root/trunk/src/game/OutdoorPvPTF.h @ 157

Revision 44, 3.4 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_TF_
2#define OUTDOOR_PVP_TF_
3
4#include "OutdoorPvP.h"
5
6const uint32 OutdoorPvPTFBuffZonesNum = 5;
7
8const uint32 OutdoorPvPTFBuffZones[OutdoorPvPTFBuffZonesNum] = { 3519 /*Terokkar Forest*/, 3791 /*Sethekk Halls*/, 3789 /*Shadow Labyrinth*/, 3792 /*Mana-Tombs*/, 3790 /*Auchenai Crypts*/ };
9
10// locked for 6 hours after capture
11const uint32 TF_LOCK_TIME = 3600 * 6 * 1000;
12// update lock timer every 1/4 minute (overkill, but this way it's sure the timer won't "jump" 2 minutes at once.)
13const uint32 TF_LOCK_TIME_UPDATE = 15000;
14
15// blessing of auchindoun
16const uint32 TF_CAPTURE_BUFF = 33377;
17
18const uint32 TF_ALLY_QUEST = 11505;
19const uint32 TF_HORDE_QUEST = 11506;
20
21enum OutdoorPvPTF_TowerType{
22    TF_TOWER_NW = 0,
23    TF_TOWER_N,
24    TF_TOWER_NE,
25    TF_TOWER_SE,
26    TF_TOWER_S,
27    TF_TOWER_NUM
28};
29
30const go_type TFCapturePoints[TF_TOWER_NUM] = {
31    {183104,530,-3081.65,5335.03,17.1853,-2.14675,0,0,0.878817,-0.477159},
32    {183411,530,-2939.9,4788.73,18.987,2.77507,0,0,0.983255,0.182236},
33    {183412,530,-3174.94,4440.97,16.2281,1.86750,0,0.803857,0.594823},
34    {183413,530,-3603.31,4529.15,20.9077,0.994838,0,0,0.477159,0.878817},
35    {183414,530,-3812.37,4899.3,17.7249,0.087266,0,0,0.043619,0.999048}
36};
37
38struct tf_tower_world_state{
39    uint32 n;
40    uint32 h;
41    uint32 a;
42};
43
44const tf_tower_world_state TFTowerWorldStates[TF_TOWER_NUM] = {
45    {0xa79,0xa7a,0xa7b},
46    {0xa7e,0xa7d,0xa7c},
47    {0xa82,0xa81,0xa80},
48    {0xa88,0xa87,0xa86},
49    {0xa85,0xa84,0xa83}
50};
51
52const uint32 TFTowerPlayerEnterEvents[TF_TOWER_NUM] = {12226, 12497, 12486, 12499, 12501};
53
54const uint32 TFTowerPlayerLeaveEvents[TF_TOWER_NUM] = {12225, 12496, 12487, 12498, 12500};
55
56enum TFWorldStates{
57    TF_UI_TOWER_SLIDER_POS = 0xa41,
58    TF_UI_TOWER_SLIDER_N = 0xa40,
59    TF_UI_TOWER_SLIDER_DISPLAY = 0xa3f,
60
61    TF_UI_TOWER_COUNT_H = 0xa3e,
62    TF_UI_TOWER_COUNT_A = 0xa3d,
63    TF_UI_TOWERS_CONTROLLED_DISPLAY = 0xa3c,
64
65    TF_UI_LOCKED_TIME_MINUTES_FIRST_DIGIT = 0x9d0,
66    TF_UI_LOCKED_TIME_MINUTES_SECOND_DIGIT = 0x9ce,
67    TF_UI_LOCKED_TIME_HOURS = 0x9cd,
68    TF_UI_LOCKED_DISPLAY_NEUTRAL = 0x9cc,
69    TF_UI_LOCKED_DISPLAY_HORDE = 0xad0,
70    TF_UI_LOCKED_DISPLAY_ALLIANCE = 0xacf
71};
72
73enum TFTowerStates {
74    TF_TOWERSTATE_N = 1,
75    TF_TOWERSTATE_H = 2,
76    TF_TOWERSTATE_A = 4
77};
78
79class OutdoorPvPObjectiveTF : public OutdoorPvPObjective
80{
81public:
82    OutdoorPvPObjectiveTF(OutdoorPvP * pvp, OutdoorPvPTF_TowerType type);
83    bool Update(uint32 diff);
84    void FillInitialWorldStates(WorldPacket & data);
85    // used when player is activated/inactivated in the area
86    bool HandlePlayerEnter(Player * plr);
87    void HandlePlayerLeave(Player * plr);
88    void UpdateTowerState();
89protected:
90    virtual bool HandleCapturePointEvent(Player * plr, uint32 eventId);
91protected:
92    OutdoorPvPTF_TowerType m_TowerType;
93    uint32 m_TowerState;
94};
95
96class OutdoorPvPTF : public OutdoorPvP
97{
98friend class OutdoorPvPObjectiveTF;
99public:
100    OutdoorPvPTF();
101    bool SetupOutdoorPvP();
102    void HandlePlayerEnterZone(Player *plr, uint32 zone);
103    void HandlePlayerLeaveZone(Player *plr, uint32 zone);
104    bool Update(uint32 diff);
105    void FillInitialWorldStates(WorldPacket &data);
106    void SendRemoveWorldStates(Player * plr);
107    void BuffTeam(uint32 team);
108private:
109    bool m_IsLocked;
110    uint32 m_LockTimer;
111    uint32 m_LockTimerUpdate;
112    uint32 m_AllianceTowersControlled;
113    uint32 m_HordeTowersControlled;
114    uint32 hours_left, second_digit, first_digit;
115};
116
117#endif
Note: See TracBrowser for help on using the browser.