Advertisement
Guest User

Untitled

a guest
Oct 19th, 2011
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 39.23 KB | None | 0 0
  1. Index: cmake/world/CMakeLists.txt
  2. ===================================================================
  3. --- cmake/world/CMakeLists.txt  (revision 4644)
  4. +++ cmake/world/CMakeLists.txt  (working copy)
  5. @@ -23,6 +23,7 @@
  6.     BattlegroundHandler.cpp
  7.     BattlegroundMgr.cpp
  8.     StrandOfTheAncient.cpp
  9. +   IsleOfConquest.cpp
  10.     Channel.cpp
  11.     ChannelHandler.cpp
  12.     CharacterHandler.cpp
  13. @@ -258,6 +259,7 @@
  14.     Stats.h
  15.     StdAfx.h
  16.     StrandOfTheAncient.h
  17. +   IsleOfConquest.h
  18.     Entities/Summons/Summon.h
  19.     SummonHandler.h
  20.     TaxiMgr.h
  21. Index: src/arcemu-world/BattlegroundMgr.cpp
  22. ===================================================================
  23. --- src/arcemu-world/BattlegroundMgr.cpp    (revision 4644)
  24. +++ src/arcemu-world/BattlegroundMgr.cpp    (working copy)
  25. @@ -36,7 +36,28 @@
  26.     0,
  27.     607,    // SOTA
  28.     0,
  29. +   0,//11
  30.     0,
  31. +   0,
  32. +   0,
  33. +   0,
  34. +   0,
  35. +   0,
  36. +   0,
  37. +   0,
  38. +   0,
  39. +   0,
  40. +   0,
  41. +   0,
  42. +   0,
  43. +   0,
  44. +   0,
  45. +   0,
  46. +   0,
  47. +   0,
  48. +   628,
  49. +   0,
  50. +   0
  51.  };
  52.  
  53.  const static CreateBattlegroundFunc BGCFuncs[BATTLEGROUND_NUM_TYPES] =
  54. @@ -53,6 +74,27 @@
  55.     &StrandOfTheAncient::Create,    // SOTA
  56.     NULL,
  57.     NULL,
  58. +   NULL,
  59. +   NULL,
  60. +   NULL,
  61. +   NULL,
  62. +   NULL,
  63. +   NULL,
  64. +   NULL,
  65. +   NULL,
  66. +   NULL,
  67. +   NULL,
  68. +   NULL,
  69. +   NULL,
  70. +   NULL,
  71. +   NULL,
  72. +   NULL,
  73. +   NULL,
  74. +   NULL,
  75. +   NULL,
  76. +   &IsleOfConquest::Create, //IOC
  77. +   NULL,
  78. +   NULL
  79.  };
  80.  
  81.  CBattlegroundManager::CBattlegroundManager()
  82. Index: src/arcemu-world/BattlegroundMgr.h
  83. ===================================================================
  84. --- src/arcemu-world/BattlegroundMgr.h  (revision 4644)
  85. +++ src/arcemu-world/BattlegroundMgr.h  (working copy)
  86. @@ -58,6 +58,8 @@
  87.      BATTLEGROUND_ARENA_5V5         = 6,
  88.      BATTLEGROUND_EYE_OF_THE_STORM      = 7,
  89.      BATTLEGROUND_STRAND_OF_THE_ANCIENT = 9,
  90. +    BATTLEGROUND_ISLE_OF_CONQUEST           = 30,
  91. +    BATTLEGROUND_RANDOM                     = 32,
  92.      BATTLEGROUND_NUM_TYPES         = 33, //Based on BattlemasterList.dbc, make the storage arrays big enough! On 3.1.3 the last one was 11 The Ring of Valor, so 12 was enough here, but on 3.2.0 there is 32 All Battlegrounds!
  93.  };
  94.  
  95. Index: src/arcemu-world/EventMgr.h
  96. ===================================================================
  97. --- src/arcemu-world/EventMgr.h (revision 4644)
  98. +++ src/arcemu-world/EventMgr.h (working copy)
  99. @@ -226,6 +226,15 @@
  100.      EVENT_FRIEND_AREA_AURA_UPDATE,
  101.      EVENT_ENEMY_AREA_AURA_UPDATE,
  102.      EVENT_OWNER_AREA_AURA_UPDATE,
  103. +    EVENT_IOC_CAPTURE_CP_1,
  104. +    EVENT_IOC_CAPTURE_CP_2,
  105. +    EVENT_IOC_CAPTURE_CP_3,
  106. +    EVENT_IOC_CAPTURE_CP_4,
  107. +    EVENT_IOC_CAPTURE_CP_5,
  108. +    EVENT_IOC_CAPTURE_CP_6,
  109. +    EVENT_IOC_CAPTURE_CP_7,
  110. +    EVENT_IOC_RESOURCES_UPDATE_TEAM_0,
  111. +    EVENT_IOC_RESOURCES_UPDATE_TEAM_1,
  112.      NUM_EVENT_TYPES
  113.  };
  114.  
  115. Index: src/arcemu-world/IsleOfConquest.cpp
  116. ===================================================================
  117. --- src/arcemu-world/IsleOfConquest.cpp (revision 0)
  118. +++ src/arcemu-world/IsleOfConquest.cpp (revision 0)
  119. @@ -0,0 +1,637 @@
  120. +/*
  121. + * Arcemu
  122. + * Copyright (C) 2008 - 2011 Arcemu <http://www.arcemu.org/>
  123. + *
  124. + * This program is free software: you can redistribute it and/or modify
  125. + * it under the terms of the GNU Affero General Public License as published by
  126. + * the Free Software Foundation, either version 3 of the License, or
  127. + * any later version.
  128. + *
  129. + * This program is distributed in the hope that it will be useful,
  130. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  131. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  132. + * GNU Affero General Public License for more details.
  133. + *
  134. + * You should have received a copy of the GNU Affero General Public License
  135. + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  136. + *
  137. + */
  138. +
  139. + #include "StdAfx.h"
  140. +
  141. +#define IOC_NUM_REINFORCEMENTS 600
  142. +#define IOC_POINTS_ON_KILL 1
  143. +
  144. +enum IOCGOs{
  145. +   IOC_TRANSPORTER = 195315,
  146. +   TELEPORTER_EFFECT_A = 195701,
  147. +   TELEPORTER_EFFECT_H = 195702,
  148. +   IOC_DYNAMIC_DOOR_A = 195699,
  149. +   IOC_DYNAMIC_DOOR_H = 195494,
  150. +   IOC_FLAGPOLE = 195131,
  151. +};
  152. +
  153. +enum ControlPoints{
  154. +   IOC_CONTROL_POINT_OILDERRICK     = 0,
  155. +   IOC_CONTROL_POINT_COBALTMINE     = 1,
  156. +   IOC_CONTROL_POINT_DOCKS          = 2,
  157. +   IOC_CONTROL_POINT_AIRSHIPHANGAR  = 3,
  158. +   IOC_CONTROL_POINT_SIEGEWORKSHOP  = 4,
  159. +   IOC_CONTROL_POINT_ALLIANCE_KEEP  = 5,
  160. +   IOC_CONTROL_POINT_HORDE_KEEP     = 6
  161. +};
  162. +
  163. +enum ControlPointTypes{
  164. +   IOC_SPAWN_TYPE_NEUTRAL              = 0,
  165. +   IOC_SPAWN_TYPE_ALLIANCE_ASSAULT     = 1,
  166. +   IOC_SPAWN_TYPE_HORDE_ASSAULT        = 2,
  167. +   IOC_SPAWN_TYPE_ALLIANCE_CONTROLLED  = 3,
  168. +   IOC_SPAWN_TYPE_HORDE_CONTROLLED     = 4
  169. +};
  170. +
  171. +
  172. + // gameobject faction
  173. +static uint32 g_gameObjectFactions[IOC_NUM_CONTROL_POINTS] = {
  174. +   35,             // neutral
  175. +   2,              // alliance assault
  176. +   2,              // alliance     controlled
  177. +   1,              // horde assault
  178. +   1               // horde controlled
  179. +};
  180. +
  181. +// Graveyard locations
  182. +static float GraveyardLocations[IOC_NUM_CONTROL_POINTS][4] = {
  183. +   { 0.0f, 0.0f, 0.0f },           // The Oil Derrick
  184. +   { 0.0f, 0.0f, 0.0f },           // The Cobalt Mine
  185. +   { 0.0f, 0.0f, 0.0f },           // The Docks
  186. +   { 0.0f, 0.0f, 0.0f },           // The Airship Hangar
  187. +   { 0.0f, 0.0f, 0.0f }            // The Siege Workshop
  188. +};
  189. +
  190. +static float NoBaseGYLocations[2][4] = {
  191. +   { 278.28f, -883.65f, 49.92f, 1.57f },   // ALLIANCE
  192. +   { 1301.30f, -839.38f, 48.91f, 1.48f }   // HORDE
  193. +};
  194. +
  195. +static const char * ControlPointNames[IOC_NUM_CONTROL_POINTS] = {
  196. +   "Oil Derrick",
  197. +   "Cobalt Mine",
  198. +   "Docks",
  199. +   "Airship Hangar",
  200. +   "Siege Workshop",
  201. +   "Allaince Keep",
  202. +   "Horde Keep"
  203. +};
  204. +
  205. +static uint32 ControlPointGoIds[IOC_NUM_CONTROL_POINTS][5] = {
  206. +   // NEUTRAL    ALLIANCE-ATTACK    HORDE-ATTACK    ALLIANCE-CONTROLLED    HORDE_CONTROLLED
  207. +   { 195343,       180085,            180086,         180076,                180078 },        // The Oil Derrick
  208. +   { 195338,       180085,            180086,         180076,                180078 },        // The Cobalt Mine
  209. +   { 195157,       180085,            180086,         180076,                180078 },        // The Docks
  210. +   { 195158,       180085,            180086,         180076,                180078 },        // The Airship Hangar
  211. +   { 195133,       180085,            180086,         180076,                180078 },        // The Siege Workshop
  212. +   { 195132,       180085,            180086,         180076,                180078 },        // Alliance Keep
  213. +   { 195130,       180085,            180086,         180076,                180078 }         // Horde Keep
  214. +};
  215. +
  216. +
  217. +static float ControlPointCoordinates[IOC_NUM_CONTROL_POINTS][4] = {
  218. +   { 1266.01f, -400.78f, 37.62f, 0.16f },          // The Oil Derrick
  219. +   { 225.29f, -1189.01f, 8.05f, 0.86f },           // The Cobalt Mine
  220. +   { 782.88f, -371.84f, 12.37f, 5.45f },           // The Docks
  221. +   { 691.70f, -1121.04f, 133.70f, 2.147f },        // The Airship Hangar
  222. +   { 751.29f, -818.18f, 7.40f, 0.75f },            // The Siege Workshop
  223. +   { 301.04f, -780.49f, 48.91f, 6.03f},            // Alliance Keep
  224. +   { 1278.59f, -704.18f, 48.91f, 3.19f}            // Horde Keep
  225. +};
  226. +
  227. +
  228. +static float demolisherSalesmen[2][5] = {
  229. +   {35345, 763.660f, -880.25f , 18.55f, 3.14f},    // Gnomish Mechanic (A)
  230. +   {35346, 763.660f, -880.25f , 18.55f, 3.14f}     // Goblin Mechanic  (H)
  231. +};
  232. +
  233. +static float iocTransporterDestination[12][4] = {
  234. +   {429.79f, -800.825f, 49.03f, 3.23f},    // Alliance front gate out
  235. +   {399.66f, -798.63f, 49.06f, 4.01f},     // Alliance front gate in
  236. +   {313.64f, -775.43f, 49.04f, 4.93f},     // Alliance west gate in
  237. +   {324.68f, -748.73f, 49.38f, 1.76f},     // Alliance west gate out
  238. +   {323.01f, -888.61f, 48.91f, 4.66f},     // Alliance east gate in
  239. +   {316.22f, -914.65f, 48.87f, 1.69f},     // Alliance east gate out
  240. +   {1234.51f, -684.55f, 49.32f, 5.01f},    // Horde west gate in
  241. +   {1196.72f, -664.84f, 48.57f, 1.71f},    // Horde west gate out
  242. +   {1161.82f, -748.87f, 48.62f, 0.34f},    // Horde front gate in
  243. +   {1140.19f, -780.74f, 48.69f, 2.93f},    // Horde front gate out
  244. +   {1196.47f, -861.29f, 49.17f, 4.04f},    // Horde east gate out
  245. +   {1196.06f, -842.70f, 49.13f, 0.30f}     // Horde east gate in
  246. +};
  247. +
  248. +static float iocTransporterLocation[12][4] = {
  249. +   {429.79f, -800.825f, 49.03f, 3.23f},    // Alliance front gate out
  250. +   {399.66f, -798.63f, 49.06f, 4.01f},     // Alliance front gate in
  251. +   {313.64f, -775.43f, 49.04f, 4.93f},     // Alliance west gate in
  252. +   {324.68f, -748.73f, 49.38f, 1.76f},     // Alliance west gate out
  253. +   {323.01f, -888.61f, 48.91f, 4.66f},     // Alliance east gate in
  254. +   {316.22f, -914.65f, 48.87f, 1.69f},     // Alliance east gate out
  255. +   {1234.51f, -684.55f, 49.32f, 5.01f},    // Horde west gate in
  256. +   {1196.72f, -664.84f, 48.57f, 1.71f},    // Horde west gate out
  257. +   {1161.82f, -748.87f, 48.62f, 0.34f},    // Horde front gate in
  258. +   {1140.19f, -780.74f, 48.69f, 2.93f},    // Horde front gate out
  259. +   {1196.47f, -861.29f, 49.17f, 4.04f},    // Horde east gate out
  260. +   {1196.06f, -842.70f, 49.13f, 0.30f}     // Horde east gate in
  261. +};
  262. +
  263. +static float iocGatesLocation[6][4] = {
  264. +   {352.70269f, -762.66369f, 48.91628f, 4.6866f},          // Alliance West gate
  265. +   {412.41436f, - 833.83011f, 48.5479f, 3.11868f},         // Alliance Front gate
  266. +   {352.54592f, -904.92181f, 48.92093f, 1.57336f},         // Alliance East gate
  267. +   {1151.51562f, -763.4730f, 48.62429f, 3.17145f},         // Horde Front gate
  268. +   {1218.54126f, -676.44390f, 48.68709f, 1.53727f},        // Horde West gate
  269. +   {1218.35607f, -850.55456f, 48.91478f, 4.77781f}         // Horde East gate
  270. +};
  271. +
  272. +static uint32 gatesIds[6] = {
  273. +   195698,
  274. +   195699,
  275. +   195700,
  276. +   195494,
  277. +   195495,
  278. +   195496
  279. +};
  280. +
  281. +static uint32 AssaultFields[IOC_NUM_CONTROL_POINTS][2] = {
  282. +   { WORLDSTATE_IOC_REFINERY_ALLIANCE_ASSAULTED, WORLDSTATE_IOC_REFINERY_HORDE_ASSAULTED },
  283. +   { WORLDSTATE_IOC_QUARRY_ALLIANCE_ASSAULTED, WORLDSTATE_IOC_QUARRY_HORDE_ASSAULTED },
  284. +   { WORLDSTATE_IOC_DOCKS_ALLIANCE_ASSAULTED, WORLDSTATE_IOC_DOCKS_HORDE_ASSAULTED },                 // The Docks
  285. +   { WORLDSTATE_IOC_HANGAR_ALLIANCE_ASSAULTED, WORLDSTATE_IOC_HANGAR_HORDE_ASSAULTED },
  286. +   { WORLDSTATE_IOC_WORKSHOP_ALLIANCE_ASSAULTED, WORLDSTATE_IOC_WORKSHOP_HORDE_ASSAULTED },           // The Siege Workshop
  287. +   { WORLDSTATE_IOC_ALLIANCE_KEEP_ALLIANCE_ASSAULTED, WORLDSTATE_IOC_ALLIANCE_KEEP_HORDE_ASSAULTED }, // Alliance Keep
  288. +   { WORLDSTATE_IOC_HORDE_KEEP_ALLIANCE_ASSAULTED, WORLDSTATE_IOC_HORDE_KEEP_HORDE_ASSAULTED }        // Horde Keep
  289. +};
  290. +
  291. +static uint32 OwnedFields[IOC_NUM_CONTROL_POINTS][2] = {
  292. +   { WORLDSTATE_IOC_REFINERY_ALLIANCE_CONTROLLED, WORLDSTATE_IOC_REFINERY_HORDE_CONTROLLED },
  293. +   { WORLDSTATE_IOC_QUARRY_ALLIANCE_CONTROLLED, WORLDSTATE_IOC_QUARRY_HORDE_CONTROLLED },
  294. +   { WORLDSTATE_IOC_DOCKS_ALLIANCE_CONTROLLED, WORLDSTATE_IOC_DOCKS_HORDE_CONTROLLED },                    // The Docks
  295. +   { WORLDSTATE_IOC_HANGAR_ALLIANCE_CONTROLLED, WORLDSTATE_IOC_HANGAR_HORDE_CONTROLLED },
  296. +   { WORLDSTATE_IOC_WORKSHOP_ALLIANCE_CONTROLLED, WORLDSTATE_IOC_WORKSHOP_HORDE_CONTROLLED },              // The Siege Workshop
  297. +   { WORLDSTATE_IOC_ALLIANCE_KEEP_ALLIANCE_CONTROLLED, WORLDSTATE_IOC_ALLIANCE_KEEP_HORDE_CONTROLLED },    // Alliance Keep
  298. +   { WORLDSTATE_IOC_HORDE_KEEP_ALLIANCE_CONTROLLED, WORLDSTATE_IOC_HORDE_KEEP_HORDE_CONTROLLED }           // Horde Keep
  299. +};
  300. +
  301. +static uint32 NeutralFields[IOC_NUM_CONTROL_POINTS] = {
  302. +   WORLDSTATE_IOC_REFINERY_NETURAL,
  303. +   WORLDSTATE_IOC_QUARRY_NETURAL,
  304. +   WORLDSTATE_IOC_DOCKS_NETURAL,
  305. +   WORLDSTATE_IOC_HANGAR_NETURAL,
  306. +   WORLDSTATE_IOC_WORKSHOP_NETURAL,
  307. +   WORLDSTATE_IOC_ALLIANCE_KEEP_NETURAL,
  308. +   WORLDSTATE_IOC_HORDE_KEEP_NETURAL
  309. +};
  310. +
  311. +static uint32 ResourceUpdateIntervals[6] = {
  312. +   0,
  313. +   12000,
  314. +   9000,
  315. +   6000,
  316. +   3000,
  317. +   1000
  318. +};
  319. +
  320. +IsleOfConquest::IsleOfConquest(MapMgr* mgr, uint32 id, uint32 lgroup, uint32 t) : CBattleground(mgr,id,lgroup,t)
  321. +{
  322. +  for(uint32 i = 0; i < IOC_NUM_CONTROL_POINTS; ++i)
  323. +        {
  324. +                m_ioccontrolPointAuras[i] = NULL;
  325. +                m_ioccontrolPoints[i] = NULL;
  326. +                m_spiritGuides[i] = NULL;
  327. +                m_basesAssaultedBy[i] = -1;
  328. +                m_basesOwnedBy[i] = -1;
  329. +                m_basesLastOwnedBy[i] = -1;
  330. +                m_flagIsVirgin[i] = true;
  331. +        }
  332. +
  333. +        for(uint32 i = 0; i < 2; ++i)
  334. +        {
  335. +                m_capturedBases[i] = 0;
  336. +        }
  337. +
  338. +        m_playerCountPerTeam = 40;
  339. +        m_reinforcements[0] = IOC_NUM_REINFORCEMENTS;
  340. +        m_reinforcements[1] = IOC_NUM_REINFORCEMENTS;
  341. +        m_LiveCaptain[0] = true;
  342. +        m_LiveCaptain[1] = true;
  343. +//      m_bonusHonor = HonorHandler::CalculateHonorPointsFormula(lgroup*10,lgroup*10);
  344. +
  345. +        /*memset(m_nodes, 0, sizeof(m_nodes));*/
  346. +
  347. +}
  348. +
  349. +IsleOfConquest::~IsleOfConquest()
  350. +{
  351. +        for(uint32 i = 0; i < IOC_NUM_CONTROL_POINTS; ++i)
  352. +        {
  353. +                if(m_ioccontrolPoints[i] != NULL)
  354. +                {
  355. +//                      m_ioccontrolPoints[i]->m_battleground = NULL;
  356. +                        if( !m_ioccontrolPoints[i]->IsInWorld() )
  357. +                        {
  358. +                                delete m_ioccontrolPoints[i];
  359. +                        }
  360. +                }
  361. +
  362. +                if(m_ioccontrolPointAuras[i])
  363. +                {
  364. +//                      m_ioccontrolPointAuras[i]->m_battleground = NULL;
  365. +                        if( !m_ioccontrolPointAuras[i]->IsInWorld() )
  366. +                        {
  367. +                                delete m_ioccontrolPointAuras[i];
  368. +                        }
  369. +                }
  370. +        }
  371. +}
  372. +
  373. +void IsleOfConquest::Init()
  374. +{
  375. +}
  376. +        
  377. +void IsleOfConquest::OnCreate()
  378. +{
  379. +        SetWorldState(WORLDSTATE_IOC_ALLIANCE_SCORE, 1);
  380. +        SetWorldState(WORLDSTATE_IOC_HORDE_SCORE, 1);
  381. +        
  382. +        SetWorldState(WORLDSTATE_IOC_ALLIANCE_EAST_GATE, 1);
  383. +        SetWorldState(WORLDSTATE_IOC_ALLIANCE_GATE_DESTROYED_1, 0);
  384. +        SetWorldState(WORLDSTATE_IOC_ALLIANCE_GATE_DESTROYED_2, 0);
  385. +        SetWorldState(WORLDSTATE_IOC_ALLIANCE_GATE_DESTROYED_3, 0);
  386. +        SetWorldState(WORLDSTATE_IOC_ALLIANCE_WEST_GATE, 1);
  387. +        SetWorldState(WORLDSTATE_IOC_ALLIANCE_FRONT_GATE, 1);
  388. +        SetWorldState(WORLDSTATE_IOC_ALLIANCE_KEEP_ALLIANCE_CONTROLLED, 0);    
  389. +        SetWorldState(WORLDSTATE_IOC_ALLIANCE_KEEP_HORDE_CONTROLLED, 0);
  390. +        SetWorldState(WORLDSTATE_IOC_ALLIANCE_KEEP_ALLIANCE_ASSAULTED, 0);
  391. +        SetWorldState(WORLDSTATE_IOC_ALLIANCE_KEEP_HORDE_ASSAULTED, 0);
  392. +        SetWorldState(WORLDSTATE_IOC_ALLIANCE_KEEP_NETURAL, 1);
  393. +        SetWorldState(WORLDSTATE_IOC_HORDE_KEEP_ALLIANCE_CONTROLLED, 0);
  394. +        SetWorldState(WORLDSTATE_IOC_HORDE_KEEP_HORDE_CONTROLLED, 0);
  395. +        SetWorldState(WORLDSTATE_IOC_HORDE_KEEP_ALLIANCE_ASSAULTED, 0);
  396. +        SetWorldState(WORLDSTATE_IOC_HORDE_KEEP_HORDE_ASSAULTED, 0);
  397. +        SetWorldState(WORLDSTATE_IOC_HORDE_KEEP_NETURAL, 1);
  398. +        SetWorldState(WORLDSTATE_IOC_DOCKS_ALLIANCE_CONTROLLED, 0);
  399. +        SetWorldState(WORLDSTATE_IOC_DOCKS_HORDE_CONTROLLED, 0);
  400. +        SetWorldState(WORLDSTATE_IOC_DOCKS_ALLIANCE_ASSAULTED, 0);
  401. +        SetWorldState(WORLDSTATE_IOC_DOCKS_HORDE_ASSAULTED, 0);
  402. +        SetWorldState(WORLDSTATE_IOC_DOCKS_NETURAL, 1);
  403. +        SetWorldState(WORLDSTATE_IOC_HANGAR_ALLIANCE_CONTROLLED, 0);
  404. +        SetWorldState(WORLDSTATE_IOC_HANGAR_HORDE_CONTROLLED, 0);
  405. +        SetWorldState(WORLDSTATE_IOC_HANGAR_ALLIANCE_ASSAULTED, 0);
  406. +        SetWorldState(WORLDSTATE_IOC_HANGAR_HORDE_ASSAULTED, 0);
  407. +        SetWorldState(WORLDSTATE_IOC_HANGAR_NETURAL, 1);
  408. +        SetWorldState(WORLDSTATE_IOC_QUARRY_ALLIANCE_CONTROLLED, 0);
  409. +        SetWorldState(WORLDSTATE_IOC_QUARRY_HORDE_CONTROLLED, 0);
  410. +        SetWorldState(WORLDSTATE_IOC_QUARRY_ALLIANCE_ASSAULTED, 0);
  411. +        SetWorldState(WORLDSTATE_IOC_QUARRY_HORDE_ASSAULTED, 0);
  412. +        SetWorldState(WORLDSTATE_IOC_QUARRY_NETURAL, 1);
  413. +        SetWorldState(WORLDSTATE_IOC_REFINERY_ALLIANCE_CONTROLLED, 0);
  414. +        SetWorldState(WORLDSTATE_IOC_REFINERY_HORDE_CONTROLLED, 0);
  415. +        SetWorldState(WORLDSTATE_IOC_REFINERY_ALLIANCE_ASSAULTED, 0);
  416. +        SetWorldState(WORLDSTATE_IOC_REFINERY_HORDE_ASSAULTED, 0);
  417. +        SetWorldState(WORLDSTATE_IOC_REFINERY_NETURAL, 1);
  418. +        SetWorldState(WORLDSTATE_IOC_WORKSHOP_ALLIANCE_CONTROLLED, 0);
  419. +        SetWorldState(WORLDSTATE_IOC_WORKSHOP_HORDE_CONTROLLED, 0);
  420. +        SetWorldState(WORLDSTATE_IOC_WORKSHOP_ALLIANCE_ASSAULTED, 0);
  421. +        SetWorldState(WORLDSTATE_IOC_WORKSHOP_HORDE_ASSAULTED, 0);
  422. +        SetWorldState(WORLDSTATE_IOC_WORKSHOP_NETURAL, 1);              
  423. +        SetWorldState(WORLDSTATE_IOC_HORDE_EAST_GATE, 1);
  424. +        SetWorldState(WORLDSTATE_IOC_HORDE_GATE_DESTROYED_1, 0);
  425. +        SetWorldState(WORLDSTATE_IOC_HORDE_GATE_DESTROYED_2, 0);
  426. +        SetWorldState(WORLDSTATE_IOC_HORDE_GATE_DESTROYED_3, 0);
  427. +        SetWorldState(WORLDSTATE_IOC_HORDE_WEST_GATE, 1);
  428. +        SetWorldState(WORLDSTATE_IOC_HORDE_FRONT_GATE, 1);
  429. +        
  430. +        // generals/leaders!
  431. +        SpawnCreature(34924, 214.77f, -830.73f, 60.81f, 0.07f); // High Commander Halford Wyrmbane (ALLIANCE)
  432. +        SpawnCreature(34922, 1296.57f, -765.78f, 69.98f, 6.22f);        // Overlord Agmar (not sure this is the good general) (HORDE)
  433. +        
  434. +        // Spawn const spiritguides
  435. +        AddSpiritGuide(SpawnSpiritGuide(NoBaseGYLocations[0][0], NoBaseGYLocations[0][1], NoBaseGYLocations[0][2], NoBaseGYLocations[0][3], 0));
  436. +        AddSpiritGuide(SpawnSpiritGuide(NoBaseGYLocations[1][0], NoBaseGYLocations[1][1], NoBaseGYLocations[1][2], NoBaseGYLocations[1][3], 1));
  437. +        
  438. +        
  439. +        // Spawn Teleporters
  440. +        for(uint32 i = 0; i < 6; i++)   // Alliance
  441. +        {
  442. +                m_teleporters[i] = SpawnGameObject(IOC_TRANSPORTER, 628, iocTransporterLocation[i][0], iocTransporterLocation[i][1], iocTransporterLocation[i][2], iocTransporterLocation[i][3], 0, 1, 1.0f);
  443. +                m_teleporters[i]->PushToWorld(m_mapMgr);
  444. +                m_teleeffect[i] = SpawnGameObject(TELEPORTER_EFFECT_A, 628, iocTransporterLocation[i][0], iocTransporterLocation[i][1], iocTransporterLocation[i][2], iocTransporterLocation[i][3], 0, 1, 1.0f);
  445. +                m_teleeffect[i]->PushToWorld(m_mapMgr);
  446. +        }
  447. +        for(uint32 i = 6; i < 12; i++)  // Horde
  448. +        {
  449. +                m_teleporters[i] = SpawnGameObject(IOC_TRANSPORTER, 628, iocTransporterLocation[i][0], iocTransporterLocation[i][1], iocTransporterLocation[i][2], iocTransporterLocation[i][3], 0, 2, 1.0f);
  450. +                m_teleporters[i]->PushToWorld(m_mapMgr);
  451. +                m_teleeffect[i] = SpawnGameObject(TELEPORTER_EFFECT_H, 628, iocTransporterLocation[i][0], iocTransporterLocation[i][1], iocTransporterLocation[i][2], iocTransporterLocation[i][3], 0, 1, 1.0f);
  452. +                m_teleeffect[i]->PushToWorld(m_mapMgr);
  453. +        }
  454. +        
  455. +        // Spawn Gates
  456. +        for(uint32 x = 0; x < 3; x++)
  457. +        {
  458. +                m_desgates[x] = SpawnGameObject(gatesIds[x], 628, iocGatesLocation[x][0],  iocGatesLocation[x][1], iocGatesLocation[x][2], iocGatesLocation[x][3], 0, 1, 1.0f);
  459. +                m_desgates[x]->PushToWorld(m_mapMgr);
  460. +                m_ogates[x] = SpawnGameObject(IOC_DYNAMIC_DOOR_A, 628, iocGatesLocation[x][0],  iocGatesLocation[x][1], iocGatesLocation[x][2], iocGatesLocation[x][3], 0, 1, 1.0f);
  461. +                m_ogates[x]->SetUInt32Value(GAMEOBJECT_FLAGS, 32);
  462. +                m_ogates[x]->SetUInt32Value(GAMEOBJECT_DYNAMIC, 4294901760);
  463. +                m_ogates[x]->SetUInt32Value(GAMEOBJECT_FACTION, 1375);
  464. +                m_ogates[x]->SetUInt32Value(GAMEOBJECT_BYTES_1, 4278190081);
  465. +                m_ogates[x]->PushToWorld(m_mapMgr);
  466. +        }
  467. +        
  468. +        for(uint32 x = 3; x < 6; x++)
  469. +        {
  470. +                m_desgates[x] = SpawnGameObject(gatesIds[x], 628, iocGatesLocation[x][0],  iocGatesLocation[x][1], iocGatesLocation[x][2], iocGatesLocation[x][3], 0, 2, 1.0f);
  471. +                m_desgates[x]->PushToWorld(m_mapMgr);
  472. +                m_ogates[x] = SpawnGameObject(IOC_DYNAMIC_DOOR_H, 628, iocGatesLocation[x][0],  iocGatesLocation[x][1], iocGatesLocation[x][2], iocGatesLocation[x][3], 0, 2, 1.0f);
  473. +                m_ogates[x]->SetUInt32Value(GAMEOBJECT_FLAGS, 32);
  474. +                m_ogates[x]->SetUInt32Value(GAMEOBJECT_DYNAMIC, 4294901760);
  475. +                m_ogates[x]->SetUInt32Value(GAMEOBJECT_FACTION, 1375);
  476. +                m_ogates[x]->SetUInt32Value(GAMEOBJECT_BYTES_1, 4278190081);
  477. +                m_ogates[x]->PushToWorld(m_mapMgr);
  478. +        }
  479. +
  480. +        // Flagpole
  481. +        for(uint32 i = 0; i < IOC_NUM_CONTROL_POINTS; ++i)
  482. +        {
  483. +                m_flagpole[i] = SpawnGameObject(IOC_FLAGPOLE, 628, ControlPointCoordinates[i][0], ControlPointCoordinates[i][1], ControlPointCoordinates[i][2], ControlPointCoordinates[i][3], 0, 35, 1.0f);
  484. +                m_flagpole[i]->PushToWorld(m_mapMgr);
  485. +        }
  486. +
  487. +        SpawnControlPoint(IOC_CONTROL_POINT_OILDERRICK,         IOC_SPAWN_TYPE_NEUTRAL);
  488. +        SpawnControlPoint(IOC_CONTROL_POINT_COBALTMINE,         IOC_SPAWN_TYPE_NEUTRAL);
  489. +        SpawnControlPoint(IOC_CONTROL_POINT_DOCKS,                      IOC_SPAWN_TYPE_NEUTRAL);
  490. +        SpawnControlPoint(IOC_CONTROL_POINT_AIRSHIPHANGAR,      IOC_SPAWN_TYPE_NEUTRAL);
  491. +        SpawnControlPoint(IOC_CONTROL_POINT_SIEGEWORKSHOP,      IOC_SPAWN_TYPE_NEUTRAL);
  492. +        SpawnControlPoint(IOC_CONTROL_POINT_ALLIANCE_KEEP,      IOC_SPAWN_TYPE_NEUTRAL);
  493. +        SpawnControlPoint(IOC_CONTROL_POINT_HORDE_KEEP,         IOC_SPAWN_TYPE_NEUTRAL);
  494. +}
  495. +
  496. +void IsleOfConquest::OnStart()
  497. +{
  498. +        for(uint32 i = 0; i < 2; ++i) {
  499. +                for(set<Player*  >::iterator itr = m_players[i].begin(); itr != m_players[i].end(); ++itr) {
  500. +                        (*itr)->RemoveAura(BG_PREPARATION);
  501. +                }
  502. +        }
  503. +
  504. +        PlaySoundToAll(SOUND_BATTLEGROUND_BEGIN);
  505. +
  506. +        m_started = true;
  507. +
  508. +}
  509. +
  510. +
  511. +void IsleOfConquest::SpawnControlPoint(uint32 Id, uint32 Type)
  512. +{
  513. +        GameObjectInfo * gi, * gi_aura;
  514. +        gi = GameObjectNameStorage.LookupEntry(ControlPointGoIds[Id][Type]);
  515. +        if(gi == NULL)
  516. +                return;
  517. +
  518. +        gi_aura = gi->sound3 ? GameObjectNameStorage.LookupEntry(gi->sound3) : NULL;
  519. +
  520. +        if(m_ioccontrolPoints[Id] == NULL)
  521. +        {
  522. +                m_ioccontrolPoints[Id] = SpawnGameObject(gi->ID, m_mapMgr->GetMapId(), ControlPointCoordinates[Id][0], ControlPointCoordinates[Id][1],
  523. +                ControlPointCoordinates[Id][2], ControlPointCoordinates[Id][3], 0, 35, 1.0f);
  524. +
  525. +                m_ioccontrolPoints[Id]->SetByte(GAMEOBJECT_BYTES_1,GAMEOBJECT_BYTES_STATE, 1);
  526. +                m_ioccontrolPoints[Id]->SetByte(GAMEOBJECT_BYTES_1,GAMEOBJECT_BYTES_TYPE_ID, gi->Type);
  527. +                m_ioccontrolPoints[Id]->SetByte(GAMEOBJECT_BYTES_1,GAMEOBJECT_BYTES_ANIMPROGRESS, 100);
  528. +                m_ioccontrolPoints[Id]->SetUInt32Value(GAMEOBJECT_DYNAMIC, 1);
  529. +                m_ioccontrolPoints[Id]->SetUInt32Value(GAMEOBJECT_DISPLAYID, gi->DisplayID);
  530. +
  531. +                switch(Type)
  532. +                {
  533. +                case IOC_SPAWN_TYPE_ALLIANCE_ASSAULT:
  534. +                case IOC_SPAWN_TYPE_ALLIANCE_CONTROLLED:
  535. +                        m_ioccontrolPoints[Id]->SetUInt32Value(GAMEOBJECT_FACTION, 2);
  536. +                        break;
  537. +
  538. +                case IOC_SPAWN_TYPE_HORDE_ASSAULT:
  539. +                case IOC_SPAWN_TYPE_HORDE_CONTROLLED:
  540. +                        m_ioccontrolPoints[Id]->SetUInt32Value(GAMEOBJECT_FACTION, 1);
  541. +                        break;
  542. +
  543. +                default:
  544. +                        m_ioccontrolPoints[Id]->SetUInt32Value(GAMEOBJECT_FACTION, 35);         // neutral
  545. +                        break;
  546. +                }
  547. +
  548. +                m_ioccontrolPoints[Id]->bannerslot = static_cast<uint8>( Id );
  549. +                m_ioccontrolPoints[Id]->PushToWorld(m_mapMgr);
  550. +        }
  551. +        else
  552. +        {
  553. +                if(m_ioccontrolPoints[Id]->IsInWorld())
  554. +                        m_ioccontrolPoints[Id]->RemoveFromWorld(false);
  555. +
  556. +                // assign it a new guid (client needs this to see the entry change?)
  557. +                m_ioccontrolPoints[Id]->SetNewGuid(m_mapMgr->GenerateGameobjectGuid());
  558. +                m_ioccontrolPoints[Id]->SetUInt32Value(OBJECT_FIELD_ENTRY, gi->ID);
  559. +                m_ioccontrolPoints[Id]->SetUInt32Value(GAMEOBJECT_DISPLAYID, gi->DisplayID);
  560. +                m_ioccontrolPoints[Id]->SetByte(GAMEOBJECT_BYTES_1,GAMEOBJECT_BYTES_TYPE_ID, gi->Type);
  561. +
  562. +                switch(Type)
  563. +                {
  564. +                case IOC_SPAWN_TYPE_ALLIANCE_ASSAULT:
  565. +                case IOC_SPAWN_TYPE_ALLIANCE_CONTROLLED:
  566. +                        m_ioccontrolPoints[Id]->SetUInt32Value(GAMEOBJECT_FACTION, 2);
  567. +                        break;
  568. +
  569. +                case IOC_SPAWN_TYPE_HORDE_ASSAULT:
  570. +                case IOC_SPAWN_TYPE_HORDE_CONTROLLED:
  571. +                        m_ioccontrolPoints[Id]->SetUInt32Value(GAMEOBJECT_FACTION, 1);
  572. +                        break;
  573. +
  574. +                default:
  575. +                        m_ioccontrolPoints[Id]->SetUInt32Value(GAMEOBJECT_FACTION, 35);         // neutral
  576. +                        break;
  577. +                }
  578. +
  579. +                m_ioccontrolPoints[Id]->SetInfo(gi);
  580. +                m_ioccontrolPoints[Id]->PushToWorld(m_mapMgr);
  581. +        }
  582. +
  583. +        if(gi_aura==NULL)
  584. +        {
  585. +                // remove it if it exists
  586. +                if(m_ioccontrolPointAuras[Id]!=NULL && m_ioccontrolPointAuras[Id]->IsInWorld())
  587. +                        m_ioccontrolPointAuras[Id]->RemoveFromWorld(false);
  588. +                        
  589. +                return;
  590. +        }
  591. +
  592. +        if(m_ioccontrolPointAuras[Id] == NULL)
  593. +        {
  594. +                m_ioccontrolPointAuras[Id] = SpawnGameObject(gi_aura->ID, 628, ControlPointCoordinates[Id][0], ControlPointCoordinates[Id][1],
  595. +                ControlPointCoordinates[Id][2], ControlPointCoordinates[Id][3], 0, 35, 5.0f);
  596. +
  597. +                m_ioccontrolPointAuras[Id]->SetByte(GAMEOBJECT_BYTES_1,GAMEOBJECT_BYTES_STATE, 1);
  598. +                m_ioccontrolPointAuras[Id]->SetByte(GAMEOBJECT_BYTES_1,GAMEOBJECT_BYTES_TYPE_ID, 6);
  599. +                m_ioccontrolPointAuras[Id]->SetByte(GAMEOBJECT_BYTES_1,GAMEOBJECT_BYTES_ANIMPROGRESS, 100);
  600. +                m_ioccontrolPointAuras[Id]->bannerauraslot = Id;
  601. +                m_ioccontrolPointAuras[Id]->PushToWorld(m_mapMgr);
  602. +        }
  603. +        else
  604. +        {
  605. +                if(m_ioccontrolPointAuras[Id]->IsInWorld())
  606. +                        m_ioccontrolPointAuras[Id]->RemoveFromWorld(false);
  607. +
  608. +                // re-spawn the aura
  609. +                m_ioccontrolPointAuras[Id]->SetNewGuid(m_mapMgr->GenerateGameobjectGuid());
  610. +                m_ioccontrolPointAuras[Id]->SetUInt32Value(OBJECT_FIELD_ENTRY, gi_aura->ID);
  611. +                m_ioccontrolPointAuras[Id]->SetUInt32Value(GAMEOBJECT_DISPLAYID, gi_aura->DisplayID);
  612. +                m_ioccontrolPointAuras[Id]->SetInfo(gi_aura);
  613. +                m_ioccontrolPointAuras[Id]->PushToWorld(m_mapMgr);
  614. +        }      
  615. +}
  616. +
  617. +
  618. +void IsleOfConquest::Finish(uint32 losingTeam)
  619. +{
  620. +        if(m_ended) return;
  621. +
  622. +        m_ended = true;
  623. +        sEventMgr.RemoveEvents(this);
  624. +        sEventMgr.AddEvent(TO< CBattleground* >(this), &CBattleground::Close, EVENT_BATTLEGROUND_CLOSE, 120000, 1,0);
  625. +
  626. +        /* add the marks of honor to all players */
  627. +        SpellEntry * winner_spell = dbcSpell.LookupEntry(24955);
  628. +        SpellEntry * loser_spell = dbcSpell.LookupEntry(24954);
  629. +        for(uint32 i = 0; i < 2; ++i)
  630. +        {
  631. +                for(set<Player*  >::iterator itr = m_players[i].begin(); itr != m_players[i].end(); ++itr)
  632. +                {
  633. +                        (*itr)->Root();
  634. +
  635. +                        if( (*itr)->HasFlag(PLAYER_FLAGS, PLAYER_FLAG_AFK) )
  636. +                                continue;
  637. +
  638. +                        if(i == losingTeam)
  639. +                                (*itr)->CastSpell((*itr), loser_spell, true);
  640. +                        else
  641. +                        {
  642. +                                (*itr)->CastSpell((*itr), winner_spell, true);
  643. +                                uint32 diff = abs((int32)(m_reinforcements[i] - m_reinforcements[i ? 0 : 1]));
  644. +                                //(*itr)->GetAchievementInterface()->HandleAchievementCriteriaWinBattleground( m_mapMgr->GetMapId(), diff, ((uint32)UNIXTIME - m_startTime) / 1000, TO_CBATTLEGROUND(this));
  645. +                        }
  646. +                }
  647. +                if (m_LiveCaptain[i])
  648. +                {
  649. +                        //GiveHonorToTeam(i, m_bonusHonor * 2);
  650. +                }
  651. +        }
  652. +
  653. +        UpdatePvPData();
  654. +}
  655. +
  656. +void IsleOfConquest::HookOnAreaTrigger(Player* plr, uint32 id)
  657. +{
  658. +}
  659. +
  660. +void IsleOfConquest::HookOnPlayerDeath(Player* plr)
  661. +{
  662. +        plr->m_bgScore.Deaths++;
  663. +        UpdatePvPData();
  664. +        RemoveReinforcements(plr->GetTeam(), IOC_POINTS_ON_KILL);
  665. +}
  666. +
  667. +// we don't have flag in ioc
  668. +void IsleOfConquest::HookFlagDrop(Player* plr, GameObject* obj)
  669. +{
  670. +}
  671. +
  672. +void IsleOfConquest::HookFlagStand(Player* plr, GameObject* obj)
  673. +{
  674. +}
  675. +
  676. +bool IsleOfConquest::HookSlowLockOpen(GameObject* pGo, Player* pPlayer, Spell* pSpell)
  677. +{
  678. +        //if( pPlayer->m_bgFlagIneligible )
  679. +                return false;
  680. +
  681. +        // burlex todo: find a cleaner way to do this that doesnt waste memory.
  682. +        if(pGo->bannerslot >= 0 && pGo->bannerslot < IOC_NUM_CONTROL_POINTS)
  683. +        {
  684. +                // TODO: anticheat here
  685. +                AssaultControlPoint(pPlayer,pGo->bannerslot);
  686. +                return true;
  687. +        }
  688. +
  689. +        return false;
  690. +}
  691. +
  692. +void IsleOfConquest::HookOnMount(Player* plr)
  693. +{
  694. +}
  695. +
  696. +void IsleOfConquest::OnAddPlayer(Player* plr)
  697. +{
  698. +        if(!m_started)
  699. +                plr->CastSpell(plr, BG_PREPARATION, true);
  700. +}
  701. +
  702. +void IsleOfConquest::OnRemovePlayer(Player* plr)
  703. +{
  704. +  plr->RemoveAura(BG_PREPARATION);
  705. +}
  706. +
  707. +void IsleOfConquest::HookOnShadowSight()
  708. +{
  709. +}
  710. +
  711. +void IsleOfConquest::SetIsWeekend(bool isweekend)
  712. +{
  713. +}
  714. +
  715. +void IsleOfConquest::HookOnUnitKill(Player* plr, Unit* pVictim)
  716. +{
  717. +}
  718. +
  719. +LocationVector IsleOfConquest::GetStartingCoords(uint32 Team)
  720. +{
  721. +        if(Team)                // Horde
  722. +                return LocationVector(1264.06f, -736.73f, 48.91f, 3.07f);
  723. +        else                    // Alliance
  724. +                return LocationVector(303.22f, -857.02f, 48.91f, 5.99f);
  725. +}
  726. +
  727. +void IsleOfConquest::RemoveReinforcements(uint32 teamId, uint32 amt)
  728. +{
  729. +}
  730. +
  731. +
  732. +void IsleOfConquest::HookOnHK(Player* plr)
  733. +{
  734. +    plr->m_bgScore.HonorableKills++;
  735. +        UpdatePvPData();
  736. +}
  737. +
  738. +void IsleOfConquest::AssaultControlPoint(Player* pPlayer, uint32 Id)
  739. +{
  740. +}
  741. +
  742. +
  743. +
  744. +bool IsleOfConquest::HookHandleRepop(Player* plr)
  745. +{
  746. +        float dist = 999999.0f;
  747. +        LocationVector dest_pos;
  748. +        if( plr->GetTeam() == 1 )
  749. +                dest_pos.ChangeCoords(NoBaseGYLocations[1][0], NoBaseGYLocations[1][1], NoBaseGYLocations[1][2], NoBaseGYLocations[1][3]);
  750. +        else
  751. +                dest_pos.ChangeCoords(NoBaseGYLocations[0][0], NoBaseGYLocations[0][1], NoBaseGYLocations[0][2], NoBaseGYLocations[0][3]);
  752. +
  753. +        // port to it
  754. +        plr->SafeTeleport(plr->GetMapId(), plr->GetInstanceID(), dest_pos);
  755. +        return false;
  756. +}
  757. Index: src/arcemu-world/IsleOfConquest.h
  758. ===================================================================
  759. --- src/arcemu-world/IsleOfConquest.h   (revision 0)
  760. +++ src/arcemu-world/IsleOfConquest.h   (revision 0)
  761. @@ -0,0 +1,76 @@
  762. +/*
  763. + * Arcemu
  764. + * Copyright (C) 2008 - 2011 Arcemu <http://www.arcemu.org/>
  765. + *
  766. + * This program is free software: you can redistribute it and/or modify
  767. + * it under the terms of the GNU Affero General Public License as published by
  768. + * the Free Software Foundation, either version 3 of the License, or
  769. + * any later version.
  770. + *
  771. + * This program is distributed in the hope that it will be useful,
  772. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  773. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  774. + * GNU Affero General Public License for more details.
  775. + *
  776. + * You should have received a copy of the GNU Affero General Public License
  777. + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  778. + *
  779. + */
  780. +
  781. +#ifndef IOC_BG_H
  782. +#define IOC_BG_H
  783. +
  784. +#define IOC_NUM_CONTROL_POINTS 7
  785. +
  786. +class IsleOfConquest : public CBattleground{
  787. +   public:
  788. +       IsleOfConquest( MapMgr *mgr, uint32 id, uint32 lgroup, uint32 t );
  789. +       ~IsleOfConquest();
  790. +       static CBattleground* Create(MapMgr* m, uint32 i, uint32 l, uint32 t) { return new IsleOfConquest(m, i, l, t); }
  791. +
  792. +       void Init();
  793. +       void OnCreate();
  794. +       void OnStart();
  795. +       void SpawnControlPoint( uint32 Id, uint32 Type );
  796. +       void Finish( uint32 losingTeam );
  797. +       void HookOnAreaTrigger( Player *plr, uint32 id );
  798. +       void HookOnPlayerDeath( Player *plr );
  799. +       void HookOnPlayerKill(Player* plr, Player* pVictim){}
  800. +       void HookFlagDrop( Player *plr, GameObject *obj );
  801. +       void HookOnFlagDrop( Player* plr ){}
  802. +       void HookFlagStand( Player* plr, GameObject* obj );
  803. +       bool HookSlowLockOpen( GameObject *pGo, Player* pPlayer, Spell *pSpell );
  804. +       void HookOnMount( Player *plr );
  805. +       void HookGenerateLoot(Player* plr, Object* pCorpse){}
  806. +       void OnAddPlayer( Player *plr );
  807. +       void OnRemovePlayer( Player *plr );
  808. +       void HookOnShadowSight();
  809. +       void SetIsWeekend( bool isweekend );
  810. +       void HookOnUnitKill( Player *plr, Unit* pVictim );
  811. +       LocationVector GetStartingCoords( uint32 Team );
  812. +       void RemoveReinforcements( uint32 teamId, uint32 amt );
  813. +       void HookOnHK( Player *plr );
  814. +       void AssaultControlPoint( Player *pPlayer, uint32 Id );
  815. +       bool HookHandleRepop( Player *plr );
  816. +
  817. +   private:
  818. +       GameObject *m_ioccontrolPointAuras[ IOC_NUM_CONTROL_POINTS ];
  819. +       GameObject *m_ioccontrolPoints[ IOC_NUM_CONTROL_POINTS ];
  820. +       Unit *m_spiritGuides[ IOC_NUM_CONTROL_POINTS ];
  821. +       int32 m_basesAssaultedBy[ IOC_NUM_CONTROL_POINTS ];
  822. +       int32 m_basesOwnedBy[ IOC_NUM_CONTROL_POINTS ];
  823. +       int32 m_basesLastOwnedBy[ IOC_NUM_CONTROL_POINTS ];
  824. +       bool m_flagIsVirgin[ IOC_NUM_CONTROL_POINTS ];
  825. +      
  826. +       uint32 m_capturedBases[2];
  827. +       uint32 m_playerCountPerTeam;
  828. +       uint32 m_reinforcements[2];
  829. +       bool m_LiveCaptain[2];
  830. +       GameObject *m_teleporters[ 6 ];
  831. +       GameObject *m_teleeffect[ 6 ];
  832. +       GameObject *m_desgates[ 3 ];
  833. +       GameObject *m_ogates[ 3 ];
  834. +       GameObject *m_flagpole[ IOC_NUM_CONTROL_POINTS ];
  835. +};
  836. +
  837. +#endif
  838. Index: src/arcemu-world/StdAfx.h
  839. ===================================================================
  840. --- src/arcemu-world/StdAfx.h   (revision 4644)
  841. +++ src/arcemu-world/StdAfx.h   (working copy)
  842. @@ -195,6 +195,7 @@
  843.  #include "TaxiMgr.h"
  844.  #include "TransporterHandler.h"
  845.  #include "StrandOfTheAncient.h"
  846. +#include "IsleOfConquest.h"
  847.  #include "WarsongGulch.h"
  848.  #include "WeatherMgr.h"
  849.  #include "World.h"
  850. Index: src/arcemu-world/WorldStates.h
  851. ===================================================================
  852. --- src/arcemu-world/WorldStates.h  (revision 4644)
  853. +++ src/arcemu-world/WorldStates.h  (working copy)
  854. @@ -240,9 +240,59 @@
  855.     WORLDSTATE_WG_HORDE_CONTROL                                          = 3802, // horde control
  856.     WORLDSTATE_WG_ALLY_CONTROL                                           = 3803, // alliance control
  857.     WORLDSTATE_SOTA_CHAMBER_GATE                                         = 3849, // Chamber of the ancient relics gate
  858. +   WORLDSTATE_IOC_ALLIANCE_SCORE                                        = 4221,
  859. +   WORLDSTATE_IOC_HORDE_SCORE                                           = 4222,
  860. +   WORLDSTATE_IOC_WORKSHOP_ALLIANCE_ASSAULTED                           = 4228,
  861. +   WORLDSTATE_IOC_WORKSHOP_ALLIANCE_CONTROLLED                          = 4229,
  862. +   WORLDSTATE_IOC_WORKSHOP_HORDE_CONTROLLED                             = 4230,
  863. +   WORLDSTATE_IOC_WORKSHOP_HORDE_ASSAULTED                              = 4293,
  864. +   WORLDSTATE_IOC_WORKSHOP_NETURAL                                      = 4294,
  865. +   WORLDSTATE_IOC_HANGAR_NETURAL                                        = 4296,
  866. +   WORLDSTATE_IOC_HANGAR_HORDE_ASSAULTED                                = 4297,
  867. +   WORLDSTATE_IOC_HANGAR_HORDE_CONTROLLED                               = 4298,
  868. +   WORLDSTATE_IOC_HANGAR_ALLIANCE_CONTROLLED                            = 4299,
  869. +   WORLDSTATE_IOC_HANGAR_ALLIANCE_ASSAULTED                             = 4300,
  870. +   WORLDSTATE_IOC_DOCKS_NETURAL                                         = 4301,
  871. +   WORLDSTATE_IOC_DOCKS_HORDE_ASSAULTED                                 = 4302,
  872. +   WORLDSTATE_IOC_DOCKS_HORDE_CONTROLLED                                = 4303,
  873. +   WORLDSTATE_IOC_DOCKS_ALLIANCE_CONTROLLED                             = 4304,
  874. +   WORLDSTATE_IOC_DOCKS_ALLIANCE_ASSAULTED                              = 4305,
  875. +   WORLDSTATE_IOC_QUARRY_NETURAL                                        = 4306,
  876. +   WORLDSTATE_IOC_QUARRY_HORDE_ASSAULTED                                = 4307,
  877. +   WORLDSTATE_IOC_QUARRY_HORDE_CONTROLLED                               = 4308,
  878. +   WORLDSTATE_IOC_QUARRY_ALLIANCE_CONTROLLED                            = 4309,
  879. +   WORLDSTATE_IOC_QUARRY_ALLIANCE_ASSAULTED                             = 4310,
  880. +   WORLDSTATE_IOC_REFINERY_NETURAL                                      = 4311,
  881. +   WORLDSTATE_IOC_REFINERY_HORDE_ASSAULTED                              = 4312,
  882. +   WORLDSTATE_IOC_REFINERY_HORDE_CONTROLLED                             = 4313,
  883. +   WORLDSTATE_IOC_REFINERY_ALLIANCE_CONTROLLED                          = 4314,
  884. +   WORLDSTATE_IOC_REFINERY_ALLIANCE_ASSAULTED                           = 4315,
  885. +   WORLDSTATE_IOC_HORDE_FRONT_GATE                                      = 4317,
  886. +   WORLDSTATE_IOC_HORDE_WEST_GATE                                       = 4318,
  887. +   WORLDSTATE_IOC_HORDE_EAST_GATE                                       = 4319,
  888. +   WORLDSTATE_IOC_HORDE_GATE_DESTROYED_2                                = 4320,
  889. +   WORLDSTATE_IOC_HORDE_GATE_DESTROYED_3                                = 4321,
  890. +   WORLDSTATE_IOC_HORDE_GATE_DESTROYED_1                                = 4322,
  891. +   WORLDSTATE_IOC_ALLIANCE_GATE_DESTROYED_1                             = 4323,
  892. +   WORLDSTATE_IOC_ALLIANCE_GATE_DESTROYED_3                             = 4324,
  893. +   WORLDSTATE_IOC_ALLIANCE_GATE_DESTROYED_2                             = 4325,
  894. +   WORLDSTATE_IOC_ALLIANCE_EAST_GATE                                    = 4326,
  895. +   WORLDSTATE_IOC_ALLIANCE_WEST_GATE                                    = 4327,
  896. +   WORLDSTATE_IOC_ALLIANCE_FRONT_GATE                                   = 4328,
  897. +   WORLDSTATE_IOC_ALLIANCE_KEEP_ALLIANCE_CONTROLLED                     = 4339,
  898. +   WORLDSTATE_IOC_ALLIANCE_KEEP_HORDE_CONTROLLED                        = 4340,
  899. +   WORLDSTATE_IOC_ALLIANCE_KEEP_NETURAL                                 = 4341,
  900. +   WORLDSTATE_IOC_ALLIANCE_KEEP_ALLIANCE_ASSAULTED                      = 4342,
  901. +   WORLDSTATE_IOC_ALLIANCE_KEEP_HORDE_ASSAULTED                         = 4343,
  902. +   WORLDSTATE_IOC_HORDE_KEEP_ALLIANCE_CONTROLLED                        = 4344,
  903. +   WORLDSTATE_IOC_HORDE_KEEP_HORDE_CONTROLLED                           = 4345,
  904. +   WORLDSTATE_IOC_HORDE_KEEP_NETURAL                                    = 4346,
  905. +   WORLDSTATE_IOC_HORDE_KEEP_ALLIANCE_ASSAULTED                         = 4347,
  906. +   WORLDSTATE_IOC_HORDE_KEEP_HORDE_ASSAULTED                            = 4348,
  907.     WORLDSTATE_SOTA_SHOW_ALLY_ROUND                                      = 4352, // Alliance attacks, Horde defends
  908.     WORLDSTATE_SOTA_SHOW_HORDE_ROUND                                     = 4353, // Horder attacks, Alliance defends
  909.     WORLDSTATE_WG_SHOW_NEXT_BATTLE                                       = 4354, // unixtime of next battle ( shows it as time left in the UI )
  910.  };
  911.  
  912. +
  913.  #endif         // __WORLDSTATES_H
  914.  
  915.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement