mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Unit: Restore function of HandleKillPlayer after bf107e0581
* also fix build
This commit is contained in:
@@ -387,6 +387,7 @@ void BattlegroundIC::HandleKillUnit(Creature* unit, Unit* killer)
|
||||
{
|
||||
if (Player* killerPlayer = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
killerPlayer->CastSpell(killerPlayer, SPELL_DESTROYED_VEHICLE_ACHIEVEMENT, true);
|
||||
}
|
||||
}
|
||||
|
||||
void BattlegroundIC::HandleKillPlayer(Player* player, Player* killer)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user