Scripts/Zulaman: remove hack from script and use correct spell

This commit is contained in:
Supabad
2011-05-16 16:06:23 +02:00
parent a28da3582e
commit fd1ed09752
@@ -62,7 +62,8 @@ enum eEnums
MOB_FIRE_BOMB = 23920, MOB_FIRE_BOMB = 23920,
// -- Hatcher Spells // -- Hatcher Spells
SPELL_HATCH_EGG = 43734, // 42471 SPELL_HATCH_EGG = 42471, // 43734
SPELL_SUMMON_HATCHLING = 42493,
// -- Hatchling Spells // -- Hatchling Spells
SPELL_FLAMEBUFFET = 43299 SPELL_FLAMEBUFFET = 43299
@@ -115,13 +116,6 @@ class boss_janalai : public CreatureScript
boss_janalaiAI(Creature *c) : ScriptedAI(c) boss_janalaiAI(Creature *c) : ScriptedAI(c)
{ {
pInstance = c->GetInstanceScript(); pInstance = c->GetInstanceScript();
SpellEntry *TempSpell = GET_SPELL(SPELL_HATCH_EGG);
if (TempSpell && TempSpell->EffectImplicitTargetA[0] != 1)
{
TempSpell->EffectImplicitTargetA[0] = 1;
TempSpell->EffectImplicitTargetB[0] = 0;
}
} }
InstanceScript *pInstance; InstanceScript *pInstance;
@@ -676,11 +670,7 @@ class mob_janalai_hatchling : public CreatureScript
class mob_janalai_egg : public CreatureScript class mob_janalai_egg : public CreatureScript
{ {
public: public:
mob_janalai_egg(): CreatureScript("mob_janalai_egg") {}
mob_janalai_egg()
: CreatureScript("mob_janalai_egg")
{
}
CreatureAI* GetAI(Creature* creature) const CreatureAI* GetAI(Creature* creature) const
{ {
@@ -689,19 +679,17 @@ public:
struct mob_janalai_eggAI : public ScriptedAI struct mob_janalai_eggAI : public ScriptedAI
{ {
mob_janalai_eggAI(Creature *c) : ScriptedAI(c){} mob_janalai_eggAI(Creature* creature) : ScriptedAI(creature){}
void Reset() {} void Reset() {}
void EnterCombat(Unit* /*who*/) {}
void AttackStart(Unit* /*who*/) {} void UpdateAI(uint32 const /*diff*/) {}
void MoveInLineOfSight(Unit* /*who*/) {}
void UpdateAI(const uint32 /*diff*/) {}
void SpellHit(Unit* /*caster*/, const SpellEntry* spell) void SpellHit(Unit* /*caster*/, const SpellEntry* spell)
{ {
if (spell->Id == SPELL_HATCH_EGG) if (spell->Id == SPELL_HATCH_EGG)
{ {
DoSpawnCreature(MOB_HATCHLING, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); DoCast(SPELL_SUMMON_HATCHLING);
me->SetDisplayId(11686);
} }
} }
}; };