[2] | 1 | /* |
---|
| 2 | * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> |
---|
| 3 | * |
---|
| 4 | * This program is free software; you can redistribute it and/or modify |
---|
| 5 | * it under the terms of the GNU General Public License as published by |
---|
| 6 | * the Free Software Foundation; either version 2 of the License, or |
---|
| 7 | * (at your option) any later version. |
---|
| 8 | * |
---|
| 9 | * This program is distributed in the hope that it will be useful, |
---|
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 12 | * GNU General Public License for more details. |
---|
| 13 | * |
---|
| 14 | * You should have received a copy of the GNU General Public License |
---|
| 15 | * along with this program; if not, write to the Free Software |
---|
| 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
| 17 | */ |
---|
| 18 | |
---|
| 19 | #ifndef __BATTLEGROUNDEY_H |
---|
| 20 | #define __BATTLEGROUNDEY_H |
---|
| 21 | |
---|
| 22 | #include "Language.h" |
---|
| 23 | |
---|
| 24 | class BattleGround; |
---|
| 25 | |
---|
| 26 | #define EY_MAX_TEAM_SCORE 2000 |
---|
| 27 | #define BG_EY_FLAG_RESPAWN_TIME 10000 //10 seconds |
---|
| 28 | #define BG_EY_FPOINTS_TICK_TIME 2000 //2 seconds |
---|
| 29 | |
---|
| 30 | enum BG_EY_WorldStates |
---|
| 31 | { |
---|
| 32 | EY_ALLIANCE_RESOURCES = 2749, |
---|
| 33 | EY_HORDE_RESOURCES = 2750, |
---|
| 34 | EY_ALLIANCE_BASE = 2752, |
---|
| 35 | EY_HORDE_BASE = 2753, |
---|
| 36 | DRAENEI_RUINS_HORDE_CONTROL = 2733, |
---|
| 37 | DRAENEI_RUINS_ALLIANCE_CONTROL = 2732, |
---|
| 38 | DRAENEI_RUINS_UNCONTROL = 2731, |
---|
| 39 | MAGE_TOWER_ALLIANCE_CONTROL = 2730, |
---|
| 40 | MAGE_TOWER_HORDE_CONTROL = 2729, |
---|
| 41 | MAGE_TOWER_UNCONTROL = 2728, |
---|
| 42 | FEL_REAVER_HORDE_CONTROL = 2727, |
---|
| 43 | FEL_REAVER_ALLIANCE_CONTROL = 2726, |
---|
| 44 | FEL_REAVER_UNCONTROL = 2725, |
---|
| 45 | BLOOD_ELF_HORDE_CONTROL = 2724, |
---|
| 46 | BLOOD_ELF_ALLIANCE_CONTROL = 2723, |
---|
| 47 | BLOOD_ELF_UNCONTROL = 2722, |
---|
| 48 | PROGRESS_BAR_PERCENT_GREY = 2720, //100 = empty (only grey), 0 = blue|red (no grey) |
---|
| 49 | PROGRESS_BAR_STATUS = 2719, //50 init!, 48 ... hordak bere .. 33 .. 0 = full 100% hordacky , 100 = full alliance |
---|
| 50 | PROGRESS_BAR_SHOW = 2718, //1 init, 0 druhy send - bez messagu, 1 = controlled aliance |
---|
| 51 | NETHERSTORM_FLAG = 2757, |
---|
| 52 | //set to 2 when flag is picked up, and to 1 if it is dropped |
---|
| 53 | NETHERSTORM_FLAG_STATE_ALLIANCE = 2769, |
---|
| 54 | NETHERSTORM_FLAG_STATE_HORDE = 2770 |
---|
| 55 | }; |
---|
| 56 | |
---|
| 57 | enum BG_EY_ProgressBarConsts |
---|
| 58 | { |
---|
| 59 | BG_EY_POINT_MAX_CAPTURERS_COUNT = 5, |
---|
| 60 | BG_EY_POINT_RADIUS = 70, |
---|
| 61 | BG_EY_PROGRESS_BAR_DONT_SHOW = 0, |
---|
| 62 | BG_EY_PROGRESS_BAR_SHOW = 1, |
---|
| 63 | BG_EY_PROGRESS_BAR_PERCENT_GREY = 40, |
---|
| 64 | BG_EY_PROGRESS_BAR_STATE_MIDDLE = 50, |
---|
| 65 | BG_EY_PROGRESS_BAR_HORDE_CONTROLLED = 0, |
---|
| 66 | BG_EY_PROGRESS_BAR_NEUTRAL_LOW = 30, |
---|
| 67 | BG_EY_PROGRESS_BAR_NEUTRAL_HIGH = 70, |
---|
| 68 | BG_EY_PROGRESS_BAR_ALI_CONTROLLED = 100 |
---|
| 69 | }; |
---|
| 70 | |
---|
| 71 | enum BG_EY_Sounds |
---|
| 72 | { |
---|
| 73 | //strange ids, but sure about them |
---|
| 74 | BG_EY_SOUND_FLAG_PICKED_UP_ALLIANCE = 8212, |
---|
| 75 | BG_EY_SOUND_FLAG_CAPTURED_HORDE = 8213, |
---|
| 76 | BG_EY_SOUND_FLAG_PICKED_UP_HORDE = 8174, |
---|
| 77 | BG_EY_SOUND_FLAG_CAPTURED_ALLIANCE = 8173, |
---|
| 78 | BG_EY_SOUND_FLAG_RESET = 8192 |
---|
| 79 | }; |
---|
| 80 | |
---|
| 81 | enum BG_EY_Spells |
---|
| 82 | { |
---|
| 83 | BG_EY_NETHERSTORM_FLAG_SPELL = 34976, |
---|
| 84 | BG_EY_PLAYER_DROPPED_FLAG_SPELL = 34991 |
---|
| 85 | }; |
---|
| 86 | |
---|
| 87 | enum EYBattleGroundObjectEntry |
---|
| 88 | { |
---|
| 89 | BG_OBJECT_A_DOOR_EY_ENTRY = 184719, //Alliance door |
---|
| 90 | BG_OBJECT_H_DOOR_EY_ENTRY = 184720, //Horde door |
---|
| 91 | BG_OBJECT_FLAG1_EY_ENTRY = 184493, //Netherstorm flag (generic) |
---|
| 92 | BG_OBJECT_FLAG2_EY_ENTRY = 184141, //Netherstorm flag (flagstand) |
---|
| 93 | BG_OBJECT_FLAG3_EY_ENTRY = 184142, //Netherstorm flag (flagdrop) |
---|
| 94 | BG_OBJECT_A_BANNER_EY_ENTRY = 184381, //Visual Banner (Alliance) |
---|
| 95 | BG_OBJECT_H_BANNER_EY_ENTRY = 184380, //Visual Banner (Horde) |
---|
| 96 | BG_OBJECT_N_BANNER_EY_ENTRY = 184382, //Visual Banner (Neutral) |
---|
| 97 | BG_OBJECT_BE_TOWER_CAP_EY_ENTRY = 184080, //BE Tower Cap Pt |
---|
| 98 | BG_OBJECT_FR_TOWER_CAP_EY_ENTRY = 184081, //Fel Reaver Cap Pt |
---|
| 99 | BG_OBJECT_HU_TOWER_CAP_EY_ENTRY = 184082, //Human Tower Cap Pt |
---|
| 100 | BG_OBJECT_DR_TOWER_CAP_EY_ENTRY = 184083 //Draenei Tower Cap Pt |
---|
| 101 | }; |
---|
| 102 | |
---|
| 103 | enum EYBattleGroundPointsTrigger |
---|
| 104 | { |
---|
| 105 | TR_BLOOD_ELF_POINT = 4476, |
---|
| 106 | TR_FEL_REALVER_POINT = 4514, |
---|
| 107 | TR_MAGE_TOWER_POINT = 4516, |
---|
| 108 | TR_DRAENEI_RUINS_POINT = 4518, |
---|
| 109 | TR_BLOOD_ELF_BUFF = 4568, |
---|
| 110 | TR_FEL_REALVER_BUFF = 4569, |
---|
| 111 | TR_MAGE_TOWER_BUFF = 4570, |
---|
| 112 | TR_DRAENEI_RUINS_BUFF = 4571 |
---|
| 113 | }; |
---|
| 114 | |
---|
| 115 | enum EYBattleGroundGaveyards |
---|
| 116 | { |
---|
| 117 | EY_GRAVEYARD_MAIN_ALLIANCE = 1103, |
---|
| 118 | EY_GRAVEYARD_MAIN_HORDE = 1104, |
---|
| 119 | EY_GRAVEYARD_FEL_REALVER = 1105, |
---|
| 120 | EY_GRAVEYARD_BLOOD_ELF = 1106, |
---|
| 121 | EY_GRAVEYARD_DRAENEI_RUINS = 1107, |
---|
| 122 | EY_GRAVEYARD_MAGE_TOWER = 1108 |
---|
| 123 | }; |
---|
| 124 | |
---|
| 125 | enum EYBattleGroundPoints |
---|
| 126 | { |
---|
| 127 | FEL_REALVER = 0, |
---|
| 128 | BLOOD_ELF = 1, |
---|
| 129 | DRAENEI_RUINS = 2, |
---|
| 130 | MAGE_TOWER = 3, |
---|
| 131 | |
---|
| 132 | EY_PLAYERS_OUT_OF_POINTS = 4, |
---|
| 133 | EY_POINTS_MAX = 4 |
---|
| 134 | }; |
---|
| 135 | |
---|
| 136 | enum EYBattleGroundCreaturesTypes |
---|
| 137 | { |
---|
| 138 | EY_SPIRIT_FEL_REALVER = 0, |
---|
| 139 | EY_SPIRIT_BLOOD_ELF = 1, |
---|
| 140 | EY_SPIRIT_DRAENEI_RUINS = 2, |
---|
| 141 | EY_SPIRIT_MAGE_TOWER = 3, |
---|
| 142 | EY_SPIRIT_MAIN_ALLIANCE = 4, |
---|
| 143 | EY_SPIRIT_MAIN_HORDE = 5, |
---|
| 144 | |
---|
| 145 | BG_EY_CREATURES_MAX = 6 |
---|
| 146 | }; |
---|
| 147 | |
---|
| 148 | enum EYBattleGroundObjectTypes |
---|
| 149 | { |
---|
| 150 | BG_EY_OBJECT_DOOR_A = 0, |
---|
| 151 | BG_EY_OBJECT_DOOR_H = 1, |
---|
| 152 | BG_EY_OBJECT_A_BANNER_FEL_REALVER_CENTER = 2, |
---|
| 153 | BG_EY_OBJECT_A_BANNER_FEL_REALVER_LEFT = 3, |
---|
| 154 | BG_EY_OBJECT_A_BANNER_FEL_REALVER_RIGHT = 4, |
---|
| 155 | BG_EY_OBJECT_A_BANNER_BLOOD_ELF_CENTER = 5, |
---|
| 156 | BG_EY_OBJECT_A_BANNER_BLOOD_ELF_LEFT = 6, |
---|
| 157 | BG_EY_OBJECT_A_BANNER_BLOOD_ELF_RIGHT = 7, |
---|
| 158 | BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_CENTER = 8, |
---|
| 159 | BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_LEFT = 9, |
---|
| 160 | BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_RIGHT = 10, |
---|
| 161 | BG_EY_OBJECT_A_BANNER_MAGE_TOWER_CENTER = 11, |
---|
| 162 | BG_EY_OBJECT_A_BANNER_MAGE_TOWER_LEFT = 12, |
---|
| 163 | BG_EY_OBJECT_A_BANNER_MAGE_TOWER_RIGHT = 13, |
---|
| 164 | BG_EY_OBJECT_H_BANNER_FEL_REALVER_CENTER = 14, |
---|
| 165 | BG_EY_OBJECT_H_BANNER_FEL_REALVER_LEFT = 15, |
---|
| 166 | BG_EY_OBJECT_H_BANNER_FEL_REALVER_RIGHT = 16, |
---|
| 167 | BG_EY_OBJECT_H_BANNER_BLOOD_ELF_CENTER = 17, |
---|
| 168 | BG_EY_OBJECT_H_BANNER_BLOOD_ELF_LEFT = 18, |
---|
| 169 | BG_EY_OBJECT_H_BANNER_BLOOD_ELF_RIGHT = 19, |
---|
| 170 | BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_CENTER = 20, |
---|
| 171 | BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_LEFT = 21, |
---|
| 172 | BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_RIGHT = 22, |
---|
| 173 | BG_EY_OBJECT_H_BANNER_MAGE_TOWER_CENTER = 23, |
---|
| 174 | BG_EY_OBJECT_H_BANNER_MAGE_TOWER_LEFT = 24, |
---|
| 175 | BG_EY_OBJECT_H_BANNER_MAGE_TOWER_RIGHT = 25, |
---|
| 176 | BG_EY_OBJECT_N_BANNER_FEL_REALVER_CENTER = 26, |
---|
| 177 | BG_EY_OBJECT_N_BANNER_FEL_REALVER_LEFT = 27, |
---|
| 178 | BG_EY_OBJECT_N_BANNER_FEL_REALVER_RIGHT = 28, |
---|
| 179 | BG_EY_OBJECT_N_BANNER_BLOOD_ELF_CENTER = 29, |
---|
| 180 | BG_EY_OBJECT_N_BANNER_BLOOD_ELF_LEFT = 30, |
---|
| 181 | BG_EY_OBJECT_N_BANNER_BLOOD_ELF_RIGHT = 31, |
---|
| 182 | BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_CENTER = 32, |
---|
| 183 | BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_LEFT = 33, |
---|
| 184 | BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_RIGHT = 34, |
---|
| 185 | BG_EY_OBJECT_N_BANNER_MAGE_TOWER_CENTER = 35, |
---|
| 186 | BG_EY_OBJECT_N_BANNER_MAGE_TOWER_LEFT = 36, |
---|
| 187 | BG_EY_OBJECT_N_BANNER_MAGE_TOWER_RIGHT = 37, |
---|
| 188 | BG_EY_OBJECT_TOWER_CAP_FEL_REALVER = 38, |
---|
| 189 | BG_EY_OBJECT_TOWER_CAP_BLOOD_ELF = 39, |
---|
| 190 | BG_EY_OBJECT_TOWER_CAP_DRAENEI_RUINS = 40, |
---|
| 191 | BG_EY_OBJECT_TOWER_CAP_MAGE_TOWER = 41, |
---|
| 192 | BG_EY_OBJECT_FLAG_NETHERSTORM = 42, |
---|
| 193 | BG_EY_OBJECT_FLAG_FEL_REALVER = 43, |
---|
| 194 | BG_EY_OBJECT_FLAG_BLOOD_ELF = 44, |
---|
| 195 | BG_EY_OBJECT_FLAG_DRAENEI_RUINS = 45, |
---|
| 196 | BG_EY_OBJECT_FLAG_MAGE_TOWER = 46, |
---|
| 197 | //buffs |
---|
| 198 | BG_EY_OBJECT_SPEEDBUFF_FEL_REALVER = 47, |
---|
| 199 | BG_EY_OBJECT_REGENBUFF_FEL_REALVER = 48, |
---|
| 200 | BG_EY_OBJECT_BERSERKBUFF_FEL_REALVER = 49, |
---|
| 201 | BG_EY_OBJECT_SPEEDBUFF_BLOOD_ELF = 50, |
---|
| 202 | BG_EY_OBJECT_REGENBUFF_BLOOD_ELF = 51, |
---|
| 203 | BG_EY_OBJECT_BERSERKBUFF_BLOOD_ELF = 52, |
---|
| 204 | BG_EY_OBJECT_SPEEDBUFF_DRAENEI_RUINS = 53, |
---|
| 205 | BG_EY_OBJECT_REGENBUFF_DRAENEI_RUINS = 54, |
---|
| 206 | BG_EY_OBJECT_BERSERKBUFF_DRAENEI_RUINS = 55, |
---|
| 207 | BG_EY_OBJECT_SPEEDBUFF_MAGE_TOWER = 56, |
---|
| 208 | BG_EY_OBJECT_REGENBUFF_MAGE_TOWER = 57, |
---|
| 209 | BG_EY_OBJECT_BERSERKBUFF_MAGE_TOWER = 58, |
---|
| 210 | BG_EY_OBJECT_MAX = 59 |
---|
| 211 | }; |
---|
| 212 | |
---|
| 213 | enum BG_EY_FlagState |
---|
| 214 | { |
---|
| 215 | BG_EY_FLAG_STATE_ON_BASE = 0, |
---|
| 216 | BG_EY_FLAG_STATE_WAIT_RESPAWN = 1, |
---|
| 217 | BG_EY_FLAG_STATE_ON_PLAYER = 2, |
---|
| 218 | BG_EY_FLAG_STATE_ON_GROUND = 3 |
---|
| 219 | }; |
---|
| 220 | |
---|
| 221 | enum EYBattleGroundPointState |
---|
| 222 | { |
---|
| 223 | EY_POINT_NO_OWNER = 0, |
---|
| 224 | EY_POINT_STATE_UNCONTROLLED = 0, |
---|
| 225 | EY_POINT_UNDER_CONTROL = 3 |
---|
| 226 | }; |
---|
| 227 | |
---|
| 228 | struct BattleGroundEYPointIconsStruct |
---|
| 229 | { |
---|
| 230 | BattleGroundEYPointIconsStruct(uint32 _WorldStateControlIndex, uint32 _WorldStateAllianceControlledIndex, uint32 _WorldStateHordeControlledIndex) |
---|
| 231 | : WorldStateControlIndex(_WorldStateControlIndex), WorldStateAllianceControlledIndex(_WorldStateAllianceControlledIndex), WorldStateHordeControlledIndex(_WorldStateHordeControlledIndex) {} |
---|
| 232 | uint32 WorldStateControlIndex; |
---|
| 233 | uint32 WorldStateAllianceControlledIndex; |
---|
| 234 | uint32 WorldStateHordeControlledIndex; |
---|
| 235 | }; |
---|
| 236 | |
---|
| 237 | struct BattleGroundEYLoosingPointStruct |
---|
| 238 | { |
---|
| 239 | BattleGroundEYLoosingPointStruct(uint32 _SpawnNeutralObjectType, uint32 _DespawnObjectTypeAlliance, uint32 _MessageIdAlliance, uint32 _DespawnObjectTypeHorde, uint32 _MessageIdHorde) |
---|
| 240 | : SpawnNeutralObjectType(_SpawnNeutralObjectType), DespawnObjectTypeAlliance(_DespawnObjectTypeAlliance), MessageIdAlliance(_MessageIdAlliance), DespawnObjectTypeHorde(_DespawnObjectTypeHorde), MessageIdHorde(_MessageIdHorde) {} |
---|
| 241 | uint32 SpawnNeutralObjectType; |
---|
| 242 | uint32 DespawnObjectTypeAlliance; |
---|
| 243 | uint32 DespawnObjectTypeHorde; |
---|
| 244 | uint32 MessageIdHorde; |
---|
| 245 | uint32 MessageIdAlliance; |
---|
| 246 | }; |
---|
| 247 | |
---|
| 248 | struct BattleGroundEYCapturingPointStruct |
---|
| 249 | { |
---|
| 250 | BattleGroundEYCapturingPointStruct(uint32 _DespawnNeutralObjectType, uint32 _SpawnObjectTypeAlliance, uint32 _MessageIdAlliance, uint32 _SpawnObjectTypeHorde, uint32 _MessageIdHorde, uint32 _GraveYardId) |
---|
| 251 | : DespawnNeutralObjectType(_DespawnNeutralObjectType), SpawnObjectTypeAlliance(_SpawnObjectTypeAlliance), MessageIdAlliance(_MessageIdAlliance), SpawnObjectTypeHorde(_SpawnObjectTypeHorde), MessageIdHorde(_MessageIdHorde), GraveYardId(_GraveYardId) {} |
---|
| 252 | uint32 DespawnNeutralObjectType; |
---|
| 253 | uint32 SpawnObjectTypeAlliance; |
---|
| 254 | uint32 SpawnObjectTypeHorde; |
---|
| 255 | uint32 MessageIdHorde; |
---|
| 256 | uint32 MessageIdAlliance; |
---|
| 257 | uint32 GraveYardId; |
---|
| 258 | }; |
---|
| 259 | |
---|
| 260 | const uint8 BG_EY_TickPoints[EY_POINTS_MAX] = {1, 2, 5, 10}; |
---|
| 261 | const uint32 BG_EY_FlagPoints[EY_POINTS_MAX] = {75, 85, 100, 500}; |
---|
| 262 | |
---|
| 263 | //constant arrays: |
---|
| 264 | const BattleGroundEYPointIconsStruct m_PointsIconStruct[EY_POINTS_MAX] = |
---|
| 265 | { |
---|
| 266 | BattleGroundEYPointIconsStruct(FEL_REAVER_UNCONTROL, FEL_REAVER_ALLIANCE_CONTROL, FEL_REAVER_HORDE_CONTROL), |
---|
| 267 | BattleGroundEYPointIconsStruct(BLOOD_ELF_UNCONTROL, BLOOD_ELF_ALLIANCE_CONTROL, BLOOD_ELF_HORDE_CONTROL), |
---|
| 268 | BattleGroundEYPointIconsStruct(DRAENEI_RUINS_UNCONTROL, DRAENEI_RUINS_ALLIANCE_CONTROL, DRAENEI_RUINS_HORDE_CONTROL), |
---|
| 269 | BattleGroundEYPointIconsStruct(MAGE_TOWER_UNCONTROL, MAGE_TOWER_ALLIANCE_CONTROL, MAGE_TOWER_HORDE_CONTROL) |
---|
| 270 | }; |
---|
| 271 | const BattleGroundEYLoosingPointStruct m_LoosingPointTypes[EY_POINTS_MAX] = |
---|
| 272 | { |
---|
| 273 | BattleGroundEYLoosingPointStruct(BG_EY_OBJECT_N_BANNER_FEL_REALVER_CENTER, BG_EY_OBJECT_A_BANNER_FEL_REALVER_CENTER, LANG_BG_EY_HAS_LOST_A_F_RUINS, BG_EY_OBJECT_H_BANNER_FEL_REALVER_CENTER, LANG_BG_EY_HAS_LOST_H_F_RUINS), |
---|
| 274 | BattleGroundEYLoosingPointStruct(BG_EY_OBJECT_N_BANNER_BLOOD_ELF_CENTER, BG_EY_OBJECT_A_BANNER_BLOOD_ELF_CENTER, LANG_BG_EY_HAS_LOST_A_B_TOWER, BG_EY_OBJECT_H_BANNER_BLOOD_ELF_CENTER, LANG_BG_EY_HAS_LOST_H_B_TOWER), |
---|
| 275 | BattleGroundEYLoosingPointStruct(BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_CENTER, BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_CENTER, LANG_BG_EY_HAS_LOST_A_D_RUINS, BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_CENTER, LANG_BG_EY_HAS_LOST_H_D_RUINS), |
---|
| 276 | BattleGroundEYLoosingPointStruct(BG_EY_OBJECT_N_BANNER_MAGE_TOWER_CENTER, BG_EY_OBJECT_A_BANNER_MAGE_TOWER_CENTER, LANG_BG_EY_HAS_LOST_A_M_TOWER, BG_EY_OBJECT_H_BANNER_MAGE_TOWER_CENTER, LANG_BG_EY_HAS_LOST_H_M_TOWER) |
---|
| 277 | }; |
---|
| 278 | const BattleGroundEYCapturingPointStruct m_CapturingPointTypes[EY_POINTS_MAX] = |
---|
| 279 | { |
---|
| 280 | BattleGroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_FEL_REALVER_CENTER, BG_EY_OBJECT_A_BANNER_FEL_REALVER_CENTER, LANG_BG_EY_HAS_TAKEN_A_F_RUINS, BG_EY_OBJECT_H_BANNER_FEL_REALVER_CENTER, LANG_BG_EY_HAS_TAKEN_H_F_RUINS, EY_GRAVEYARD_FEL_REALVER), |
---|
| 281 | BattleGroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_BLOOD_ELF_CENTER, BG_EY_OBJECT_A_BANNER_BLOOD_ELF_CENTER, LANG_BG_EY_HAS_TAKEN_A_B_TOWER, BG_EY_OBJECT_H_BANNER_BLOOD_ELF_CENTER, LANG_BG_EY_HAS_TAKEN_H_B_TOWER, EY_GRAVEYARD_BLOOD_ELF), |
---|
| 282 | BattleGroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_DRAENEI_RUINS_CENTER, BG_EY_OBJECT_A_BANNER_DRAENEI_RUINS_CENTER, LANG_BG_EY_HAS_TAKEN_A_D_RUINS, BG_EY_OBJECT_H_BANNER_DRAENEI_RUINS_CENTER, LANG_BG_EY_HAS_TAKEN_H_D_RUINS, EY_GRAVEYARD_DRAENEI_RUINS), |
---|
| 283 | BattleGroundEYCapturingPointStruct(BG_EY_OBJECT_N_BANNER_MAGE_TOWER_CENTER, BG_EY_OBJECT_A_BANNER_MAGE_TOWER_CENTER, LANG_BG_EY_HAS_TAKEN_A_M_TOWER, BG_EY_OBJECT_H_BANNER_MAGE_TOWER_CENTER, LANG_BG_EY_HAS_TAKEN_H_M_TOWER, EY_GRAVEYARD_MAGE_TOWER) |
---|
| 284 | }; |
---|
| 285 | |
---|
| 286 | class BattleGroundEYScore : public BattleGroundScore |
---|
| 287 | { |
---|
| 288 | public: |
---|
| 289 | BattleGroundEYScore () : FlagCaptures(0) {}; |
---|
| 290 | virtual ~BattleGroundEYScore() {}; |
---|
| 291 | uint32 FlagCaptures; |
---|
| 292 | }; |
---|
| 293 | |
---|
| 294 | class BattleGroundEY : public BattleGround |
---|
| 295 | { |
---|
| 296 | friend class BattleGroundMgr; |
---|
| 297 | |
---|
| 298 | public: |
---|
| 299 | BattleGroundEY(); |
---|
| 300 | ~BattleGroundEY(); |
---|
| 301 | void Update(time_t diff); |
---|
| 302 | |
---|
| 303 | /* inherited from BattlegroundClass */ |
---|
| 304 | virtual void AddPlayer(Player *plr); |
---|
| 305 | |
---|
| 306 | /* BG Flags */ |
---|
| 307 | uint64 GetFlagPickerGUID() const { return m_FlagKeeper; } |
---|
| 308 | void SetFlagPicker(uint64 guid) { m_FlagKeeper = guid; } |
---|
| 309 | bool IsFlagPickedup() const { return m_FlagKeeper != 0; } |
---|
| 310 | uint8 GetFlagState() const { return m_FlagState; } |
---|
| 311 | void RespawnFlag(bool send_message); |
---|
| 312 | void RespawnFlagAfterDrop(); |
---|
| 313 | |
---|
| 314 | void RemovePlayer(Player *plr,uint64 guid); |
---|
| 315 | void HandleBuffUse(uint64 const& buff_guid); |
---|
| 316 | void HandleAreaTrigger(Player *Source, uint32 Trigger); |
---|
| 317 | void HandleKillPlayer(Player *player, Player *killer); |
---|
| 318 | virtual WorldSafeLocsEntry const* GetClosestGraveYard(float x, float y, float z, uint32 team); |
---|
| 319 | virtual bool SetupBattleGround(); |
---|
| 320 | virtual void ResetBGSubclass(); |
---|
| 321 | void UpdateTeamScore(uint32 Team); |
---|
| 322 | void UpdatePlayerScore(Player *Source, uint32 type, uint32 value); |
---|
| 323 | virtual void FillInitialWorldStates(WorldPacket& data); |
---|
| 324 | void SetDroppedFlagGUID(uint64 guid) { m_DroppedFlagGUID = guid;} |
---|
| 325 | uint64 GetDroppedFlagGUID() const { return m_DroppedFlagGUID;} |
---|
| 326 | |
---|
| 327 | /* Battleground Events */ |
---|
| 328 | virtual void EventPlayerClickedOnFlag(Player *Source, GameObject* target_obj); |
---|
| 329 | virtual void EventPlayerDroppedFlag(Player *Source); |
---|
| 330 | |
---|
| 331 | private: |
---|
| 332 | void EventPlayerCapturedFlag(Player *Source, uint32 BgObjectType); |
---|
| 333 | void EventTeamCapturedPoint(Player *Source, uint32 Point); |
---|
| 334 | void EventTeamLostPoint(Player *Source, uint32 Point); |
---|
| 335 | void UpdatePointsCount(uint32 Team); |
---|
| 336 | void UpdatePointsIcons(uint32 Team, uint32 Point); |
---|
| 337 | |
---|
| 338 | /* Point status updating procedures */ |
---|
| 339 | void CheckSomeoneLeftPoint(); |
---|
| 340 | void CheckSomeoneJoinedPoint(); |
---|
| 341 | void UpdatePointStatuses(); |
---|
| 342 | |
---|
| 343 | /* Scorekeeping */ |
---|
| 344 | uint32 GetTeamScore(uint32 Team) const { return m_TeamScores[GetTeamIndexByTeamId(Team)]; } |
---|
| 345 | void AddPoints(uint32 Team, uint32 Points); |
---|
| 346 | |
---|
| 347 | void RemovePoint(uint32 TeamID, uint32 Points = 1) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] -= Points; } |
---|
| 348 | void SetTeamPoint(uint32 TeamID, uint32 Points = 0) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] = Points; } |
---|
| 349 | |
---|
| 350 | uint32 m_TeamScores[2]; |
---|
| 351 | uint32 m_HonorScoreTics[2]; |
---|
| 352 | uint32 m_TeamPointsCount[2]; |
---|
| 353 | |
---|
| 354 | uint32 m_Points_Trigger[EY_POINTS_MAX]; |
---|
| 355 | |
---|
| 356 | uint64 m_FlagKeeper; // keepers guid |
---|
| 357 | uint64 m_DroppedFlagGUID; |
---|
| 358 | uint32 m_FlagCapturedBgObjectType; // type that should be despawned when flag is captured |
---|
| 359 | uint8 m_FlagState; // for checking flag state |
---|
| 360 | int32 m_FlagsTimer; |
---|
| 361 | int32 m_TowerCapCheckTimer; |
---|
| 362 | |
---|
| 363 | uint32 m_PointOwnedByTeam[EY_POINTS_MAX]; |
---|
| 364 | uint8 m_PointState[EY_POINTS_MAX]; |
---|
| 365 | int32 m_PointBarStatus[EY_POINTS_MAX]; |
---|
| 366 | typedef std::vector<uint64> PlayersNearPointType; |
---|
| 367 | PlayersNearPointType m_PlayersNearPoint[EY_POINTS_MAX + 1]; |
---|
| 368 | uint8 m_CurrentPointPlayersCount[2*EY_POINTS_MAX]; |
---|
| 369 | |
---|
| 370 | int32 m_PointAddingTimer; |
---|
| 371 | }; |
---|
| 372 | #endif |
---|