mirror of
https://github.com/mangosfour/server.git
synced 2025-12-24 19:37:07 +00:00
Add Outdoor PvP handlers to various files
This commit is contained in:
parent
525ec3ea4c
commit
e955c3bc8f
6 changed files with 68 additions and 4 deletions
|
|
@ -52,6 +52,7 @@
|
|||
#include "BattleGround.h"
|
||||
#include "BattleGroundAV.h"
|
||||
#include "BattleGroundMgr.h"
|
||||
#include "OutdoorPvP/OutdoorPvP.h"
|
||||
#include "ArenaTeam.h"
|
||||
#include "Chat.h"
|
||||
#include "Database/DatabaseImpl.h"
|
||||
|
|
@ -621,6 +622,10 @@ void Player::CleanupsBeforeDelete()
|
|||
TradeCancel(false);
|
||||
DuelComplete(DUEL_INTERUPTED);
|
||||
}
|
||||
|
||||
// notify zone scripts for player logout
|
||||
sOutdoorPvPMgr.HandlePlayerLeaveZone(this, m_zoneUpdateId);
|
||||
|
||||
Unit::CleanupsBeforeDelete();
|
||||
}
|
||||
|
||||
|
|
@ -6870,6 +6875,10 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea)
|
|||
|
||||
if (m_zoneUpdateId != newZone)
|
||||
{
|
||||
// handle outdoor pvp zones
|
||||
sOutdoorPvPMgr.HandlePlayerLeaveZone(this, m_zoneUpdateId);
|
||||
sOutdoorPvPMgr.HandlePlayerEnterZone(this, newZone);
|
||||
|
||||
SendInitWorldStates(newZone, newArea); // only if really enters to new zone, not just area change, works strange...
|
||||
|
||||
if (sWorld.getConfig(CONFIG_BOOL_WEATHER))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue