1 (edited by Selphius 2015-09-20 14:00:23)

This script propably misses some text, after SpellHit, feel free to add it if there should be one.

src/scripts/Kalimdor/bloodmyst_isle.cpp

struct npc_young_furbolg_shamanAI : public ScriptedAI
{
    npc_young_furbolg_shamanAI(Creature* c) : ScriptedAI(c) {}

    void Reset()
    {
        lifeTimer = 120000;
        me->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD);
        me->SetStandState(UNIT_STAND_STATE_DEAD);
    }

    uint32 lifeTimer;
    bool spellHit;

    void SpellHit(Unit* /*Hitter*/, const SpellEntry* Spellkind)
    {
        if (Spellkind->Id == 8593 && !spellHit)
        {
            DoCast(me, 32343);
            me->SetStandState(UNIT_STAND_STATE_STAND);
            me->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0);
            spellHit = true;
        }
    }

    void UpdateAI(const uint32 uiDiff)
    {
        if (me->IsStandState())
        {
            if (lifeTimer <= uiDiff)
            {
                EnterEvadeMode();
                return;
            }
            else
                lifeTimer -= uiDiff;
        }
    }
};
CreatureAI* GetAI_npc_young_furbolg_shaman(Creature* pCreature)
{
    return new npc_young_furbolg_shamanAI(pCreature);
}
    newscript = new Script;
    newscript->Name = "npc_young_furbolg_shaman";
    newscript->GetAI = &GetAI_npc_young_furbolg_shaman;
    newscript->RegisterSelf();
UPDATE `world`.`creature_template` SET `ScriptName`='npc_young_furbolg_shaman' WHERE  `entry`=17542;