mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 19:37:02 +00:00
Merge commit 'origin/master' into 320
This commit is contained in:
commit
48a470dfc1
23 changed files with 471 additions and 193 deletions
|
|
@ -2198,6 +2198,21 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
|||
bg->RemovePlayerFromResurrectQueue(m_target->GetGUID());
|
||||
return;
|
||||
}
|
||||
case 36730: // Flame Strike
|
||||
{
|
||||
m_target->CastSpell(m_target, 36731, true, NULL, this);
|
||||
return;
|
||||
}
|
||||
case 44191: // Flame Strike
|
||||
{
|
||||
if (m_target->GetMap()->IsDungeon())
|
||||
{
|
||||
uint32 spellId = m_target->GetMap()->IsHeroic() ? 46163 : 44190;
|
||||
|
||||
m_target->CastSpell(m_target, spellId, true, NULL, this);
|
||||
}
|
||||
return;
|
||||
}
|
||||
case 45934: // Dark Fiend
|
||||
{
|
||||
// Kill target if dispelled
|
||||
|
|
@ -2389,6 +2404,19 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
|||
((Player*)m_target)->AddSpellMod(m_spellmod, apply);
|
||||
return;
|
||||
}
|
||||
case 52610: // Savage Roar
|
||||
{
|
||||
if(apply)
|
||||
{
|
||||
if(m_target->m_form != FORM_CAT)
|
||||
return;
|
||||
|
||||
m_target->CastSpell(m_target, 62071, true);
|
||||
}
|
||||
else
|
||||
m_target-> RemoveAurasDueToSpell(62071);
|
||||
return;
|
||||
}
|
||||
case 61336: // Survival Instincts
|
||||
{
|
||||
if(apply)
|
||||
|
|
@ -2450,6 +2478,32 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
|||
((Player*)m_target)->UpdateAttackPowerAndDamage();
|
||||
return;
|
||||
}
|
||||
|
||||
// Improved Moonkin Form
|
||||
if(GetSpellProto()->SpellIconID == 2855)
|
||||
{
|
||||
uint32 spell_id;
|
||||
switch(GetId())
|
||||
{
|
||||
case 48384: spell_id = 50170; //Rank 1
|
||||
case 48395: spell_id = 50171; //Rank 2
|
||||
case 48396: spell_id = 50172; //Rank 3
|
||||
default:
|
||||
sLog.outError("HandleAuraDummy: Not handled rank of IMF (Spell: %u)",GetId());
|
||||
return;
|
||||
}
|
||||
|
||||
if(apply)
|
||||
{
|
||||
if(m_target->m_form != FORM_MOONKIN)
|
||||
return;
|
||||
|
||||
m_target->CastSpell(m_target, spell_id, true);
|
||||
}
|
||||
else
|
||||
m_target-> RemoveAurasDueToSpell(spell_id);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_HUNTER:
|
||||
|
|
@ -2721,10 +2775,12 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real)
|
|||
{
|
||||
SpellEntry const* aurSpellInfo = (*iter)->GetSpellProto();
|
||||
|
||||
uint32 aurMechMask = GetAllSpellMechanicMask(aurSpellInfo);
|
||||
|
||||
// If spell that caused this aura has Croud Control or Daze effect
|
||||
if((GetAllSpellMechanicMask(aurSpellInfo) & MECHANIC_NOT_REMOVED_BY_SHAPESHIFT) ||
|
||||
// some Daze spells have these parameters instead of MECHANIC_DAZE
|
||||
(aurSpellInfo->SpellIconID == 15 && aurSpellInfo->Dispel == 0))
|
||||
if((aurMechMask & MECHANIC_NOT_REMOVED_BY_SHAPESHIFT) ||
|
||||
// some Daze spells have these parameters instead of MECHANIC_DAZE (skip snare spells)
|
||||
aurSpellInfo->SpellIconID == 15 && aurSpellInfo->Dispel == 0 && (aurMechMask & (1 << MECHANIC_SNARE))==0)
|
||||
{
|
||||
++iter;
|
||||
continue;
|
||||
|
|
@ -5366,7 +5422,9 @@ void Aura::HandleShapeshiftBoosts(bool apply)
|
|||
uint32 HotWSpellId = 0;
|
||||
uint32 MasterShaperSpellId = 0;
|
||||
|
||||
switch(GetModifier()->m_miscvalue)
|
||||
uint32 form = GetModifier()->m_miscvalue;
|
||||
|
||||
switch(form)
|
||||
{
|
||||
case FORM_CAT:
|
||||
spellId = 3025;
|
||||
|
|
@ -5438,8 +5496,6 @@ void Aura::HandleShapeshiftBoosts(bool apply)
|
|||
break;
|
||||
}
|
||||
|
||||
uint32 form = GetModifier()->m_miscvalue-1;
|
||||
|
||||
if(apply)
|
||||
{
|
||||
if (spellId) m_target->CastSpell(m_target, spellId, true, NULL, this );
|
||||
|
|
@ -5455,7 +5511,7 @@ void Aura::HandleShapeshiftBoosts(bool apply)
|
|||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
|
||||
if (!spellInfo || !(spellInfo->Attributes & (SPELL_ATTR_PASSIVE | (1<<7))))
|
||||
continue;
|
||||
if (spellInfo->Stances & (1<<form))
|
||||
if (spellInfo->Stances & (1<<(form-1)))
|
||||
m_target->CastSpell(m_target, itr->first, true, NULL, this);
|
||||
}
|
||||
|
||||
|
|
@ -5478,10 +5534,41 @@ void Aura::HandleShapeshiftBoosts(bool apply)
|
|||
if (((Player*)m_target)->HasSpell(17007))
|
||||
{
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(24932);
|
||||
if (spellInfo && spellInfo->Stances & (1<<form))
|
||||
if (spellInfo && spellInfo->Stances & (1<<(form-1)))
|
||||
m_target->CastSpell(m_target, 24932, true, NULL, this);
|
||||
}
|
||||
|
||||
// Savage Roar
|
||||
if (form == FORM_CAT && ((Player*)m_target)->HasAura(52610))
|
||||
m_target->CastSpell(m_target, 62071, true);
|
||||
|
||||
// Improved Moonkin Form
|
||||
if (form == FORM_MOONKIN)
|
||||
{
|
||||
Unit::AuraList const& dummyAuras = m_target->GetAurasByType(SPELL_AURA_DUMMY);
|
||||
for(Unit::AuraList::const_iterator i = dummyAuras.begin(); i != dummyAuras.end(); i++)
|
||||
{
|
||||
if ((*i)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_DRUID &&
|
||||
(*i)->GetSpellProto()->SpellIconID == 2855)
|
||||
{
|
||||
uint32 spell_id = 0;
|
||||
switch((*i)->GetId())
|
||||
{
|
||||
case 48384:spell_id=50170;break;//Rank 1
|
||||
case 48395:spell_id=50171;break;//Rank 2
|
||||
case 48396:spell_id=50172;break;//Rank 3
|
||||
default:
|
||||
sLog.outError("Aura::HandleShapeshiftBoosts: Not handled rank of IMF (Spell: %u)",(*i)->GetId());
|
||||
break;
|
||||
}
|
||||
|
||||
if(spell_id)
|
||||
m_target->CastSpell(m_target, spell_id, true, NULL, this);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Heart of the Wild
|
||||
if (HotWSpellId)
|
||||
{
|
||||
|
|
@ -5519,9 +5606,6 @@ void Aura::HandleShapeshiftBoosts(bool apply)
|
|||
++itr;
|
||||
}
|
||||
}
|
||||
|
||||
/*double healthPercentage = (double)m_target->GetHealth() / (double)m_target->GetMaxHealth();
|
||||
m_target->SetHealth(uint32(ceil((double)m_target->GetMaxHealth() * healthPercentage)));*/
|
||||
}
|
||||
|
||||
void Aura::HandleSpellSpecificBoosts(bool apply)
|
||||
|
|
@ -5610,15 +5694,18 @@ void Aura::HandleSpellSpecificBoosts(bool apply)
|
|||
return;
|
||||
}
|
||||
|
||||
// prevent aura deletion, specially in multi-boost case
|
||||
SetInUse(true);
|
||||
|
||||
if (apply)
|
||||
{
|
||||
if (spellId1)
|
||||
m_target->CastSpell(m_target, spellId1, true, NULL, this);
|
||||
if (spellId2)
|
||||
if (spellId2 && !IsDeleted())
|
||||
m_target->CastSpell(m_target, spellId2, true, NULL, this);
|
||||
if (spellId3)
|
||||
if (spellId3 && !IsDeleted())
|
||||
m_target->CastSpell(m_target, spellId3, true, NULL, this);
|
||||
if (spellId4)
|
||||
if (spellId4 && !IsDeleted())
|
||||
m_target->CastSpell(m_target, spellId4, true, NULL, this);
|
||||
}
|
||||
else
|
||||
|
|
@ -5632,6 +5719,8 @@ void Aura::HandleSpellSpecificBoosts(bool apply)
|
|||
if (spellId4)
|
||||
m_target->RemoveAurasByCasterSpell(spellId4, GetCasterGUID());
|
||||
}
|
||||
|
||||
SetInUse(false);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraEmpathy(bool apply, bool /*Real*/)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue