Example #1
0
/**
   Function that handles the players which enters a specific zone

   @param   player to be handled in the event
   @param   zone id used for the current outdoor pvp script
 */
void OutdoorPvPMgr::HandlePlayerEnterZone(Player* player, uint32 zoneId)
{
    if (OutdoorPvP* script = GetScript(zoneId))
        script->HandlePlayerEnterZone(player, true);
    else if (OutdoorPvP* script = GetScriptOfAffectedZone(zoneId))
        script->HandlePlayerEnterZone(player, false);
}
Example #2
0
/**
   Function that handles the player who leaves a specific zone

   @param   player to be handled in the event
   @param   zone id used for the current outdoor pvp script
 */
void OutdoorPvPMgr::HandlePlayerLeaveZone(Player* player, uint32 zoneId)
{
    // teleport: called once from Player::CleanupsBeforeDelete, once from Player::UpdateZone
    if (OutdoorPvP* script = GetScript(zoneId))
        script->HandlePlayerLeaveZone(player, true);
    else if (OutdoorPvP* script = GetScriptOfAffectedZone(zoneId))
        script->HandlePlayerLeaveZone(player, false);
}
Example #3
0
/**
   Function that handles the players which enters a specific zone

   @param   player to be handled in the event
   @param   zone id used for the current outdoor pvp script
 */
void OutdoorPvPMgr::HandlePlayerEnterZone(Player* player, uint32 zoneId)
{
    OutdoorPvP* script = GetScript(zoneId);
    if (script)
        { script->HandlePlayerEnterZone(player, true); }
    else
    {
        script = GetScriptOfAffectedZone(zoneId);
        if (script)
            { script->HandlePlayerEnterZone(player, false); }
    }
}