Core/Battleground: Changed HandleKillUnit hook to accept any Unit as killer
Port From (https://github.com/TrinityCore/TrinityCore/commit/bf107e0581c58f767b21f15fe7f75cb7eac95d97)
This commit is contained in:
@@ -998,17 +998,21 @@ namespace Game.Entities
|
||||
bf.HandleKill(player, victim);
|
||||
}
|
||||
|
||||
// Battlegroundthings (do this at the end, so the death state flag will be properly set to handle in the bg.handlekill)
|
||||
if (player != null && player.InBattleground())
|
||||
// battleground things (do this at the end, so the death state flag will be properly set to handle in the bg->handlekill)
|
||||
if (attacker != null)
|
||||
{
|
||||
Battleground bg = player.GetBattleground();
|
||||
if (bg != null)
|
||||
BattlegroundMap bgMap = victim.GetMap().ToBattlegroundMap();
|
||||
if (bgMap != null)
|
||||
{
|
||||
Player playerVictim = victim.ToPlayer();
|
||||
if (playerVictim != null)
|
||||
bg.HandleKillPlayer(playerVictim, player);
|
||||
else
|
||||
bg.HandleKillUnit(victim.ToCreature(), player);
|
||||
Battleground bg = bgMap.GetBG();
|
||||
if (bg != null)
|
||||
{
|
||||
Player playerVictim = victim.ToPlayer();
|
||||
if (playerVictim != null)
|
||||
bg.HandleKillPlayer(playerVictim, player);
|
||||
else
|
||||
bg.HandleKillUnit(victim.ToCreature(), player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user