aboutsummaryrefslogtreecommitdiff
path: root/src/game/BattleGroundAB.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/BattleGroundAB.h')
-rw-r--r--src/game/BattleGroundAB.h78
1 files changed, 45 insertions, 33 deletions
diff --git a/src/game/BattleGroundAB.h b/src/game/BattleGroundAB.h
index 3fcea59c8e8..1c4a6d3b738 100644
--- a/src/game/BattleGroundAB.h
+++ b/src/game/BattleGroundAB.h
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
- * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
+ * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -77,17 +77,17 @@ enum BG_AB_NodeObjectId
enum BG_AB_ObjectType
{
// for all 5 node points 8*5=40 objects
- BG_AB_OBJECT_BANNER_NEUTRAL = 0,
- BG_AB_OBJECT_BANNER_CONT_A = 1,
- BG_AB_OBJECT_BANNER_CONT_H = 2,
- BG_AB_OBJECT_BANNER_ALLY = 3,
- BG_AB_OBJECT_BANNER_HORDE = 4,
- BG_AB_OBJECT_AURA_ALLY = 5,
- BG_AB_OBJECT_AURA_HORDE = 6,
- BG_AB_OBJECT_AURA_CONTESTED = 7,
+ BG_AB_OBJECT_BANNER_NEUTRAL = 0,
+ BG_AB_OBJECT_BANNER_CONT_A = 1,
+ BG_AB_OBJECT_BANNER_CONT_H = 2,
+ BG_AB_OBJECT_BANNER_ALLY = 3,
+ BG_AB_OBJECT_BANNER_HORDE = 4,
+ BG_AB_OBJECT_AURA_ALLY = 5,
+ BG_AB_OBJECT_AURA_HORDE = 6,
+ BG_AB_OBJECT_AURA_CONTESTED = 7,
//gates
- BG_AB_OBJECT_GATE_A = 40,
- BG_AB_OBJECT_GATE_H = 41,
+ BG_AB_OBJECT_GATE_A = 40,
+ BG_AB_OBJECT_GATE_H = 41,
//buffs
BG_AB_OBJECT_SPEEDBUFF_STABLES = 42,
BG_AB_OBJECT_REGENBUFF_STABLES = 43,
@@ -130,8 +130,8 @@ enum BG_AB_Timers
enum BG_AB_Score
{
- BG_AB_MAX_TEAM_SCORE = 2000,
- BG_AB_WARNING_SCORE = 1800
+ BG_AB_WARNING_NEAR_VICTORY_SCORE = 1800,
+ BG_AB_MAX_TEAM_SCORE = 2000
};
/* do NOT change the order, else wrong behaviour */
@@ -164,14 +164,19 @@ enum BG_AB_NodeStatus
enum BG_AB_Sounds
{
- SOUND_NODE_CLAIMED = 8192,
- SOUND_NODE_CAPTURED_ALLIANCE = 8173,
- SOUND_NODE_CAPTURED_HORDE = 8213,
- SOUND_NODE_ASSAULTED_ALLIANCE = 8174,
- SOUND_NODE_ASSAULTED_HORDE = 8212,
- SOUND_NEAR_VICTORY = 8456
+ BG_AB_SOUND_NODE_CLAIMED = 8192,
+ BG_AB_SOUND_NODE_CAPTURED_ALLIANCE = 8173,
+ BG_AB_SOUND_NODE_CAPTURED_HORDE = 8213,
+ BG_AB_SOUND_NODE_ASSAULTED_ALLIANCE = 8212,
+ BG_AB_SOUND_NODE_ASSAULTED_HORDE = 8174,
+ BG_AB_SOUND_NEAR_VICTORY = 8456
};
+#define BG_AB_NotABBGWeekendHonorTicks 330
+#define BG_AB_ABBGWeekendHonorTicks 200
+#define BG_AB_NotABBGWeekendReputationTicks 200
+#define BG_AB_ABBGWeekendReputationTicks 150
+
// x, y, z, o
const float BG_AB_NodePositions[BG_AB_DYNAMIC_NODES_COUNT][4] = {
{1166.785f, 1200.132f, -56.70859f, 0.9075713f}, // stables
@@ -238,13 +243,16 @@ class BattleGroundAB : public BattleGround
BattleGroundAB();
~BattleGroundAB();
- void Update(time_t diff);
+ void Update(uint32 diff);
void AddPlayer(Player *plr);
+ virtual void StartingEventCloseDoors();
+ virtual void StartingEventOpenDoors();
void RemovePlayer(Player *plr,uint64 guid);
void HandleAreaTrigger(Player *Source, uint32 Trigger);
virtual bool SetupBattleGround();
- virtual void ResetBGSubclass();
- virtual WorldSafeLocsEntry const* GetClosestGraveYard(float x, float y, float z, uint32 team);
+ virtual void Reset();
+ void EndBattleGround(uint32 winner);
+ virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
/* Scorekeeping */
virtual void UpdatePlayerScore(Player *Source, uint32 type, uint32 value);
@@ -265,7 +273,7 @@ class BattleGroundAB : public BattleGround
void _NodeOccupied(uint8 node,Team team);
void _NodeDeOccupied(uint8 node);
- const char* _GetNodeName(uint8 node);
+ int32 _GetNodeNameId(uint8 node);
/* Nodes info:
0: neutral
@@ -273,15 +281,19 @@ class BattleGroundAB : public BattleGround
2: horde contested
3: ally occupied
4: horde occupied */
- uint8 m_Nodes[BG_AB_DYNAMIC_NODES_COUNT];
- uint8 m_prevNodes[BG_AB_DYNAMIC_NODES_COUNT];
- BG_AB_BannerTimer m_BannerTimers[BG_AB_DYNAMIC_NODES_COUNT];
- int32 m_NodeTimers[BG_AB_DYNAMIC_NODES_COUNT];
- uint32 m_TeamScores[2];
- uint32 m_lastTick[2];
- uint32 m_HonorScoreTics[2];
- uint32 m_ReputationScoreTics[2];
- bool m_IsInformedNearVictory;
+ uint8 m_Nodes[BG_AB_DYNAMIC_NODES_COUNT];
+ uint8 m_prevNodes[BG_AB_DYNAMIC_NODES_COUNT];
+ BG_AB_BannerTimer m_BannerTimers[BG_AB_DYNAMIC_NODES_COUNT];
+ uint32 m_NodeTimers[BG_AB_DYNAMIC_NODES_COUNT];
+ uint32 m_TeamScores[BG_TEAMS_COUNT];
+ uint32 m_lastTick[BG_TEAMS_COUNT];
+ uint32 m_HonorScoreTics[BG_TEAMS_COUNT];
+ uint32 m_ReputationScoreTics[BG_TEAMS_COUNT];
+ bool m_IsInformedNearVictory;
+ uint32 m_HonorTics;
+ uint32 m_ReputationTics;
+
+
};
#endif