AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
OutdoorPvPNA.cpp File Reference
#include "OutdoorPvPNA.h"
#include "CreatureScript.h"
#include "GameGraveyard.h"
#include "GridNotifiers.h"
#include "Language.h"
#include "MapMgr.h"
#include "ObjectMgr.h"
#include "OutdoorPvPMgr.h"
#include "OutdoorPvPScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
#include "World.h"
#include "WorldPacket.h"

Go to the source code of this file.

Classes

class  OutdoorPvP_nagrand
 
struct  outdoorpvp_na_halaa_creatures
 

Functions

void UpdateCreatureHalaa (ObjectGuid::LowType spawnId, Map *map, float x, float y)
 
void FlagPlayerPvP (Player *player)
 
void AddSC_outdoorpvp_na ()
 

Variables

HalaaNPCS halaaNPCHorde
 
HalaaNPCS halaaNPCAlly
 

Function Documentation

◆ AddSC_outdoorpvp_na()

void AddSC_outdoorpvp_na ( )
927{
928 new OutdoorPvP_nagrand();
930}
#define RegisterCreatureAI(ai_name)
Definition: CreatureScript.h:71
Definition: OutdoorPvPNA.cpp:878
Definition: OutdoorPvPNA.cpp:889

References RegisterCreatureAI.

Referenced by AddOutdoorPvPScripts().

◆ FlagPlayerPvP()

void FlagPlayerPvP ( Player player)
396{
398 player->UpdatePvP(true, true);
399}
@ PLAYER_FLAGS_IN_PVP
Definition: Player.h:483
void SetPlayerFlag(PlayerFlags flags)
Definition: Player.h:1109
void UpdatePvP(bool state, bool _override=false)
Definition: PlayerUpdates.cpp:1483

References PLAYER_FLAGS_IN_PVP, Player::SetPlayerFlag(), and Player::UpdatePvP().

Referenced by OPvPCapturePointNA::HandleCustomSpell(), and OPvPCapturePointNA::HandleOpenGo().

◆ UpdateCreatureHalaa()

void UpdateCreatureHalaa ( ObjectGuid::LowType  spawnId,
Map map,
float  x,
float  y 
)
85{
86 CreatureData& data = sObjectMgr->NewOrExistCreatureData(spawnId);
87
88 sObjectMgr->AddCreatureToGrid(spawnId, &data);
89
90 // Spawn if necessary (loaded grids only)
91 if (!map->Instanceable() && !map->IsRemovalGrid(x, y))
92 {
93 Creature* creature = new Creature();
94 if (!creature->LoadCreatureFromDB(spawnId, map, true, true))
95 {
96 LOG_ERROR("sql.sql", "AddCreature: Cannot add creature spawnId {} to map", spawnId);
97 delete creature;
98 return;
99 }
100 }
101}
#define LOG_ERROR(filterType__,...)
Definition: Log.h:157
#define sObjectMgr
Definition: ObjectMgr.h:1635
Definition: Creature.h:43
bool LoadCreatureFromDB(ObjectGuid::LowType guid, Map *map, bool addToMap=true, bool allowDuplicate=false)
Definition: Creature.cpp:1692
Definition: CreatureData.h:370
bool IsRemovalGrid(float x, float y) const
Definition: Map.h:361
bool Instanceable() const
Definition: Map.h:445

References Map::Instanceable(), Map::IsRemovalGrid(), Creature::LoadCreatureFromDB(), LOG_ERROR, and sObjectMgr.

Referenced by OPvPCapturePointNA::SpawnNPCsForTeam().

Variable Documentation

◆ halaaNPCAlly

◆ halaaNPCHorde