mirror of
https://github.com/mangosfour/server.git
synced 2025-12-20 16:37:04 +00:00
[10445] Re-implement in more safe way single cast spell targets system.
It also fix case when target can unexpected lost single target aura at phase switch in case when target still visible in new phase (pet for example)
This commit is contained in:
parent
6e6936c321
commit
dfc9966d3b
4 changed files with 68 additions and 53 deletions
|
|
@ -8886,14 +8886,8 @@ void SpellAuraHolder::UnregisterSingleCastHolder()
|
|||
if (IsSingleTarget())
|
||||
{
|
||||
if(Unit* caster = GetCaster())
|
||||
{
|
||||
caster->GetSingleCastSpellAuraHolders().remove(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog.outError("Couldn't find the caster of the single target aura (SpellId %u), may crash later!", GetId());
|
||||
MANGOS_ASSERT(false);
|
||||
}
|
||||
caster->GetSingleCastSpellTargets().erase(GetSpellProto());
|
||||
|
||||
m_isSingleTarget = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue