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:
1 parent
d78d787292
commit
1f78a55f20
2 files changed
+6
-7
No files matched your search
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user