mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 19:37:02 +00:00
Merge commit 'origin/master' into 310 (at [7360])
This commit is contained in:
commit
ce8bd43bef
69 changed files with 2352 additions and 1751 deletions
|
|
@ -2067,6 +2067,22 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
|||
m_modifier.m_amount = caster->SpellHealingBonus(m_target, GetSpellProto(), m_modifier.m_amount, SPELL_DIRECT_DAMAGE);
|
||||
return;
|
||||
}
|
||||
|
||||
// some auras applied at aura apply
|
||||
if(GetEffIndex()==0 && m_target->GetTypeId()==TYPEID_PLAYER)
|
||||
{
|
||||
SpellAreaForAreaMapBounds saBounds = spellmgr.GetSpellAreaForAuraMapBounds(GetId());
|
||||
if(saBounds.first != saBounds.second)
|
||||
{
|
||||
uint32 zone = m_target->GetZoneId();
|
||||
uint32 area = m_target->GetAreaId();
|
||||
|
||||
for(SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
|
||||
if(itr->second->autocast && itr->second->IsFitToRequirements((Player*)m_target,zone,area))
|
||||
if( !m_target->HasAura(itr->second->spellId,0) )
|
||||
m_target->CastSpell(m_target,itr->second->spellId,true);
|
||||
}
|
||||
}
|
||||
}
|
||||
// AT REMOVE
|
||||
else
|
||||
|
|
@ -2156,6 +2172,21 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
// some auras remove at aura remove
|
||||
if(GetEffIndex()==0 && m_target->GetTypeId()==TYPEID_PLAYER)
|
||||
{
|
||||
SpellAreaForAreaMapBounds saBounds = spellmgr.GetSpellAreaForAuraMapBounds(GetId());
|
||||
if(saBounds.first != saBounds.second)
|
||||
{
|
||||
uint32 zone = m_target->GetZoneId();
|
||||
uint32 area = m_target->GetAreaId();
|
||||
|
||||
for(SpellAreaForAreaMap::const_iterator itr = saBounds.first; itr != saBounds.second; ++itr)
|
||||
if(!itr->second->IsFitToRequirements((Player*)m_target,zone,area))
|
||||
m_target->RemoveAurasDueToSpell(itr->second->spellId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// AT APPLY & REMOVE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue