mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[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:
parent
d2dadbcb99
commit
36605805b4
7 changed files with 72 additions and 29 deletions
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue