TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
BattlefieldWG.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the
6  * Free Software Foundation; either version 2 of the License, or (at your
7  * option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef BATTLEFIELD_WG_
19 #define BATTLEFIELD_WG_
20 
21 #include "Battlefield.h"
22 
23 class Group;
24 class BattlefieldWG;
26 
29 
30 typedef std::set<GameObject*> GameObjectSet;
31 typedef std::set<BfWGGameObjectBuilding*> GameObjectBuildingSet;
32 typedef std::set<WintergraspWorkshop*> WorkshopSet;
33 typedef std::set<Group*> GroupSet;
34 //typedef std::set<WintergraspCapturePoint *> CapturePointSet; unused ?
35 
37 {
38  BATTLEFIELD_WG_ZONEID = 4197, // Wintergrasp
39  BATTLEFIELD_WG_MAPID = 571 // Northrend
40 };
41 
43 {
44  // Wartime auras
45  SPELL_RECRUIT = 37795,
46  SPELL_CORPORAL = 33280,
48  SPELL_TENACITY = 58549,
58 
59  // Reward spells
66 
69 
72 
73  // Other spells
77 
78  // Phasing spells
79  SPELL_HORDE_CONTROLS_FACTORY_PHASE_SHIFT = 56618, // ADDS PHASE 16
81 
82  SPELL_HORDE_CONTROL_PHASE_SHIFT = 55773, // ADDS PHASE 64
83  SPELL_ALLIANCE_CONTROL_PHASE_SHIFT = 55774 // ADDS PHASE 128
84 };
85 
87 {
97 };
98 
100 {
117 };
118 
120 {
129 };
130 
132 {
140 };
141 
142 /*#########################
143  *####### Graveyards ######
144  *#########################*/
145 
147 {
148  public:
150 
151  void SetTextId(uint32 textId) { m_GossipTextId = textId; }
152  uint32 GetTextId() const { return m_GossipTextId; }
153 
154  protected:
156 };
157 
159 {
168 };
169 
171 {
179 };
180 
182 {
186 
188  BATTLEFIELD_WG_NPC_STONE_GUARD_MUKAR = 32296, // <WINTERGRASP QUARTERMASTER>
189  BATTLEFIELD_WG_NPC_HOODOO_MASTER_FU_JIN = 31101, // <MASTER HEXXER>
190  BATTLEFIELD_WG_NPC_CHAMPION_ROS_SLAI = 39173, // <WINTERGRASP QUARTERMASTER>
196 
198  BATTLEFIELD_WG_NPC_KNIGHT_DAMERON = 32294, // <WINTERGRASP QUARTERMASTER>
199  BATTLEFIELD_WG_NPC_SORCERESS_KAYLANA = 31051, // <ENCHANTRESS>
200  BATTLEFIELD_WG_NPC_MARSHAL_MAGRUDER = 39172, // <WINTERGRASP QUARTERMASTER>
206 
207  NPC_TAUNKA_SPIRIT_GUIDE = 31841, // Horde spirit guide for Wintergrasp
208  NPC_DWARVEN_SPIRIT_GUIDE = 31842, // Alliance spirit guide for Wintergrasp
209 
215 };
216 
218 {
219  float x;
220  float y;
221  float z;
222  float o;
225  uint32 textid; // for gossip menu
227 };
228 
229 uint32 const WGQuest[2][6] =
230 {
231  { 13186, 13181, 13222, 13538, 13177, 13179 },
232  { 13185, 13183, 13223, 13539, 13178, 13180 },
233 };
234 
235 // 7 in sql, 7 in header
237 {
238  { 5104.750f, 2300.940f, 368.579f, 0.733038f, 1329, BATTLEFIELD_WG_GY_WORKSHOP_NE, BATTLEFIELD_WG_GOSSIPTEXT_GY_NE, TEAM_NEUTRAL },
239  { 5099.120f, 3466.036f, 368.484f, 5.317802f, 1330, BATTLEFIELD_WG_GY_WORKSHOP_NW, BATTLEFIELD_WG_GOSSIPTEXT_GY_NW, TEAM_NEUTRAL },
240  { 4314.648f, 2408.522f, 392.642f, 6.268125f, 1333, BATTLEFIELD_WG_GY_WORKSHOP_SE, BATTLEFIELD_WG_GOSSIPTEXT_GY_SE, TEAM_NEUTRAL },
241  { 4331.716f, 3235.695f, 390.251f, 0.008500f, 1334, BATTLEFIELD_WG_GY_WORKSHOP_SW, BATTLEFIELD_WG_GOSSIPTEXT_GY_SW, TEAM_NEUTRAL },
242  { 5537.986f, 2897.493f, 517.057f, 4.819249f, 1285, BATTLEFIELD_WG_GY_KEEP, BATTLEFIELD_WG_GOSSIPTEXT_GY_KEEP, TEAM_NEUTRAL },
243  { 5032.454f, 3711.382f, 372.468f, 3.971623f, 1331, BATTLEFIELD_WG_GY_HORDE, BATTLEFIELD_WG_GOSSIPTEXT_GY_HORDE, TEAM_HORDE },
244  { 5140.790f, 2179.120f, 390.950f, 1.972220f, 1332, BATTLEFIELD_WG_GY_ALLIANCE, BATTLEFIELD_WG_GOSSIPTEXT_GY_ALLIANCE, TEAM_ALLIANCE },
245 };
246 
247 /* ######################### *
248  * WintergraspCapturePoint *
249  * ######################### */
250 
252 {
253  public:
254  WintergraspCapturePoint(BattlefieldWG* battlefield, TeamId teamInControl);
255 
256  void LinkToWorkshop(WintergraspWorkshop* workshop) { m_Workshop = workshop; }
257 
258  void ChangeTeam(TeamId oldteam) override;
259  TeamId GetTeam() const { return m_team; }
260 
261  protected:
263 };
264 
265 /* ######################### *
266  * WinterGrasp Battlefield *
267  * ######################### */
268 
270 {
271  public:
272  ~BattlefieldWG();
279  void OnBattleStart() override;
280 
290  void OnBattleEnd(bool endByTimer) override;
291 
296  void OnStartGrouping() override;
297 
306  void OnPlayerJoinWar(Player* player) override;
307 
313  void OnPlayerLeaveWar(Player* player) override;
314 
319  void OnPlayerLeaveZone(Player* player) override;
320 
327  void OnPlayerEnterZone(Player* player) override;
328 
335  bool Update(uint32 diff) override;
336 
341  void OnCreatureCreate(Creature* creature) override;
342 
347  void OnCreatureRemove(Creature* creature) override;
348 
352  void OnGameObjectCreate(GameObject* go) override;
353 
358  void BrokenWallOrTower(TeamId team);
359 
364  void UpdateDamagedTowerCount(TeamId team);
365 
371  void UpdatedDestroyedTowerCount(TeamId team);
372 
373  void DoCompleteOrIncrementAchievement(uint32 achievement, Player* player, uint8 incrementNumber = 1) override;
374 
375  void RemoveAurasFromPlayer(Player* player);
376 
380  bool SetupBattlefield() override;
381 
383  GameObject* GetRelic() { return GetGameObject(m_titansRelicGUID); }
384 
386  void SetRelic(ObjectGuid relicGUID) { m_titansRelicGUID = relicGUID; }
387 
389  bool CanInteractWithRelic() { return m_isRelicInteractible; }
390 
392  void SetRelicInteractible(bool allow) { m_isRelicInteractible = allow; }
393 
394  void UpdateVehicleCountWG();
395  void UpdateCounterVehicle(bool init);
396 
397  void SendInitWorldStatesTo(Player* player);
398  void SendInitWorldStatesToAll() override;
400 
401  void HandleKill(Player* killer, Unit* victim) override;
402  void OnUnitDeath(Unit* unit) override;
403  void PromotePlayer(Player* killer);
404 
405  void UpdateTenacity();
406  void ProcessEvent(WorldObject* obj, uint32 eventId) override;
407 
408  bool FindAndRemoveVehicleFromList(Unit* vehicle);
409 
410  // returns the graveyardId in the specified area.
411  uint8 GetSpiritGraveyardId(uint32 areaId) const;
412 
413  uint32 GetData(uint32 data) const override;
414 
415  protected:
417 
419 
421  GuidSet m_KeepGameObject[BG_TEAMS_COUNT];
423 
424  GuidSet m_vehicles[BG_TEAMS_COUNT];
426  GuidSet KeepCreature[BG_TEAMS_COUNT];
427  GuidSet OutsideCreature[BG_TEAMS_COUNT];
428 
431 
433 };
434 
435 uint32 const VehNumWorldState[] = { 3680, 3490 };
436 uint32 const MaxVehNumWorldState[] = { 3681, 3491 };
437 uint32 const ClockWorldState[] = { 3781, 4354 };
438 uint32 const WintergraspFaction[] = { 1732, 1735, 35 };
439 
440 Position const WintergraspStalkerPos = { 4948.985f, 2937.789f, 550.5172f, 1.815142f };
441 
442 uint8 const WG_MAX_OBJ = 32;
443 uint8 const WG_MAX_TURRET = 15;
449 uint8 const WG_MAX_TOWER = 7;
450 
452 {
459 };
460 
462 {
473 };
474 
476 {
484 };
485 
487 {
494 };
495 
497 {
504 };
505 
507 {
511 };
512 
514 {
515  // Invisible Stalker
542 
549 
554 
557 };
558 
560 {
565 
567 
572 
576 
579 
581 };
582 
583 // *****************************************************
584 // ************ Destructible (Wall, Tower..) ***********
585 // *****************************************************
586 
588 {
591  float x;
592  float y;
593  float z;
594  float o;
596 };
597 
599 {
600  float x;
601  float y;
602  float z;
603  float o;
606 };
607 
609 {
610  // Wall (Not spawned in db)
611  // Entry WS X Y Z O Type
612  { 190219, 3749, 5371.46f, 3047.47f, 407.571f, 3.14159f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
613  { 190220, 3750, 5331.26f, 3047.1f, 407.923f, 0.052359f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
614  { 191795, 3764, 5385.84f, 2909.49f, 409.713f, 0.00872f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
615  { 191796, 3772, 5384.45f, 2771.84f, 410.27f, 3.14159f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
616  { 191799, 3762, 5371.44f, 2630.61f, 408.816f, 3.13286f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
617  { 191800, 3766, 5301.84f, 2909.09f, 409.866f, 0.008724f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
618  { 191801, 3770, 5301.06f, 2771.41f, 409.901f, 3.14159f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
619  { 191802, 3751, 5280.2f, 2995.58f, 408.825f, 1.61443f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
620  { 191803, 3752, 5279.14f, 2956.02f, 408.604f, 1.5708f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
621  { 191804, 3767, 5278.69f, 2882.51f, 409.539f, 1.5708f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
622  { 191806, 3769, 5279.5f, 2798.94f, 409.998f, 1.5708f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
623  { 191807, 3759, 5279.94f, 2724.77f, 409.945f, 1.56207f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
624  { 191808, 3760, 5279.6f, 2683.79f, 409.849f, 1.55334f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
625  { 191809, 3761, 5330.96f, 2630.78f, 409.283f, 3.13286f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
626  { 190369, 3753, 5256.08f, 2933.96f, 409.357f, 3.13286f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
627  { 190370, 3758, 5257.46f, 2747.33f, 409.743f, -3.13286f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
628  { 190371, 3754, 5214.96f, 2934.09f, 409.19f, -0.008724f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
629  { 190372, 3757, 5215.82f, 2747.57f, 409.188f, -3.13286f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
630  { 190374, 3755, 5162.27f, 2883.04f, 410.256f, 1.57952f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
631  { 190376, 3756, 5163.72f, 2799.84f, 409.227f, 1.57952f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
632 
633  // Tower of keep (Not spawned in db)
634  { 190221, 3711, 5281.15f, 3044.59f, 407.843f, 3.11539f, BATTLEFIELD_WG_OBJECTTYPE_KEEP_TOWER }, // NW
635  { 190373, 3713, 5163.76f, 2932.23f, 409.19f, 3.12412f, BATTLEFIELD_WG_OBJECTTYPE_KEEP_TOWER }, // SW
636  { 190377, 3714, 5166.4f, 2748.37f, 409.188f, -1.5708f, BATTLEFIELD_WG_OBJECTTYPE_KEEP_TOWER }, // SE
637  { 190378, 3712, 5281.19f, 2632.48f, 409.099f, -1.58825f, BATTLEFIELD_WG_OBJECTTYPE_KEEP_TOWER }, // NE
638 
639  // Wall (with passage) (Not spawned in db)
640  { 191797, 3765, 5343.29f, 2908.86f, 409.576f, 0.008724f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
641  { 191798, 3771, 5342.72f, 2771.39f, 409.625f, 3.14159f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
642  { 191805, 3768, 5279.13f, 2840.8f, 409.783f, 1.57952f, BATTLEFIELD_WG_OBJECTTYPE_WALL },
643 
644  // South tower (Not spawned in db)
645  { 190356, 3704, 4557.17f, 3623.94f, 395.883f, 1.67552f, BATTLEFIELD_WG_OBJECTTYPE_TOWER }, // W
646  { 190357, 3705, 4398.17f, 2822.5f, 405.627f, -3.12412f, BATTLEFIELD_WG_OBJECTTYPE_TOWER }, // S
647  { 190358, 3706, 4459.1f, 1944.33f, 434.991f, -2.00276f, BATTLEFIELD_WG_OBJECTTYPE_TOWER }, // E
648 
649  // Door of forteress (Not spawned in db)
650  { GO_WINTERGRASP_FORTRESS_GATE, 3763, 5162.99f, 2841.23f, 410.162f, -3.13286f, BATTLEFIELD_WG_OBJECTTYPE_DOOR },
651 
652  // Last door (Not spawned in db)
653  { GO_WINTERGRASP_VAULT_GATE, 3773, 5397.11f, 2841.54f, 425.899f, 3.14159f, BATTLEFIELD_WG_OBJECTTYPE_DOOR_LAST },
654 };
655 
657 {
659 
660  struct
661  {
664  } TextIds;
665 };
666 
668 {
676 };
677 
679 {
680  { 5391.19f, 3060.8f, 419.616f, 1.69557f },
681  { 5266.75f, 2976.5f, 421.067f, 3.20354f },
682  { 5234.86f, 2948.8f, 420.88f, 1.61311f },
683  { 5323.05f, 2923.7f, 421.645f, 1.5817f },
684  { 5363.82f, 2923.87f, 421.709f, 1.60527f },
685  { 5264.04f, 2861.34f, 421.587f, 3.21142f },
686  { 5264.68f, 2819.78f, 421.656f, 3.15645f },
687  { 5322.16f, 2756.69f, 421.646f, 4.69978f },
688  { 5363.78f, 2756.77f, 421.629f, 4.78226f },
689  { 5236.2f, 2732.68f, 421.649f, 4.72336f },
690  { 5265.02f, 2704.63f, 421.7f, 3.12507f },
691  { 5350.87f, 2616.03f, 421.243f, 4.72729f },
692  { 5390.95f, 2615.5f, 421.126f, 4.6409f },
693  { 5148.8f, 2820.24f, 421.621f, 3.16043f },
694  { 5147.98f, 2861.93f, 421.63f, 3.18792f },
695 };
696 
697 // Here there is all npc keeper spawn point
699 {
700  // X Y Z O horde alliance
701  // North East
702  { 5326.203125f, 2660.026367f, 409.100891f, 2.543383f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Roaming Guard
703  { 5298.430176f, 2738.760010f, 409.316010f, 3.971740f, BATTLEFIELD_WG_NPC_VIERON_BLAZEFEATHER, BATTLEFIELD_WG_NPC_BOWYER_RANDOLPH }, // Vieron Blazefeather
704  { 5335.310059f, 2764.110107f, 409.274994f, 4.834560f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
705  { 5349.810059f, 2763.629883f, 409.333008f, 4.660030f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
706  // North
707  { 5373.470215f, 2789.060059f, 409.322998f, 2.600540f, BATTLEFIELD_WG_NPC_STONE_GUARD_MUKAR, BATTLEFIELD_WG_NPC_KNIGHT_DAMERON }, // Stone Guard Mukar
708  { 5296.560059f, 2789.870117f, 409.274994f, 0.733038f, BATTLEFIELD_WG_NPC_HOODOO_MASTER_FU_JIN, BATTLEFIELD_WG_NPC_SORCERESS_KAYLANA }, // Voodoo Master Fu'jin
709  { 5372.670000f, 2786.740000f, 409.442000f, 2.809980f, BATTLEFIELD_WG_NPC_CHAMPION_ROS_SLAI, BATTLEFIELD_WG_NPC_MARSHAL_MAGRUDER }, // Wintergrasp Quartermaster
710  { 5368.709961f, 2856.360107f, 409.322998f, 2.949610f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
711  { 5367.910156f, 2826.520020f, 409.322998f, 3.333580f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
712  { 5389.270020f, 2847.370117f, 418.759003f, 3.106690f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
713  { 5388.560059f, 2834.770020f, 418.759003f, 3.071780f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
714  { 5359.129883f, 2837.989990f, 409.364014f, 4.698930f, BATTLEFIELD_WG_NPC_COMMANDER_DARDOSH, BATTLEFIELD_WG_NPC_COMMANDER_ZANNETH }, // Commander Dardosh
715  { 5366.129883f, 2833.399902f, 409.322998f, 3.141590f, BATTLEFIELD_WG_NPC_TACTICAL_OFFICER_KILRATH, BATTLEFIELD_WG_NPC_TACTICAL_OFFICER_AHBRAMIS }, // Tactical Officer Kilrath
716  // X Y Z O horde alliance
717  // North West
718  { 5350.680176f, 2917.010010f, 409.274994f, 1.466080f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
719  { 5335.120117f, 2916.800049f, 409.444000f, 1.500980f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
720  { 5295.560059f, 2926.669922f, 409.274994f, 0.872665f, BATTLEFIELD_WG_NPC_SIEGESMITH_STRONGHOOF, BATTLEFIELD_WG_NPC_SIEGE_MASTER_STOUTHANDLE }, // Stronghoof
721  { 5371.399902f, 3026.510010f, 409.205994f, 3.250030f, BATTLEFIELD_WG_NPC_PRIMALIST_MULFORT, BATTLEFIELD_WG_NPC_ANCHORITE_TESSA }, // Primalist Mulfort
722  { 5392.123535f, 3031.110352f, 409.187683f, 3.677212f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Roaming Guard
723  // South
724  { 5270.060059f, 2847.550049f, 409.274994f, 3.071780f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
725  { 5270.160156f, 2833.479980f, 409.274994f, 3.124140f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
726  { 5179.109863f, 2837.129883f, 409.274994f, 3.211410f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
727  { 5179.669922f, 2846.600098f, 409.274994f, 3.089230f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
728  { 5234.970215f, 2883.399902f, 409.274994f, 4.293510f, BATTLEFIELD_WG_NPC_LIEUTENANT_MURP, BATTLEFIELD_WG_NPC_SENIOR_DEMOLITIONIST_LEGOSO }, // Lieutenant Murp
729  // X Y Z O horde alliance
730  // Portal guards (from around the fortress)
731  { 5319.209473f, 3055.947754f, 409.176636f, 1.020201f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
732  { 5311.612305f, 3061.207275f, 408.734161f, 0.965223f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
733  { 5264.713379f, 3017.283447f, 408.479706f, 3.482424f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
734  { 5269.096191f, 3008.315918f, 408.826294f, 3.843706f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
735  { 5201.414551f, 2945.096924f, 409.190735f, 0.945592f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
736  { 5193.386230f, 2949.617188f, 409.190735f, 1.145859f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
737  { 5148.116211f, 2904.761963f, 409.193756f, 3.368532f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
738  { 5153.355957f, 2895.501465f, 409.199310f, 3.549174f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
739  { 5154.353027f, 2787.349365f, 409.250183f, 2.555644f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
740  { 5150.066406f, 2777.876953f, 409.343903f, 2.708797f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
741  { 5193.706543f, 2732.882812f, 409.189514f, 4.845073f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
742  { 5202.126953f, 2737.570557f, 409.189514f, 5.375215f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
743  { 5269.181152f, 2671.174072f, 409.098999f, 2.457459f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
744  { 5264.960938f, 2662.332520f, 409.098999f, 2.598828f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
745  { 5307.111816f, 2616.006836f, 409.095734f, 5.355575f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
746  { 5316.770996f, 2619.430176f, 409.027740f, 5.363431f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A } // Standing Guard
747 };
748 
750 {
751  { 5032.04f, 3681.79f, 362.980f, 4.210f, BATTLEFIELD_WG_NPC_VIERON_BLAZEFEATHER, 0 },
752  { 5020.71f, 3626.19f, 360.150f, 4.640f, BATTLEFIELD_WG_NPC_HOODOO_MASTER_FU_JIN, 0 },
753  { 4994.85f, 3660.51f, 359.150f, 2.260f, BATTLEFIELD_WG_NPC_COMMANDER_DARDOSH, 0 },
754  { 5015.46f, 3677.11f, 362.970f, 6.009f, BATTLEFIELD_WG_NPC_TACTICAL_OFFICER_KILRATH, 0 },
755  { 5031.12f, 3663.77f, 363.500f, 3.110f, BATTLEFIELD_WG_NPC_SIEGESMITH_STRONGHOOF, 0 },
756  { 5042.74f, 3675.82f, 363.060f, 3.358f, BATTLEFIELD_WG_NPC_PRIMALIST_MULFORT, 0 },
757  { 5014.45f, 3640.87f, 361.390f, 3.280f, BATTLEFIELD_WG_NPC_LIEUTENANT_MURP, 0 },
758  { 5100.07f, 2168.89f, 365.779f, 1.972f, 0, BATTLEFIELD_WG_NPC_BOWYER_RANDOLPH },
759  { 5081.70f, 2173.73f, 365.878f, 0.855f, 0, BATTLEFIELD_WG_NPC_SORCERESS_KAYLANA },
760  { 5078.28f, 2183.70f, 365.029f, 1.466f, 0, BATTLEFIELD_WG_NPC_COMMANDER_ZANNETH },
761  { 5088.49f, 2188.18f, 365.647f, 5.253f, 0, BATTLEFIELD_WG_NPC_TACTICAL_OFFICER_AHBRAMIS },
762  { 5095.67f, 2193.28f, 365.924f, 4.939f, 0, BATTLEFIELD_WG_NPC_SIEGE_MASTER_STOUTHANDLE },
763  { 5088.61f, 2167.66f, 365.689f, 0.680f, 0, BATTLEFIELD_WG_NPC_ANCHORITE_TESSA },
764  { 5080.40f, 2199.00f, 359.489f, 2.967f, 0, BATTLEFIELD_WG_NPC_SENIOR_DEMOLITIONIST_LEGOSO },
765 };
766 
768 {
770  float x;
771  float y;
772  float z;
773  float o;
774 };
775 
777 {
778  // Player teleporter
779  { 190763, 5153.41f, 2901.35f, 409.191f, -0.069f },
780  { 190763, 5268.70f, 2666.42f, 409.099f, -0.715f },
781  { 190763, 5197.05f, 2944.81f, 409.191f, 2.3387f },
782  { 190763, 5196.67f, 2737.34f, 409.189f, -2.932f },
783  { 190763, 5314.58f, 3055.85f, 408.862f, 0.5410f },
784  { 190763, 5391.28f, 2828.09f, 418.675f, -2.164f },
785  { 190763, 5153.93f, 2781.67f, 409.246f, 1.6580f },
786  { 190763, 5311.44f, 2618.93f, 409.092f, -2.373f },
787  { 190763, 5269.21f, 3013.84f, 408.828f, -1.762f },
788  { 190763, 5401.62f, 2853.66f, 418.674f, 2.6354f },
789  // Vehicle teleporter
790  { 192951, 5314.51f, 2703.69f, 408.550f, -0.890f },
791  { 192951, 5316.25f, 2977.04f, 408.539f, -0.820f },
792 };
793 
794 // *********************************************************
795 // **********Tower Element(GameObject, Creature)************
796 // *********************************************************
797 
799 {
800  uint32 towerEntry; // Gameobject id of tower
801  uint8 nbObject; // Number of gameobjects spawned on this point
802  WintergraspObjectPositionData GameObject[6]; // Gameobject position and entry (Horde/Alliance)
803 
804  // Creature: Turrets and Guard /// @todo: Killed on Tower destruction ? Tower damage ? Requires confirming
809 };
810 
812 // 192414 : 0 in sql, 1 in header
813 // 192278 : 0 in sql, 3 in header
815 {
816  // West tower
817  {
818  190356,
819  6,
820  {
821  { 4559.109863f, 3606.219971f, 419.998993f, -1.483530f, 192488, 192501 }, // Flag on tower
822  { 4539.419922f, 3622.489990f, 420.033997f, -3.071770f, 192488, 192501 }, // Flag on tower
823  { 4555.259766f, 3641.649902f, 419.973999f, 1.675510f, 192488, 192501 }, // Flag on tower
824  { 4574.870117f, 3625.909912f, 420.079010f, 0.080117f, 192488, 192501 }, // Flag on tower
825  { 4433.899902f, 3534.139893f, 360.274994f, -1.850050f, 192269, 192278 }, // Flag near workshop
826  { 4572.930176f, 3475.520020f, 363.009003f, 1.42240f, 192269, 192278 } // Flag near bridge
827  },
828  1,
829  {
830  { 4418.688477f, 3506.251709f, 358.975494f, 4.293305f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Roaming Guard
831  { 0, 0, 0, 0, 0, 0 },
832  { 0, 0, 0, 0, 0, 0 },
833  { 0, 0, 0, 0, 0, 0 },
834  { 0, 0, 0, 0, 0, 0 },
835  { 0, 0, 0, 0, 0, 0 },
836  { 0, 0, 0, 0, 0, 0 },
837  { 0, 0, 0, 0, 0, 0 },
838  { 0, 0, 0, 0, 0, 0 },
839  },
840  0,
841  {
842  { 0, 0, 0, 0, 0, 0 },
843  { 0, 0, 0, 0, 0, 0 },
844  { 0, 0, 0, 0, 0, 0 },
845  { 0, 0, 0, 0, 0, 0 },
846  { 0, 0, 0, 0, 0, 0 },
847  }
848  },
849 
850  // South Tower
851  {
852  190357,
853  5,
854  {
855  { 4416.000000f, 2822.669922f, 429.851013f, -0.017452f, 192488, 192501 }, // Flag on tower
856  { 4398.819824f, 2804.699951f, 429.791992f, -1.588250f, 192488, 192501 }, // Flag on tower
857  { 4387.620117f, 2719.570068f, 389.934998f, -1.544620f, 192366, 192414 }, // Flag near tower
858  { 4464.120117f, 2855.449951f, 406.110992f, 0.829032f, 192366, 192429 }, // Flag near tower
859  { 4526.459961f, 2810.179932f, 391.200012f, -2.993220f, 192269, 192278 }, // Flag near bridge
860  { 0, 0, 0, 0, 0, 0 },
861  },
862  6,
863  {
864  { 4452.859863f, 2808.870117f, 402.604004f, 6.056290f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
865  { 4455.899902f, 2835.958008f, 401.122559f, 0.034907f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
866  { 4412.649414f, 2953.792236f, 374.799957f, 0.980838f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Roaming Guard
867  { 4362.089844f, 2811.510010f, 407.337006f, 3.193950f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
868  { 4412.290039f, 2753.790039f, 401.015015f, 5.829400f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
869  { 4421.939941f, 2773.189941f, 400.894989f, 5.707230f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
870  { 0, 0, 0, 0, 0, 0},
871  { 0, 0, 0, 0, 0, 0},
872  { 0, 0, 0, 0, 0, 0},
873  },
874  0,
875  {
876  { 0, 0, 0, 0, 0, 0 },
877  { 0, 0, 0, 0, 0, 0 },
878  { 0, 0, 0, 0, 0, 0 },
879  { 0, 0, 0, 0, 0, 0 },
880  { 0, 0, 0, 0, 0, 0 },
881  },
882  },
883 
884  // East Tower
885  {
886  190358,
887  4,
888  {
889  { 4466.790039f, 1960.420044f, 459.144012f, 1.151920f, 192488, 192501 }, // Flag on tower
890  { 4475.350098f, 1937.030029f, 459.070007f, -0.43633f, 192488, 192501 }, // Flag on tower
891  { 4451.759766f, 1928.099976f, 459.075989f, -2.00713f, 192488, 192501 }, // Flag on tower
892  { 4442.990234f, 1951.900024f, 459.092987f, 2.740160f, 192488, 192501 }, // Flag on tower
893  { 0, 0, 0, 0, 0, 0 },
894  { 0, 0, 0, 0, 0, 0 },
895  },
896  5,
897  {
898  { 4501.060059f, 1990.280029f, 431.157013f, 1.029740f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
899  { 4463.830078f, 2015.180054f, 430.299988f, 1.431170f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
900  { 4494.580078f, 1943.760010f, 435.627014f, 6.195920f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
901  { 4450.149902f, 1897.579956f, 435.045013f, 4.398230f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
902  { 4428.870117f, 1906.869995f, 432.648010f, 3.996800f, BATTLEFIELD_WG_NPC_GUARD_H, BATTLEFIELD_WG_NPC_GUARD_A }, // Standing Guard
903  { 0, 0, 0, 0, 0, 0 },
904  { 0, 0, 0, 0, 0, 0 },
905  { 0, 0, 0, 0, 0, 0 },
906  { 0, 0, 0, 0, 0, 0 },
907  },
908  0,
909  {
910  { 0, 0, 0, 0, 0, 0 },
911  { 0, 0, 0, 0, 0, 0 },
912  { 0, 0, 0, 0, 0, 0 },
913  { 0, 0, 0, 0, 0, 0 },
914  { 0, 0, 0, 0, 0, 0 },
915  },
916  },
917 };
918 
920 {
926 };
927 
929 
931 {
932  {
933  190221,
934  0,
935  {
936  { 0, 0, 0, 0 },
937  { 0, 0, 0, 0 },
938  { 0, 0, 0, 0 },
939  { 0, 0, 0, 0 },
940  { 0, 0, 0, 0 },
941  },
942  2,
943  {
944  { 5255.88f, 3047.63f, 438.499f, 3.13677f },
945  { 5280.9f, 3071.32f, 438.499f, 1.62879f },
946  { 0, 0, 0, 0 },
947  { 0, 0, 0, 0 },
948  { 0, 0, 0, 0 },
949  },
950  },
951  {
952  190373,
953  0,
954  {
955  { 0, 0, 0, 0 },
956  { 0, 0, 0, 0 },
957  { 0, 0, 0, 0 },
958  { 0, 0, 0, 0 },
959  { 0, 0, 0, 0 },
960  },
961  2,
962  {
963  { 5138.59f, 2935.16f, 439.845f, 3.11723f },
964  { 5163.06f, 2959.52f, 439.846f, 1.47258f },
965  { 0, 0, 0, 0 },
966  { 0, 0, 0, 0 },
967  { 0, 0, 0, 0 },
968  },
969  },
970  {
971  190377,
972  0,
973  {
974  { 0, 0, 0, 0 },
975  { 0, 0, 0, 0 },
976  { 0, 0, 0, 0 },
977  { 0, 0, 0, 0 },
978  { 0, 0, 0, 0 },
979  },
980  2,
981  {
982  { 5163.84f, 2723.74f, 439.844f, 1.3994f },
983  { 5139.69f, 2747.4f, 439.844f, 3.17221f },
984  { 0, 0, 0, 0 },
985  { 0, 0, 0, 0 },
986  { 0, 0, 0, 0 },
987  },
988  },
989  {
990  190378,
991  0,
992  {
993  { 0, 0, 0, 0 },
994  { 0, 0, 0, 0 },
995  { 0, 0, 0, 0 },
996  { 0, 0, 0, 0 },
997  { 0, 0, 0, 0 },
998  },
999  2,
1000  {
1001  { 5278.21f, 2607.23f, 439.755f, 4.71944f },
1002  { 5255.01f, 2631.98f, 439.755f, 3.15257f },
1003  { 0, 0, 0, 0 },
1004  { 0, 0, 0, 0 },
1005  { 0, 0, 0, 0 },
1006  },
1007  },
1008  {
1009  190356,
1010  2,
1011  {
1012  {4537.380371f, 3599.531738f, 402.886993f, 3.998462f},
1013  {4581.497559f, 3604.087158f, 402.886963f, 5.651723f},
1014  {0, 0, 0, 0},
1015  {0, 0, 0, 0},
1016  {0, 0, 0, 0},
1017  },
1018  2,
1019  {
1020  {4469.448242f, 1966.623779f, 465.647217f, 1.153573f},
1021  {4581.895996f, 3626.438477f, 426.539062f, 0.117806f},
1022  {0, 0, 0, 0},
1023  {0, 0, 0, 0},
1024  {0, 0, 0, 0},
1025  },
1026  },
1027  {
1028  190357,
1029  2,
1030  {
1031  { 4421.640137f, 2799.935791f, 412.630920f, 5.459298f },
1032  { 4420.263184f, 2845.340332f, 412.630951f, 0.742197f },
1033  { 0, 0, 0, 0 },
1034  { 0, 0, 0, 0 },
1035  { 0, 0, 0, 0 },
1036  },
1037  3,
1038  {
1039  { 4423.430664f, 2822.762939f, 436.283142f, 6.223487f },
1040  { 4397.825684f, 2847.629639f, 436.283325f, 1.579430f },
1041  { 4398.814941f, 2797.266357f, 436.283051f, 4.703747f },
1042  { 0, 0, 0, 0 },
1043  { 0, 0, 0, 0 },
1044  },
1045  },
1046  {
1047  190358,
1048  2,
1049  {
1050  { 4448.138184f, 1974.998779f, 441.995911f, 1.967238f },
1051  { 4448.713379f, 1955.148682f, 441.995178f, 0.380733f },
1052  { 0, 0, 0, 0 },
1053  { 0, 0, 0, 0 },
1054  { 0, 0, 0, 0 },
1055  },
1056  2,
1057  {
1058  { 4469.448242f, 1966.623779f, 465.647217f, 1.153573f },
1059  { 4481.996582f, 1933.658325f, 465.647186f, 5.873029f },
1060  { 0, 0, 0, 0 },
1061  { 0, 0, 0, 0 },
1062  { 0, 0, 0, 0 },
1063  },
1064  },
1065 };
1066 
1067 // *********************************************************
1068 // *****************WorkShop Data & Element*****************
1069 // *********************************************************
1070 
1072 {
1075 
1076  struct
1077  {
1082  } TextIds;
1083 };
1084 
1086 {
1091  // KEEP WORKSHOPS - It can't be taken, so it doesn't have a textids
1094 };
1095 
1096 // ********************************************************************
1097 // * Structs using for Building, Graveyard, Workshop *
1098 // ********************************************************************
1099 
1100 // Structure for different buildings that can be destroyed during battle
1102 {
1103 private:
1104  // WG object
1106 
1107  // Linked gameobject
1109 
1110  // the team that controls this point
1112 
1115 
1117 
1119 
1120  // GameObject associations
1121  GuidSet m_GameObjectList[BG_TEAMS_COUNT];
1122 
1123  // Creature associations
1124  GuidSet m_CreatureBottomList[BG_TEAMS_COUNT];
1125  GuidSet m_CreatureTopList[BG_TEAMS_COUNT];
1128 
1129 public:
1131  void Init(GameObject* go);
1132 
1133  ObjectGuid const& GetGUID() const { return _buildGUID; }
1134 
1135  void Rebuild();
1136 
1137  // Called when associated gameobject is damaged
1138  void Damaged();
1139 
1140  // Called when associated gameobject is destroyed
1141  void Destroyed();
1142 
1143  void UpdateCreatureAndGo();
1144 
1145  void UpdateTurretAttack(bool disable);
1146 
1147  void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet);
1148 
1149  void Save();
1150 };
1151 
1152 // Structure for the 6 workshop
1154 {
1155 private:
1156  BattlefieldWG* _wg; // Pointer to wintergrasp
1159  TeamId _teamControl; // Team witch control the workshop
1160  GuidSet _creatureOnPoint[BG_TEAMS_COUNT]; // Contain all Creature associate to this point
1161  GuidSet _gameObjectOnPoint[BG_TEAMS_COUNT]; // Contain all Gameobject associate to this point
1162 
1164 
1165 public:
1167 
1168  uint8 GetId() const { return _staticInfo->WorkshopId; }
1169  TeamId GetTeamControl() const { return _teamControl; }
1170 
1171  // Spawning associate creature and store them
1172  void AddCreature(WintergraspObjectPositionData const& obj);
1173 
1174  // Spawning Associate gameobject and store them
1175  void AddGameObject(WintergraspObjectPositionData const& obj);
1176 
1177  // Called on change faction in CapturePoint class
1178  void GiveControlTo(TeamId teamId, bool init = false);
1179 
1180  void UpdateGraveyardAndWorkshop();
1181 
1182  void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates& packet);
1183 
1184  void Save();
1185 };
1186 
1187 #endif
WintergraspGameObjectBuildingType
Definition: BattlefieldWG.h:451
virtual uint32 GetData(uint32 dataId) const override
Definition: Battlefield.h:266
Definition: BattlefieldWG.h:163
virtual void OnPlayerLeaveWar(Player *)
Called when a player leave the battle.
Definition: Battlefield.h:315
Definition: BattlefieldWG.h:509
Definition: BattlefieldWG.h:49
Definition: BattlefieldWG.h:204
Definition: BattlefieldWG.h:75
uint8 const WG_MAX_TOWER
Definition: BattlefieldWG.h:449
Definition: BattlefieldWG.h:517
Definition: BattlefieldWG.h:545
Definition: BattlefieldWG.h:192
void ChangeTeam(TeamId oldteam) override
Definition: BattlefieldWG.cpp:1042
Definition: BattlefieldWG.h:479
Definition: BattlefieldWG.h:467
Definition: BattlefieldWG.h:561
WintergraspWorkshopIds
Definition: BattlefieldWG.h:486
uint8 const WG_MAX_OUTSIDE_NPC
Definition: BattlefieldWG.h:445
Definition: BattlefieldWG.h:135
Definition: BattlefieldWG.h:207
uint8 AllianceAttack
Definition: BattlefieldWG.h:1079
virtual bool SetupBattlefield()
Call this to init the Battlefield.
Definition: Battlefield.h:210
Definition: BattlefieldWG.h:1071
uint32 GetTextId() const
Definition: BattlefieldWG.h:152
Definition: BattlefieldWG.h:197
uint32 WorldState
Definition: BattlefieldWG.h:590
Definition: BattlefieldWG.h:562
struct StaticWintergraspTowerInfo::@210 TextIds
Definition: BattlefieldWG.h:128
Definition: BattlefieldWG.h:212
Definition: BattlefieldWG.h:185
std::set< GameObject * > GameObjectSet
Definition: BattlefieldWG.h:28
Definition: BattlefieldWG.h:193
Definition: BattlefieldWG.h:508
Definition: BattlefieldWG.h:503
Definition: BattlefieldWG.h:483
Definition: BattlefieldWG.h:195
WintergraspGameObjectBuildingType type
Definition: BattlefieldWG.h:595
Definition: BattlefieldWG.h:767
uint32 gyid
Definition: BattlefieldWG.h:223
Definition: BattlefieldWG.h:136
Definition: BattlefieldWG.h:548
Definition: BattlefieldWG.h:556
Definition: BattlefieldWG.h:39
Definition: BattlefieldWG.h:91
Definition: BattlefieldWG.h:116
uint32 const WGQuest[2][6]
Definition: BattlefieldWG.h:229
bool m_isRelicInteractible
Definition: BattlefieldWG.h:416
Definition: BattlefieldWG.h:521
Definition: BattlefieldWG.h:166
Definition: BattlefieldWG.h:543
Definition: BattlefieldWG.h:175
Definition: BattlefieldWG.h:52
void LinkToWorkshop(WintergraspWorkshop *workshop)
Definition: BattlefieldWG.h:256
Definition: BattlefieldWG.h:492
Definition: BattlefieldWG.h:188
uint32 entryHorde
Definition: BattlefieldWG.h:604
virtual void OnGameObjectCreate(GameObject *)
Definition: ZoneScript.h:38
Definition: BattlefieldWG.h:137
uint8 TowerId
Definition: BattlefieldWG.h:658
Definition: BattlefieldWG.h:457
uint32 m_GossipTextId
Definition: BattlefieldWG.h:155
Definition: BattlefieldWG.h:491
StaticWintergraspTowerInfo const TowerData[WG_MAX_TOWER]
Definition: BattlefieldWG.h:667
std::set< WintergraspWorkshop * > WorkshopSet
Definition: BattlefieldWG.h:32
Definition: BattlefieldWG.h:191
float y
Definition: BattlefieldWG.h:592
float z
Definition: BattlefieldWG.h:593
Definition: BattlefieldWG.h:101
Definition: BattlefieldWG.h:211
Definition: BattlefieldWG.h:60
Position const WintergraspStalkerPos
Definition: BattlefieldWG.h:440
Definition: BattlefieldWG.h:502
GameObjectBuildingSet BuildingsInZone
Definition: BattlefieldWG.h:422
Definition: BattlefieldWG.h:126
Definition: BattlefieldWG.h:109
WintergraspObjectPositionData const WGKeepNPC[WG_MAX_KEEP_NPC]
Definition: BattlefieldWG.h:698
Definition: BattlefieldWG.h:269
Definition: BattlefieldWG.h:46
uint32 const WintergraspFaction[]
Definition: BattlefieldWG.h:438
uint8 nbCreatureTop
Definition: BattlefieldWG.h:807
Definition: BattlefieldWG.h:114
Definition: BattlefieldWG.h:555
uint32 WorldStateId
Definition: BattlefieldWG.h:1074
Definition: BattlefieldWG.h:199
virtual void OnPlayerJoinWar(Player *)
Called when a player accept to join the battle.
Definition: Battlefield.h:313
Definition: BattlefieldWG.h:525
Definition: BattlefieldWG.h:470
Definition: BattlefieldWG.h:48
Definition: BattlefieldWG.h:121
Definition: BattlefieldWG.h:490
Definition: BattlefieldWG.h:127
ObjectGuid _buildGUID
Definition: BattlefieldWG.h:1108
WintergraspObjectPositionData CreatureTop[5]
Definition: BattlefieldWG.h:808
Definition: BattlefieldWG.h:472
Definition: BattlefieldWG.h:45
Definition: BattlefieldWG.h:205
Definition: BattlefieldWG.h:187
Definition: BattlefieldWG.h:104
uint8 WorkshopId
Definition: BattlefieldWG.h:1073
Definition: BattlefieldWG.h:578
Definition: Object.h:423
Definition: BattlefieldWG.h:798
Definition: BattlefieldWG.h:537
Definition: Creature.h:467
Definition: BattlefieldWG.h:1101
Definition: BattlefieldWG.h:214
virtual void OnPlayerLeaveZone(Player *)
Called when a player leave battlefield zone.
Definition: Battlefield.h:317
Definition: BattlefieldWG.h:210
Definition: BattlefieldWG.h:125
Position const WGTurret[WG_MAX_TURRET]
Definition: BattlefieldWG.h:678
Definition: BattlefieldWG.h:466
WintergraspCapturePoint(BattlefieldWG *battlefield, TeamId teamInControl)
Definition: BattlefieldWG.cpp:1035
Position TowerCannonBottom[5]
Definition: BattlefieldWG.h:923
float y
Definition: BattlefieldWG.h:601
uint8 const WG_MAX_ATTACKTOWERS
Definition: BattlefieldWG.h:811
uint8 const WG_OUTSIDE_ALLIANCE_NPC
Definition: BattlefieldWG.h:446
Definition: BattlefieldWG.h:580
Definition: BattlefieldWG.h:551
Definition: BattlefieldWG.h:455
Definition: BattlefieldWG.h:571
uint8 nbCreatureBottom
Definition: BattlefieldWG.h:805
void SetRelic(ObjectGuid relicGUID)
Define relic object.
Definition: BattlefieldWG.h:386
uint32 const MaxVehNumWorldState[]
Definition: BattlefieldWG.h:436
Definition: BattlefieldWG.h:82
uint8 Damaged
Definition: BattlefieldWG.h:662
virtual void OnBattleStart()
Called on start.
Definition: Battlefield.h:307
const WintergraspTowerData AttackTowers[WG_MAX_ATTACKTOWERS]
Definition: BattlefieldWG.h:814
Definition: BattlefieldWG.h:553
float o
Definition: BattlefieldWG.h:773
Definition: BattlefieldWG.h:563
WintergraspTeleporterData const WGPortalDefenderData[WG_MAX_TELEPORTER]
Definition: BattlefieldWG.h:776
Definition: BattlefieldWG.h:47
uint32 m_saveTimer
Definition: BattlefieldWG.h:430
Definition: BattlefieldWG.h:50
Definition: BattlefieldWG.h:139
Definition: BattlefieldWG.h:160
Definition: BattlefieldWG.h:198
Definition: BattlefieldWG.h:57
Definition: SharedDefines.h:994
Definition: BattlefieldWG.h:456
#define BG_TEAMS_COUNT
Definition: SharedDefines.h:4555
virtual void DoCompleteOrIncrementAchievement(uint32, Player *, uint8)
Definition: Battlefield.h:328
StaticWintergraspWorkshopInfo const * _staticInfo
Definition: BattlefieldWG.h:1163
Definition: BattlefieldWG.h:200
float x
Definition: BattlefieldWG.h:770
Definition: BattlefieldWG.h:488
GuidSet m_TurretTopList
Definition: BattlefieldWG.h:1127
Definition: BattlefieldWG.h:480
bool CanInteractWithRelic()
Check if players can interact with the relic (Only if the last door has been broken) ...
Definition: BattlefieldWG.h:389
Definition: BattlefieldWG.h:510
virtual void HandleKill(Player *, Unit *)
Called when a Unit is kill in battlefield zone.
Definition: Battlefield.h:232
Definition: BattlefieldWG.h:112
Definition: BattlefieldWG.h:489
Definition: BattlefieldWG.h:251
float z
Definition: BattlefieldWG.h:221
Definition: BattlefieldWG.h:108
uint8 nbTowerCannonBottom
Definition: BattlefieldWG.h:922
BfWGCoordGY const WGGraveYard[BATTLEFIELD_WG_GRAVEYARD_MAX]
Definition: BattlefieldWG.h:236
Definition: BattlefieldWG.h:587
Definition: BattlefieldWG.h:482
Definition: BattlefieldWG.h:65
Definition: BattlefieldWG.h:173
Definition: BattlefieldWG.h:74
Definition: BattlefieldWG.h:176
Definition: BattlefieldWG.h:83
TeamId GetTeamControl() const
Definition: BattlefieldWG.h:1169
WintergraspGameObject
Definition: BattlefieldWG.h:559
Definition: BattlefieldWG.h:538
Definition: BattlefieldWG.h:493
Definition: BattlefieldWG.h:111
Definition: BattlefieldWG.h:518
Definition: BattlefieldWG.h:177
uint32 entry
Definition: BattlefieldWG.h:589
Definition: BattlefieldWG.h:94
WintergraspAchievements
Definition: BattlefieldWG.h:99
Definition: BattlefieldWG.h:499
Definition: BattlefieldWG.h:79
Definition: BattlefieldWG.h:178
GuidSet CanonList
Definition: BattlefieldWG.h:425
uint8 const WG_MAX_TELEPORTER
Definition: BattlefieldWG.h:447
Definition: BattlefieldWG.h:102
uint32 _worldState
Definition: BattlefieldWG.h:1114
uint8 nbTurretTop
Definition: BattlefieldWG.h:924
Definition: BattlefieldWG.h:531
Definition: BattlefieldWG.h:90
Definition: BattlefieldWG.h:71
WGGossipText
Definition: BattlefieldWG.h:170
Definition: BattlefieldWG.h:217
Definition: BattlefieldWG.h:574
const WintergraspTowerCannonData TowerCannon[WG_MAX_TOWER_CANNON]
Definition: BattlefieldWG.h:930
Definition: BattlefieldWG.h:194
Definition: BattlefieldWG.h:68
Definition: BattlefieldWG.h:550
uint8 const WG_MAX_WORKSHOP
Definition: BattlefieldWG.h:448
std::set< Group * > GroupSet
Definition: BattlefieldWG.h:33
Definition: BattlefieldWG.h:134
Definition: BattlefieldWG.h:569
Definition: BattlefieldWG.h:454
virtual void OnStartGrouping()
Called x minutes before battle start when player in zone are invite to join queue.
Definition: Battlefield.h:311
StaticWintergraspTowerInfo const * _staticTowerInfo
Definition: BattlefieldWG.h:1118
WintergraspWorldStates
Definition: BattlefieldWG.h:119
Definition: BattlefieldWG.h:468
Definition: BattlefieldWG.h:80
Definition: BattlefieldWG.h:566
Definition: BattlefieldWG.h:471
Definition: BattlefieldWG.h:201
Definition: BattlefieldWG.h:62
uint8 GetId() const
Definition: BattlefieldWG.h:1168
ObjectGuid m_titansRelicGUID
Definition: BattlefieldWG.h:432
Definition: BattlefieldWG.h:552
Definition: BattlefieldWG.h:477
WintergrastData
Definition: BattlefieldWG.h:36
WintergraspNpcs
Definition: BattlefieldWG.h:181
Definition: BattlefieldWG.h:546
WintergraspTeamControl
Definition: BattlefieldWG.h:506
Definition: BattlefieldWG.h:573
virtual void OnBattleEnd(bool)
Called at the end of battle.
Definition: Battlefield.h:309
TeamId m_team
Definition: Battlefield.h:130
Definition: BattlefieldWG.h:564
uint32_t uint32
Definition: Define.h:150
uint32 textid
Definition: BattlefieldWG.h:225
Definition: BattlefieldWG.h:533
Definition: Battlefield.h:196
float o
Definition: BattlefieldWG.h:603
Definition: BattlefieldWG.h:122
Definition: BattlefieldWG.h:547
Definition: BattlefieldWG.h:113
Definition: WorldStatePackets.h:27
Definition: SharedDefines.h:992
Definition: BattlefieldWG.h:138
Definition: GameObject.h:880
BattlefieldWG * _wg
Definition: BattlefieldWG.h:1156
WintergraspGameObjectState _state
Definition: BattlefieldWG.h:1158
WintergraspObjectPositionData CreatureBottom[9]
Definition: BattlefieldWG.h:806
TeamId _teamControl
Definition: BattlefieldWG.h:1111
uint8 const WG_MAX_OBJ
Definition: BattlefieldWG.h:442
BfGraveyardWG(BattlefieldWG *Bf)
Definition: BattlefieldWG.cpp:1048
Definition: BattlefieldWG.h:524
Definition: BattlefieldWG.h:55
BattlefieldWG * _wg
Definition: BattlefieldWG.h:1105
uint32 const VehNumWorldState[]
Definition: BattlefieldWG.h:435
WGGraveyardId
Definition: BattlefieldWG.h:158
Definition: BattlefieldWG.h:522
float o
Definition: BattlefieldWG.h:222
TeamId startcontrol
Definition: BattlefieldWG.h:226
virtual void OnCreatureRemove(Creature *)
Definition: ZoneScript.h:36
TeamId
Definition: SharedDefines.h:990
Definition: BattlefieldWG.h:107
Definition: BattlefieldWG.h:656
Definition: BattlefieldWG.h:523
Definition: BattlefieldWG.h:38
Definition: BattlefieldWG.h:453
GameObject * GetRelic()
Return pointer to relic object.
Definition: BattlefieldWG.h:383
TeamId _teamControl
Definition: BattlefieldWG.h:1159
Definition: BattlefieldWG.h:61
WintergraspGameObjectBuildingType _type
Definition: BattlefieldWG.h:1113
WintergraspTowerIds
Definition: BattlefieldWG.h:475
Definition: BattlefieldWG.h:536
Definition: BattlefieldWG.h:103
Definition: BattlefieldWG.h:203
Definition: BattlefieldWG.h:189
Definition: BattlefieldWG.h:1153
Definition: BattlefieldWG.h:174
Definition: BattlefieldWG.h:541
Definition: BattlefieldWG.h:520
Definition: BattlefieldWG.h:67
float x
Definition: BattlefieldWG.h:219
Definition: BattlefieldWG.h:93
Definition: BattlefieldWG.h:96
uint8 const WG_MAX_KEEP_NPC
Definition: BattlefieldWG.h:444
Definition: BattlefieldWG.h:532
const uint8 WG_MAX_TOWER_CANNON
Definition: BattlefieldWG.h:928
Definition: BattlefieldWG.h:478
void SetRelicInteractible(bool allow)
Define if player can interact with the relic.
Definition: BattlefieldWG.h:392
Definition: BattlefieldWG.h:481
uint8 Destroyed
Definition: BattlefieldWG.h:663
Definition: BattlefieldWG.h:598
Definition: BattlefieldWG.h:106
Definition: BattlefieldWG.h:570
Definition: BattlefieldWG.h:54
Definition: BattlefieldWG.h:519
Definition: BattlefieldWG.h:184
uint32 towerEntry
Definition: BattlefieldWG.h:800
Definition: BattlefieldWG.h:88
Definition: BattlefieldWG.h:919
Definition: BattlefieldWG.h:70
Definition: BattlefieldWG.h:575
Definition: BattlefieldWG.h:577
Position TurretTop[5]
Definition: BattlefieldWG.h:925
Definition: BattlefieldWG.h:540
Definition: BattlefieldWG.h:89
virtual void OnPlayerEnterZone(Player *)
Called when a player enter in battlefield zone.
Definition: Battlefield.h:319
std::set< ObjectGuid > GuidSet
Definition: ObjectGuid.h:332
std::set< BfWGGameObjectBuilding * > GameObjectBuildingSet
Definition: BattlefieldWG.h:31
TeamId GetTeam() const
Definition: BattlefieldWG.h:259
Definition: BattlefieldWG.h:124
float x
Definition: BattlefieldWG.h:591
#define TC_GAME_API
Definition: Define.h:134
StaticWintergraspWorkshopInfo const WorkshopData[WG_MAX_WORKSHOP]
Definition: BattlefieldWG.h:1085
uint8 HordeAttack
Definition: BattlefieldWG.h:1081
float z
Definition: BattlefieldWG.h:772
float x
Definition: BattlefieldWG.h:600
uint8 nbObject
Definition: BattlefieldWG.h:801
ObjectGuid const & GetGUID() const
Definition: BattlefieldWG.h:1133
uint32 const ClockWorldState[]
Definition: BattlefieldWG.h:437
Definition: BattlefieldWG.h:76
uint32 entry
Definition: BattlefieldWG.h:769
Definition: BattlefieldWG.h:56
Definition: BattlefieldWG.h:463
WintergraspAreaIds
Definition: BattlefieldWG.h:131
Definition: BattlefieldWG.h:63
uint8_t uint8
Definition: Define.h:152
Definition: Position.h:27
Definition: BattlefieldWG.h:190
const WintergraspObjectPositionData WGOutsideNPC[WG_MAX_OUTSIDE_NPC]
Definition: BattlefieldWG.h:749
virtual void FillInitialWorldStates(WorldPackets::WorldState::InitWorldStates &)=0
Definition: BattlefieldWG.h:92
Definition: BattlefieldWG.h:208
WintergraspGameObjectState
Definition: BattlefieldWG.h:461
uint8 HordeCapture
Definition: BattlefieldWG.h:1080
Definition: BattlefieldWG.h:123
uint8 type
Definition: BattlefieldWG.h:224
Definition: BattlefieldWG.h:146
GuidSet DefenderPortalList
Definition: BattlefieldWG.h:420
virtual void SendInitWorldStatesToAll()=0
Send all worldstate data to all player in zone.
float o
Definition: BattlefieldWG.h:594
void SetTextId(uint32 textId)
Definition: BattlefieldWG.h:151
Definition: ObjectGuid.h:189
float y
Definition: BattlefieldWG.h:220
Definition: BattlefieldWG.h:64
Definition: BattlefieldWG.h:516
WintergraspWorldstates
Definition: BattlefieldWG.h:496
Definition: BattlefieldWG.h:95
Definition: BattlefieldWG.h:164
Definition: BattlefieldWG.h:539
WintergraspData
Definition: BattlefieldWG.h:86
Definition: BattlefieldWG.h:51
Definition: BattlefieldWG.h:544
GuidSet m_TowerCannonBottomList
Definition: BattlefieldWG.h:1126
virtual void ProcessEvent(WorldObject *, uint32)
Definition: ZoneScript.h:54
ObjectGuid _buildGUID
Definition: BattlefieldWG.h:1157
virtual bool Update(uint32 diff)
Called every time for update bf data and time.
Definition: Battlefield.cpp:128
Definition: BattlefieldWG.h:528
struct StaticWintergraspWorkshopInfo::@211 TextIds
Definition: BattlefieldWG.h:133
uint32 towerEntry
Definition: BattlefieldWG.h:921
Definition: SharedDefines.h:993
Definition: BattlefieldWG.h:162
Definition: BattlefieldWG.h:498
uint8 AllianceCapture
Definition: BattlefieldWG.h:1078
Definition: Unit.h:1305
Definition: BattlefieldWG.h:500
Definition: BattlefieldWG.h:458
Definition: BattlefieldWG.h:165
WintergraspWorkshop * m_Workshop
Definition: BattlefieldWG.h:262
WorkshopSet Workshops
Definition: BattlefieldWG.h:418
Definition: BattlefieldWG.h:172
uint32 entryAlliance
Definition: BattlefieldWG.h:605
WintergraspText
Definition: BattlefieldWG.h:513
Definition: BattlefieldWG.h:115
Definition: BattlefieldWG.h:530
float z
Definition: BattlefieldWG.h:602
Definition: BattlefieldWG.h:465
virtual void OnCreatureCreate(Creature *)
Definition: ZoneScript.h:35
WintergraspGameObjectState _state
Definition: BattlefieldWG.h:1116
Definition: BattlefieldWG.h:213
GameObject * GetGameObject(ObjectGuid guid)
Definition: Battlefield.cpp:852
float y
Definition: BattlefieldWG.h:771
uint8 const WG_MAX_TURRET
Definition: BattlefieldWG.h:443
Definition: BattlefieldWG.h:464
uint32 m_tenacityStack
Definition: BattlefieldWG.h:429
Definition: BattlefieldWG.h:501
Definition: Battlefield.h:81
virtual void OnUnitDeath(Unit *)
Definition: ZoneScript.h:41
Definition: BattlefieldWG.h:167
Definition: Battlefield.h:149
Definition: BattlefieldWG.h:53
WintergraspSpells
Definition: BattlefieldWG.h:42
Definition: Group.h:191
Definition: BattlefieldWG.h:202
Definition: BattlefieldWG.h:183
Definition: BattlefieldWG.h:110
WintergraspBuildingSpawnData const WGGameObjectBuilding[WG_MAX_OBJ]
Definition: BattlefieldWG.h:608
Definition: BattlefieldWG.h:469
Definition: BattlefieldWG.h:161
Definition: BattlefieldWG.h:568
Definition: BattlefieldWG.h:105