mirror of
https://github.com/mangosfour/server.git
synced 2025-12-29 07:37:05 +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
|
|
@ -38,6 +38,7 @@
|
|||
#include "Creature.h"
|
||||
#include "Formulas.h"
|
||||
#include "BattleGround.h"
|
||||
#include "OutdoorPvP/OutdoorPvP.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "Util.h"
|
||||
|
|
@ -5194,8 +5195,11 @@ void Aura::HandleAuraModEffectImmunity(bool apply, bool /*Real*/)
|
|||
if( !apply && target->GetTypeId() == TYPEID_PLAYER
|
||||
&& (GetSpellProto()->GetAuraInterruptFlags() & AURA_INTERRUPT_FLAG_IMMUNE_OR_LOST_SELECTION) )
|
||||
{
|
||||
if (BattleGround* bg = ((Player*)target)->GetBattleGround())
|
||||
bg->EventPlayerDroppedFlag(((Player*)target));
|
||||
Player* player = (Player*)target;
|
||||
if (BattleGround* bg = player->GetBattleGround())
|
||||
bg->EventPlayerDroppedFlag(player);
|
||||
else if (OutdoorPvP* outdoorPvP = sOutdoorPvPMgr.GetScript(player->GetCachedZoneId()))
|
||||
outdoorPvP->HandleDropFlag(player, GetSpellProto()->Id);
|
||||
}
|
||||
|
||||
target->ApplySpellImmune(GetId(), IMMUNITY_EFFECT, m_modifier.m_miscvalue, apply);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue