Scripts/Quests: Implement quest 12659 (Scalps!)

Thanks Malcrom for condition

Closes #917
This commit is contained in:
Shocker
2011-06-12 19:46:33 +03:00
parent d277ecc26a
commit 13b34a5d72
4 changed files with 50 additions and 0 deletions
+1
View File
@@ -2245,6 +2245,7 @@ INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
( 55804, 'spell_q12937_relief_for_the_fallen'), ( 55804, 'spell_q12937_relief_for_the_fallen'),
( 54798, 'spell_q12851_going_bearback'), ( 54798, 'spell_q12851_going_bearback'),
( 8593, 'spell_symbol_of_life_dummy'), ( 8593, 'spell_symbol_of_life_dummy'),
( 52090, 'spell_q12659_ahunaes_knife'),
-- item -- item
( 23074, 'spell_item_arcanite_dragonling'), ( 23074, 'spell_item_arcanite_dragonling'),
( 8063, 'spell_item_deviate_fish'), ( 8063, 'spell_item_deviate_fish'),
@@ -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');
@@ -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');
+42
View File
@@ -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() void AddSC_quest_spell_scripts()
{ {
new spell_q55_sacred_cleansing(); new spell_q55_sacred_cleansing();
@@ -835,4 +876,5 @@ void AddSC_quest_spell_scripts()
new spell_q12937_relief_for_the_fallen(); new spell_q12937_relief_for_the_fallen();
new spell_q10041_q10040_who_are_they(); new spell_q10041_q10040_who_are_they();
new spell_symbol_of_life_dummy(); new spell_symbol_of_life_dummy();
new spell_q12659_ahunaes_knife();
} }