mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[12152] Remove unused argument from OutdoorPvP::HandlePlayerKillInsideArea
This commit is contained in:
parent
f2cf0bcd19
commit
a53ac2aca7
10 changed files with 33 additions and 30 deletions
|
|
@ -78,7 +78,7 @@ void OutdoorPvP::SendUpdateWorldState(uint32 field, uint32 value)
|
|||
@param player who killed another player
|
||||
@param victim who was killed
|
||||
*/
|
||||
void OutdoorPvP::HandlePlayerKill(Player* killer, Unit* victim)
|
||||
void OutdoorPvP::HandlePlayerKill(Player* killer, Player* victim)
|
||||
{
|
||||
if (Group* group = killer->GetGroup())
|
||||
{
|
||||
|
|
@ -96,14 +96,14 @@ void OutdoorPvP::HandlePlayerKill(Player* killer, Unit* victim)
|
|||
// creature kills must be notified, even if not inside objective / not outdoor pvp active
|
||||
// player kills only count if active and inside objective
|
||||
if (groupMember->CanUseOutdoorCapturePoint())
|
||||
HandlePlayerKillInsideArea(groupMember, victim);
|
||||
HandlePlayerKillInsideArea(groupMember);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// creature kills must be notified, even if not inside objective / not outdoor pvp active
|
||||
if (killer && killer->CanUseOutdoorCapturePoint())
|
||||
HandlePlayerKillInsideArea(killer, victim);
|
||||
HandlePlayerKillInsideArea(killer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@ class OutdoorPvP
|
|||
// update - called by the OutdoorPvPMgr
|
||||
virtual void Update(uint32 /*diff*/) {}
|
||||
|
||||
// handle npc/player kill
|
||||
void HandlePlayerKill(Player* killer, Unit* victim);
|
||||
// Handle player kill
|
||||
void HandlePlayerKill(Player* killer, Player* victim);
|
||||
|
||||
protected:
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ class OutdoorPvP
|
|||
virtual void SendRemoveWorldStates(Player* /*player*/) {}
|
||||
|
||||
// handle npc/player kill
|
||||
virtual void HandlePlayerKillInsideArea(Player* /*killer*/, Unit* /*victim*/) {}
|
||||
virtual void HandlePlayerKillInsideArea(Player* /*killer*/) {}
|
||||
|
||||
// send world state update to all players present
|
||||
void SendUpdateWorldState(uint32 field, uint32 value);
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ void OutdoorPvPHP::HandleObjectiveComplete(uint32 eventId, std::list<Player*> pl
|
|||
}
|
||||
|
||||
// Cast player spell on opponent kill
|
||||
void OutdoorPvPHP::HandlePlayerKillInsideArea(Player* player, Unit* /*victim*/)
|
||||
void OutdoorPvPHP::HandlePlayerKillInsideArea(Player* player)
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_HP_TOWERS; ++i)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ class OutdoorPvPHP : public OutdoorPvP
|
|||
void HandleObjectiveComplete(uint32 eventId, std::list<Player*> players, Team team) override;
|
||||
|
||||
void HandleGameObjectCreate(GameObject* go) override;
|
||||
void HandlePlayerKillInsideArea(Player* player, Unit* victim) override;
|
||||
void HandlePlayerKillInsideArea(Player* player) override;
|
||||
|
||||
private:
|
||||
// process capture events
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ void OutdoorPvPNA::HandleObjectiveComplete(uint32 eventId, std::list<Player*> pl
|
|||
}
|
||||
|
||||
// Cast player spell on opponent kill
|
||||
void OutdoorPvPNA::HandlePlayerKillInsideArea(Player* player, Unit* /*victim*/)
|
||||
void OutdoorPvPNA::HandlePlayerKillInsideArea(Player* player)
|
||||
{
|
||||
if (GameObject* capturePoint = player->GetMap()->GetGameObject(m_capturePoint))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ class OutdoorPvPNA : public OutdoorPvP
|
|||
void HandleGameObjectCreate(GameObject* go) override;
|
||||
void HandleCreatureDeath(Creature* creature) override;
|
||||
|
||||
void HandlePlayerKillInsideArea(Player* player, Unit* victim) override;
|
||||
void HandlePlayerKillInsideArea(Player* player) override;
|
||||
bool HandleGameObjectUse(Player* player, GameObject* go) override;
|
||||
void Update(uint32 diff) override;
|
||||
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ void OutdoorPvPZM::HandleGameObjectCreate(GameObject* go)
|
|||
}
|
||||
|
||||
// Cast player spell on opponent kill
|
||||
void OutdoorPvPZM::HandlePlayerKillInsideArea(Player* player, Unit* /*victim*/)
|
||||
void OutdoorPvPZM::HandlePlayerKillInsideArea(Player* player)
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ZM_TOWERS; ++i)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ class OutdoorPvPZM : public OutdoorPvP
|
|||
void HandleCreatureCreate(Creature* creature) override;
|
||||
void HandleGameObjectCreate(GameObject* go) override;
|
||||
|
||||
void HandlePlayerKillInsideArea(Player* player, Unit* victim) override;
|
||||
void HandlePlayerKillInsideArea(Player* player) override;
|
||||
bool HandleGameObjectUse(Player* player, GameObject* go) override;
|
||||
//bool HandleDropFlag(Player* player, uint32 spellId) override;
|
||||
|
||||
|
|
|
|||
|
|
@ -1114,28 +1114,31 @@ uint32 Unit::DealDamage(Unit* pVictim, uint32 damage, CleanDamage const* cleanDa
|
|||
he->DuelComplete(DUEL_INTERUPTED);
|
||||
}
|
||||
|
||||
// handle player kill in outdoor pvp
|
||||
if (player_tap && pVictim->GetTypeId() == TYPEID_PLAYER && pVictim != this)
|
||||
{
|
||||
if (OutdoorPvP* outdoorPvP = sOutdoorPvPMgr.GetScript(player_tap->GetCachedZoneId()))
|
||||
outdoorPvP->HandlePlayerKill(player_tap, pVictim);
|
||||
}
|
||||
|
||||
// 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())
|
||||
{
|
||||
Player* killed = ((Player*)pVictim);
|
||||
if (BattleGround* bg = killed->GetBattleGround())
|
||||
// handle player/npc kill in battleground or outdoor pvp script
|
||||
if (player_tap)
|
||||
{
|
||||
if (pVictim->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
Player* killed = (Player*)pVictim;
|
||||
if (killed->InBattleGround())
|
||||
{
|
||||
if (BattleGround* bg = killed->GetBattleGround())
|
||||
bg->HandleKillPlayer(killed, player_tap);
|
||||
}
|
||||
else if (pVictim != this)
|
||||
{
|
||||
// selfkills are not handled in outdoor pvp scripts
|
||||
if (OutdoorPvP* outdoorPvP = sOutdoorPvPMgr.GetScript(player_tap->GetCachedZoneId()))
|
||||
outdoorPvP->HandlePlayerKill(player_tap, killed);
|
||||
}
|
||||
}
|
||||
else if (pVictim->GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
if (player_tap)
|
||||
if (BattleGround* bg = player_tap->GetBattleGround())
|
||||
bg->HandleKillUnit((Creature*)pVictim, player_tap);
|
||||
}
|
||||
}
|
||||
}
|
||||
else // if (health <= damage)
|
||||
{
|
||||
DEBUG_FILTER_LOG(LOG_FILTER_DAMAGE, "DealDamageAlive");
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12151"
|
||||
#define REVISION_NR "12152"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue