Core/Unit: Restore function of HandleKillPlayer after bf107e0581

* also fix build
This commit is contained in:
ModoX
2024-01-01 03:33:17 +01:00
parent bf107e0581
commit 78012dadf2
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -10957,7 +10957,10 @@ void Unit::SetMeleeAnimKitId(uint16 animKitId)
if (Battleground* bg = bgMap->GetBG())
{
if (Player* playerVictim = victim->ToPlayer())
bg->HandleKillPlayer(playerVictim, player);
{
if (player)
bg->HandleKillPlayer(playerVictim, player);
}
else
bg->HandleKillUnit(victim->ToCreature(), attacker);
}