1 | #ifndef OUTDOOR_PVP_ZM_ |
---|
2 | #define OUTDOOR_PVP_ZM_ |
---|
3 | |
---|
4 | #include "OutdoorPvP.h" |
---|
5 | #include "Language.h" |
---|
6 | |
---|
7 | const uint32 OutdoorPvPZMBuffZonesNum = 5; |
---|
8 | // the buff is cast in these zones |
---|
9 | const uint32 OutdoorPvPZMBuffZones[OutdoorPvPZMBuffZonesNum] = {3521,3607,3717,3715,3716}; |
---|
10 | // cast on the players of the controlling faction |
---|
11 | const uint32 ZM_CAPTURE_BUFF = 33779; // twin spire blessing |
---|
12 | // spell that the field scout casts on the player to carry the flag |
---|
13 | const uint32 ZM_BATTLE_STANDARD_A = 32430; |
---|
14 | // spell that the field scout casts on the player to carry the flag |
---|
15 | const uint32 ZM_BATTLE_STANDARD_H = 32431; |
---|
16 | // linked when the central tower is controlled |
---|
17 | const uint32 ZM_GRAVEYARD_ZONE = 3521; |
---|
18 | // linked when the central tower is controlled |
---|
19 | const uint32 ZM_GRAVEYARD_ID = 969; |
---|
20 | // token create spell |
---|
21 | const uint32 ZM_AlliancePlayerKillReward = 32155; |
---|
22 | // token create spell |
---|
23 | const uint32 ZM_HordePlayerKillReward = 32158; |
---|
24 | |
---|
25 | // banners 182527, 182528, 182529, gotta check them ingame |
---|
26 | const go_type ZM_Banner_A = { 182527,530,253.54,7083.81,36.7728,-0.017453,0,0,0.008727,-0.999962 }; |
---|
27 | const go_type ZM_Banner_H = { 182528,530,253.54,7083.81,36.7728,-0.017453,0,0,0.008727,-0.999962 }; |
---|
28 | const go_type ZM_Banner_N = { 182529,530,253.54,7083.81,36.7728,-0.017453,0,0,0.008727,-0.999962 }; |
---|
29 | |
---|
30 | // horde field scout spawn data |
---|
31 | const creature_type ZM_HordeFieldScout = {18564,67,530,296.625,7818.4,42.6294,5.18363}; |
---|
32 | // alliance field scout spawn data |
---|
33 | const creature_type ZM_AllianceFieldScout = {18581,469,530,374.395,6230.08,22.8351,0.593412}; |
---|
34 | |
---|
35 | enum ZMCreatureTypes{ |
---|
36 | ZM_ALLIANCE_FIELD_SCOUT = 0, |
---|
37 | ZM_HORDE_FIELD_SCOUT, |
---|
38 | ZM_CREATURE_NUM |
---|
39 | }; |
---|
40 | |
---|
41 | struct zm_beacon { |
---|
42 | uint32 slider_disp; |
---|
43 | uint32 slider_n; |
---|
44 | uint32 slider_pos; |
---|
45 | uint32 ui_tower_n; |
---|
46 | uint32 ui_tower_h; |
---|
47 | uint32 ui_tower_a; |
---|
48 | uint32 map_tower_n; |
---|
49 | uint32 map_tower_h; |
---|
50 | uint32 map_tower_a; |
---|
51 | uint32 event_enter; |
---|
52 | uint32 event_leave; |
---|
53 | }; |
---|
54 | |
---|
55 | enum ZM_BeaconType{ |
---|
56 | ZM_BEACON_EAST = 0, |
---|
57 | ZM_BEACON_WEST, |
---|
58 | ZM_NUM_BEACONS |
---|
59 | }; |
---|
60 | |
---|
61 | const zm_beacon ZMBeaconInfo[ZM_NUM_BEACONS] = { |
---|
62 | {2533,2535,2534,2560,2559,2558,2652,2651,2650,11807,11806}, |
---|
63 | {2527,2529,2528,2557,2556,2555,2646,2645,2644,11805,11804} |
---|
64 | }; |
---|
65 | |
---|
66 | const uint32 ZMBeaconCaptureA[ZM_NUM_BEACONS] = { |
---|
67 | LANG_OPVP_ZM_CAPTURE_EAST_A, |
---|
68 | LANG_OPVP_ZM_CAPTURE_WEST_A |
---|
69 | }; |
---|
70 | |
---|
71 | const uint32 ZMBeaconCaptureH[ZM_NUM_BEACONS] = { |
---|
72 | LANG_OPVP_ZM_CAPTURE_EAST_H, |
---|
73 | LANG_OPVP_ZM_CAPTURE_WEST_H |
---|
74 | }; |
---|
75 | |
---|
76 | const uint32 ZMBeaconLooseA[ZM_NUM_BEACONS] = { |
---|
77 | LANG_OPVP_ZM_LOOSE_EAST_A, |
---|
78 | LANG_OPVP_ZM_LOOSE_WEST_A |
---|
79 | }; |
---|
80 | |
---|
81 | const uint32 ZMBeaconLooseH[ZM_NUM_BEACONS] = { |
---|
82 | LANG_OPVP_ZM_LOOSE_EAST_H, |
---|
83 | LANG_OPVP_ZM_LOOSE_WEST_H |
---|
84 | }; |
---|
85 | |
---|
86 | const go_type ZMCapturePoints[ZM_NUM_BEACONS] = { |
---|
87 | {182523,530,303.243,6841.36,40.1245,-1.58825,0,0,0.71325,-0.700909}, |
---|
88 | {182522,530,336.466,7340.26,41.4984,-1.58825,0,0,0.71325,-0.700909} |
---|
89 | }; |
---|
90 | |
---|
91 | enum OutdoorPvPZMWorldStates |
---|
92 | { |
---|
93 | ZM_UI_TOWER_SLIDER_N_W = 2529, |
---|
94 | ZM_UI_TOWER_SLIDER_POS_W = 2528, |
---|
95 | ZM_UI_TOWER_SLIDER_DISPLAY_W = 2527, |
---|
96 | |
---|
97 | ZM_UI_TOWER_SLIDER_N_E = 2535, |
---|
98 | ZM_UI_TOWER_SLIDER_POS_E = 2534, |
---|
99 | ZM_UI_TOWER_SLIDER_DISPLAY_E = 2533, |
---|
100 | |
---|
101 | ZM_WORLDSTATE_UNK_1 = 2653, |
---|
102 | |
---|
103 | ZM_UI_TOWER_EAST_N = 2560, |
---|
104 | ZM_UI_TOWER_EAST_H = 2559, |
---|
105 | ZM_UI_TOWER_EAST_A = 2558, |
---|
106 | ZM_UI_TOWER_WEST_N = 2557, |
---|
107 | ZM_UI_TOWER_WEST_H = 2556, |
---|
108 | ZM_UI_TOWER_WEST_A = 2555, |
---|
109 | |
---|
110 | ZM_MAP_TOWER_EAST_N = 2652, |
---|
111 | ZM_MAP_TOWER_EAST_H = 2651, |
---|
112 | ZM_MAP_TOWER_EAST_A = 2650, |
---|
113 | ZM_MAP_GRAVEYARD_H = 2649, |
---|
114 | ZM_MAP_GRAVEYARD_A = 2648, |
---|
115 | ZM_MAP_GRAVEYARD_N = 2647, |
---|
116 | ZM_MAP_TOWER_WEST_N = 2646, |
---|
117 | ZM_MAP_TOWER_WEST_H = 2645, |
---|
118 | ZM_MAP_TOWER_WEST_A = 2644, |
---|
119 | |
---|
120 | ZM_MAP_HORDE_FLAG_READY = 2658, |
---|
121 | ZM_MAP_HORDE_FLAG_NOT_READY = 2657, |
---|
122 | ZM_MAP_ALLIANCE_FLAG_NOT_READY = 2656, |
---|
123 | ZM_MAP_ALLIANCE_FLAG_READY = 2655 |
---|
124 | }; |
---|
125 | |
---|
126 | enum ZM_TowerStateMask{ |
---|
127 | ZM_TOWERSTATE_N = 1, |
---|
128 | ZM_TOWERSTATE_A = 2, |
---|
129 | ZM_TOWERSTATE_H = 4 |
---|
130 | }; |
---|
131 | |
---|
132 | class OutdoorPvPZM; |
---|
133 | class OutdoorPvPObjectiveZM_Beacon : public OutdoorPvPObjective |
---|
134 | { |
---|
135 | friend class OutdoorPvPZM; |
---|
136 | public: |
---|
137 | OutdoorPvPObjectiveZM_Beacon(OutdoorPvP * pvp, ZM_BeaconType type); |
---|
138 | bool Update(uint32 diff); |
---|
139 | void FillInitialWorldStates(WorldPacket & data); |
---|
140 | // used when player is activated/inactivated in the area |
---|
141 | bool HandlePlayerEnter(Player * plr); |
---|
142 | void HandlePlayerLeave(Player * plr); |
---|
143 | void UpdateTowerState(); |
---|
144 | protected: |
---|
145 | bool HandleCapturePointEvent(Player * plr, uint32 eventId); |
---|
146 | protected: |
---|
147 | ZM_BeaconType m_TowerType; |
---|
148 | uint32 m_TowerState; |
---|
149 | }; |
---|
150 | |
---|
151 | enum ZM_GraveYardState{ |
---|
152 | ZM_GRAVEYARD_N = 1, |
---|
153 | ZM_GRAVEYARD_A = 2, |
---|
154 | ZM_GRAVEYARD_H = 4 |
---|
155 | }; |
---|
156 | |
---|
157 | class OutdoorPvPObjectiveZM_GraveYard : public OutdoorPvPObjective |
---|
158 | { |
---|
159 | friend class OutdoorPvPZM; |
---|
160 | public: |
---|
161 | OutdoorPvPObjectiveZM_GraveYard(OutdoorPvP * pvp); |
---|
162 | bool Update(uint32 diff); |
---|
163 | void FillInitialWorldStates(WorldPacket & data); |
---|
164 | void UpdateTowerState(); |
---|
165 | int32 HandleOpenGo(Player *plr, uint64 guid); |
---|
166 | void SetBeaconState(uint32 controlling_team); // not good atm |
---|
167 | bool HandleGossipOption(Player * plr, uint64 guid, uint32 gossipid); |
---|
168 | bool HandleDropFlag(Player * plr, uint32 spellId); |
---|
169 | bool CanTalkTo(Player * plr, Creature * c, GossipOption &gso); |
---|
170 | private: |
---|
171 | uint32 m_GraveYardState; |
---|
172 | protected: |
---|
173 | uint32 m_BothControllingFaction; |
---|
174 | uint64 m_FlagCarrierGUID; |
---|
175 | }; |
---|
176 | |
---|
177 | class OutdoorPvPZM : public OutdoorPvP |
---|
178 | { |
---|
179 | friend class OutdoorPvPObjectiveZM_Beacon; |
---|
180 | public: |
---|
181 | OutdoorPvPZM(); |
---|
182 | bool SetupOutdoorPvP(); |
---|
183 | void HandlePlayerEnterZone(Player *plr, uint32 zone); |
---|
184 | void HandlePlayerLeaveZone(Player *plr, uint32 zone); |
---|
185 | bool Update(uint32 diff); |
---|
186 | void FillInitialWorldStates(WorldPacket &data); |
---|
187 | void SendRemoveWorldStates(Player * plr); |
---|
188 | void HandleKillImpl(Player * plr, Unit * killed); |
---|
189 | void BuffTeam(uint32 team); |
---|
190 | private: |
---|
191 | OutdoorPvPObjectiveZM_GraveYard * m_GraveYard; |
---|
192 | uint32 m_AllianceTowersControlled; |
---|
193 | uint32 m_HordeTowersControlled; |
---|
194 | }; |
---|
195 | |
---|
196 | // todo: flag carrier death/leave/mount/activitychange should give back the gossip options |
---|
197 | #endif |
---|