Pelf

saurf1

Jul 9th, 2011
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 39.01 KB | None | 0 0
  1. diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp
  2. index 577bc63..e2b42cf 100755
  3. --- a/src/server/game/Entities/Transport/Transport.cpp
  4. +++ b/src/server/game/Entities/Transport/Transport.cpp
  5. @@ -63,6 +63,19 @@ void MapManager::LoadTransports()
  6.              continue;
  7.          }
  8.  
  9. +       // Zeppelin Mighty Wind, Icecrown Citadel
  10. +       // Предотвращаю его автоматическую загрузку,
  11. +       // чтобы загрузить его в нужное время в скрипте.
  12. +
  13. +       if (goinfo->entry == 201834)
  14. +       {
  15. +           sLog->outErrorDb("Loading zeppelin");
  16. +           delete t;
  17. +           continue;
  18. +       }
  19. +
  20. +       //
  21. +
  22.          if (goinfo->type != GAMEOBJECT_TYPE_MO_TRANSPORT)
  23.          {
  24.              sLog->outErrorDb("Transport ID:%u, Name: %s, will not be loaded, gameobject_template type wrong", entry, name.c_str());
  25. diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
  26. index d333b6e..1c0384a 100755
  27. --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
  28. +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
  29. @@ -15,12 +15,15 @@
  30.   * with this program. If not, see <http://www.gnu.org/licenses/>.
  31.   */
  32.  
  33. +#include "MapManager.h"
  34. +#include "Transport.h"
  35.  #include "ObjectMgr.h"
  36.  #include "ScriptMgr.h"
  37.  #include "ScriptedCreature.h"
  38.  #include "ScriptedGossip.h"
  39.  #include "SpellAuras.h"
  40.  #include "icecrown_citadel.h"
  41. +#include "Vehicle.h"
  42.  
  43.  enum ScriptTexts
  44.  {
  45. @@ -154,17 +157,30 @@ enum EventTypes
  46.      EVENT_OUTRO_ALLIANCE_8      = 30,
  47.      EVENT_OUTRO_ALLIANCE_9      = 31,
  48.      EVENT_OUTRO_ALLIANCE_10     = 32,
  49. +   EVENT_OUTRO_ALLIANCE_10_1   = 321// Чтобы сделать паузу между появлением портала и нпц
  50.      EVENT_OUTRO_ALLIANCE_11     = 33,
  51. +   EVENT_OUTRO_ALLIANCE_11_1   = 331// Чтобы сделать паузу между словами нпц и движением нпц
  52.      EVENT_OUTRO_ALLIANCE_12     = 34,
  53.      EVENT_OUTRO_ALLIANCE_13     = 35,
  54.      EVENT_OUTRO_ALLIANCE_14     = 36,
  55. +   EVENT_OUTRO_ALLIANCE_14_1   = 361// Для паузы
  56.      EVENT_OUTRO_ALLIANCE_15     = 37,
  57.      EVENT_OUTRO_ALLIANCE_16     = 38,
  58. +   EVENT_OUTRO_ALLIANCE_16_1   = 381// Чтобы сделать паузу между словами нпц и движением нпц
  59.      EVENT_OUTRO_ALLIANCE_17     = 39,
  60.      EVENT_OUTRO_ALLIANCE_18     = 40,
  61.      EVENT_OUTRO_ALLIANCE_19     = 41,
  62.      EVENT_OUTRO_ALLIANCE_20     = 42,
  63.      EVENT_OUTRO_ALLIANCE_21     = 43,
  64. +   EVENT_OUTRO_ALLIANCE_21_1   = 431// Чтобы сделать паузу
  65. +   EVENT_OUTRO_ALLIANCE_21_2   = 432// Когда мурадин возвращается на свой пост
  66. +   EVENT_OUTRO_ALLIANCE_21_3   = 433,
  67. +   EVENT_OUTRO_ALLIANCE_21_4   = 434,
  68. +   EVENT_OUTRO_ALLIANCE_21_5   = 435,
  69. +   EVENT_OUTRO_ALLIANCE_21_6   = 436,
  70. +   EVENT_OUTRO_ALLIANCE_21_7   = 437,
  71. +   EVENT_OUTRO_ALLIANCE_21_8   = 438,
  72. +   EVENT_OUTRO_ALLIANCE_21_9   = 439,
  73.  
  74.      EVENT_OUTRO_HORDE_1         = 44,
  75.      EVENT_OUTRO_HORDE_2         = 45,
  76. @@ -172,6 +188,11 @@ enum EventTypes
  77.      EVENT_OUTRO_HORDE_4         = 47,
  78.      EVENT_OUTRO_HORDE_5         = 48,
  79.      EVENT_OUTRO_HORDE_6         = 49,
  80. +   EVENT_OUTRO_HORDE_6_1       = 491,
  81. +   EVENT_OUTRO_HORDE_6_2       = 492,
  82. +   EVENT_OUTRO_HORDE_6_3       = 493,
  83. +   EVENT_OUTRO_HORDE_6_4       = 494,
  84. +   EVENT_OUTRO_HORDE_6_5       = 495,
  85.      EVENT_OUTRO_HORDE_7         = 50,
  86.      EVENT_OUTRO_HORDE_8         = 51,
  87.  };
  88. @@ -193,6 +214,12 @@ enum Actions
  89.      ACTION_START_OUTRO                  = -3781303,
  90.      ACTION_DESPAWN                      = -3781304,
  91.      ACTION_INTERRUPT_INTRO              = -3781305,
  92. +   ACTION_MOVE                         = -3781306,
  93. +   ACTION_STAND                        = -3781307,
  94. +   ACTION_KNEEL                        = -3781308,
  95. +   ACTION_KING                         = -3781309,
  96. +   ACTION_EXIT_1                       = -3791310,
  97. +   ACTION_EXIT_2                       = -3791311,
  98.      ACTION_MARK_OF_THE_FALLEN_CHAMPION  = -72293,
  99.  };
  100.  
  101. @@ -206,6 +233,11 @@ enum MovePoints
  102.      POINT_CHOKE             = 3781303,
  103.      POINT_CORPSE            = 3781304,
  104.      POINT_FINAL             = 3781305,
  105. +   POINT_STAND             = 3781306,
  106. +   POINT_CORPSE_1          = 3781307// Для эвента альянса
  107. +   POINT_KING              = 3781308// Для эвента альянса
  108. +   POINT_EXIT_1            = 3781309// Для эвента альянса
  109. +   POINT_EXIT_2            = 3781310,
  110.      POINT_EXIT              = 5,        // waypoint id
  111.  };
  112.  
  113. @@ -234,6 +266,33 @@ Position const chokePos[6] =
  114.  
  115.  Position const finalPos = {-563.7552f, 2211.328f, 538.7848f, 0.0f};
  116.  
  117. +Position const movePos[5] =
  118. +{
  119. +   {-516.70f, 2227.09f, 539.28f, 0.0f}, // front left
  120. +   {-514.98f, 2226.66f, 539.28f, 0.0f}, // front right
  121. +   {-513.25f, 2226.23f, 539.28f, 0.0f}, // back middle
  122. +   {-520.84f, 2227.91f, 539.28f, 0.0f}, // back left
  123. +   {-523.24f, 2228.28f, 539.29f, 0.0f}  // back right
  124. +};
  125. +
  126. +Position const standPos[5] =
  127. +{
  128. +   {-538.71f, 2228.63f, 539.29f, 0.0f},
  129. +   {-539.12f, 2226.92f, 539.29f, 0.0f},
  130. +   {-539.80f, 2225.36f, 539.29f, 0.0f},
  131. +   {-540.32f, 2223.16f, 539.29f, 0.0f},
  132. +   {-540.79f, 2221.18f, 539.29f, 0.0f}
  133. +};
  134. +
  135. +Position const exitPos[5] =
  136. +{
  137. +   {-557.30f, 2208.20f, 539.29f, 0.0f},
  138. +   {-559.16f, 2211.43f, 539.29f, 0.0f},
  139. +   {-557.26f, 2215.06f, 539.29f, 0.0f},
  140. +   {-561.04f, 2207.88f, 539.29f, 0.0f},
  141. +   {-560.90f, 2214.58f, 539.29f, 0.0f}
  142. +};
  143. +
  144.  class boss_deathbringer_saurfang : public CreatureScript
  145.  {
  146.      public:
  147. @@ -352,7 +411,7 @@ class boss_deathbringer_saurfang : public CreatureScript
  148.  
  149.              void JustSummoned(Creature* summon)
  150.              {
  151. -                if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true))
  152. +                if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f))
  153.                      summon->AI()->AttackStart(target);
  154.  
  155.                  if (IsHeroic())
  156. @@ -460,8 +519,8 @@ class boss_deathbringer_saurfang : public CreatureScript
  157.                              DoCastVictim(SPELL_RUNE_OF_BLOOD);
  158.                              events.ScheduleEvent(EVENT_RUNE_OF_BLOOD, urand(20000, 25000), 0, PHASE_COMBAT);
  159.                              break;
  160. -                        case EVENT_BOILING_BLOOD:
  161. -                            DoCast(me, SPELL_BOILING_BLOOD);
  162. +                       case EVENT_BOILING_BLOOD:
  163. +                           DoCast(me, SPELL_BOILING_BLOOD);
  164.                              events.ScheduleEvent(EVENT_BOILING_BLOOD, urand(15000, 20000), 0, PHASE_COMBAT);
  165.                              break;
  166.                          case EVENT_BERSERK:
  167. @@ -653,9 +712,11 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
  168.                          case POINT_CORPSE:
  169.                              if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
  170.                              {
  171. +                               Vehicle* vehicle(me->GetVehicleKit());
  172.                                  deathbringer->CastSpell(me, SPELL_RIDE_VEHICLE, true);  // for the packet logs.
  173.                                  deathbringer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
  174.                                  deathbringer->setDeathState(ALIVE);
  175. +                               deathbringer->_EnterVehicle(vehicle, 0);
  176.                              }
  177.                              _events.ScheduleEvent(EVENT_OUTRO_HORDE_5, 1000);    // move
  178.                              _events.ScheduleEvent(EVENT_OUTRO_HORDE_6, 4000);    // say
  179. @@ -663,7 +724,8 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
  180.                          case POINT_FINAL:
  181.                              if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
  182.                                  deathbringer->DespawnOrUnsummon();
  183. -                            me->DespawnOrUnsummon();
  184. +                            me->SetVisible(false);
  185. +                           _events.ScheduleEvent(EVENT_OUTRO_HORDE_6_1, 1000);
  186.                              break;
  187.                          default:
  188.                              break;
  189. @@ -728,14 +790,65 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
  190.                          case EVENT_OUTRO_HORDE_6:   // say
  191.                              Talk(SAY_OUTRO_HORDE_4);
  192.                              break;
  193. +                       case EVENT_OUTRO_HORDE_6_1:
  194. +                           _hordeportal1 = me->SummonGameObject(195702, -561.16f, 2219.30f, 539.28f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, DAY);
  195. +                           _hordeportal1->SetGoState(GO_STATE_READY);
  196. +                           _hordeportal2 = me->SummonGameObject(195702, -560.84f, 2202.57f, 539.28f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, DAY);
  197. +                           _hordeportal2->SetGoState(GO_STATE_READY);
  198. +                           _events.ScheduleEvent(EVENT_OUTRO_HORDE_6_2, 5000);
  199. +                           break;
  200. +                       // Порталы орды активируются
  201. +                       case EVENT_OUTRO_HORDE_6_2:
  202. +                           _hordeportal1->SetGoState(GO_STATE_ACTIVE);
  203. +                           _hordeportal2->SetGoState(GO_STATE_ACTIVE);
  204. +                           _events.ScheduleEvent(EVENT_OUTRO_HORDE_6_3, 5000);
  205. +                           break;
  206. +                       // Появляются батраки орды и бегут к палаткам
  207. +                       case EVENT_OUTRO_HORDE_6_3:
  208. +                           _peon1 = me->SummonCreature(14901, -561.16f, 2219.30f, 539.28f, 0.0f);
  209. +                           _peon1->GetMotionMaster()->MovePoint(0, -538.82f, 2225.95f, 539.29f);
  210. +                           _peon2 = me->SummonCreature(14901, -560.84f, 2202.57f, 539.28f, 0.0f);
  211. +                           _peon2->GetMotionMaster()->MovePoint(0, -534.05f, 2222.42f, 539.29f);
  212. +                           _events.ScheduleEvent(EVENT_OUTRO_HORDE_6_4, 5000);
  213. +                           break;
  214. +                       // Батраки орды строят
  215. +                       case EVENT_OUTRO_HORDE_6_4:
  216. +                           _peon1->SetStandState(EMOTE_STATE_WORK);
  217. +                           _peon2->SetStandState(EMOTE_STATE_WORK);
  218. +                           _events.ScheduleEvent(EVENT_OUTRO_HORDE_6_5, 5000);
  219. +                           break;
  220. +                       // Появление палаток, костра, кузни и наковальни
  221. +                       // Появление кузнеца и продавца
  222. +                       // Батраки пропадают
  223. +                       case EVENT_OUTRO_HORDE_6_5:
  224. +                           if (GameObject* pGo = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SAURFANG_FORGE)))
  225. +                               pGo->SetRespawnTime(7*DAY);
  226. +                           if (GameObject* pGo = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SAURFANG_ANVIL)))
  227. +                               pGo->SetRespawnTime(7*DAY);
  228. +                           if (GameObject* pGo = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SAURFANG_BONFIRE)))
  229. +                               pGo->SetRespawnTime(7*DAY);
  230. +                           if (GameObject* pGo = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SAURFANG_HORDE_TENT1)))
  231. +                               pGo->SetRespawnTime(7*DAY);
  232. +                           if (GameObject* pGo = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SAURFANG_HORDE_TENT2)))
  233. +                               pGo->SetRespawnTime(7*DAY);
  234. +                           if (Creature* pCreature = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_SAURFANG_HORDE_SELLER)))
  235. +                               pCreature->SetVisible(true);
  236. +                           if (Creature* pCreature = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_SAURFANG_HORDE_SMITH)))
  237. +                               pCreature->SetVisible(true);
  238. +                           _peon1->DespawnOrUnsummon();
  239. +                           _peon2->DespawnOrUnsummon();
  240. +                           break;
  241.                      }
  242.                  }
  243.              }
  244.  
  245.          private:
  246. +           TempSummon* _peon1, * _peon2;
  247. +           GameObject* _hordeportal1, * _hordeportal2;
  248.              EventMap _events;
  249.              InstanceScript* _instance;
  250.              std::list<Creature*> _guardList;
  251. +           Vehicle* vehicle;
  252.          };
  253.  
  254.          bool OnGossipHello(Player* player, Creature* creature)
  255. @@ -778,6 +891,50 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
  256.                  _instance = me->GetInstanceScript();
  257.              }
  258.  
  259. +           Transport* CreateZeppelin()
  260. +           {
  261. +               const GameObjectTemplate* goInfo = sObjectMgr->GetGameObjectTemplate(201834);
  262. +              
  263. +               if (!goInfo) return NULL;
  264. +
  265. +               Transport *t = new Transport(154573, goInfo->ScriptId);
  266. +
  267. +               std::set<uint32> mapsUsed;
  268. +               if (!t->GenerateWaypoints(goInfo->moTransport.taxiPathId, mapsUsed))
  269. +               {
  270. +                   delete t;
  271. +                   return NULL;
  272. +               }
  273. +
  274. +               uint32 transportLowGuid = sObjectMgr->GenerateLowGuid(HIGHGUID_MO_TRANSPORT);
  275. +
  276. +               if (!t->Create(transportLowGuid, 201834, t->m_WayPoints[0].mapid, t->m_WayPoints[0].x,                 t->m_WayPoints[0].y, t->m_WayPoints[0].z, 0.0f, 0, 0))
  277. +               {
  278. +                   delete t;
  279. +                   return NULL;
  280. +               }
  281. +               t->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
  282. +               t->SetGoState(GO_STATE_READY);
  283. +               Map* tMap = me->GetMap();
  284. +               t->SetMap(tMap);
  285. +               t->AddToWorld();
  286. +              
  287. +               for (Map::PlayerList::const_iterator itr = tMap->GetPlayers().begin(); itr != tMap->GetPlayers().end(); ++itr)
  288. +              
  289. +                   if (Player* pPlayer = itr->getSource())
  290. +                   {
  291. +                       UpdateData transData;
  292. +                       t->BuildCreateUpdateBlockForPlayer(&transData, pPlayer);
  293. +                       WorldPacket packet;
  294. +                       transData.BuildPacket(&packet);
  295. +                       pPlayer->SendDirectMessage(&packet);
  296. +                   }
  297. +                
  298. +               sMapMgr->m_Transports.insert(t);
  299. +               t->Update(1);
  300. +               return t;
  301. +           }
  302. +
  303.              void Reset()
  304.              {
  305.                  _events.Reset();
  306. @@ -812,12 +969,19 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
  307.                      {
  308.                          me->RemoveAurasDueToSpell(SPELL_GRIP_OF_AGONY);
  309.                          Talk(SAY_OUTRO_ALLIANCE_1);
  310. +                       zepp = CreateZeppelin();
  311. +                       _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_2, 4000);
  312.                          me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
  313.                          me->SendMovementFlagUpdate();
  314.                          me->Relocate(me->GetPositionX(), me->GetPositionY(), 539.2917f);
  315.                          me->SendMonsterMove(me->GetPositionX(), me->GetPositionY(), 539.2917f, SPLINEFLAG_FALLING, 0, 0.0f);
  316.                          for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
  317. -                            (*itr)->AI()->DoAction(ACTION_DESPAWN);
  318. +                       {
  319. +                           (*itr)->RemoveAurasDueToSpell(SPELL_GRIP_OF_AGONY);
  320. +                           (*itr)->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
  321. +                           (*itr)->Relocate(me->GetPositionX(), me->GetPositionY(), 539.2917f);
  322. +                           (*itr)->SendMonsterMove(me->GetPositionX(), me->GetPositionY(), 539.2917f, SPLINEFLAG_FALLING, 0, 0.0f);
  323. +                       }
  324.                          break;
  325.                      }
  326.                      case ACTION_INTERRUPT_INTRO:
  327. @@ -825,6 +989,15 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
  328.                          for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
  329.                              (*itr)->AI()->DoAction(ACTION_DESPAWN);
  330.                          break;
  331. +                   case ACTION_KNEEL:
  332. +                       _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_13, 1000);
  333. +                       break;
  334. +                   case ACTION_KING:
  335. +                       _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_15, 1000);
  336. +                       break;
  337. +                   case ACTION_EXIT_1:
  338. +                       _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_17, 1000);
  339. +                       break;
  340.                  }
  341.              }
  342.  
  343. @@ -855,6 +1028,31 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
  344.                          (*itr)->DespawnOrUnsummon();
  345.                      me->DespawnOrUnsummon();
  346.                  }
  347. +               if (id == POINT_STAND)
  348. +                   me->SetFacing(6.05f);
  349. +               if (id == POINT_CORPSE_1)
  350. +               {
  351. +                   Creature* muradin = ObjectAccessor::GetCreature(*me, me->GetCreatorGUID());
  352. +                   muradin->AI()->DoAction(ACTION_KNEEL);
  353. +               }
  354. +               if (id == POINT_KING)
  355. +               {
  356. +                   Creature* muradin = ObjectAccessor::GetCreature(*me, me->GetCreatorGUID());
  357. +                   muradin->AI()->DoAction(ACTION_KING);
  358. +               }
  359. +               if (id == POINT_EXIT_1)
  360. +               {
  361. +                   Creature* muradin = ObjectAccessor::GetCreature(*me, me->GetCreatorGUID());
  362. +                   if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
  363. +                       deathbringer->DespawnOrUnsummon();
  364. +                   muradin->AI()->DoAction(ACTION_EXIT_1);
  365. +                   me->DespawnOrUnsummon();
  366. +               }
  367. +               if (id == POINT_EXIT_2)
  368. +               {
  369. +                   me->SetFacing(0.0f);
  370. +                   _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_21_2, 1000);
  371. +               }
  372.              }
  373.  
  374.              void UpdateAI(uint32 const diff)
  375. @@ -874,14 +1072,251 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
  376.                                  (*itr)->AI()->DoAction(ACTION_CHARGE);
  377.                              me->GetMotionMaster()->MoveCharge(chargePos[0].GetPositionX(), chargePos[0].GetPositionY(), chargePos[0].GetPositionZ(), 8.5f, POINT_CHARGE);
  378.                              break;
  379. -                    }
  380. +                       case EVENT_OUTRO_ALLIANCE_2:
  381. +                           Talk(SAY_OUTRO_ALLIANCE_2);
  382. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_3, 9000);
  383. +                           break;
  384. +                       case EVENT_OUTRO_ALLIANCE_3:
  385. +                           me->SetFacing(2.69f);
  386. +                           Talk(SAY_OUTRO_ALLIANCE_3);
  387. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_4, 6000);
  388. +                           break;
  389. +                       case EVENT_OUTRO_ALLIANCE_4:
  390. +                           me->GetMotionMaster()->MovePoint(0, -518.49f, 2227.77f, 539.29f);
  391. +                           Talk(SAY_OUTRO_ALLIANCE_4);
  392. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_5, 12000);
  393. +                           break;
  394. +                       case EVENT_OUTRO_ALLIANCE_5:
  395. +                           me->SetFacing(1.31f);
  396. +                           Talk(SAY_OUTRO_ALLIANCE_5);
  397. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_6, 15000);
  398. +                           for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
  399. +                                (*itr)->AI()->DoAction(ACTION_MOVE);
  400. +                           break;
  401. +                       // Появляется правитель Саурфанг и идет к Мурадину
  402. +                       case EVENT_OUTRO_ALLIANCE_6:
  403. +                           Talk(SAY_OUTRO_ALLIANCE_6);
  404. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_7, 4000);
  405. +                           me->SummonCreature(37187, -519.17f, 2250.46f, 539.29f, 4.89f);
  406. +                           for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
  407. +                                (*itr)->SetFacing(1.31f);
  408. +                           break;
  409. +                       // Мурадин говорит с правителем Саурфангом
  410. +                       case EVENT_OUTRO_ALLIANCE_7:
  411. +                           Talk(SAY_OUTRO_ALLIANCE_7);
  412. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_8, 8000);
  413. +                           break;
  414. +                       // Правитель Саурфанг говорит с Мурадином
  415. +                       case EVENT_OUTRO_ALLIANCE_8:
  416. +                           _HighLordSaurfang->AI()->Talk(SAY_OUTRO_ALLIANCE_8);
  417. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_9, 10000);
  418. +                           break;
  419. +                       // Мударин говорит с правителем Саурфангом
  420. +                       case EVENT_OUTRO_ALLIANCE_9:
  421. +                           Talk(SAY_OUTRO_ALLIANCE_9);
  422. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_10, 10000);
  423. +                           break;
  424. +                       // Появляется портал из штормграда
  425. +                       case EVENT_OUTRO_ALLIANCE_10:
  426. +                           _stormwindportal = me->SummonGameObject(195139, -532.01f, 2235.35f, 539.29f, 0.0f,0.0f,0.0f,0.0f,0.0f, 30000);
  427. +                           _stormwindportal->CastSpell(_stormwindportal->ToUnit(), 52096);
  428. +                           _stormwindportal->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND);
  429. +                           Talk(SAY_OUTRO_ALLIANCE_10);
  430. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_10_1, 2000);
  431. +                           break;
  432. +                       // Появляются Вариан Ринн и Джайна
  433. +                       case EVENT_OUTRO_ALLIANCE_10_1:
  434. +                           me->SummonCreature(NPC_SE_JAINA_PROUDMOORE, -529.64f, 2232.39f, 539.29f, 5.88f);
  435. +                           me->SummonCreature(NPC_SE_KING_VARIAN_WRYNN, -528.45f, 2235.44f, 539.29f, 5.91f);
  436. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_11, 2000);
  437. +                           break;
  438. +                       // Вариан Ринн говорит Мурадину отойти
  439. +                       case EVENT_OUTRO_ALLIANCE_11:
  440. +                           _KingVarianWrynn->AI()->Talk(SAY_OUTRO_ALLIANCE_11);
  441. +                           _stormwindportal->SetRespawnTime(30);
  442. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_11_1, 5000);
  443. +                           break;
  444. +                       // Мурадин и солдаты отходят в сторону
  445. +                       // Правитель Саурфанг идет к сыну
  446. +                       case EVENT_OUTRO_ALLIANCE_11_1:
  447. +                           me->GetMotionMaster()->MovePoint(POINT_STAND, -531.14f, 2229.90f, 539.29f);
  448. +                           for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
  449. +                                (*itr)->AI()->DoAction(ACTION_STAND);
  450. +                           if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
  451. +                            {
  452. +                                float x, y, z;
  453. +                                deathbringer->GetClosePoint(x, y, z, deathbringer->GetObjectSize());
  454. +                                _HighLordSaurfang->GetMotionMaster()->MovePoint(POINT_CORPSE_1, x, y, z);
  455. +                               _HighLordSaurfang->AI()->Talk(SAY_OUTRO_ALLIANCE_12);
  456. +                            }
  457. +                           break;
  458. +                       // Правитель Саурфанг доходит до тела
  459. +                       case EVENT_OUTRO_ALLIANCE_13:
  460. +                           _HighLordSaurfang->AI()->Talk(SAY_OUTRO_ALLIANCE_13);
  461. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_14, 8000);
  462. +                           break;
  463. +                       // Правитель Саурфанг поднимает тело сына
  464. +                       case EVENT_OUTRO_ALLIANCE_14:
  465. +                           if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
  466. +                           {
  467. +                               Vehicle* vehicle(_HighLordSaurfang->GetVehicleKit());
  468. +                               deathbringer->CastSpell(_HighLordSaurfang, SPELL_RIDE_VEHICLE, true);
  469. +                                deathbringer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
  470. +                                deathbringer->setDeathState(ALIVE);
  471. +                               deathbringer->_EnterVehicle(vehicle, 0);
  472. +                           }
  473. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_14_1, 2000);
  474. +                           break;
  475. +                       // Правитель Саурфанг идет к Вариану Ринну
  476. +                       case EVENT_OUTRO_ALLIANCE_14_1:
  477. +                           _HighLordSaurfang->AI()->Talk(SAY_OUTRO_ALLIANCE_14);
  478. +                           _HighLordSaurfang->GetMotionMaster()->MovePoint(POINT_KING, -525.41f, 2233.26f, 539.29f);
  479. +                           break;
  480. +                       // Правитель Саурфанг говорит с Варианом Ринном
  481. +                       case EVENT_OUTRO_ALLIANCE_15:
  482. +                           _HighLordSaurfang->SetFacing(2.42f);
  483. +                           _HighLordSaurfang->AI()->Talk(SAY_OUTRO_ALLIANCE_15);
  484. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_16, 8000);
  485. +                           break;
  486. +                       // Вариан Ринн говорит с правителем Саурфангом
  487. +                       case EVENT_OUTRO_ALLIANCE_16:
  488. +                           _KingVarianWrynn->AI()->Talk(SAY_OUTRO_ALLIANCE_16);
  489. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_16_1, 18000);
  490. +                           break;
  491. +                       // Правитель Саурфанг направляется к дирижаблю
  492. +                       case EVENT_OUTRO_ALLIANCE_16_1:
  493. +                           _HighLordSaurfang->GetMotionMaster()->MovePoint(POINT_EXIT_1, -520.34f, 2249.83f, 539.29f);
  494. +                           break;
  495. +                       // Дирижабль улетает
  496. +                       // Джайна плачет
  497. +                       case EVENT_OUTRO_ALLIANCE_17:
  498. +                           _LadyJainaProudmoore->AI()->Talk(SAY_OUTRO_ALLIANCE_17);
  499. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_18, 4000);
  500. +                           break;
  501. +                       // Вариан Ринн говорит с Джайной
  502. +                       case EVENT_OUTRO_ALLIANCE_18:
  503. +                           _KingVarianWrynn->SetFacingToObject(_LadyJainaProudmoore);
  504. +                           _KingVarianWrynn->AI()->Talk(SAY_OUTRO_ALLIANCE_18);
  505. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_19, 4000);
  506. +                           break;
  507. +                       // Джайна говорит с Варианом Ринном
  508. +                       case EVENT_OUTRO_ALLIANCE_19:
  509. +                           _LadyJainaProudmoore->SetFacingToObject(_KingVarianWrynn);
  510. +                           _LadyJainaProudmoore->AI()->Talk(SAY_OUTRO_ALLIANCE_19);
  511. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_20, 9000);
  512. +                           break;
  513. +                       // Вариан Ринн говорит с Мурадином
  514. +                       case EVENT_OUTRO_ALLIANCE_20:
  515. +                           me->SetFacingToObject(_KingVarianWrynn);
  516. +                           _KingVarianWrynn->AI()->Talk(SAY_OUTRO_ALLIANCE_20);
  517. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_21, 11000);
  518. +                           break;
  519. +                       // Мурадин говорит с Варианом Ринном
  520. +                       case EVENT_OUTRO_ALLIANCE_21:
  521. +                           Talk(SAY_OUTRO_ALLIANCE_21);
  522. +                           _KingVarianWrynn->CastSpell(me, 52096,false);
  523. +                           _LadyJainaProudmoore->CastSpell(me, 52096,false);
  524. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_21_1, 1000);
  525. +                           break;
  526. +                       // Вариан Ринн и Джайна исчезают
  527. +                       // Мурадин и солдаты убегают к выходу
  528. +                       case EVENT_OUTRO_ALLIANCE_21_1:
  529. +                           _KingVarianWrynn->DespawnOrUnsummon();
  530. +                           _LadyJainaProudmoore->DespawnOrUnsummon();
  531. +                           me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
  532. +                           me->GetMotionMaster()->MovePoint(POINT_EXIT_2, -556.0f, 2211.42f, 539.37f);
  533. +                           for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
  534. +                                (*itr)->AI()->DoAction(ACTION_EXIT_2);
  535. +                           break;
  536. +                       // Появляются порталы альянса
  537. +                       case EVENT_OUTRO_ALLIANCE_21_2:
  538. +                           _allianceportal1 = me->SummonGameObject(195701, -561.16f, 2219.30f, 539.28f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, DAY);
  539. +                           _allianceportal1->SetGoState(GO_STATE_READY);
  540. +                           _allianceportal2 = me->SummonGameObject(195701, -560.84f, 2202.57f, 539.28f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, DAY);
  541. +                           _allianceportal2->SetGoState(GO_STATE_READY);
  542. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_21_3, 5000);
  543. +                           break;
  544. +                       // Порталы альянса активируются
  545. +                       case EVENT_OUTRO_ALLIANCE_21_3:
  546. +                           _allianceportal1->SetGoState(GO_STATE_ACTIVE);
  547. +                           _allianceportal2->SetGoState(GO_STATE_ACTIVE);
  548. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_21_4, 5000);
  549. +                           break;
  550. +                       // Появляются батраки альянса и бегут к палаткам
  551. +                       case EVENT_OUTRO_ALLIANCE_21_4:
  552. +                           _peon1 = me->SummonCreature(20424, -561.16f, 2219.30f, 539.28f, 0.0f);
  553. +                           _peon1->GetMotionMaster()->MovePoint(0, -538.82f, 2225.95f, 539.29f);
  554. +                           _peon2 = me->SummonCreature(20424, -560.84f, 2202.57f, 539.28f, 0.0f);
  555. +                           _peon2->GetMotionMaster()->MovePoint(0, -534.05f, 2222.42f, 539.29f);
  556. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_21_5, 7000);
  557. +                           break;
  558. +                       // Батраки альянса строят
  559. +                       case EVENT_OUTRO_ALLIANCE_21_5:
  560. +                           _peon1->SetStandState(EMOTE_STATE_WORK);
  561. +                           _peon2->SetStandState(EMOTE_STATE_WORK);
  562. +                           _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_21_6, 5000);
  563. +                           break;
  564. +                       // Появление палаток, костра, кузни и наковальни
  565. +                       // Появление кузнеца и продавца
  566. +                       // Батраки пропадают
  567. +                       case EVENT_OUTRO_ALLIANCE_21_6:
  568. +                           if (GameObject* pGo = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SAURFANG_FORGE)))
  569. +                               pGo->SetRespawnTime(7*DAY);
  570. +                           if (GameObject* pGo = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SAURFANG_ANVIL)))
  571. +                               pGo->SetRespawnTime(7*DAY);
  572. +                           if (GameObject* pGo = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SAURFANG_BONFIRE)))
  573. +                               pGo->SetRespawnTime(7*DAY);
  574. +                           if (GameObject* pGo = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SAURFANG_ALLIANCE_TENT1)))
  575. +                               pGo->SetRespawnTime(7*DAY);
  576. +                           if (GameObject* pGo = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SAURFANG_ALLIANCE_TENT2)))
  577. +                               pGo->SetRespawnTime(7*DAY);
  578. +                           if (Creature* pCreature = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_SAURFANG_ALLIANCE_SELLER)))
  579. +                               pCreature->SetVisible(true);
  580. +                           if (Creature* pCreature = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_SAURFANG_ALLIANCE_SMITH)))
  581. +                               pCreature->SetVisible(true);
  582. +                           _peon1->DespawnOrUnsummon();
  583. +                           _peon2->DespawnOrUnsummon();
  584. +                           break;
  585. +                   }
  586.                  }
  587.              }
  588.  
  589. +           void JustSummoned(Creature* summon)
  590. +           {
  591. +               // Правитель Саурфанг
  592. +               // Так как при загрузке нпц для альянса он автоматически поменяется на Мурадина
  593. +               // меняем ему ентри обратно на Саурфанга
  594. +               if (summon->GetEntry() == NPC_SE_MURADIN_BRONZEBEARD)
  595. +               {
  596. +                   summon->UpdateEntry(37187);
  597. +                   summon->SetCreatorGUID(me->GetGUID());
  598. +                   summon->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
  599. +                   _HighLordSaurfang = summon;
  600. +                   summon->GetMotionMaster()->MovePoint(0, -517.80f, 2236.91f, 539.29f);
  601. +               }
  602. +               // Вариан Ринн
  603. +               if (summon->GetEntry() == NPC_SE_KING_VARIAN_WRYNN)
  604. +               {
  605. +                   summon->CastSpell(me, 52096,false);
  606. +                   _KingVarianWrynn = summon;
  607. +               }
  608. +               // Джайна Праудмур
  609. +               if (summon->GetEntry() == NPC_SE_JAINA_PROUDMOORE)
  610. +               {
  611. +                   summon->CastSpell(me, 52096,false);
  612. +                   _LadyJainaProudmoore = summon;
  613. +               }
  614. +           }
  615. +
  616.          private:
  617. +           Transport* zepp;
  618. +           TempSummon* _peon1, * _peon2;
  619. +           Creature* _HighLordSaurfang, *  _KingVarianWrynn, * _LadyJainaProudmoore;
  620. +           GameObject* _stormwindportal, * _allianceportal1, * _allianceportal2;
  621.              EventMap _events;
  622.              InstanceScript* _instance;
  623.              std::list<Creature*> _guardList;
  624. +           Vehicle* vehicle;
  625.          };
  626.  
  627.          bool OnGossipHello(Player* player, Creature* creature)
  628. @@ -939,13 +1374,35 @@ class npc_saurfang_event : public CreatureScript
  629.                  }
  630.              }
  631.  
  632. +           void MovementInform(uint32 type, uint32 id)
  633. +           {
  634. +               if (type == POINT_MOTION_TYPE)
  635. +                {
  636. +                    switch (id)
  637. +                    {
  638. +                       case POINT_STAND:
  639. +                           me->SetFacing(6.05f);
  640. +                           break;
  641. +                       case POINT_EXIT_2:
  642. +                           me->SetFacing(0.0f);
  643. +                           break;
  644. +                   }
  645. +               }
  646. +           }
  647. +
  648.              void DoAction(int32 const action)
  649.              {
  650.                  if (action == ACTION_CHARGE && _index)
  651.                      me->GetMotionMaster()->MoveCharge(chargePos[_index].GetPositionX(), chargePos[_index].GetPositionY(), chargePos[_index].GetPositionZ(), 13.0f, POINT_CHARGE);
  652.                  else if (action == ACTION_DESPAWN)
  653.                      me->DespawnOrUnsummon();
  654. -            }
  655. +               else if (action == ACTION_MOVE && _index)
  656. +                   me->GetMotionMaster()->MovePoint(0, movePos[_index-1].GetPositionX(), movePos[_index-1].GetPositionY(), movePos[_index-1].GetPositionZ());
  657. +               else if (action == ACTION_STAND && _index)
  658. +                   me->GetMotionMaster()->MovePoint(POINT_STAND, standPos[_index-1].GetPositionX(), standPos[_index-1].GetPositionY(), standPos[_index-1].GetPositionZ());
  659. +               else if (action == ACTION_EXIT_2 && _index)
  660. +                   me->GetMotionMaster()->MovePoint(POINT_EXIT_2, exitPos[_index-1].GetPositionX(), exitPos[_index-1].GetPositionY(), exitPos[_index-1].GetPositionZ());
  661. +           }
  662.  
  663.          private:
  664.              uint32 _index;
  665. @@ -1177,7 +1634,7 @@ class spell_deathbringer_blood_nova_targeting : public SpellScriptLoader
  666.              {
  667.                  // select one random target, with preference of ranged targets
  668.                  uint32 targetsAtRange = 0;
  669. -                uint32 const minTargets = uint32(GetCaster()->GetMap()->GetSpawnMode() & 1 ? 10 : 4);
  670. +                uint32 const minTargets = uint32(GetCaster()->GetMap()->GetSpawnMode() & 1 ? 8 : 3);
  671.                  unitList.sort(Trinity::ObjectDistanceOrderPred(GetCaster(), false));
  672.  
  673.                  // get target count at range
  674. diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
  675. index 4dc9a24..9b4ca31 100755
  676. --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
  677. +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
  678. @@ -28,6 +28,7 @@ uint32 const EncounterCount = 13;
  679.  uint32 const WeeklyNPCs = 9;
  680.  uint32 const MaxHeroicAttempts = 50;
  681.  
  682. +
  683.  extern Position const ValithriaSpawnPos;
  684.  // Defined in boss_sindragosa.cpp
  685.  extern Position const SindragosaSpawnPos;
  686. @@ -99,6 +100,10 @@ enum DataTypes
  687.      DATA_CAPTAIN_RUPERT             = 34,
  688.      DATA_VALITHRIA_TRIGGER          = 35,
  689.      DATA_VALITHRIA_LICH_KING        = 36,
  690. +   DATA_SAURFANG_HORDE_SELLER      = 37,
  691. +   DATA_SAURFANG_HORDE_SMITH       = 38,
  692. +   DATA_SAURFANG_ALLIANCE_SELLER   = 39,
  693. +   DATA_SAURFANG_ALLIANCE_SMITH    = 40,
  694.  };
  695.  
  696.  enum CreaturesIds
  697. @@ -161,7 +166,7 @@ enum CreaturesIds
  698.      NPC_SE_HIGH_OVERLORD_SAURFANG               = 37187,
  699.      NPC_SE_KOR_KRON_REAVER                      = 37920,
  700.      NPC_SE_SKYBREAKER_MARINE                    = 37830,
  701. -    NPC_FROST_FREEZE_TRAP                       = 37744,
  702. +    NPC_FROST_FREEZE_TRAP                       = 37744,  
  703.  
  704.      // Festergut
  705.      NPC_FESTERGUT                               = 36626,
  706. @@ -272,6 +277,13 @@ enum GameObjectsIds
  707.      GO_DEATHBRINGER_S_CACHE_10H             = 202238,
  708.      GO_DEATHBRINGER_S_CACHE_25H             = 202241,
  709.      GO_SCOURGE_TRANSPORTER_SAURFANG         = 202244,
  710. +   GO_SAURFANG_FORGE                       = 191508,
  711. +   GO_SAURFANG_ANVIL                       = 191345,
  712. +   GO_SAURFANG_BONFIRE                     = 196417,
  713. +   GO_SAURFANG_HORDE_TENT1                 = 201887,
  714. +   GO_SAURFANG_HORDE_TENT2                 = 201886,
  715. +   GO_SAURFANG_ALLIANCE_TENT1              = 201868,
  716. +   GO_SAURFANG_ALLIANCE_TENT2              = 2018681,
  717.  
  718.      // Professor Putricide
  719.      GO_ORANGE_PLAGUE_MONSTER_ENTRANCE       = 201371,
  720. diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
  721. index 7890f2f..c58a89a 100755
  722. --- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
  723. +++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
  724. @@ -74,6 +74,8 @@ WeeklyQuest const WeeklyQuestData[WeeklyNPCs] =
  725.      {NPC_VALITHRIA_DREAMWALKER_QUEST, {QUEST_RESPITE_FOR_A_TORNMENTED_SOUL_10, QUEST_RESPITE_FOR_A_TORNMENTED_SOUL_25}}, // Respite for a Tormented Soul
  726.  };
  727.  
  728. +
  729. +
  730.  class instance_icecrown_citadel : public InstanceMapScript
  731.  {
  732.      public:
  733. @@ -87,6 +89,17 @@ class instance_icecrown_citadel : public InstanceMapScript
  734.                  LoadDoorData(doorData);
  735.                  TeamInInstance = 0;
  736.                  HeroicAttempts = MaxHeroicAttempts;
  737. +               SaurfangAllianceTent1GUID = 0;
  738. +               SaurfangAllianceTent2GUID = 0;
  739. +               SaurfangHordeTent1GUID = 0;
  740. +               SaurfangHordeTent2GUID = 0;
  741. +               SaurfangBonfireGUID = 0;
  742. +               SaurfangForgeGUID = 0;
  743. +               SaurfangAnvilGUID = 0;
  744. +               SaurfangAllianceSmithGUID = 0;
  745. +               SaurfangAllianceSellerGUID = 0;
  746. +               SaurfangHordeSmithGUID = 0;
  747. +               SaurfangHordeSellerGUID = 0;
  748.                  LadyDeathwisperElevatorGUID = 0;
  749.                  DeathbringerSaurfangGUID = 0;
  750.                  DeathbringerSaurfangDoorGUID = 0;
  751. @@ -156,6 +169,22 @@ class instance_icecrown_citadel : public InstanceMapScript
  752.  
  753.                  switch (creature->GetEntry())
  754.                  {
  755. +                   case 37936:                         //Морган Дневной Свет
  756. +                       SaurfangHordeSmithGUID = creature->GetGUID();
  757. +                       creature->SetVisible(false);
  758. +                       break;
  759. +                   case 37935:                         //Кандита Томас
  760. +                       SaurfangHordeSellerGUID = creature->GetGUID();
  761. +                       creature->SetVisible(false);
  762. +                       break;
  763. +                   case 37904:                         //Брейзи Нашол
  764. +                       SaurfangAllianceSellerGUID = creature->GetGUID();
  765. +                       creature->SetVisible(false);
  766. +                       break;
  767. +                   case 37903:                         //Шели Стальнобрюхий
  768. +                       SaurfangAllianceSmithGUID = creature->GetGUID();
  769. +                       creature->SetVisible(false);
  770. +                       break;
  771.                      case NPC_KOR_KRON_GENERAL:
  772.                          if (TeamInInstance == ALLIANCE)
  773.                              creature->UpdateEntry(NPC_ALLIANCE_COMMANDER, ALLIANCE);
  774. @@ -197,7 +226,7 @@ class instance_icecrown_citadel : public InstanceMapScript
  775.                          break;
  776.                      case NPC_SE_HIGH_OVERLORD_SAURFANG:
  777.                          if (TeamInInstance == ALLIANCE)
  778. -                            creature->UpdateEntry(NPC_SE_MURADIN_BRONZEBEARD, ALLIANCE, creature->GetCreatureData());
  779. +                            creature->UpdateEntry(NPC_SE_MURADIN_BRONZEBEARD, ALLIANCE/*, creature->GetCreatureData()*/);
  780.                          // no break;
  781.                      case NPC_SE_MURADIN_BRONZEBEARD:
  782.                          DeathbringerSaurfangEventGUID = creature->GetGUID();
  783. @@ -337,6 +366,27 @@ class instance_icecrown_citadel : public InstanceMapScript
  784.              {
  785.                  switch (go->GetEntry())
  786.                  {
  787. +                   case 191508:
  788. +                       SaurfangForgeGUID = go->GetGUID();
  789. +                       break;
  790. +                   case 191345:
  791. +                       SaurfangAnvilGUID = go->GetGUID();
  792. +                       break;
  793. +                   case 196417:
  794. +                       SaurfangBonfireGUID = go->GetGUID();
  795. +                       break;
  796. +                   case 201868:
  797. +                       if (!SaurfangAllianceTent1GUID)
  798. +                           SaurfangAllianceTent1GUID = go->GetGUID();
  799. +                       else
  800. +                           SaurfangAllianceTent2GUID = go->GetGUID();
  801. +                       break;
  802. +                   case 201887:
  803. +                       SaurfangHordeTent1GUID = go->GetGUID();
  804. +                       break;
  805. +                   case 201886:
  806. +                       SaurfangHordeTent2GUID = go->GetGUID();
  807. +                       break;
  808.                      case GO_DOODAD_ICECROWN_ICEWALL02:
  809.                      case GO_ICEWALL:
  810.                      case GO_LORD_MARROWGAR_S_ENTRANCE:
  811. @@ -501,6 +551,28 @@ class instance_icecrown_citadel : public InstanceMapScript
  812.              {
  813.                  switch (type)
  814.                  {
  815. +                   case DATA_SAURFANG_HORDE_SELLER:
  816. +                       return SaurfangHordeSellerGUID;
  817. +                   case DATA_SAURFANG_HORDE_SMITH:
  818. +                       return SaurfangHordeSmithGUID;
  819. +                   case DATA_SAURFANG_ALLIANCE_SELLER:
  820. +                       return SaurfangAllianceSellerGUID;
  821. +                   case DATA_SAURFANG_ALLIANCE_SMITH:
  822. +                       return SaurfangAllianceSmithGUID;
  823. +                   case GO_SAURFANG_HORDE_TENT1:
  824. +                       return SaurfangHordeTent1GUID;
  825. +                   case GO_SAURFANG_HORDE_TENT2:
  826. +                       return SaurfangHordeTent2GUID;
  827. +                   case GO_SAURFANG_ALLIANCE_TENT1:
  828. +                       return SaurfangAllianceTent1GUID;
  829. +                   case GO_SAURFANG_ALLIANCE_TENT2:
  830. +                       return SaurfangAllianceTent2GUID;
  831. +                   case GO_SAURFANG_BONFIRE:
  832. +                       return SaurfangBonfireGUID;
  833. +                   case GO_SAURFANG_ANVIL:
  834. +                       return SaurfangAnvilGUID;
  835. +                   case GO_SAURFANG_FORGE:
  836. +                       return SaurfangForgeGUID;
  837.                      case DATA_DEATHBRINGER_SAURFANG:
  838.                          return DeathbringerSaurfangGUID;
  839.                      case DATA_SAURFANG_EVENT_NPC:
  840. @@ -1091,6 +1163,17 @@ class instance_icecrown_citadel : public InstanceMapScript
  841.  
  842.          protected:
  843.              std::set<uint64> ColdflameJetGUIDs;
  844. +           uint64 SaurfangAllianceTent1GUID;
  845. +           uint64 SaurfangAllianceTent2GUID;
  846. +           uint64 SaurfangHordeTent1GUID;
  847. +           uint64 SaurfangHordeTent2GUID;
  848. +           uint64 SaurfangBonfireGUID;
  849. +           uint64 SaurfangForgeGUID;
  850. +           uint64 SaurfangAnvilGUID;
  851. +           uint64 SaurfangAllianceSmithGUID;
  852. +           uint64 SaurfangAllianceSellerGUID;
  853. +           uint64 SaurfangHordeSmithGUID;
  854. +           uint64 SaurfangHordeSellerGUID;
  855.              uint64 LadyDeathwisperElevatorGUID;
  856.              uint64 DeathbringerSaurfangGUID;
  857.              uint64 DeathbringerSaurfangDoorGUID;
Advertisement
Add Comment
Please, Sign In to add comment