mirror of
https://github.com/mangosfour/server.git
synced 2025-12-22 04:37:01 +00:00
[7597] Fixed crash at stealing single target auras (54648 for example)
This commit is contained in:
parent
4d42cd9e1a
commit
1ec8e1f24d
5 changed files with 46 additions and 27 deletions
|
|
@ -360,6 +360,8 @@ m_updated(false), m_isRemovedOnShapeLost(true), m_in_use(false)
|
|||
m_isPassive = IsPassiveSpell(GetId());
|
||||
m_positive = IsPositiveEffect(GetId(), m_effIndex);
|
||||
|
||||
m_isSingleTargetAura = IsSingleTargetSpell(m_spellProto);
|
||||
|
||||
m_applyTime = time(NULL);
|
||||
|
||||
int32 damage;
|
||||
|
|
@ -6742,3 +6744,21 @@ void Aura::HandlePhase(bool apply, bool Real)
|
|||
m_target->SetVisibility(m_target->GetVisibility());
|
||||
}
|
||||
|
||||
void Aura::UnregisterSingleCastAura()
|
||||
{
|
||||
if (IsSingleTarget())
|
||||
{
|
||||
Unit* caster = NULL;
|
||||
caster = GetCaster();
|
||||
if(caster)
|
||||
{
|
||||
caster->GetSingleCastAuras().remove(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog.outError("Couldn't find the caster of the single target aura, may crash later!");
|
||||
assert(false);
|
||||
}
|
||||
m_isSingleTargetAura = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue