aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMalcrom <malcromdev@gmail.com>2013-12-04 14:43:35 -0330
committerMalcrom <malcromdev@gmail.com>2013-12-04 14:43:35 -0330
commit5da508c0a0e2e3e2642d7d586edf72489e974b75 (patch)
tree6ca108d1e9db6ee4bed69ef8860b28542b7d1a52 /src
parentc084b3d16e87a315f130a868162463b485146262 (diff)
Scripting/Blade's Edge: Quest 10594 "Gauging the Resonant Frequency"
Closes #6214
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/SpellMgr.cpp4
-rw-r--r--src/server/scripts/Outland/zone_blades_edge_mountains.cpp101
2 files changed, 104 insertions, 1 deletions
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 994050b2374..0a815b6c28e 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -3167,6 +3167,7 @@ void SpellMgr::LoadSpellInfoCorrections()
case 54171: // Divine Storm
spellInfo->MaxAffectedTargets = 3;
break;
+ case 37697: // Top Bunny Beam Test Visual
case 38310: // Multi-Shot
case 53385: // Divine Storm (Damage)
spellInfo->MaxAffectedTargets = 4;
@@ -3221,6 +3222,9 @@ void SpellMgr::LoadSpellInfoCorrections()
case 28200: // Ascendance (Talisman of Ascendance trinket)
spellInfo->ProcCharges = 6;
break;
+ case 37408: // Oscillation Field
+ spellInfo->AttributesEx3 |= SPELL_ATTR3_STACK_FOR_DIFF_CASTERS;
+ break;
case 47201: // Everlasting Affliction
case 47202:
case 47203:
diff --git a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
index a005153a4fc..167fd7f2074 100644
--- a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
+++ b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
@@ -19,7 +19,7 @@
/* ScriptData
SDName: Blades_Edge_Mountains
SD%Complete: 90
-SDComment: Quest support: 10503, 10504, 10556, 10609, 10682, 10821, 10980. Ogri'la->Skettis Flight. (npc_daranelle needs bit more work before consider complete)
+SDComment: Quest support: 10503, 10504, 10556, 10594, 10609, 10682, 10821, 10980. Ogri'la->Skettis Flight. (npc_daranelle needs bit more work before consider complete)
SDCategory: Blade's Edge Mountains
EndScriptData */
@@ -40,6 +40,10 @@ EndContentData */
#include "GridNotifiersImpl.h"
#include "Cell.h"
#include "CellImpl.h"
+#include "SpellInfo.h"
+#include "SpellScript.h"
+#include "SpellAuras.h"
+#include "SpellAuraEffects.h"
//Support for quest: You're Fired! (10821)
bool obelisk_one, obelisk_two, obelisk_three, obelisk_four, obelisk_five;
@@ -1143,6 +1147,99 @@ class go_apexis_relic : public GameObjectScript
}
};
+/*######
+## npc_oscillating_frequency_scanner_master_bunny used for quest 10594 "Gauging the Resonant Frequency"
+######*/
+
+enum ScannerMasterBunny
+{
+ NPC_OSCILLATING_FREQUENCY_SCANNER_TOP_BUNNY = 21759,
+ SPELL_OSCILLATION_FIELD = 37408,
+ QUEST_GAUGING_THE_RESONANT_FREQUENCY = 10594
+};
+
+class npc_oscillating_frequency_scanner_master_bunny : public CreatureScript
+{
+public:
+ npc_oscillating_frequency_scanner_master_bunny() : CreatureScript("npc_oscillating_frequency_scanner_master_bunny") { }
+
+ struct npc_oscillating_frequency_scanner_master_bunnyAI : public ScriptedAI
+ {
+ npc_oscillating_frequency_scanner_master_bunnyAI(Creature* creature) : ScriptedAI(creature) { }
+
+ void Reset() OVERRIDE
+ {
+ if (GetClosestCreatureWithEntry(me, NPC_OSCILLATING_FREQUENCY_SCANNER_TOP_BUNNY, 25.0f))
+ me->DespawnOrUnsummon();
+ else
+ {
+ // Spell 37392 does not exist in dbc, manually spawning
+ me->SummonCreature(21759, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 0.5f, me->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 50000);
+ me->SummonGameObject(184926, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), 0, 0, 0, 0, 50000);
+ me->DespawnOrUnsummon(50000);
+ }
+
+ timer = 500;
+ }
+
+ void IsSummonedBy(Unit* summoner) OVERRIDE
+ {
+ if (summoner->isType(TYPEMASK_PLAYER))
+ playerGuid = summoner->GetGUID();
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (timer <= diff)
+ {
+ if (Player* player = ObjectAccessor::GetPlayer(*me, playerGuid))
+ DoCast(player, SPELL_OSCILLATION_FIELD);
+
+ timer = 3000;
+ }
+ else
+ timer -= diff;
+ }
+
+ private:
+ uint64 playerGuid;
+ uint32 timer;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_oscillating_frequency_scanner_master_bunnyAI(creature);
+ }
+};
+
+class spell_oscillating_field : public SpellScriptLoader
+{
+ public:
+ spell_oscillating_field() : SpellScriptLoader("spell_oscillating_field") { }
+
+ class spell_oscillating_field_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_oscillating_field_SpellScript);
+
+ void HandleEffect(SpellEffIndex /*effIndex*/)
+ {
+ if (Player* player = GetHitPlayer())
+ if (player->GetAuraCount(SPELL_OSCILLATION_FIELD) == 5 && player->GetQuestStatus(QUEST_GAUGING_THE_RESONANT_FREQUENCY) == QUEST_STATUS_INCOMPLETE)
+ player->CompleteQuest(QUEST_GAUGING_THE_RESONANT_FREQUENCY);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_oscillating_field_SpellScript::HandleEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_oscillating_field_SpellScript();
+ }
+};
+
void AddSC_blades_edge_mountains()
{
new npc_bladespire_ogre();
@@ -1157,4 +1254,6 @@ void AddSC_blades_edge_mountains()
new npc_simon_bunny();
new go_simon_cluster();
new go_apexis_relic();
+ new npc_oscillating_frequency_scanner_master_bunny();
+ new spell_oscillating_field();
}