Merge pull request 'Fix quest New Recruit(13143) & Fix quest King of the Mountain(13280&13283)' from Kiperr/TrinityCore

This commit is contained in:
QAston
2011-09-03 16:44:05 +02:00
parent 414f048bd5
commit 7871ead798
6 changed files with 106 additions and 0 deletions
@@ -0,0 +1 @@
UPDATE `creature_template` SET `ScriptName`='npc_vereth_the_cunning' WHERE `entry`=30944;
@@ -0,0 +1,14 @@
UPDATE `creature_template` SET `npcflag`=`npcflag`|0x1000000 WHERE `entry` in(31770,31736);
UPDATE `creature_template` SET `minlevel`=80,`maxlevel`=80,`exp`=2,`npcflag`=`npcflag`|0x1000000,`VehicleId`=282,`spell1`=59643,`spell2`=4342,`spell3`=4336 WHERE `entry`=31785;
UPDATE `creature_template` SET `minlevel`=80,`maxlevel`=80,`exp`=2,`npcflag`=`npcflag`|0x1000000,`VehicleId`=282,`spell1`=4338,`spell2`=4342,`spell3`=4336 WHERE `entry`=31784;
DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` in (31785,31770,31736,31784);
INSERT INTO `npc_spellclick_spells` VALUES
(31785,59656,13283,1,13283,1,0,0,0),
(31770,59654,0,0,0,1,0,0,0),
(31736,59592,13280,1,13280,1,0,0,0),
(31784,59593,0,0,0,1,0,0,0);
DELETE FROM `spell_script_names` WHERE `spell_id` IN (59643,4338);
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(59643, 'spell_q13280_13283_plant_battle_standard'),
(4338, 'spell_q13280_13283_plant_battle_standard');
@@ -0,0 +1,5 @@
DELETE FROM `gossip_menu_option` WHERE `menu_id`=1293 AND `id`=1;
DELETE FROM `gossip_menu_option` WHERE `menu_id`=1293 AND `id`=2;
INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`) VALUES
(1293,1,0, 'Make this inn my home!',8,66179,0,0,0,0,NULL),
(1293,2,1, 'I want to browse your goods!',3,66179,0,0,0,0,NULL);
+46
View File
@@ -381,6 +381,51 @@ public:
} }
}; };
/*######
## npc_vereth_the_cunning
######*/
enum eVerethTheCunning
{
NPC_GEIST_RETURN_BUNNY_KC = 31049,
NPC_LITHE_STALKER = 30894,
SPELL_SUBDUED_LITHE_STALKER = 58151,
};
class npc_vereth_the_cunning : public CreatureScript
{
public:
npc_vereth_the_cunning() : CreatureScript("npc_vereth_the_cunning") { }
struct npc_vereth_the_cunningAI : public ScriptedAI
{
npc_vereth_the_cunningAI(Creature* pCreature) : ScriptedAI(pCreature) {}
void MoveInLineOfSight(Unit* who)
{
ScriptedAI::MoveInLineOfSight(who);
if (who->GetEntry() == NPC_LITHE_STALKER && me->IsWithinDistInMap(who, 10.0f))
{
if (Unit* owner = who->GetCharmer())
{
if (who->HasAura(SPELL_SUBDUED_LITHE_STALKER))
{
owner->ToPlayer()->KilledMonsterCredit(NPC_GEIST_RETURN_BUNNY_KC, 0);
who->ToCreature()->DisappearAndDie();
}
}
}
}
};
CreatureAI *GetAI(Creature *creature) const
{
return new npc_vereth_the_cunningAI(creature);
}
};
void AddSC_icecrown() void AddSC_icecrown()
{ {
new npc_arete; new npc_arete;
@@ -389,4 +434,5 @@ void AddSC_icecrown()
new npc_argent_valiant; new npc_argent_valiant;
new npc_alorah_and_grimmin; new npc_alorah_and_grimmin;
new npc_guardian_pavilion; new npc_guardian_pavilion;
new npc_vereth_the_cunning;
} }
+40
View File
@@ -22,6 +22,7 @@
*/ */
#include "ScriptPCH.h" #include "ScriptPCH.h"
#include "Vehicle.h"
class spell_generic_quest_update_entry_SpellScript : public SpellScript class spell_generic_quest_update_entry_SpellScript : public SpellScript
{ {
@@ -939,6 +940,44 @@ class spell_q12805_lifeblood_dummy : public SpellScriptLoader
}; };
}; };
/*
http://www.wowhead.com/quest=13283 King of the Mountain
http://www.wowhead.com/quest=13280 King of the Mountain
59643 Plant Horde Battle Standard
4338 Plant Alliance Battle Standard
*/
enum eBattleStandard
{
NPC_KING_OF_THE_MOUNTAINT_KC = 31766,
};
class spell_q13280_13283_plant_battle_standard: public SpellScriptLoader
{
public:
spell_q13280_13283_plant_battle_standard() : SpellScriptLoader("spell_q13280_13283_plant_battle_standard") { }
class spell_q13280_13283_plant_battle_standard_SpellScript : public SpellScript
{
PrepareSpellScript(spell_q13280_13283_plant_battle_standard_SpellScript)
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
if (caster->IsVehicle())
if (Unit* player = caster->GetVehicleKit()->GetPassenger(0))
player->ToPlayer()->KilledMonsterCredit(NPC_KING_OF_THE_MOUNTAINT_KC,0);
}
void Register()
{
OnEffect += SpellEffectFn(spell_q13280_13283_plant_battle_standard_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const
{
return new spell_q13280_13283_plant_battle_standard_SpellScript();
}
};
void AddSC_quest_spell_scripts() void AddSC_quest_spell_scripts()
{ {
new spell_q55_sacred_cleansing(); new spell_q55_sacred_cleansing();
@@ -961,4 +1000,5 @@ void AddSC_quest_spell_scripts()
new spell_q12659_ahunaes_knife(); new spell_q12659_ahunaes_knife();
new spell_q9874_liquid_fire(); new spell_q9874_liquid_fire();
new spell_q12805_lifeblood_dummy(); new spell_q12805_lifeblood_dummy();
new spell_q13280_13283_plant_battle_standard();
} }