*Alterac Valley. By Bogie and Balrok. Note: some core contents are modified. Will fix them later. Some sql are disabled because of possible conflict with offical DB. Use them at your own risk.
--HG-- branch : trunk
This commit is contained in:
1 parent
b2ba78e57a
commit
fa667cf450
15 files changed
+3746
-179
No files matched your search
+6
-13
@@ -829,22 +829,15 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
|
||||
}
|
||||
|
||||
// battleground things (do this at the end, so the death state flag will be properly set to handle in the bg->handlekill)
|
||||
if(pVictim->GetTypeId() == TYPEID_PLAYER && (((Player*)pVictim)->InBattleGround()))
|
||||
if(player && player->InBattleGround())
|
||||
{
|
||||
Player *killed = ((Player*)pVictim);
|
||||
Player *killer = NULL;
|
||||
if(GetTypeId() == TYPEID_PLAYER)
|
||||
killer = ((Player*)this);
|
||||
else if(GetTypeId() == TYPEID_UNIT && ((Creature*)this)->isPet())
|
||||
if(BattleGround *bg = player->GetBattleGround())
|
||||
{
|
||||
Unit *owner = GetOwner();
|
||||
if(owner && owner->GetTypeId() == TYPEID_PLAYER)
|
||||
killer = ((Player*)owner);
|
||||
if(pVictim->GetTypeId() == TYPEID_PLAYER)
|
||||
bg->HandleKillPlayer((Player*)pVictim, player);
|
||||
else
|
||||
bg->HandleKillUnit((Creature*)pVictim, player);
|
||||
}
|
||||
|
||||
if(killer)
|
||||
if(BattleGround *bg = killed->GetBattleGround())
|
||||
bg->HandleKillPlayer(killed, killer); // drop flags and etc
|
||||
}
|
||||
}
|
||||
else // if (health <= damage)
|
||||
|
||||
Reference in new issue
Block a user