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

Revision 102, 3.9 kB (checked in by yumileroy, 17 years ago)

[svn] Fixed copyright notices to comply with GPL.

Original author: w12x
Date: 2008-10-23 03:29:52-05:00

Line 
1/*
2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19#ifndef OUTDOOR_PVP_HP_
20#define OUTDOOR_PVP_HP_
21
22#include "OutdoorPvP.h"
23
24#define OutdoorPvPHPBuffZonesNum 6
25                                                         //  HP, citadel, ramparts, blood furnace, shattered halls, mag's lair
26const uint32 OutdoorPvPHPBuffZones[OutdoorPvPHPBuffZonesNum] = { 3483, 3563, 3562, 3713, 3714, 3836 };
27
28const uint32 AllianceBuff = 32071;
29
30const uint32 HordeBuff = 32049;
31
32const uint32 AlliancePlayerKillReward = 32155;
33
34const uint32 HordePlayerKillReward = 32158;
35
36enum OutdoorPvPHPTowerType{
37    HP_TOWER_BROKEN_HILL = 0,
38    HP_TOWER_OVERLOOK = 1,
39    HP_TOWER_STADIUM = 2,
40    HP_TOWER_NUM = 3
41};
42
43const uint32 HP_CREDITMARKER[HP_TOWER_NUM] = {19032,19028,19029};
44
45const uint32 HP_CapturePointEvent_Enter[HP_TOWER_NUM] = {11404,11396,11388};
46
47const uint32 HP_CapturePointEvent_Leave[HP_TOWER_NUM] = {11403,11395,11387};
48
49enum OutdoorPvPHPWorldStates{
50    HP_UI_TOWER_DISPLAY_A = 0x9ba,
51    HP_UI_TOWER_DISPLAY_H = 0x9b9,
52
53    HP_UI_TOWER_COUNT_H = 0x9ae,
54    HP_UI_TOWER_COUNT_A = 0x9ac,
55
56    HP_UI_TOWER_SLIDER_N = 2475,
57    HP_UI_TOWER_SLIDER_POS = 2474,
58    HP_UI_TOWER_SLIDER_DISPLAY = 2473
59};
60
61const uint32 HP_MAP_N[HP_TOWER_NUM] = {0x9b5,0x9b2,0x9a8};
62
63const uint32 HP_MAP_A[HP_TOWER_NUM] = {0x9b3,0x9b0,0x9a7};
64
65const uint32 HP_MAP_H[HP_TOWER_NUM] = {0x9b4,0x9b1,0x9a6};
66
67const uint32 HP_TowerArtKit_A[HP_TOWER_NUM] = {65,62,67};
68
69const uint32 HP_TowerArtKit_H[HP_TOWER_NUM] = {64,61,68};
70
71const uint32 HP_TowerArtKit_N[HP_TOWER_NUM] = {66,63,69};
72
73const go_type HPCapturePoints[HP_TOWER_NUM] = {
74    {182175,530,-471.462,3451.09,34.6432,0.174533,0,0,0.087156,0.996195},      // 0 - Broken Hill
75    {182174,530,-184.889,3476.93,38.205,-0.017453,0,0,0.008727,-0.999962},     // 1 - Overlook
76    {182173,530,-290.016,3702.42,56.6729,0.034907,0,0,0.017452,0.999848}     // 2 - Stadium
77};
78
79const go_type HPTowerFlags[HP_TOWER_NUM] = {
80    {183514,530,-467.078,3528.17,64.7121,3.14159,0,0,1,0},  // 0 broken hill
81    {182525,530,-187.887,3459.38,60.0403,-3.12414,0,0,0.999962,-0.008727}, // 1 overlook
82    {183515,530,-289.610,3696.83,75.9447,3.12414,0,0,0.999962,0.008727} // 2 stadium
83};
84
85class OutdoorPvPObjectiveHP : public OutdoorPvPObjective
86{
87public:
88    OutdoorPvPObjectiveHP(OutdoorPvP * pvp, OutdoorPvPHPTowerType type);
89    bool Update(uint32 diff);
90    void FillInitialWorldStates(WorldPacket & data);
91    // used when player is activated/inactivated in the area
92    bool HandlePlayerEnter(Player * plr);
93    void HandlePlayerLeave(Player * plr);
94    bool HandleCapturePointEvent(Player * plr, uint32 eventId);
95private:
96    OutdoorPvPHPTowerType m_TowerType;
97};
98
99class OutdoorPvPHP : public OutdoorPvP
100{
101friend class OutdoorPvPObjectiveHP;
102public:
103    OutdoorPvPHP();
104    bool SetupOutdoorPvP();
105    void HandlePlayerEnterZone(Player *plr, uint32 zone);
106    void HandlePlayerLeaveZone(Player *plr, uint32 zone);
107    bool Update(uint32 diff);
108    void FillInitialWorldStates(WorldPacket &data);
109    void SendRemoveWorldStates(Player * plr);
110    void HandleKillImpl(Player * plr, Unit * killed);
111    void BuffTeam(uint32 team);
112private:
113    // how many towers are controlled
114    uint32 m_AllianceTowersControlled;
115    uint32 m_HordeTowersControlled;
116};
117
118#endif
Note: See TracBrowser for help on using the browser.