aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2013_12_04_01_world_misc.sql24
-rw-r--r--src/server/game/Spells/SpellMgr.cpp4
-rw-r--r--src/server/scripts/Outland/zone_blades_edge_mountains.cpp101
3 files changed, 128 insertions, 1 deletions
diff --git a/sql/updates/world/2013_12_04_01_world_misc.sql b/sql/updates/world/2013_12_04_01_world_misc.sql
new file mode 100644
index 00000000000..93ebd81665d
--- /dev/null
+++ b/sql/updates/world/2013_12_04_01_world_misc.sql
@@ -0,0 +1,24 @@
+Quest 10594 "Gauging the Resonant Frequency"
+
+-- Add creature script
+UPDATE creature_template SET ScriptName = 'npc_oscillating_frequency_scanner_master_bunny' WHERE entry=21760;
+
+-- Update triggers
+UPDATE `creature_template` SET `flags_extra`=`flags_extra`|128 WHERE `entry` IN (21759,21760);
+
+-- Add spell script
+DELETE FROM `spell_script_names` WHERE `spell_id`=37408;
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(37408, 'spell_oscillating_field');
+
+-- Oscillating Frequency Scanner Top Bunny (Caster) SAI
+SET @ENTRY := 21759;
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(@ENTRY,0,0,0,11,0,100,0,0,0,0,0,11,37418,0,0,0,0,0,1,0,0,0,0,0,0,0,"Oscillating Frequency Scanner Top Bunny (Caster) - On Spawn - Cast Top Bunny Beam Test Visual");
+
+-- Condition for spell Top Bunny Beam Test Visual
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=37697;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13, 1, 37697, 0, 0, 31, 0, 3, 21759, 0, 0, 0, 0, '', 'Top Bunny Beam Test Visual targets Oscillating Frequency Scanner Top Bunny');
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();
}