fix(Core): Fixed a few crashes/bugs that were found via static code analysis (#2617)

This commit is contained in:
Kaev
2020-01-25 14:26:38 +01:00
committed by Stoabrogga
parent 1bbe10dc33
commit 999d588c37
21 changed files with 80 additions and 59 deletions

View File

@@ -220,16 +220,20 @@ public:
void JustSummoned(Creature *pSummoned)
{
listOfMobs.Summon(pSummoned);
if (pSummoned)
{
listOfMobs.Summon(pSummoned);
pInstance->SetData64(DATA_ADD_TRASH_MOB, pSummoned->GetGUID());
}
}
void SummonedMobDied(Creature *pSummoned)
{
listOfMobs.Despawn(pSummoned);
if (pSummoned)
{
listOfMobs.Despawn(pSummoned);
pInstance->SetData64(DATA_DELETE_TRASH_MOB, pSummoned->GetGUID());
}
}
};
};