Core/Creature: ported assert crashfix that fixes a focus related crash that was happening when dismissing a warlock pet while it was casting a spell

This commit is contained in:
Ovahlord committed 2019-09-02 00:36:34 +02:00
1 parent d78d787292
commit 1f78a55f20
2 files changed
+6 -7

No files matched your search

+1 -6
View File
@@ -261,17 +261,12 @@ void WorldSession::HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spe
if (pet->IsPet())
{
if (((Pet*)pet)->IsHunterPet())
{
GetPlayer()->RemovePet((Pet*)pet, PET_SAVE_AS_DELETED);
}
else
//dismissing a summoned pet is like killing them (this prevents returning a soulshard...)
pet->setDeathState(CORPSE);
GetPlayer()->RemovePet((Pet*)pet, PET_SAVE_DISMISS);
}
else if (pet->HasUnitTypeMask(UNIT_MASK_MINION))
{
((Minion*)pet)->UnSummon();
}
}
break;
case COMMAND_MOVE_TO: