root/trunk/src/game/OutdoorPvPHP.h @ 94

Revision 44, 3.1 kB (checked in by yumileroy, 17 years ago)

[svn] * Merge Temp dev SVN with Assembla.
* Changes include:

  • Implementation of w12x's Outdoor PvP and Game Event Systems.
  • Temporary removal of IRC Chat Bot (until infinite loop when disabled is fixed).
  • All mangos -> trinity (to convert your mangos_string table, please run mangos_string_to_trinity_string.sql).
  • Improved Config cleanup.
  • And many more changes.

Original author: Seline
Date: 2008-10-14 11:57:03-05:00

Line 
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
8const uint32 OutdoorPvPHPBuffZones[OutdoorPvPHPBuffZonesNum] = { 3483, 3563, 3562, 3713, 3714, 3836 };
9
10const uint32 AllianceBuff = 32071;
11
12const uint32 HordeBuff = 32049;
13
14const uint32 AlliancePlayerKillReward = 32155;
15
16const uint32 HordePlayerKillReward = 32158;
17
18enum OutdoorPvPHPTowerType{
19    HP_TOWER_BROKEN_HILL = 0,
20    HP_TOWER_OVERLOOK = 1,
21    HP_TOWER_STADIUM = 2,
22    HP_TOWER_NUM = 3
23};
24
25const uint32 HP_CREDITMARKER[HP_TOWER_NUM] = {19032,19028,19029};
26
27const uint32 HP_CapturePointEvent_Enter[HP_TOWER_NUM] = {11404,11396,11388};
28
29const uint32 HP_CapturePointEvent_Leave[HP_TOWER_NUM] = {11403,11395,11387};
30
31enum 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
43const uint32 HP_MAP_N[HP_TOWER_NUM] = {0x9b5,0x9b2,0x9a8};
44
45const uint32 HP_MAP_A[HP_TOWER_NUM] = {0x9b3,0x9b0,0x9a7};
46
47const uint32 HP_MAP_H[HP_TOWER_NUM] = {0x9b4,0x9b1,0x9a6};
48
49const uint32 HP_TowerArtKit_A[HP_TOWER_NUM] = {65,62,67};
50
51const uint32 HP_TowerArtKit_H[HP_TOWER_NUM] = {64,61,68};
52
53const uint32 HP_TowerArtKit_N[HP_TOWER_NUM] = {66,63,69};
54
55const 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
61const 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
67class OutdoorPvPObjectiveHP : public OutdoorPvPObjective
68{
69public:
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);
77private:
78    OutdoorPvPHPTowerType m_TowerType;
79};
80
81class OutdoorPvPHP : public OutdoorPvP
82{
83friend class OutdoorPvPObjectiveHP;
84public:
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);
94private:
95    // how many towers are controlled
96    uint32 m_AllianceTowersControlled;
97    uint32 m_HordeTowersControlled;
98};
99
100#endif
Note: See TracBrowser for help on using the browser.