aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/scripts/world_scripts_full.sql1
-rw-r--r--sql/updates/world/2011_06_12_01_world_conditions.sql4
-rw-r--r--sql/updates/world/2011_06_12_01_world_spell_script_names.sql3
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp42
4 files changed, 50 insertions, 0 deletions
diff --git a/sql/scripts/world_scripts_full.sql b/sql/scripts/world_scripts_full.sql
index b59220ec53f..6d8ca17379e 100644
--- a/sql/scripts/world_scripts_full.sql
+++ b/sql/scripts/world_scripts_full.sql
@@ -2245,6 +2245,7 @@ INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
( 55804, 'spell_q12937_relief_for_the_fallen'),
( 54798, 'spell_q12851_going_bearback'),
( 8593, 'spell_symbol_of_life_dummy'),
+( 52090, 'spell_q12659_ahunaes_knife'),
-- item
( 23074, 'spell_item_arcanite_dragonling'),
( 8063, 'spell_item_deviate_fish'),
diff --git a/sql/updates/world/2011_06_12_01_world_conditions.sql b/sql/updates/world/2011_06_12_01_world_conditions.sql
new file mode 100644
index 00000000000..65cbac95761
--- /dev/null
+++ b/sql/updates/world/2011_06_12_01_world_conditions.sql
@@ -0,0 +1,4 @@
+-- Add condition for Item 38731 "Ahunae's Knife" to target 28600 "Dead Heb'Drakkar Headhunter"
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=18 AND `SourceEntry`=38731;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(18,0,38731,0,24,2,28600,0,63,'','Item 38731 "Ahunae''s Knife" targets 28600 "Dead Heb''Drakkar Headhunter');
diff --git a/sql/updates/world/2011_06_12_01_world_spell_script_names.sql b/sql/updates/world/2011_06_12_01_world_spell_script_names.sql
new file mode 100644
index 00000000000..e2dbeceb417
--- /dev/null
+++ b/sql/updates/world/2011_06_12_01_world_spell_script_names.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE `spell_id`=52090;
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(52090, 'spell_q12659_ahunaes_knife');
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index 75cb838b1c0..2d926118ed2 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -816,6 +816,47 @@ public:
};
};
+// http://www.wowhead.com/quest=12659 Scalps!
+// 52090 Ahunae's Knife
+enum eQuest12659Data
+{
+ NPC_SCALPS_KC_BUNNY = 28622,
+};
+
+class spell_q12659_ahunaes_knife : public SpellScriptLoader
+{
+public:
+ spell_q12659_ahunaes_knife() : SpellScriptLoader("spell_q12659_ahunaes_knife") { }
+
+ class spell_q12659_ahunaes_knife_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_q12659_ahunaes_knife_SpellScript);
+
+ void HandleDummy(SpellEffIndex /*effIndex*/)
+ {
+ Player* caster = GetCaster()->ToPlayer();
+ if (!caster)
+ return;
+
+ if (Creature* target = GetTargetUnit()->ToCreature())
+ {
+ target->ForcedDespawn();
+ caster->KilledMonsterCredit(NPC_SCALPS_KC_BUNNY, 0);
+ }
+ }
+
+ void Register()
+ {
+ OnEffect += SpellEffectFn(spell_q12659_ahunaes_knife_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_q12659_ahunaes_knife_SpellScript();
+ };
+};
+
void AddSC_quest_spell_scripts()
{
new spell_q55_sacred_cleansing();
@@ -835,4 +876,5 @@ void AddSC_quest_spell_scripts()
new spell_q12937_relief_for_the_fallen();
new spell_q10041_q10040_who_are_they();
new spell_symbol_of_life_dummy();
+ new spell_q12659_ahunaes_knife();
}