[8218] Final part of talent 17962 and ranks fixes.

* Support correct aura state at server set for different casters effects
* Correctly check this telent (per caster) aura state at cast
* Correctly show per-caster aura state for cleitns.
This commit is contained in:
VladimirMangos 2009-07-20 11:43:33 +04:00
parent d2dadbcb99
commit 36605805b4
7 changed files with 72 additions and 29 deletions

View file

@ -7456,6 +7456,34 @@ void Unit::RemoveAllAttackers()
}
}
bool Unit::HasAuraStateForCaster(AuraState flag, uint64 caster) const
{
if(!HasAuraState(flag))
return false;
// single per-caster aura state
if(flag == AURA_STATE_CONFLAGRATE)
{
Unit::AuraList const& dotList = GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
for(Unit::AuraList::const_iterator i = dotList.begin(); i != dotList.end(); ++i)
{
if ((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK &&
(*i)->GetCasterGUID() == caster &&
// Immolate
(((*i)->GetSpellProto()->SpellFamilyFlags & UI64LIT(0x0000000000000004)) ||
// Shadowflame
((*i)->GetSpellProto()->SpellFamilyFlags2 & 0x00000002)))
{
return true;
}
}
return false;
}
return true;
}
void Unit::ModifyAuraState(AuraState flag, bool apply)
{
if (apply)
@ -7508,7 +7536,6 @@ void Unit::ModifyAuraState(AuraState flag, bool apply)
}
}
}
Unit *Unit::GetOwner() const
{
if(uint64 ownerid = GetOwnerGUID())