mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[8023] Move guardian list at Unit level and unsummon guardians at owner-creature death/unload.
This expected to fix well known crash at intances unload with creature with summoned guardians. Note: this "fix" special case but not original source of problem in general.
This commit is contained in:
parent
02a71edb86
commit
309ac7ead0
6 changed files with 56 additions and 46 deletions
|
|
@ -3711,8 +3711,7 @@ void Spell::EffectSummonGuardian(uint32 i)
|
|||
|
||||
spawnCreature->AIM_Initialize();
|
||||
|
||||
if(m_caster->GetTypeId()==TYPEID_PLAYER)
|
||||
((Player*)m_caster)->AddGuardian(spawnCreature);
|
||||
m_caster->AddGuardian(spawnCreature);
|
||||
|
||||
map->Add((Creature*)spawnCreature);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue