diff options
Diffstat (limited to 'src/server/scripts')
13 files changed, 193 insertions, 111 deletions
diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp index 28bc17a7450..c32abb9537b 100644 --- a/src/server/scripts/Commands/cs_modify.cpp +++ b/src/server/scripts/Commands/cs_modify.cpp @@ -1129,7 +1129,12 @@ public: uint16 drunkMod = drunklevel * 0xFFFF / 100; - handler->GetSession()->GetPlayer()->SetDrunkValue(drunkMod); + Player* target = handler->getSelectedPlayer(); + if (!target) + target = handler->GetSession()->GetPlayer(); + + if (target) + target->SetDrunkValue(drunkMod); return true; } diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp index 82f16dd7784..7cbb1b91755 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp @@ -582,7 +582,7 @@ public: { Unit* pJaina = GetClosestCreatureWithEntry(me, NPC_JAINA, 50.0f); if (!pJaina) - pJaina = pJaina = me->SummonCreature(NPC_JAINA, 1895.48f, 1292.66f, 143.706f, 0.023475f, TEMPSUMMON_DEAD_DESPAWN, 180000); + pJaina = me->SummonCreature(NPC_JAINA, 1895.48f, 1292.66f, 143.706f, 0.023475f, TEMPSUMMON_DEAD_DESPAWN, 180000); if (pJaina) uiJainaGUID = pJaina->GetGUID(); bStepping = false; diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp index 545dc79453d..e0892ffb009 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp @@ -91,49 +91,50 @@ public: struct boss_anub_arakAI : public ScriptedAI { - boss_anub_arakAI(Creature* c) : ScriptedAI(c), lSummons(me) + boss_anub_arakAI(Creature* creature) : ScriptedAI(creature), Summons(me) { - instance = c->GetInstanceScript(); + instance = creature->GetInstanceScript(); } InstanceScript* instance; - bool bChanneling; - bool bGuardianSummoned; - bool bVenomancerSummoned; - bool bDatterSummoned; - uint8 uiPhase; - uint32 uiUndergroundPhase; - uint32 uiCarrionBeetlesTimer; - uint32 uiLeechingSwarmTimer; - uint32 uiPoundTimer; - uint32 uiSubmergeTimer; - uint32 uiUndergroundTimer; - uint32 uiVenomancerTimer; - uint32 uiDatterTimer; - - uint32 uiImpaleTimer; - uint32 uiImpalePhase; - uint64 uiImpaleTarget; - - SummonList lSummons; + bool Channeling; + bool GuardianSummoned; + bool VenomancerSummoned; + bool DatterSummoned; + uint8 Phase; + uint32 UndergroundPhase; + uint32 CarrionBeetlesTimer; + uint32 LeechingSwarmTimer; + uint32 PoundTimer; + uint32 SubmergeTimer; + uint32 UndergroundTimer; + uint32 VenomancerTimer; + uint32 DatterTimer; + uint32 DelayTimer; + + uint32 ImpaleTimer; + uint32 ImpalePhase; + uint64 ImpaleTarget; + + SummonList Summons; void Reset() { - uiCarrionBeetlesTimer = 8*IN_MILLISECONDS; - uiLeechingSwarmTimer = 20*IN_MILLISECONDS; - uiImpaleTimer = 9*IN_MILLISECONDS; - uiPoundTimer = 15*IN_MILLISECONDS; + CarrionBeetlesTimer = 8*IN_MILLISECONDS; + LeechingSwarmTimer = 20*IN_MILLISECONDS; + ImpaleTimer = 9*IN_MILLISECONDS; + PoundTimer = 15*IN_MILLISECONDS; - uiPhase = PHASE_MELEE; - uiUndergroundPhase = 0; - bChanneling = false; - uiImpalePhase = IMPALE_PHASE_TARGET; + Phase = PHASE_MELEE; + UndergroundPhase = 0; + Channeling = false; + ImpalePhase = IMPALE_PHASE_TARGET; me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); me->RemoveAura(SPELL_SUBMERGE); - lSummons.DespawnAll(); + Summons.DespawnAll(); if (instance) { @@ -147,13 +148,13 @@ public: Position targetPos; target->GetPosition(&targetPos); - if (TempSummon* pImpaleTarget = me->SummonCreature(CREATURE_IMPALE_TARGET, targetPos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 6*IN_MILLISECONDS)) + if (TempSummon* impaleTarget = me->SummonCreature(CREATURE_IMPALE_TARGET, targetPos, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 6*IN_MILLISECONDS)) { - uiImpaleTarget = pImpaleTarget->GetGUID(); - pImpaleTarget->SetReactState(REACT_PASSIVE); - pImpaleTarget->SetDisplayId(DISPLAY_INVISIBLE); - pImpaleTarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE|UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); - return pImpaleTarget; + ImpaleTarget = impaleTarget->GetGUID(); + impaleTarget->SetReactState(REACT_PASSIVE); + impaleTarget->SetDisplayId(DISPLAY_INVISIBLE); + impaleTarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE|UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); + return impaleTarget; } return NULL; @@ -162,11 +163,15 @@ public: void EnterCombat(Unit* /*who*/) { DoScriptText(SAY_AGGRO, me); + DelayTimer = 0; if (instance) - { - instance->SetData(DATA_ANUBARAK_EVENT, IN_PROGRESS); instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT); - } + } + + void DelayEventStart() + { + if (instance) + instance->SetData(DATA_ANUBARAK_EVENT, IN_PROGRESS); } void UpdateAI(const uint32 diff) @@ -174,41 +179,45 @@ public: if (!UpdateVictim()) return; - switch (uiPhase) + if (DelayTimer && DelayTimer > 5000) + DelayEventStart(); + else DelayTimer+=diff; + + switch (Phase) { case PHASE_UNDERGROUND: - if (uiImpaleTimer <= diff) + if (ImpaleTimer <= diff) { - switch (uiImpalePhase) + switch (ImpalePhase) { case IMPALE_PHASE_TARGET: if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) { - if (Creature* pImpaleTarget = DoSummonImpaleTarget(target)) - pImpaleTarget->CastSpell(pImpaleTarget, SPELL_IMPALE_SHAKEGROUND, true); - uiImpaleTimer = 3*IN_MILLISECONDS; - uiImpalePhase = IMPALE_PHASE_ATTACK; + if (Creature* impaleTarget = DoSummonImpaleTarget(target)) + impaleTarget->CastSpell(impaleTarget, SPELL_IMPALE_SHAKEGROUND, true); + ImpaleTimer = 3*IN_MILLISECONDS; + ImpalePhase = IMPALE_PHASE_ATTACK; } break; case IMPALE_PHASE_ATTACK: - if (Creature* pImpaleTarget = Unit::GetCreature(*me, uiImpaleTarget)) + if (Creature* impaleTarget = Unit::GetCreature(*me, ImpaleTarget)) { - pImpaleTarget->CastSpell(pImpaleTarget, SPELL_IMPALE_SPIKE, false); - pImpaleTarget->RemoveAurasDueToSpell(SPELL_IMPALE_SHAKEGROUND); + impaleTarget->CastSpell(impaleTarget, SPELL_IMPALE_SPIKE, false); + impaleTarget->RemoveAurasDueToSpell(SPELL_IMPALE_SHAKEGROUND); } - uiImpalePhase = IMPALE_PHASE_DMG; - uiImpaleTimer = 1*IN_MILLISECONDS; + ImpalePhase = IMPALE_PHASE_DMG; + ImpaleTimer = 1*IN_MILLISECONDS; break; case IMPALE_PHASE_DMG: - if (Creature* pImpaleTarget = Unit::GetCreature(*me, uiImpaleTarget)) - me->CastSpell(pImpaleTarget, DUNGEON_MODE(SPELL_IMPALE_DMG, SPELL_IMPALE_DMG_H), true); - uiImpalePhase = IMPALE_PHASE_TARGET; - uiImpaleTimer = 9*IN_MILLISECONDS; + if (Creature* impaleTarget = Unit::GetCreature(*me, ImpaleTarget)) + me->CastSpell(impaleTarget, DUNGEON_MODE(SPELL_IMPALE_DMG, SPELL_IMPALE_DMG_H), true); + ImpalePhase = IMPALE_PHASE_TARGET; + ImpaleTimer = 9*IN_MILLISECONDS; break; } - } else uiImpaleTimer -= diff; + } else ImpaleTimer -= diff; - if (!bGuardianSummoned) + if (!GuardianSummoned) { for (uint8 i = 0; i < 2; ++i) { @@ -218,14 +227,14 @@ public: DoZoneInCombat(Guardian); } } - bGuardianSummoned = true; + GuardianSummoned = true; } - if (!bVenomancerSummoned) + if (!VenomancerSummoned) { - if (uiVenomancerTimer <= diff) + if (VenomancerTimer <= diff) { - if (uiUndergroundPhase > 1) + if (UndergroundPhase > 1) { for (uint8 i = 0; i < 2; ++i) { @@ -235,16 +244,16 @@ public: DoZoneInCombat(Venomancer); } } - bVenomancerSummoned = true; + VenomancerSummoned = true; } - } else uiVenomancerTimer -= diff; + } else VenomancerTimer -= diff; } - if (!bDatterSummoned) + if (!DatterSummoned) { - if (uiDatterTimer <= diff) + if (DatterTimer <= diff) { - if (uiUndergroundPhase > 2) + if (UndergroundPhase > 2) { for (uint8 i = 0; i < 2; ++i) { @@ -254,71 +263,74 @@ public: DoZoneInCombat(Datter); } } - bDatterSummoned = true; + DatterSummoned = true; } - } else uiDatterTimer -= diff; + } else DatterTimer -= diff; + + if(me->HasAura(SPELL_LEECHING_SWARM)) + me->RemoveAurasDueToSpell(SPELL_LEECHING_SWARM); } - if (uiUndergroundTimer <= diff) + if (UndergroundTimer <= diff) { me->RemoveAura(SPELL_SUBMERGE); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); - uiPhase = PHASE_MELEE; - } else uiUndergroundTimer -= diff; + Phase = PHASE_MELEE; + } else UndergroundTimer -= diff; break; case PHASE_MELEE: - if (((uiUndergroundPhase == 0 && HealthBelowPct(75)) - || (uiUndergroundPhase == 1 && HealthBelowPct(50)) - || (uiUndergroundPhase == 2 && HealthBelowPct(25))) + if (((UndergroundPhase == 0 && HealthBelowPct(75)) + || (UndergroundPhase == 1 && HealthBelowPct(50)) + || (UndergroundPhase == 2 && HealthBelowPct(25))) && !me->HasUnitState(UNIT_STAT_CASTING)) { - bGuardianSummoned = false; - bVenomancerSummoned = false; - bDatterSummoned = false; + GuardianSummoned = false; + VenomancerSummoned = false; + DatterSummoned = false; - uiUndergroundTimer = 40*IN_MILLISECONDS; - uiVenomancerTimer = 25*IN_MILLISECONDS; - uiDatterTimer = 32*IN_MILLISECONDS; + UndergroundTimer = 40*IN_MILLISECONDS; + VenomancerTimer = 25*IN_MILLISECONDS; + DatterTimer = 32*IN_MILLISECONDS; - uiImpalePhase = 0; - uiImpaleTimer = 9*IN_MILLISECONDS; + ImpalePhase = 0; + ImpaleTimer = 9*IN_MILLISECONDS; DoCast(me, SPELL_SUBMERGE, false); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); - uiPhase = PHASE_UNDERGROUND; - ++uiUndergroundPhase; + Phase = PHASE_UNDERGROUND; + ++UndergroundPhase; } - if (bChanneling == true) + if (Channeling == true) { for (uint8 i = 0; i < 8; ++i) DoCast(me->getVictim(), SPELL_SUMMON_CARRION_BEETLES, true); - bChanneling = false; + Channeling = false; } - else if (uiCarrionBeetlesTimer <= diff) + else if (CarrionBeetlesTimer <= diff) { - bChanneling = true; + Channeling = true; DoCastVictim(SPELL_CARRION_BEETLES); - uiCarrionBeetlesTimer = 25*IN_MILLISECONDS; - } else uiCarrionBeetlesTimer -= diff; + CarrionBeetlesTimer = 25*IN_MILLISECONDS; + } else CarrionBeetlesTimer -= diff; - if (uiLeechingSwarmTimer <= diff) + if (LeechingSwarmTimer <= diff) { DoCast(me, SPELL_LEECHING_SWARM, true); - uiLeechingSwarmTimer = 19*IN_MILLISECONDS; - } else uiLeechingSwarmTimer -= diff; + LeechingSwarmTimer = 19*IN_MILLISECONDS; + } else LeechingSwarmTimer -= diff; - if (uiPoundTimer <= diff) + if (PoundTimer <= diff) { if (Unit* target = me->getVictim()) { if (Creature* pImpaleTarget = DoSummonImpaleTarget(target)) me->CastSpell(pImpaleTarget, DUNGEON_MODE(SPELL_POUND, SPELL_POUND_H), false); } - uiPoundTimer = 16500; - } else uiPoundTimer -= diff; + PoundTimer = 16500; + } else PoundTimer -= diff; DoMeleeAttackIfReady(); break; @@ -328,7 +340,7 @@ public: void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); - lSummons.DespawnAll(); + Summons.DespawnAll(); if (instance) instance->SetData(DATA_ANUBARAK_EVENT, DONE); } @@ -342,7 +354,7 @@ public: void JustSummoned(Creature* summon) { - lSummons.Summon(summon); + Summons.Summon(summon); } }; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index 29c3276467b..25610341a2f 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -341,7 +341,7 @@ class boss_sindragosa : public CreatureScript { if (uint32 spellId = sSpellMgr->GetSpellIdForDifficulty(_isThirdPhase ? SPELL_FROST_BREATH_P2 : SPELL_FROST_BREATH_P1, me)) { - if (player->GetQuestStatus(QUEST_FROST_INFUSION) != QUEST_STATUS_REWARDED && spellId == spell->Id) + if (player->GetQuestStatus(QUEST_FROST_INFUSION) == QUEST_STATUS_INCOMPLETE && spellId == spell->Id) { if (Item* shadowsEdge = player->GetWeaponForAttack(BASE_ATTACK, true)) { diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp index 16c258af756..e63d50b0133 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp @@ -289,6 +289,7 @@ public: void JustDied(Unit* /*killer*/) { _JustDied(); + DoCast(me, SPELL_DEATH_SPELL, true); // we cast the spell as triggered or the summon effect does not occur } void LeaveCombat() diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp index f3384b7ec15..4dcd2618895 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp @@ -144,8 +144,8 @@ public: void JustDied(Unit* /*killer*/) { _JustDied(); - Talk(SAY_DEATH); + DoCast(me, SPELL_DEATH_SPELL, true); // we cast the spell as triggered or the summon effect does not occur } private: bool firstCoreEnergize; diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp index f8839aa0028..b9799103214 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp @@ -50,6 +50,12 @@ enum Drakes NPC_ETERNOS = 27659 }; +enum Says +{ + SAY_VAROS = 0, + SAY_UROM = 1 +}; + class npc_oculus_drake : public CreatureScript { public: @@ -174,7 +180,38 @@ public: }; +class npc_image_belgaristrasz : public CreatureScript +{ +public: + npc_image_belgaristrasz() : CreatureScript("npc_image_belgaristrasz") { } + + struct npc_image_belgaristraszAI : public ScriptedAI + { + npc_image_belgaristraszAI(Creature* creature) : ScriptedAI(creature) {} + + void IsSummonedBy(Unit* summoner) + { + if (summoner->GetEntry() == NPC_VAROS) + { + Talk(SAY_VAROS); + me->DespawnOrUnsummon(60000); + } + if (summoner->GetEntry() == NPC_UROM) + { + Talk(SAY_UROM); + me->DespawnOrUnsummon(60000); + } + } + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new npc_image_belgaristraszAI(creature); + } +}; + void AddSC_oculus() { new npc_oculus_drake(); + new npc_image_belgaristrasz(); } diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.h b/src/server/scripts/Northrend/Nexus/Oculus/oculus.h index e04f2c8aab9..dab2821b5e5 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.h +++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.h @@ -71,6 +71,7 @@ enum OculusWorldStates enum OculusSpells { - SPELL_CENTRIFUGE_SHIELD = 50053 + SPELL_CENTRIFUGE_SHIELD = 50053, + SPELL_DEATH_SPELL = 50415 }; #endif diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp index e7d8b070e53..13c174a9607 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp @@ -526,7 +526,7 @@ class boss_freya : public CreatureScript { uint8 n = 0; - // Handling recieved data + // Handling received data for (uint8 i = 0; i < 5; ++i) // We have created "instances" for keeping informations about last 6 death lashers - needed because of respawning { deforestation[i][0] = deforestation[(i + 1)][0]; // Time @@ -590,7 +590,7 @@ class boss_freya : public CreatureScript waveCount++; } - void JustDied(Unit* who) + void JustDied(Unit* /*who*/) { //! Freya's chest is dynamically spawned on death by different spells. const uint32 summonSpell[2][4] = diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index a690f3cbd9b..ec7f9a8e070 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -364,8 +364,8 @@ static const Animation DemonTransformation[10]= {0, SPELL_DEMON_TRANSFORM_3, 0, 0, 0, 8, true} }; -#define EMOTE_SETS_GAZE_ON "sets its gaze on $N!" -#define EMOTE_UNABLE_TO_SUMMON "is unable to summon Maiev Shadowsong and enter Phase 4. Resetting Encounter." +#define EMOTE_SETS_GAZE_ON "%s sets its gaze on $N!" +#define EMOTE_UNABLE_TO_SUMMON "%s is unable to summon Maiev Shadowsong and enter Phase 4. Resetting Encounter." class mob_flame_of_azzinoth : public CreatureScript { diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp index 4f837870612..5965c352975 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp @@ -303,9 +303,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript if (resetcheck_timer <= diff) { - uint32 tempx, tempy; - tempx = uint32(me->GetPositionX()); - tempy = uint32(me->GetPositionY()); + uint32 tempx = uint32(me->GetPositionX()); if (tempx > 255 || tempx < 205) { EnterEvadeMode(); diff --git a/src/server/scripts/Outland/nagrand.cpp b/src/server/scripts/Outland/nagrand.cpp index c556253ecf1..bae3aa65b98 100644 --- a/src/server/scripts/Outland/nagrand.cpp +++ b/src/server/scripts/Outland/nagrand.cpp @@ -573,7 +573,7 @@ public: { Talk(SAY_KUR_MORE); - if (Creature* temp = me->SummonCreature(NPC_KUR_MURK_PUTRIFIER, kurenaiAmbushB[0], kurenaiAmbushB[1], kurenaiAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000)) + if (me->SummonCreature(NPC_KUR_MURK_PUTRIFIER, kurenaiAmbushB[0], kurenaiAmbushB[1], kurenaiAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000)) Talk(SAY_KUR_MORE_TWO); me->SummonCreature(NPC_KUR_MURK_PUTRIFIER, kurenaiAmbushB[0]-2.5f, kurenaiAmbushB[1]-2.5f, kurenaiAmbushB[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index 3bb969977b6..44c3ab9bdc9 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -47,6 +47,7 @@ go_jotunheim_cage go_table_theka go_soulwell go_bashir_crystalforge +go_ethereal_teleport_pad EndContentData */ #include "ScriptPCH.h" @@ -922,6 +923,32 @@ public: }; /*###### +## go_ethereal_teleport_pad +######*/ + +enum eEtherealTeleportPad +{ + NPC_IMAGE_WIND_TRADER = 20518, + ITEM_TELEPORTER_POWER_PACK = 28969, +}; + +class go_ethereal_teleport_pad : public GameObjectScript +{ +public: + go_ethereal_teleport_pad() : GameObjectScript("go_ethereal_teleport_pad") { } + + bool OnGossipHello(Player* player, GameObject* pGO) + { + if (!player->HasItemCount(ITEM_TELEPORTER_POWER_PACK, 1)) + return false; + + pGO->SummonCreature(NPC_IMAGE_WIND_TRADER, pGO->GetPositionX(), pGO->GetPositionY(), pGO->GetPositionZ(), pGO->GetAngle(player), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); + + return true; + } +}; + +/*###### ## go_soulwell ######*/ @@ -1282,6 +1309,7 @@ void AddSC_go_scripts() new go_jotunheim_cage; new go_table_theka; new go_inconspicuous_landmark; + new go_ethereal_teleport_pad; new go_soulwell; new go_tadpole_cage; new go_dragonflayer_cage; |
