Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp
- index 577bc63..e2b42cf 100755
- --- a/src/server/game/Entities/Transport/Transport.cpp
- +++ b/src/server/game/Entities/Transport/Transport.cpp
- @@ -63,6 +63,19 @@ void MapManager::LoadTransports()
- continue;
- }
- + // Zeppelin Mighty Wind, Icecrown Citadel
- + // Предотвращаю его автоматическую загрузку,
- + // чтобы загрузить его в нужное время в скрипте.
- +
- + if (goinfo->entry == 201834)
- + {
- + sLog->outErrorDb("Loading zeppelin");
- + delete t;
- + continue;
- + }
- +
- + //
- +
- if (goinfo->type != GAMEOBJECT_TYPE_MO_TRANSPORT)
- {
- sLog->outErrorDb("Transport ID:%u, Name: %s, will not be loaded, gameobject_template type wrong", entry, name.c_str());
- diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
- index d333b6e..1c0384a 100755
- --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
- +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
- @@ -15,12 +15,15 @@
- * with this program. If not, see <http://www.gnu.org/licenses/>.
- */
- +#include "MapManager.h"
- +#include "Transport.h"
- #include "ObjectMgr.h"
- #include "ScriptMgr.h"
- #include "ScriptedCreature.h"
- #include "ScriptedGossip.h"
- #include "SpellAuras.h"
- #include "icecrown_citadel.h"
- +#include "Vehicle.h"
- enum ScriptTexts
- {
- @@ -154,17 +157,30 @@ enum EventTypes
- EVENT_OUTRO_ALLIANCE_8 = 30,
- EVENT_OUTRO_ALLIANCE_9 = 31,
- EVENT_OUTRO_ALLIANCE_10 = 32,
- + EVENT_OUTRO_ALLIANCE_10_1 = 321, // Чтобы сделать паузу между появлением портала и нпц
- EVENT_OUTRO_ALLIANCE_11 = 33,
- + EVENT_OUTRO_ALLIANCE_11_1 = 331, // Чтобы сделать паузу между словами нпц и движением нпц
- EVENT_OUTRO_ALLIANCE_12 = 34,
- EVENT_OUTRO_ALLIANCE_13 = 35,
- EVENT_OUTRO_ALLIANCE_14 = 36,
- + EVENT_OUTRO_ALLIANCE_14_1 = 361, // Для паузы
- EVENT_OUTRO_ALLIANCE_15 = 37,
- EVENT_OUTRO_ALLIANCE_16 = 38,
- + EVENT_OUTRO_ALLIANCE_16_1 = 381, // Чтобы сделать паузу между словами нпц и движением нпц
- EVENT_OUTRO_ALLIANCE_17 = 39,
- EVENT_OUTRO_ALLIANCE_18 = 40,
- EVENT_OUTRO_ALLIANCE_19 = 41,
- EVENT_OUTRO_ALLIANCE_20 = 42,
- EVENT_OUTRO_ALLIANCE_21 = 43,
- + EVENT_OUTRO_ALLIANCE_21_1 = 431, // Чтобы сделать паузу
- + EVENT_OUTRO_ALLIANCE_21_2 = 432, // Когда мурадин возвращается на свой пост
- + EVENT_OUTRO_ALLIANCE_21_3 = 433,
- + EVENT_OUTRO_ALLIANCE_21_4 = 434,
- + EVENT_OUTRO_ALLIANCE_21_5 = 435,
- + EVENT_OUTRO_ALLIANCE_21_6 = 436,
- + EVENT_OUTRO_ALLIANCE_21_7 = 437,
- + EVENT_OUTRO_ALLIANCE_21_8 = 438,
- + EVENT_OUTRO_ALLIANCE_21_9 = 439,
- EVENT_OUTRO_HORDE_1 = 44,
- EVENT_OUTRO_HORDE_2 = 45,
- @@ -172,6 +188,11 @@ enum EventTypes
- EVENT_OUTRO_HORDE_4 = 47,
- EVENT_OUTRO_HORDE_5 = 48,
- EVENT_OUTRO_HORDE_6 = 49,
- + EVENT_OUTRO_HORDE_6_1 = 491,
- + EVENT_OUTRO_HORDE_6_2 = 492,
- + EVENT_OUTRO_HORDE_6_3 = 493,
- + EVENT_OUTRO_HORDE_6_4 = 494,
- + EVENT_OUTRO_HORDE_6_5 = 495,
- EVENT_OUTRO_HORDE_7 = 50,
- EVENT_OUTRO_HORDE_8 = 51,
- };
- @@ -193,6 +214,12 @@ enum Actions
- ACTION_START_OUTRO = -3781303,
- ACTION_DESPAWN = -3781304,
- ACTION_INTERRUPT_INTRO = -3781305,
- + ACTION_MOVE = -3781306,
- + ACTION_STAND = -3781307,
- + ACTION_KNEEL = -3781308,
- + ACTION_KING = -3781309,
- + ACTION_EXIT_1 = -3791310,
- + ACTION_EXIT_2 = -3791311,
- ACTION_MARK_OF_THE_FALLEN_CHAMPION = -72293,
- };
- @@ -206,6 +233,11 @@ enum MovePoints
- POINT_CHOKE = 3781303,
- POINT_CORPSE = 3781304,
- POINT_FINAL = 3781305,
- + POINT_STAND = 3781306,
- + POINT_CORPSE_1 = 3781307, // Для эвента альянса
- + POINT_KING = 3781308, // Для эвента альянса
- + POINT_EXIT_1 = 3781309, // Для эвента альянса
- + POINT_EXIT_2 = 3781310,
- POINT_EXIT = 5, // waypoint id
- };
- @@ -234,6 +266,33 @@ Position const chokePos[6] =
- Position const finalPos = {-563.7552f, 2211.328f, 538.7848f, 0.0f};
- +Position const movePos[5] =
- +{
- + {-516.70f, 2227.09f, 539.28f, 0.0f}, // front left
- + {-514.98f, 2226.66f, 539.28f, 0.0f}, // front right
- + {-513.25f, 2226.23f, 539.28f, 0.0f}, // back middle
- + {-520.84f, 2227.91f, 539.28f, 0.0f}, // back left
- + {-523.24f, 2228.28f, 539.29f, 0.0f} // back right
- +};
- +
- +Position const standPos[5] =
- +{
- + {-538.71f, 2228.63f, 539.29f, 0.0f},
- + {-539.12f, 2226.92f, 539.29f, 0.0f},
- + {-539.80f, 2225.36f, 539.29f, 0.0f},
- + {-540.32f, 2223.16f, 539.29f, 0.0f},
- + {-540.79f, 2221.18f, 539.29f, 0.0f}
- +};
- +
- +Position const exitPos[5] =
- +{
- + {-557.30f, 2208.20f, 539.29f, 0.0f},
- + {-559.16f, 2211.43f, 539.29f, 0.0f},
- + {-557.26f, 2215.06f, 539.29f, 0.0f},
- + {-561.04f, 2207.88f, 539.29f, 0.0f},
- + {-560.90f, 2214.58f, 539.29f, 0.0f}
- +};
- +
- class boss_deathbringer_saurfang : public CreatureScript
- {
- public:
- @@ -352,7 +411,7 @@ class boss_deathbringer_saurfang : public CreatureScript
- void JustSummoned(Creature* summon)
- {
- - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true))
- + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f))
- summon->AI()->AttackStart(target);
- if (IsHeroic())
- @@ -460,8 +519,8 @@ class boss_deathbringer_saurfang : public CreatureScript
- DoCastVictim(SPELL_RUNE_OF_BLOOD);
- events.ScheduleEvent(EVENT_RUNE_OF_BLOOD, urand(20000, 25000), 0, PHASE_COMBAT);
- break;
- - case EVENT_BOILING_BLOOD:
- - DoCast(me, SPELL_BOILING_BLOOD);
- + case EVENT_BOILING_BLOOD:
- + DoCast(me, SPELL_BOILING_BLOOD);
- events.ScheduleEvent(EVENT_BOILING_BLOOD, urand(15000, 20000), 0, PHASE_COMBAT);
- break;
- case EVENT_BERSERK:
- @@ -653,9 +712,11 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
- case POINT_CORPSE:
- if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
- {
- + Vehicle* vehicle(me->GetVehicleKit());
- deathbringer->CastSpell(me, SPELL_RIDE_VEHICLE, true); // for the packet logs.
- deathbringer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- deathbringer->setDeathState(ALIVE);
- + deathbringer->_EnterVehicle(vehicle, 0);
- }
- _events.ScheduleEvent(EVENT_OUTRO_HORDE_5, 1000); // move
- _events.ScheduleEvent(EVENT_OUTRO_HORDE_6, 4000); // say
- @@ -663,7 +724,8 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
- case POINT_FINAL:
- if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
- deathbringer->DespawnOrUnsummon();
- - me->DespawnOrUnsummon();
- + me->SetVisible(false);
- + _events.ScheduleEvent(EVENT_OUTRO_HORDE_6_1, 1000);
- break;
- default:
- break;
- @@ -728,14 +790,65 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
- case EVENT_OUTRO_HORDE_6: // say
- Talk(SAY_OUTRO_HORDE_4);
- break;
- + case EVENT_OUTRO_HORDE_6_1:
- + _hordeportal1 = me->SummonGameObject(195702, -561.16f, 2219.30f, 539.28f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, DAY);
- + _hordeportal1->SetGoState(GO_STATE_READY);
- + _hordeportal2 = me->SummonGameObject(195702, -560.84f, 2202.57f, 539.28f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, DAY);
- + _hordeportal2->SetGoState(GO_STATE_READY);
- + _events.ScheduleEvent(EVENT_OUTRO_HORDE_6_2, 5000);
- + break;
- + // Порталы орды активируются
- + case EVENT_OUTRO_HORDE_6_2:
- + _hordeportal1->SetGoState(GO_STATE_ACTIVE);
- + _hordeportal2->SetGoState(GO_STATE_ACTIVE);
- + _events.ScheduleEvent(EVENT_OUTRO_HORDE_6_3, 5000);
- + break;
- + // Появляются батраки орды и бегут к палаткам
- + case EVENT_OUTRO_HORDE_6_3:
- + _peon1 = me->SummonCreature(14901, -561.16f, 2219.30f, 539.28f, 0.0f);
- + _peon1->GetMotionMaster()->MovePoint(0, -538.82f, 2225.95f, 539.29f);
- + _peon2 = me->SummonCreature(14901, -560.84f, 2202.57f, 539.28f, 0.0f);
- + _peon2->GetMotionMaster()->MovePoint(0, -534.05f, 2222.42f, 539.29f);
- + _events.ScheduleEvent(EVENT_OUTRO_HORDE_6_4, 5000);
- + break;
- + // Батраки орды строят
- + case EVENT_OUTRO_HORDE_6_4:
- + _peon1->SetStandState(EMOTE_STATE_WORK);
- + _peon2->SetStandState(EMOTE_STATE_WORK);
- + _events.ScheduleEvent(EVENT_OUTRO_HORDE_6_5, 5000);
- + break;
- + // Появление палаток, костра, кузни и наковальни
- + // Появление кузнеца и продавца
- + // Батраки пропадают
- + case EVENT_OUTRO_HORDE_6_5:
- + if (GameObject* pGo = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SAURFANG_FORGE)))
- + pGo->SetRespawnTime(7*DAY);
- + if (GameObject* pGo = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SAURFANG_ANVIL)))
- + pGo->SetRespawnTime(7*DAY);
- + if (GameObject* pGo = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SAURFANG_BONFIRE)))
- + pGo->SetRespawnTime(7*DAY);
- + if (GameObject* pGo = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SAURFANG_HORDE_TENT1)))
- + pGo->SetRespawnTime(7*DAY);
- + if (GameObject* pGo = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SAURFANG_HORDE_TENT2)))
- + pGo->SetRespawnTime(7*DAY);
- + if (Creature* pCreature = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_SAURFANG_HORDE_SELLER)))
- + pCreature->SetVisible(true);
- + if (Creature* pCreature = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_SAURFANG_HORDE_SMITH)))
- + pCreature->SetVisible(true);
- + _peon1->DespawnOrUnsummon();
- + _peon2->DespawnOrUnsummon();
- + break;
- }
- }
- }
- private:
- + TempSummon* _peon1, * _peon2;
- + GameObject* _hordeportal1, * _hordeportal2;
- EventMap _events;
- InstanceScript* _instance;
- std::list<Creature*> _guardList;
- + Vehicle* vehicle;
- };
- bool OnGossipHello(Player* player, Creature* creature)
- @@ -778,6 +891,50 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
- _instance = me->GetInstanceScript();
- }
- + Transport* CreateZeppelin()
- + {
- + const GameObjectTemplate* goInfo = sObjectMgr->GetGameObjectTemplate(201834);
- +
- + if (!goInfo) return NULL;
- +
- + Transport *t = new Transport(154573, goInfo->ScriptId);
- +
- + std::set<uint32> mapsUsed;
- + if (!t->GenerateWaypoints(goInfo->moTransport.taxiPathId, mapsUsed))
- + {
- + delete t;
- + return NULL;
- + }
- +
- + uint32 transportLowGuid = sObjectMgr->GenerateLowGuid(HIGHGUID_MO_TRANSPORT);
- +
- + 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))
- + {
- + delete t;
- + return NULL;
- + }
- + t->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
- + t->SetGoState(GO_STATE_READY);
- + Map* tMap = me->GetMap();
- + t->SetMap(tMap);
- + t->AddToWorld();
- +
- + for (Map::PlayerList::const_iterator itr = tMap->GetPlayers().begin(); itr != tMap->GetPlayers().end(); ++itr)
- +
- + if (Player* pPlayer = itr->getSource())
- + {
- + UpdateData transData;
- + t->BuildCreateUpdateBlockForPlayer(&transData, pPlayer);
- + WorldPacket packet;
- + transData.BuildPacket(&packet);
- + pPlayer->SendDirectMessage(&packet);
- + }
- +
- + sMapMgr->m_Transports.insert(t);
- + t->Update(1);
- + return t;
- + }
- +
- void Reset()
- {
- _events.Reset();
- @@ -812,12 +969,19 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
- {
- me->RemoveAurasDueToSpell(SPELL_GRIP_OF_AGONY);
- Talk(SAY_OUTRO_ALLIANCE_1);
- + zepp = CreateZeppelin();
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_2, 4000);
- me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
- me->SendMovementFlagUpdate();
- me->Relocate(me->GetPositionX(), me->GetPositionY(), 539.2917f);
- me->SendMonsterMove(me->GetPositionX(), me->GetPositionY(), 539.2917f, SPLINEFLAG_FALLING, 0, 0.0f);
- for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
- - (*itr)->AI()->DoAction(ACTION_DESPAWN);
- + {
- + (*itr)->RemoveAurasDueToSpell(SPELL_GRIP_OF_AGONY);
- + (*itr)->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
- + (*itr)->Relocate(me->GetPositionX(), me->GetPositionY(), 539.2917f);
- + (*itr)->SendMonsterMove(me->GetPositionX(), me->GetPositionY(), 539.2917f, SPLINEFLAG_FALLING, 0, 0.0f);
- + }
- break;
- }
- case ACTION_INTERRUPT_INTRO:
- @@ -825,6 +989,15 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
- for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
- (*itr)->AI()->DoAction(ACTION_DESPAWN);
- break;
- + case ACTION_KNEEL:
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_13, 1000);
- + break;
- + case ACTION_KING:
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_15, 1000);
- + break;
- + case ACTION_EXIT_1:
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_17, 1000);
- + break;
- }
- }
- @@ -855,6 +1028,31 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
- (*itr)->DespawnOrUnsummon();
- me->DespawnOrUnsummon();
- }
- + if (id == POINT_STAND)
- + me->SetFacing(6.05f);
- + if (id == POINT_CORPSE_1)
- + {
- + Creature* muradin = ObjectAccessor::GetCreature(*me, me->GetCreatorGUID());
- + muradin->AI()->DoAction(ACTION_KNEEL);
- + }
- + if (id == POINT_KING)
- + {
- + Creature* muradin = ObjectAccessor::GetCreature(*me, me->GetCreatorGUID());
- + muradin->AI()->DoAction(ACTION_KING);
- + }
- + if (id == POINT_EXIT_1)
- + {
- + Creature* muradin = ObjectAccessor::GetCreature(*me, me->GetCreatorGUID());
- + if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
- + deathbringer->DespawnOrUnsummon();
- + muradin->AI()->DoAction(ACTION_EXIT_1);
- + me->DespawnOrUnsummon();
- + }
- + if (id == POINT_EXIT_2)
- + {
- + me->SetFacing(0.0f);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_21_2, 1000);
- + }
- }
- void UpdateAI(uint32 const diff)
- @@ -874,14 +1072,251 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
- (*itr)->AI()->DoAction(ACTION_CHARGE);
- me->GetMotionMaster()->MoveCharge(chargePos[0].GetPositionX(), chargePos[0].GetPositionY(), chargePos[0].GetPositionZ(), 8.5f, POINT_CHARGE);
- break;
- - }
- + case EVENT_OUTRO_ALLIANCE_2:
- + Talk(SAY_OUTRO_ALLIANCE_2);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_3, 9000);
- + break;
- + case EVENT_OUTRO_ALLIANCE_3:
- + me->SetFacing(2.69f);
- + Talk(SAY_OUTRO_ALLIANCE_3);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_4, 6000);
- + break;
- + case EVENT_OUTRO_ALLIANCE_4:
- + me->GetMotionMaster()->MovePoint(0, -518.49f, 2227.77f, 539.29f);
- + Talk(SAY_OUTRO_ALLIANCE_4);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_5, 12000);
- + break;
- + case EVENT_OUTRO_ALLIANCE_5:
- + me->SetFacing(1.31f);
- + Talk(SAY_OUTRO_ALLIANCE_5);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_6, 15000);
- + for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
- + (*itr)->AI()->DoAction(ACTION_MOVE);
- + break;
- + // Появляется правитель Саурфанг и идет к Мурадину
- + case EVENT_OUTRO_ALLIANCE_6:
- + Talk(SAY_OUTRO_ALLIANCE_6);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_7, 4000);
- + me->SummonCreature(37187, -519.17f, 2250.46f, 539.29f, 4.89f);
- + for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
- + (*itr)->SetFacing(1.31f);
- + break;
- + // Мурадин говорит с правителем Саурфангом
- + case EVENT_OUTRO_ALLIANCE_7:
- + Talk(SAY_OUTRO_ALLIANCE_7);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_8, 8000);
- + break;
- + // Правитель Саурфанг говорит с Мурадином
- + case EVENT_OUTRO_ALLIANCE_8:
- + _HighLordSaurfang->AI()->Talk(SAY_OUTRO_ALLIANCE_8);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_9, 10000);
- + break;
- + // Мударин говорит с правителем Саурфангом
- + case EVENT_OUTRO_ALLIANCE_9:
- + Talk(SAY_OUTRO_ALLIANCE_9);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_10, 10000);
- + break;
- + // Появляется портал из штормграда
- + case EVENT_OUTRO_ALLIANCE_10:
- + _stormwindportal = me->SummonGameObject(195139, -532.01f, 2235.35f, 539.29f, 0.0f,0.0f,0.0f,0.0f,0.0f, 30000);
- + _stormwindportal->CastSpell(_stormwindportal->ToUnit(), 52096);
- + _stormwindportal->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND);
- + Talk(SAY_OUTRO_ALLIANCE_10);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_10_1, 2000);
- + break;
- + // Появляются Вариан Ринн и Джайна
- + case EVENT_OUTRO_ALLIANCE_10_1:
- + me->SummonCreature(NPC_SE_JAINA_PROUDMOORE, -529.64f, 2232.39f, 539.29f, 5.88f);
- + me->SummonCreature(NPC_SE_KING_VARIAN_WRYNN, -528.45f, 2235.44f, 539.29f, 5.91f);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_11, 2000);
- + break;
- + // Вариан Ринн говорит Мурадину отойти
- + case EVENT_OUTRO_ALLIANCE_11:
- + _KingVarianWrynn->AI()->Talk(SAY_OUTRO_ALLIANCE_11);
- + _stormwindportal->SetRespawnTime(30);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_11_1, 5000);
- + break;
- + // Мурадин и солдаты отходят в сторону
- + // Правитель Саурфанг идет к сыну
- + case EVENT_OUTRO_ALLIANCE_11_1:
- + me->GetMotionMaster()->MovePoint(POINT_STAND, -531.14f, 2229.90f, 539.29f);
- + for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
- + (*itr)->AI()->DoAction(ACTION_STAND);
- + if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
- + {
- + float x, y, z;
- + deathbringer->GetClosePoint(x, y, z, deathbringer->GetObjectSize());
- + _HighLordSaurfang->GetMotionMaster()->MovePoint(POINT_CORPSE_1, x, y, z);
- + _HighLordSaurfang->AI()->Talk(SAY_OUTRO_ALLIANCE_12);
- + }
- + break;
- + // Правитель Саурфанг доходит до тела
- + case EVENT_OUTRO_ALLIANCE_13:
- + _HighLordSaurfang->AI()->Talk(SAY_OUTRO_ALLIANCE_13);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_14, 8000);
- + break;
- + // Правитель Саурфанг поднимает тело сына
- + case EVENT_OUTRO_ALLIANCE_14:
- + if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_DEATHBRINGER_SAURFANG)))
- + {
- + Vehicle* vehicle(_HighLordSaurfang->GetVehicleKit());
- + deathbringer->CastSpell(_HighLordSaurfang, SPELL_RIDE_VEHICLE, true);
- + deathbringer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- + deathbringer->setDeathState(ALIVE);
- + deathbringer->_EnterVehicle(vehicle, 0);
- + }
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_14_1, 2000);
- + break;
- + // Правитель Саурфанг идет к Вариану Ринну
- + case EVENT_OUTRO_ALLIANCE_14_1:
- + _HighLordSaurfang->AI()->Talk(SAY_OUTRO_ALLIANCE_14);
- + _HighLordSaurfang->GetMotionMaster()->MovePoint(POINT_KING, -525.41f, 2233.26f, 539.29f);
- + break;
- + // Правитель Саурфанг говорит с Варианом Ринном
- + case EVENT_OUTRO_ALLIANCE_15:
- + _HighLordSaurfang->SetFacing(2.42f);
- + _HighLordSaurfang->AI()->Talk(SAY_OUTRO_ALLIANCE_15);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_16, 8000);
- + break;
- + // Вариан Ринн говорит с правителем Саурфангом
- + case EVENT_OUTRO_ALLIANCE_16:
- + _KingVarianWrynn->AI()->Talk(SAY_OUTRO_ALLIANCE_16);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_16_1, 18000);
- + break;
- + // Правитель Саурфанг направляется к дирижаблю
- + case EVENT_OUTRO_ALLIANCE_16_1:
- + _HighLordSaurfang->GetMotionMaster()->MovePoint(POINT_EXIT_1, -520.34f, 2249.83f, 539.29f);
- + break;
- + // Дирижабль улетает
- + // Джайна плачет
- + case EVENT_OUTRO_ALLIANCE_17:
- + _LadyJainaProudmoore->AI()->Talk(SAY_OUTRO_ALLIANCE_17);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_18, 4000);
- + break;
- + // Вариан Ринн говорит с Джайной
- + case EVENT_OUTRO_ALLIANCE_18:
- + _KingVarianWrynn->SetFacingToObject(_LadyJainaProudmoore);
- + _KingVarianWrynn->AI()->Talk(SAY_OUTRO_ALLIANCE_18);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_19, 4000);
- + break;
- + // Джайна говорит с Варианом Ринном
- + case EVENT_OUTRO_ALLIANCE_19:
- + _LadyJainaProudmoore->SetFacingToObject(_KingVarianWrynn);
- + _LadyJainaProudmoore->AI()->Talk(SAY_OUTRO_ALLIANCE_19);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_20, 9000);
- + break;
- + // Вариан Ринн говорит с Мурадином
- + case EVENT_OUTRO_ALLIANCE_20:
- + me->SetFacingToObject(_KingVarianWrynn);
- + _KingVarianWrynn->AI()->Talk(SAY_OUTRO_ALLIANCE_20);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_21, 11000);
- + break;
- + // Мурадин говорит с Варианом Ринном
- + case EVENT_OUTRO_ALLIANCE_21:
- + Talk(SAY_OUTRO_ALLIANCE_21);
- + _KingVarianWrynn->CastSpell(me, 52096,false);
- + _LadyJainaProudmoore->CastSpell(me, 52096,false);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_21_1, 1000);
- + break;
- + // Вариан Ринн и Джайна исчезают
- + // Мурадин и солдаты убегают к выходу
- + case EVENT_OUTRO_ALLIANCE_21_1:
- + _KingVarianWrynn->DespawnOrUnsummon();
- + _LadyJainaProudmoore->DespawnOrUnsummon();
- + me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
- + me->GetMotionMaster()->MovePoint(POINT_EXIT_2, -556.0f, 2211.42f, 539.37f);
- + for (std::list<Creature*>::iterator itr = _guardList.begin(); itr != _guardList.end(); ++itr)
- + (*itr)->AI()->DoAction(ACTION_EXIT_2);
- + break;
- + // Появляются порталы альянса
- + case EVENT_OUTRO_ALLIANCE_21_2:
- + _allianceportal1 = me->SummonGameObject(195701, -561.16f, 2219.30f, 539.28f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, DAY);
- + _allianceportal1->SetGoState(GO_STATE_READY);
- + _allianceportal2 = me->SummonGameObject(195701, -560.84f, 2202.57f, 539.28f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, DAY);
- + _allianceportal2->SetGoState(GO_STATE_READY);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_21_3, 5000);
- + break;
- + // Порталы альянса активируются
- + case EVENT_OUTRO_ALLIANCE_21_3:
- + _allianceportal1->SetGoState(GO_STATE_ACTIVE);
- + _allianceportal2->SetGoState(GO_STATE_ACTIVE);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_21_4, 5000);
- + break;
- + // Появляются батраки альянса и бегут к палаткам
- + case EVENT_OUTRO_ALLIANCE_21_4:
- + _peon1 = me->SummonCreature(20424, -561.16f, 2219.30f, 539.28f, 0.0f);
- + _peon1->GetMotionMaster()->MovePoint(0, -538.82f, 2225.95f, 539.29f);
- + _peon2 = me->SummonCreature(20424, -560.84f, 2202.57f, 539.28f, 0.0f);
- + _peon2->GetMotionMaster()->MovePoint(0, -534.05f, 2222.42f, 539.29f);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_21_5, 7000);
- + break;
- + // Батраки альянса строят
- + case EVENT_OUTRO_ALLIANCE_21_5:
- + _peon1->SetStandState(EMOTE_STATE_WORK);
- + _peon2->SetStandState(EMOTE_STATE_WORK);
- + _events.ScheduleEvent(EVENT_OUTRO_ALLIANCE_21_6, 5000);
- + break;
- + // Появление палаток, костра, кузни и наковальни
- + // Появление кузнеца и продавца
- + // Батраки пропадают
- + case EVENT_OUTRO_ALLIANCE_21_6:
- + if (GameObject* pGo = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SAURFANG_FORGE)))
- + pGo->SetRespawnTime(7*DAY);
- + if (GameObject* pGo = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SAURFANG_ANVIL)))
- + pGo->SetRespawnTime(7*DAY);
- + if (GameObject* pGo = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SAURFANG_BONFIRE)))
- + pGo->SetRespawnTime(7*DAY);
- + if (GameObject* pGo = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SAURFANG_ALLIANCE_TENT1)))
- + pGo->SetRespawnTime(7*DAY);
- + if (GameObject* pGo = ObjectAccessor::GetGameObject(*me, _instance->GetData64(GO_SAURFANG_ALLIANCE_TENT2)))
- + pGo->SetRespawnTime(7*DAY);
- + if (Creature* pCreature = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_SAURFANG_ALLIANCE_SELLER)))
- + pCreature->SetVisible(true);
- + if (Creature* pCreature = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_SAURFANG_ALLIANCE_SMITH)))
- + pCreature->SetVisible(true);
- + _peon1->DespawnOrUnsummon();
- + _peon2->DespawnOrUnsummon();
- + break;
- + }
- }
- }
- + void JustSummoned(Creature* summon)
- + {
- + // Правитель Саурфанг
- + // Так как при загрузке нпц для альянса он автоматически поменяется на Мурадина
- + // меняем ему ентри обратно на Саурфанга
- + if (summon->GetEntry() == NPC_SE_MURADIN_BRONZEBEARD)
- + {
- + summon->UpdateEntry(37187);
- + summon->SetCreatorGUID(me->GetGUID());
- + summon->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
- + _HighLordSaurfang = summon;
- + summon->GetMotionMaster()->MovePoint(0, -517.80f, 2236.91f, 539.29f);
- + }
- + // Вариан Ринн
- + if (summon->GetEntry() == NPC_SE_KING_VARIAN_WRYNN)
- + {
- + summon->CastSpell(me, 52096,false);
- + _KingVarianWrynn = summon;
- + }
- + // Джайна Праудмур
- + if (summon->GetEntry() == NPC_SE_JAINA_PROUDMOORE)
- + {
- + summon->CastSpell(me, 52096,false);
- + _LadyJainaProudmoore = summon;
- + }
- + }
- +
- private:
- + Transport* zepp;
- + TempSummon* _peon1, * _peon2;
- + Creature* _HighLordSaurfang, * _KingVarianWrynn, * _LadyJainaProudmoore;
- + GameObject* _stormwindportal, * _allianceportal1, * _allianceportal2;
- EventMap _events;
- InstanceScript* _instance;
- std::list<Creature*> _guardList;
- + Vehicle* vehicle;
- };
- bool OnGossipHello(Player* player, Creature* creature)
- @@ -939,13 +1374,35 @@ class npc_saurfang_event : public CreatureScript
- }
- }
- + void MovementInform(uint32 type, uint32 id)
- + {
- + if (type == POINT_MOTION_TYPE)
- + {
- + switch (id)
- + {
- + case POINT_STAND:
- + me->SetFacing(6.05f);
- + break;
- + case POINT_EXIT_2:
- + me->SetFacing(0.0f);
- + break;
- + }
- + }
- + }
- +
- void DoAction(int32 const action)
- {
- if (action == ACTION_CHARGE && _index)
- me->GetMotionMaster()->MoveCharge(chargePos[_index].GetPositionX(), chargePos[_index].GetPositionY(), chargePos[_index].GetPositionZ(), 13.0f, POINT_CHARGE);
- else if (action == ACTION_DESPAWN)
- me->DespawnOrUnsummon();
- - }
- + else if (action == ACTION_MOVE && _index)
- + me->GetMotionMaster()->MovePoint(0, movePos[_index-1].GetPositionX(), movePos[_index-1].GetPositionY(), movePos[_index-1].GetPositionZ());
- + else if (action == ACTION_STAND && _index)
- + me->GetMotionMaster()->MovePoint(POINT_STAND, standPos[_index-1].GetPositionX(), standPos[_index-1].GetPositionY(), standPos[_index-1].GetPositionZ());
- + else if (action == ACTION_EXIT_2 && _index)
- + me->GetMotionMaster()->MovePoint(POINT_EXIT_2, exitPos[_index-1].GetPositionX(), exitPos[_index-1].GetPositionY(), exitPos[_index-1].GetPositionZ());
- + }
- private:
- uint32 _index;
- @@ -1177,7 +1634,7 @@ class spell_deathbringer_blood_nova_targeting : public SpellScriptLoader
- {
- // select one random target, with preference of ranged targets
- uint32 targetsAtRange = 0;
- - uint32 const minTargets = uint32(GetCaster()->GetMap()->GetSpawnMode() & 1 ? 10 : 4);
- + uint32 const minTargets = uint32(GetCaster()->GetMap()->GetSpawnMode() & 1 ? 8 : 3);
- unitList.sort(Trinity::ObjectDistanceOrderPred(GetCaster(), false));
- // get target count at range
- diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
- index 4dc9a24..9b4ca31 100755
- --- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
- +++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
- @@ -28,6 +28,7 @@ uint32 const EncounterCount = 13;
- uint32 const WeeklyNPCs = 9;
- uint32 const MaxHeroicAttempts = 50;
- +
- extern Position const ValithriaSpawnPos;
- // Defined in boss_sindragosa.cpp
- extern Position const SindragosaSpawnPos;
- @@ -99,6 +100,10 @@ enum DataTypes
- DATA_CAPTAIN_RUPERT = 34,
- DATA_VALITHRIA_TRIGGER = 35,
- DATA_VALITHRIA_LICH_KING = 36,
- + DATA_SAURFANG_HORDE_SELLER = 37,
- + DATA_SAURFANG_HORDE_SMITH = 38,
- + DATA_SAURFANG_ALLIANCE_SELLER = 39,
- + DATA_SAURFANG_ALLIANCE_SMITH = 40,
- };
- enum CreaturesIds
- @@ -161,7 +166,7 @@ enum CreaturesIds
- NPC_SE_HIGH_OVERLORD_SAURFANG = 37187,
- NPC_SE_KOR_KRON_REAVER = 37920,
- NPC_SE_SKYBREAKER_MARINE = 37830,
- - NPC_FROST_FREEZE_TRAP = 37744,
- + NPC_FROST_FREEZE_TRAP = 37744,
- // Festergut
- NPC_FESTERGUT = 36626,
- @@ -272,6 +277,13 @@ enum GameObjectsIds
- GO_DEATHBRINGER_S_CACHE_10H = 202238,
- GO_DEATHBRINGER_S_CACHE_25H = 202241,
- GO_SCOURGE_TRANSPORTER_SAURFANG = 202244,
- + GO_SAURFANG_FORGE = 191508,
- + GO_SAURFANG_ANVIL = 191345,
- + GO_SAURFANG_BONFIRE = 196417,
- + GO_SAURFANG_HORDE_TENT1 = 201887,
- + GO_SAURFANG_HORDE_TENT2 = 201886,
- + GO_SAURFANG_ALLIANCE_TENT1 = 201868,
- + GO_SAURFANG_ALLIANCE_TENT2 = 2018681,
- // Professor Putricide
- GO_ORANGE_PLAGUE_MONSTER_ENTRANCE = 201371,
- diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
- index 7890f2f..c58a89a 100755
- --- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
- +++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
- @@ -74,6 +74,8 @@ WeeklyQuest const WeeklyQuestData[WeeklyNPCs] =
- {NPC_VALITHRIA_DREAMWALKER_QUEST, {QUEST_RESPITE_FOR_A_TORNMENTED_SOUL_10, QUEST_RESPITE_FOR_A_TORNMENTED_SOUL_25}}, // Respite for a Tormented Soul
- };
- +
- +
- class instance_icecrown_citadel : public InstanceMapScript
- {
- public:
- @@ -87,6 +89,17 @@ class instance_icecrown_citadel : public InstanceMapScript
- LoadDoorData(doorData);
- TeamInInstance = 0;
- HeroicAttempts = MaxHeroicAttempts;
- + SaurfangAllianceTent1GUID = 0;
- + SaurfangAllianceTent2GUID = 0;
- + SaurfangHordeTent1GUID = 0;
- + SaurfangHordeTent2GUID = 0;
- + SaurfangBonfireGUID = 0;
- + SaurfangForgeGUID = 0;
- + SaurfangAnvilGUID = 0;
- + SaurfangAllianceSmithGUID = 0;
- + SaurfangAllianceSellerGUID = 0;
- + SaurfangHordeSmithGUID = 0;
- + SaurfangHordeSellerGUID = 0;
- LadyDeathwisperElevatorGUID = 0;
- DeathbringerSaurfangGUID = 0;
- DeathbringerSaurfangDoorGUID = 0;
- @@ -156,6 +169,22 @@ class instance_icecrown_citadel : public InstanceMapScript
- switch (creature->GetEntry())
- {
- + case 37936: //Морган Дневной Свет
- + SaurfangHordeSmithGUID = creature->GetGUID();
- + creature->SetVisible(false);
- + break;
- + case 37935: //Кандита Томас
- + SaurfangHordeSellerGUID = creature->GetGUID();
- + creature->SetVisible(false);
- + break;
- + case 37904: //Брейзи Нашол
- + SaurfangAllianceSellerGUID = creature->GetGUID();
- + creature->SetVisible(false);
- + break;
- + case 37903: //Шели Стальнобрюхий
- + SaurfangAllianceSmithGUID = creature->GetGUID();
- + creature->SetVisible(false);
- + break;
- case NPC_KOR_KRON_GENERAL:
- if (TeamInInstance == ALLIANCE)
- creature->UpdateEntry(NPC_ALLIANCE_COMMANDER, ALLIANCE);
- @@ -197,7 +226,7 @@ class instance_icecrown_citadel : public InstanceMapScript
- break;
- case NPC_SE_HIGH_OVERLORD_SAURFANG:
- if (TeamInInstance == ALLIANCE)
- - creature->UpdateEntry(NPC_SE_MURADIN_BRONZEBEARD, ALLIANCE, creature->GetCreatureData());
- + creature->UpdateEntry(NPC_SE_MURADIN_BRONZEBEARD, ALLIANCE/*, creature->GetCreatureData()*/);
- // no break;
- case NPC_SE_MURADIN_BRONZEBEARD:
- DeathbringerSaurfangEventGUID = creature->GetGUID();
- @@ -337,6 +366,27 @@ class instance_icecrown_citadel : public InstanceMapScript
- {
- switch (go->GetEntry())
- {
- + case 191508:
- + SaurfangForgeGUID = go->GetGUID();
- + break;
- + case 191345:
- + SaurfangAnvilGUID = go->GetGUID();
- + break;
- + case 196417:
- + SaurfangBonfireGUID = go->GetGUID();
- + break;
- + case 201868:
- + if (!SaurfangAllianceTent1GUID)
- + SaurfangAllianceTent1GUID = go->GetGUID();
- + else
- + SaurfangAllianceTent2GUID = go->GetGUID();
- + break;
- + case 201887:
- + SaurfangHordeTent1GUID = go->GetGUID();
- + break;
- + case 201886:
- + SaurfangHordeTent2GUID = go->GetGUID();
- + break;
- case GO_DOODAD_ICECROWN_ICEWALL02:
- case GO_ICEWALL:
- case GO_LORD_MARROWGAR_S_ENTRANCE:
- @@ -501,6 +551,28 @@ class instance_icecrown_citadel : public InstanceMapScript
- {
- switch (type)
- {
- + case DATA_SAURFANG_HORDE_SELLER:
- + return SaurfangHordeSellerGUID;
- + case DATA_SAURFANG_HORDE_SMITH:
- + return SaurfangHordeSmithGUID;
- + case DATA_SAURFANG_ALLIANCE_SELLER:
- + return SaurfangAllianceSellerGUID;
- + case DATA_SAURFANG_ALLIANCE_SMITH:
- + return SaurfangAllianceSmithGUID;
- + case GO_SAURFANG_HORDE_TENT1:
- + return SaurfangHordeTent1GUID;
- + case GO_SAURFANG_HORDE_TENT2:
- + return SaurfangHordeTent2GUID;
- + case GO_SAURFANG_ALLIANCE_TENT1:
- + return SaurfangAllianceTent1GUID;
- + case GO_SAURFANG_ALLIANCE_TENT2:
- + return SaurfangAllianceTent2GUID;
- + case GO_SAURFANG_BONFIRE:
- + return SaurfangBonfireGUID;
- + case GO_SAURFANG_ANVIL:
- + return SaurfangAnvilGUID;
- + case GO_SAURFANG_FORGE:
- + return SaurfangForgeGUID;
- case DATA_DEATHBRINGER_SAURFANG:
- return DeathbringerSaurfangGUID;
- case DATA_SAURFANG_EVENT_NPC:
- @@ -1091,6 +1163,17 @@ class instance_icecrown_citadel : public InstanceMapScript
- protected:
- std::set<uint64> ColdflameJetGUIDs;
- + uint64 SaurfangAllianceTent1GUID;
- + uint64 SaurfangAllianceTent2GUID;
- + uint64 SaurfangHordeTent1GUID;
- + uint64 SaurfangHordeTent2GUID;
- + uint64 SaurfangBonfireGUID;
- + uint64 SaurfangForgeGUID;
- + uint64 SaurfangAnvilGUID;
- + uint64 SaurfangAllianceSmithGUID;
- + uint64 SaurfangAllianceSellerGUID;
- + uint64 SaurfangHordeSmithGUID;
- + uint64 SaurfangHordeSellerGUID;
- uint64 LadyDeathwisperElevatorGUID;
- uint64 DeathbringerSaurfangGUID;
- uint64 DeathbringerSaurfangDoorGUID;
Advertisement
Add Comment
Please, Sign In to add comment