TrinityCore
Loading...
Searching...
No Matches
battleground_alterac_valley Struct Reference
+ Inheritance diagram for battleground_alterac_valley:

Public Types

enum  QuestIds {
  AV_QUEST_A_SCRAPS1 = 7223 , AV_QUEST_A_SCRAPS2 = 6781 , AV_QUEST_H_SCRAPS1 = 7224 , AV_QUEST_H_SCRAPS2 = 6741 ,
  AV_QUEST_A_COMMANDER1 = 6942 , AV_QUEST_H_COMMANDER1 = 6825 , AV_QUEST_A_COMMANDER2 = 6941 , AV_QUEST_H_COMMANDER2 = 6826 ,
  AV_QUEST_A_COMMANDER3 = 6943 , AV_QUEST_H_COMMANDER3 = 6827 , AV_QUEST_A_BOSS1 = 7386 , AV_QUEST_H_BOSS1 = 7385 ,
  AV_QUEST_A_BOSS2 = 6881 , AV_QUEST_H_BOSS2 = 6801 , AV_QUEST_A_NEAR_MINE = 5892 , AV_QUEST_H_NEAR_MINE = 5893 ,
  AV_QUEST_A_OTHER_MINE = 6982 , AV_QUEST_H_OTHER_MINE = 6985 , AV_QUEST_A_RIDER_HIDE = 7026 , AV_QUEST_H_RIDER_HIDE = 7002 ,
  AV_QUEST_A_RIDER_TAME = 7027 , AV_QUEST_H_RIDER_TAME = 7001
}
 
enum  Data : uint32 { DATA_DEFENDER_TIER_HORDE = 1 , DATA_DEFENDER_TIER_ALLIANCE = 2 }
 
enum  DefenderTier : uint32 { BG_AV_DEFENDER_TIER_DEFENDER , BG_AV_DEFENDER_TIER_SEASONED , BG_AV_DEFENDER_TIER_VETERAN , BG_AV_DEFENDER_TIER_CHAMPION }
 
enum  PvpStats {
  PVP_STAT_TOWERS_ASSAULTED = 61 , PVP_STAT_GRAVEYARDS_ASSAULTED = 63 , PVP_STAT_TOWERS_DEFENDED = 64 , PVP_STAT_GRAVEYARDS_DEFENDED = 65 ,
  PVP_STAT_SECONDARY_OBJECTIVES = 82
}
 
enum  Misc { NEAR_LOSE_POINTS = 140 }
 
enum  HonorKillBonus {
  HONOR_KILL_BONUS_BOSS = 4 , HONOR_KILL_BONUS_CAPTAIN = 3 , HONOR_KILL_BONUS_SURVIVING_TOWER = 2 , HONOR_KILL_BONUS_SURVIVING_CAPTAIN = 2 ,
  HONOR_KILL_BONUS_DESTROY_TOWER = 3
}
 
enum  ReputationGains {
  REP_GAIN_BOSS = 350 , REP_GAIN_CAPTAIN = 125 , REP_GAIN_DESTROY_TOWER = 12 , REP_GAIN_SURVIVING_TOWER = 12 ,
  REP_GAIN_SURVIVING_CAPTAIN = 125
}
 
enum  ResourceLoss { RESOURCE_LOSS_TOWER = -75 , RESOURCE_LOSS_CAPTAIN = -100 }
 
enum  Spells { SPELL_COMPLETE_ALTERAC_VALLEY_QUEST = 23658 }
 
enum  Factions { FACTION_FROSTWOLF_CLAN = 729 , FACTION_STORMPIKE_GUARD = 730 }
 

Public Member Functions

 battleground_alterac_valley (BattlegroundMap *map)
 
void OnUpdate (uint32 diff) override
 
void OnPlayerKilled (Player *victim, Player *) override
 
void OnUnitKilled (Creature *victim, Unit *killer) override
 
bool IsCaptainAlive (TeamId teamId) const
 
void OnStart () override
 
void OnEnd (Team winner) override
 
void OnPlayerLeft (Player *player) override
 
void EventPlayerDestroyedPoint (GameObject *gameobject)
 
void DoAction (uint32 actionId, WorldObject *source, WorldObject *target) override
 
void ChangeMineOwner (AlteracValleyMine mine, Team team, bool initial=false)
 
void HandleInteractCapturableObject (Player *player, GameObject *target)
 
void EventPlayerDefendsPoint (Player *player, uint32 object)
 
void EventPlayerAssaultsPoint (Player *player, uint32 object)
 
void UpdateNodeWorldState (BG_AV_Nodes node) const
 
void SendMineWorldStates (AlteracValleyMine mine) const
 
void AssaultNode (BG_AV_Nodes node, Team team)
 
void DestroyNode (BG_AV_Nodes node)
 
void InitNode (BG_AV_Nodes node, Team team, bool tower)
 
void DefendNode (BG_AV_Nodes node, Team team)
 
Team GetPrematureWinner () override
 
void OnGameObjectCreate (GameObject *gameObject) override
 
void OnCreatureCreate (Creature *creature) override
 
uint32 GetData (uint32 dataId) const override
 
CreatureFindHerald (std::string_view stringId) const
 
bool IsTower (BG_AV_Nodes node) const
 
void UpdateScore (Team team, int16 points)
 
- Public Member Functions inherited from BattlegroundScript
 BattlegroundScript (BattlegroundMap *map) noexcept
 
 ~BattlegroundScript () override=default
 
virtual void OnInit ()
 
virtual void OnPrepareStage1 ()
 
virtual void OnPrepareStage2 ()
 
virtual void OnPrepareStage3 ()
 
virtual void OnPlayerJoined (Player *player, bool inBattleground)
 
void TriggerGameEvent (uint32 gameEventId, WorldObject *source=nullptr, WorldObject *target=nullptr) override
 
- Public Member Functions inherited from ZoneScript
 ZoneScript () noexcept
 
 ZoneScript (ZoneScript const &right)
 
 ZoneScript (ZoneScript &&right) noexcept
 
ZoneScriptoperator= (ZoneScript const &right)
 
ZoneScriptoperator= (ZoneScript &&right) noexcept
 
virtual ~ZoneScript ()
 
virtual uint32 GetCreatureEntry (ObjectGuid::LowType, CreatureData const *data)
 
virtual uint32 GetGameObjectEntry (ObjectGuid::LowType, uint32 entry)
 
virtual void OnCreatureRemove (Creature *)
 
virtual void OnGameObjectRemove (GameObject *)
 
virtual void OnAreaTriggerCreate (AreaTrigger *areaTrigger)
 
virtual void OnAreaTriggerRemove (AreaTrigger *areaTrigger)
 
virtual void OnUnitDeath (Unit *unit)
 
virtual void OnCreatureGroupDepleted (CreatureGroup const *creatureGroup)
 
virtual ObjectGuid GetGuidData (uint32) const
 
virtual void SetGuidData (uint32, ObjectGuid)
 
virtual uint64 GetData64 (uint32) const
 
virtual void SetData64 (uint32, uint64)
 
virtual void SetData (uint32, uint32)
 
virtual void ProcessEvent (WorldObject *obj, uint32 eventId, WorldObject *invoker)
 
virtual void OnFlagStateChange (GameObject *flagInBase, FlagState oldValue, FlagState newValue, Player *player)
 
virtual bool CanCaptureFlag (AreaTrigger *areaTrigger, Player *player)
 
virtual void OnCaptureFlag (AreaTrigger *areaTrigger, Player *player)
 
virtual void OnFlagTaken (GameObject *flag, Player *player)
 
virtual void OnFlagDropped (ObjectGuid const &flagGuid, Player *player)
 

Static Public Member Functions

static BG_AV_Nodes GetNodeThroughObject (uint32 object)
 
static StaticNodeInfo const * GetStaticNodeInfo (BG_AV_Nodes node)
 

Private Attributes

std::array< int32, PVP_TEAMS_COUNT_teamResources
 
uint32 _teamQuestStatus [PVP_TEAMS_COUNT][9]
 
std::array< BG_AV_NodeInfo, BG_AV_NODES_MAX_nodes
 
TimeTracker _mineResourceTimer
 
std::array< AlteracValleyMineInfo, 2 > _mineInfo
 
std::array< TimeTracker, PVP_TEAMS_COUNT_captainBuffTimer
 
std::array< bool, PVP_TEAMS_COUNT_isInformedNearVictory
 
GuidUnorderedSet _doorGUIDs
 
ObjectGuid _balindaGUID
 
ObjectGuid _galvangarGUID
 
GuidUnorderedSet _heraldGUIDs
 

Additional Inherited Members

- Protected Member Functions inherited from BattlegroundScript
void UpdateWorldState (int32 worldStateId, int32 value, bool hidden=false) const
 
- Protected Attributes inherited from BattlegroundScript
BattlegroundMapbattlegroundMap
 
Battlegroundbattleground
 

Detailed Description

Definition at line 477 of file battleground_alterac_valley.cpp.

Member Enumeration Documentation

◆ Data

Enumerator
DATA_DEFENDER_TIER_HORDE 
DATA_DEFENDER_TIER_ALLIANCE 

Definition at line 505 of file battleground_alterac_valley.cpp.

◆ DefenderTier

Enumerator
BG_AV_DEFENDER_TIER_DEFENDER 
BG_AV_DEFENDER_TIER_SEASONED 
BG_AV_DEFENDER_TIER_VETERAN 
BG_AV_DEFENDER_TIER_CHAMPION 

Definition at line 511 of file battleground_alterac_valley.cpp.

◆ Factions

Enumerator
FACTION_FROSTWOLF_CLAN 
FACTION_STORMPIKE_GUARD 

Definition at line 562 of file battleground_alterac_valley.cpp.

◆ HonorKillBonus

Enumerator
HONOR_KILL_BONUS_BOSS 
HONOR_KILL_BONUS_CAPTAIN 
HONOR_KILL_BONUS_SURVIVING_TOWER 
HONOR_KILL_BONUS_SURVIVING_CAPTAIN 
HONOR_KILL_BONUS_DESTROY_TOWER 

Definition at line 533 of file battleground_alterac_valley.cpp.

◆ Misc

Enumerator
NEAR_LOSE_POINTS 

Definition at line 528 of file battleground_alterac_valley.cpp.

◆ PvpStats

Enumerator
PVP_STAT_TOWERS_ASSAULTED 
PVP_STAT_GRAVEYARDS_ASSAULTED 
PVP_STAT_TOWERS_DEFENDED 
PVP_STAT_GRAVEYARDS_DEFENDED 
PVP_STAT_SECONDARY_OBJECTIVES 

Definition at line 519 of file battleground_alterac_valley.cpp.

◆ QuestIds

Enumerator
AV_QUEST_A_SCRAPS1 
AV_QUEST_A_SCRAPS2 
AV_QUEST_H_SCRAPS1 
AV_QUEST_H_SCRAPS2 
AV_QUEST_A_COMMANDER1 
AV_QUEST_H_COMMANDER1 
AV_QUEST_A_COMMANDER2 
AV_QUEST_H_COMMANDER2 
AV_QUEST_A_COMMANDER3 
AV_QUEST_H_COMMANDER3 
AV_QUEST_A_BOSS1 
AV_QUEST_H_BOSS1 
AV_QUEST_A_BOSS2 
AV_QUEST_H_BOSS2 
AV_QUEST_A_NEAR_MINE 
AV_QUEST_H_NEAR_MINE 
AV_QUEST_A_OTHER_MINE 
AV_QUEST_H_OTHER_MINE 
AV_QUEST_A_RIDER_HIDE 
AV_QUEST_H_RIDER_HIDE 
AV_QUEST_A_RIDER_TAME 
AV_QUEST_H_RIDER_TAME 

Definition at line 479 of file battleground_alterac_valley.cpp.

◆ ReputationGains

Enumerator
REP_GAIN_BOSS 
REP_GAIN_CAPTAIN 
REP_GAIN_DESTROY_TOWER 
REP_GAIN_SURVIVING_TOWER 
REP_GAIN_SURVIVING_CAPTAIN 

Definition at line 542 of file battleground_alterac_valley.cpp.

◆ ResourceLoss

Enumerator
RESOURCE_LOSS_TOWER 
RESOURCE_LOSS_CAPTAIN 

Definition at line 551 of file battleground_alterac_valley.cpp.

◆ Spells

Enumerator
SPELL_COMPLETE_ALTERAC_VALLEY_QUEST 

Definition at line 557 of file battleground_alterac_valley.cpp.

Constructor & Destructor Documentation

◆ battleground_alterac_valley()

battleground_alterac_valley::battleground_alterac_valley ( BattlegroundMap map)
inlineexplicit

Definition at line 568 of file battleground_alterac_valley.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ AssaultNode()

void battleground_alterac_valley::AssaultNode ( BG_AV_Nodes  node,
Team  team 
)
inline

