1 | #ifndef OUTDOOR_PVP_HP_ |
---|
2 | #define OUTDOOR_PVP_HP_ |
---|
3 | |
---|
4 | #include "OutdoorPvP.h" |
---|
5 | |
---|
6 | #define OutdoorPvPHPBuffZonesNum 6 |
---|
7 | // HP, citadel, ramparts, blood furnace, shattered halls, mag's lair |
---|
8 | const uint32 OutdoorPvPHPBuffZones[OutdoorPvPHPBuffZonesNum] = { 3483, 3563, 3562, 3713, 3714, 3836 }; |
---|
9 | |
---|
10 | const uint32 AllianceBuff = 32071; |
---|
11 | |
---|
12 | const uint32 HordeBuff = 32049; |
---|
13 | |
---|
14 | const uint32 AlliancePlayerKillReward = 32155; |
---|
15 | |
---|
16 | const uint32 HordePlayerKillReward = 32158; |
---|
17 | |
---|
18 | enum OutdoorPvPHPTowerType{ |
---|
19 | HP_TOWER_BROKEN_HILL = 0, |
---|
20 | HP_TOWER_OVERLOOK = 1, |
---|
21 | HP_TOWER_STADIUM = 2, |
---|
22 | HP_TOWER_NUM = 3 |
---|
23 | }; |
---|
24 | |
---|
25 | const uint32 HP_CREDITMARKER[HP_TOWER_NUM] = {19032,19028,19029}; |
---|
26 | |
---|
27 | const uint32 HP_CapturePointEvent_Enter[HP_TOWER_NUM] = {11404,11396,11388}; |
---|
28 | |
---|
29 | const uint32 HP_CapturePointEvent_Leave[HP_TOWER_NUM] = {11403,11395,11387}; |
---|
30 | |
---|
31 | enum OutdoorPvPHPWorldStates{ |
---|
32 | HP_UI_TOWER_DISPLAY_A = 0x9ba, |
---|
33 | HP_UI_TOWER_DISPLAY_H = 0x9b9, |
---|
34 | |
---|
35 | HP_UI_TOWER_COUNT_H = 0x9ae, |
---|
36 | HP_UI_TOWER_COUNT_A = 0x9ac, |
---|
37 | |
---|
38 | HP_UI_TOWER_SLIDER_N = 2475, |
---|
39 | HP_UI_TOWER_SLIDER_POS = 2474, |
---|
40 | HP_UI_TOWER_SLIDER_DISPLAY = 2473 |
---|
41 | }; |
---|
42 | |
---|
43 | const uint32 HP_MAP_N[HP_TOWER_NUM] = {0x9b5,0x9b2,0x9a8}; |
---|
44 | |
---|
45 | const uint32 HP_MAP_A[HP_TOWER_NUM] = {0x9b3,0x9b0,0x9a7}; |
---|
46 | |
---|
47 | const uint32 HP_MAP_H[HP_TOWER_NUM] = {0x9b4,0x9b1,0x9a6}; |
---|
48 | |
---|
49 | const uint32 HP_TowerArtKit_A[HP_TOWER_NUM] = {65,62,67}; |
---|
50 | |
---|
51 | const uint32 HP_TowerArtKit_H[HP_TOWER_NUM] = {64,61,68}; |
---|
52 | |
---|
53 | const uint32 HP_TowerArtKit_N[HP_TOWER_NUM] = {66,63,69}; |
---|
54 | |
---|
55 | const go_type HPCapturePoints[HP_TOWER_NUM] = { |
---|
56 | {182175,530,-471.462,3451.09,34.6432,0.174533,0,0,0.087156,0.996195}, // 0 - Broken Hill |
---|
57 | {182174,530,-184.889,3476.93,38.205,-0.017453,0,0,0.008727,-0.999962}, // 1 - Overlook |
---|
58 | {182173,530,-290.016,3702.42,56.6729,0.034907,0,0,0.017452,0.999848} // 2 - Stadium |
---|
59 | }; |
---|
60 | |
---|
61 | const go_type HPTowerFlags[HP_TOWER_NUM] = { |
---|
62 | {183514,530,-467.078,3528.17,64.7121,3.14159,0,0,1,0}, // 0 broken hill |
---|
63 | {182525,530,-187.887,3459.38,60.0403,-3.12414,0,0,0.999962,-0.008727}, // 1 overlook |
---|
64 | {183515,530,-289.610,3696.83,75.9447,3.12414,0,0,0.999962,0.008727} // 2 stadium |
---|
65 | }; |
---|
66 | |
---|
67 | class OutdoorPvPObjectiveHP : public OutdoorPvPObjective |
---|
68 | { |
---|
69 | public: |
---|
70 | OutdoorPvPObjectiveHP(OutdoorPvP * pvp, OutdoorPvPHPTowerType type); |
---|
71 | bool Update(uint32 diff); |
---|
72 | void FillInitialWorldStates(WorldPacket & data); |
---|
73 | // used when player is activated/inactivated in the area |
---|
74 | bool HandlePlayerEnter(Player * plr); |
---|
75 | void HandlePlayerLeave(Player * plr); |
---|
76 | bool HandleCapturePointEvent(Player * plr, uint32 eventId); |
---|
77 | private: |
---|
78 | OutdoorPvPHPTowerType m_TowerType; |
---|
79 | }; |
---|
80 | |
---|
81 | class OutdoorPvPHP : public OutdoorPvP |
---|
82 | { |
---|
83 | friend class OutdoorPvPObjectiveHP; |
---|
84 | public: |
---|
85 | OutdoorPvPHP(); |
---|
86 | bool SetupOutdoorPvP(); |
---|
87 | void HandlePlayerEnterZone(Player *plr, uint32 zone); |
---|
88 | void HandlePlayerLeaveZone(Player *plr, uint32 zone); |
---|
89 | bool Update(uint32 diff); |
---|
90 | void FillInitialWorldStates(WorldPacket &data); |
---|
91 | void SendRemoveWorldStates(Player * plr); |
---|
92 | void HandleKillImpl(Player * plr, Unit * killed); |
---|
93 | void BuffTeam(uint32 team); |
---|
94 | private: |
---|
95 | // how many towers are controlled |
---|
96 | uint32 m_AllianceTowersControlled; |
---|
97 | uint32 m_HordeTowersControlled; |
---|
98 | }; |
---|
99 | |
---|
100 | #endif |
---|