DB/SAI: Fix Quest 12828 (Ample Inspiration).

This commit is contained in:
w1sht0l1v3
2012-06-26 00:45:07 +03:00
parent 1f0ecf2c3e
commit 4a85def47e
2 changed files with 50 additions and 55 deletions
-55
View File
@@ -1848,60 +1848,6 @@ class spell_item_unusual_compass : public SpellScriptLoader
}
};
enum UDED
{
NPC_IRONWOOL_MAMMOTH = 53806,
SPELL_MAMMOTH_CARCASS = 57444,
SPELL_MAMMOTH_MEAT = 54625,
};
class spell_item_uded : public SpellScriptLoader
{
public:
spell_item_uded() : SpellScriptLoader("spell_item_uded") { }
class spell_item_uded_SpellScript : public SpellScript
{
PrepareSpellScript(spell_item_uded_SpellScript);
bool Load()
{
if (GetHitCreature() && GetHitCreature()->GetEntry() == NPC_IRONWOOL_MAMMOTH)
return true;
return false;
}
bool Validate(SpellInfo const* /*spell*/)
{
if (!sSpellMgr->GetSpellInfo(SPELL_MAMMOTH_CARCASS) || !sSpellMgr->GetSpellInfo(SPELL_MAMMOTH_MEAT))
return false;
return true;
}
void HandleDummy(SpellEffIndex /* effIndex */)
{
Unit* caster = GetCaster();
Creature* creature = GetHitCreature();
caster->CastSpell(caster,SPELL_MAMMOTH_CARCASS,true);
for (uint8 i = 0; i < 4; ++i)
caster->CastSpell(caster,SPELL_MAMMOTH_MEAT,true);
creature->Kill(creature);
}
void Register()
{
OnEffectHitTarget += SpellEffectFn(spell_item_uded_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const
{
return new spell_item_uded_SpellScript();
}
};
enum ChickenCover
{
SPELL_CHICKEN_NET = 51959,
@@ -2109,7 +2055,6 @@ void AddSC_item_spell_scripts()
new spell_item_rocket_boots();
new spell_item_pygmy_oil();
new spell_item_unusual_compass();
new spell_item_uded();
new spell_item_chicken_cover();
new spell_item_muisek_vessel();
new spell_item_greatmothers_soulcatcher();