Definition at line 1193 of file battleground_alterac_valley.cpp.

+ Here is the caller graph for this function:

◆ ChangeMineOwner()

void battleground_alterac_valley::ChangeMineOwner ( AlteracValleyMine  mine,
Team  team,
bool  initial = false 
)
inline

Definition at line 913 of file battleground_alterac_valley.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DefendNode()

void battleground_alterac_valley::DefendNode ( BG_AV_Nodes  node,
Team  team 
)
inline

Definition at line 1220 of file battleground_alterac_valley.cpp.

+ Here is the caller graph for this function:

◆ DestroyNode()

void battleground_alterac_valley::DestroyNode ( BG_AV_Nodes  node)
inline

Definition at line 1201 of file battleground_alterac_valley.cpp.

+ Here is the caller graph for this function:

◆ DoAction()

void battleground_alterac_valley::DoAction ( uint32  actionId,
WorldObject source,
WorldObject target 
)
inlineoverridevirtual

Reimplemented from ZoneScript.

Definition at line 827 of file battleground_alterac_valley.cpp.

+ Here is the call graph for this function:

◆ EventPlayerAssaultsPoint()

void battleground_alterac_valley::EventPlayerAssaultsPoint ( Player player,
uint32  object 
)
inline

Definition at line 1135 of file battleground_alterac_valley.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EventPlayerDefendsPoint()

void battleground_alterac_valley::EventPlayerDefendsPoint ( Player player,
uint32  object 
)
inline

Definition at line 1097 of file battleground_alterac_valley.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EventPlayerDestroyedPoint()

void battleground_alterac_valley::EventPlayerDestroyedPoint ( GameObject gameobject)
inline

Definition at line 803 of file battleground_alterac_valley.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FindHerald()

Creature * battleground_alterac_valley::FindHerald ( std::string_view  stringId) const
inline

Definition at line 1299 of file battleground_alterac_valley.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetData()

uint32 battleground_alterac_valley::GetData ( uint32  dataId) const
inlineoverridevirtual

Reimplemented from ZoneScript.

Definition at line 1272 of file battleground_alterac_valley.cpp.

+ Here is the call graph for this function:

◆ GetNodeThroughObject()

static BG_AV_Nodes battleground_alterac_valley::GetNodeThroughObject ( uint32  object)
inlinestatic

Definition at line 935 of file battleground_alterac_valley.cpp.

+ Here is the caller graph for this function:

◆ GetPrematureWinner()

Team battleground_alterac_valley::GetPrematureWinner ( )
inlineoverridevirtual

Reimplemented from BattlegroundScript.

Definition at line 1228 of file battleground_alterac_valley.cpp.

+ Here is the call graph for this function:

◆ GetStaticNodeInfo()

static StaticNodeInfo const * battleground_alterac_valley::GetStaticNodeInfo ( BG_AV_Nodes  node)
inlinestatic

Definition at line 1309 of file battleground_alterac_valley.cpp.

+ Here is the caller graph for this function:

◆ HandleInteractCapturableObject()

void battleground_alterac_valley::HandleInteractCapturableObject ( Player player,
GameObject target 
)
inline

Definition at line 1022 of file battleground_alterac_valley.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ InitNode()

void battleground_alterac_valley::InitNode ( BG_AV_Nodes  node,
Team  team,
bool  tower 
)
inline

Definition at line 1209 of file battleground_alterac_valley.cpp.

+ Here is the caller graph for this function:

◆ IsCaptainAlive()

bool battleground_alterac_valley::IsCaptainAlive ( TeamId  teamId) const
inline

Definition at line 725 of file battleground_alterac_valley.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsTower()

bool battleground_alterac_valley::IsTower ( BG_AV_Nodes  node) const
inline

Definition at line 1318 of file battleground_alterac_valley.cpp.

+ Here is the caller graph for this function:

◆ OnCreatureCreate()

void battleground_alterac_valley::OnCreatureCreate ( Creature creature)
inlineoverridevirtual

Reimplemented from ZoneScript.

Definition at line 1254 of file battleground_alterac_valley.cpp.

+ Here is the call graph for this function:

◆ OnEnd()

void battleground_alterac_valley::OnEnd ( Team  winner)
inlineoverridevirtual

Reimplemented from BattlegroundScript.

Definition at line 755 of file battleground_alterac_valley.cpp.

+ Here is the call graph for this function:

◆ OnGameObjectCreate()

