Permalink
Browse files

Fix quest #12244, #12270

Signed-off-by: privatecore <rial9111@rambler.ru>
  • Loading branch information...
1 parent a31a547 commit f948d8449795a169a4380aeb35baab178c981fda @denisakajacob denisakajacob committed Jun 3, 2012
Showing with 70 additions and 0 deletions.
  1. +36 −0 sql/greenpis/quest.sql
  2. +34 −0 src/server/scripts/Northrend/grizzly_hills.cpp
View
36 sql/greenpis/quest.sql
@@ -0,0 +1,36 @@
+SET @shredder := 27354;
+SET @delivery := 48610;
+SET @grekk := 27423;
+SET @synipus := 27371;
+
+-- template updates
+UPDATE `creature_template` SET `speed_walk`=1.6,`speed_run`=0.57143, `spell1`=48558, `spell2`=48604, `spell3`=48548, `spell4`=48610 WHERE `entry`=@shredder; -- Broken-down Shredder
+DELETE FROM `creature_template_addon` WHERE `entry`=27354;
+INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
+(@shredder,0,0,1,0, NULL); -- Broken-down Shredder
+
+-- mounting the shredder
+DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` = @shredder;
+INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES
+(@shredder, 62309, 1, 0);
+
+-- despawn on hand in
+DELETE FROM `spell_scripts` WHERE `id` = 48610;
+INSERT INTO `spell_scripts` (`id`, `effIndex`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) VALUES
+(@delivery, 2, 0, 18, 3, @shredder, 2, 0, 0, 0, 0);
+
+DELETE FROM `conditions` WHERE `SourceEntry` = 48610;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(17, 0, @delivery, 0, 29, @grekk, 5, 0, 0, '', "Spell Shredder Delivery - 5 yards from Grekk"), -- Horde
+(13, 0, @delivery, 0, 18, 1, @shredder, 0, 0, '', "Spell Shredder Delivery - self target"),
+(17, 0, @delivery, 1, 29, @synipus, 5, 0, 0, '', "Spell Shredder Delivery - 5 yards from Synipus"), -- Alliance
+(13, 0, @delivery, 1, 18, 1, @shredder, 0, 0, '', "Spell Shredder Delivery - self target");
+
+-- set spellscript to handle kill credit
+DELETE FROM `spell_script_names` WHERE `spell_id` = @delivery;
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(@delivery, 'spell_shredder_delivery');
+
+
+--delete quest .valide in quest_bug_list
+DELETE FROM quest_bug_list where quest_id in (12244,12270);
View
34 src/server/scripts/Northrend/grizzly_hills.cpp
@@ -18,6 +18,7 @@
#include "ScriptPCH.h"
#include "ScriptedEscortAI.h"
+#include "Vehicle.h"
/*######
## Quest 12027: Mr. Floppy's Perilous Adventure
@@ -694,6 +695,38 @@ class npc_venture_co_straggler : public CreatureScript
}
};
};
+/*
+* Commiter: GreenpisCore
@Kiperr
Kiperr Jun 2, 2012

all hail greenpisCore!!!!!!!!!!!!

@SkyFire
SkyFire Jun 2, 2012

Is that GreenPissCore? I think they misspelled it.

+* Fix quest #12244, #12270
+*/
+
+class spell_shredder_delivery : public SpellScriptLoader
+{
+public:
+ spell_shredder_delivery() : SpellScriptLoader("spell_shredder_delivery") { }
+
+ class spell_shredder_delivery_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_shredder_delivery_SpellScript);
+
+ void HandleKillCredit(SpellEffIndex effIndex)
+ {
+ if (GetCaster()->GetVehicleKit()->GetPassenger(0) && GetCaster()->GetVehicleKit()->GetPassenger(0)->GetTypeId() == TYPEID_PLAYER)
+ if (Player* player = GetCaster()->GetVehicleKit()->GetPassenger(0)->ToPlayer())
+ player->KilledMonsterCredit(27396, 0);
+ }
+
+ void Register()
+ {
+ OnEffectHit += SpellEffectFn(spell_shredder_delivery_SpellScript::HandleKillCredit, EFFECT_1, SPELL_EFFECT_KILL_CREDIT2);
+ }
+ };
+
+ SpellScript* GetSpellScript() const
+ {
+ return new spell_shredder_delivery_SpellScript();
+ }
+};
void AddSC_grizzly_hills()
{
@@ -705,4 +738,5 @@ void AddSC_grizzly_hills()
new npc_wounded_skirmisher();
new npc_lightning_sentry();
new npc_venture_co_straggler();
+ new spell_shredder_delivery();
}

0 comments on commit f948d84

Please sign in to comment.