void battleground_alterac_valley::OnGameObjectCreate ( GameObject gameObject)
inlineoverridevirtual

Reimplemented from ZoneScript.

Definition at line 1241 of file battleground_alterac_valley.cpp.

+ Here is the call graph for this function:

◆ OnPlayerKilled()

void battleground_alterac_valley::OnPlayerKilled ( Player victim,
Player  
)
inlineoverridevirtual

Reimplemented from BattlegroundScript.

Definition at line 642 of file battleground_alterac_valley.cpp.

+ Here is the call graph for this function:

◆ OnPlayerLeft()

void battleground_alterac_valley::OnPlayerLeft ( Player player)
inlineoverridevirtual

Reimplemented from BattlegroundScript.

Definition at line 794 of file battleground_alterac_valley.cpp.

+ Here is the call graph for this function:

◆ OnStart()

void battleground_alterac_valley::OnStart ( )
inlineoverridevirtual

Reimplemented from BattlegroundScript.

Definition at line 736 of file battleground_alterac_valley.cpp.

+ Here is the call graph for this function:

◆ OnUnitKilled()

void battleground_alterac_valley::OnUnitKilled ( Creature victim,
Unit killer 
)
inlineoverridevirtual

Reimplemented from BattlegroundScript.

Definition at line 647 of file battleground_alterac_valley.cpp.

+ Here is the call graph for this function:

◆ OnUpdate()

void battleground_alterac_valley::OnUpdate ( uint32  diff)
inlineoverridevirtual

Reimplemented from BattlegroundScript.

Definition at line 597 of file battleground_alterac_valley.cpp.

+ Here is the call graph for this function:

◆ SendMineWorldStates()

void battleground_alterac_valley::SendMineWorldStates ( AlteracValleyMine  mine) const
inline

Definition at line 1184 of file battleground_alterac_valley.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateNodeWorldState()

void battleground_alterac_valley::UpdateNodeWorldState ( BG_AV_Nodes  node) const
inline

Definition at line 1165 of file battleground_alterac_valley.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateScore()

void battleground_alterac_valley::UpdateScore ( Team  team,
int16  points 
)
inline

Definition at line 1320 of file battleground_alterac_valley.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ _balindaGUID

ObjectGuid battleground_alterac_valley::_balindaGUID
private

Definition at line 1361 of file battleground_alterac_valley.cpp.

◆ _captainBuffTimer

std::array<TimeTracker, PVP_TEAMS_COUNT> battleground_alterac_valley::_captainBuffTimer
private

Definition at line 1357 of file battleground_alterac_valley.cpp.

◆ _doorGUIDs

GuidUnorderedSet battleground_alterac_valley::_doorGUIDs
private

Definition at line 1360 of file battleground_alterac_valley.cpp.

◆ _galvangarGUID

ObjectGuid battleground_alterac_valley::_galvangarGUID
private

Definition at line 1362 of file battleground_alterac_valley.cpp.

◆ _heraldGUIDs

GuidUnorderedSet battleground_alterac_valley::_heraldGUIDs
private

Definition at line 1363 of file battleground_alterac_valley.cpp.

◆ _isInformedNearVictory

std::array<bool, PVP_TEAMS_COUNT> battleground_alterac_valley::_isInformedNearVictory
private

Definition at line 1359 of file battleground_alterac_valley.cpp.

◆ _mineInfo

std::array<AlteracValleyMineInfo, 2> battleground_alterac_valley::_mineInfo
private

Definition at line 1355 of file battleground_alterac_valley.cpp.

◆ _mineResourceTimer

TimeTracker battleground_alterac_valley::_mineResourceTimer
private

Definition at line 1353 of file battleground_alterac_valley.cpp.

◆ _nodes

std::array<BG_AV_NodeInfo, BG_AV_NODES_MAX> battleground_alterac_valley::_nodes
private

Definition at line 1351 of file battleground_alterac_valley.cpp.

◆ _teamQuestStatus

uint32 battleground_alterac_valley::_teamQuestStatus[PVP_TEAMS_COUNT][9]
private

Definition at line 1349 of file battleground_alterac_valley.cpp.

◆ _teamResources

std::array<int32, PVP_TEAMS_COUNT> battleground_alterac_valley::_teamResources
private

Definition at line 1348 of file battleground_alterac_valley.cpp.


The documentation for this struct was generated from the following file: