/*###### ## mob_riven_widow_cocoon ######*/ #define FREED_WINTERHOOF_LONGRUNNER 24211 class mob_nerubar_victim : public CreatureScript { public: mob_riven_widow_cocoon() : CreatureScript("mob_riven_widow_cocoon") { } struct mob_riven_widow_cocoonAI : public ScriptedAI { mob_riven_widow_cocoonAI(Creature *c) : ScriptedAI(c) {} void Reset() {} void EnterCombat(Unit * /*who*/) {} void MoveInLineOfSight(Unit * /*who*/) {} void JustDied(Unit* Killer) { if (Killer->GetTypeId() == TYPEID_PLAYER) { if (CAST_PLR(Killer)->GetQuestStatus(11296) == QUEST_STATUS_INCOMPLETE) { uint8 uiRand = urand(0,99); if (uiRand < 25) { Killer->SummonCreature(24211,m_creature->GetPozitionX(),m_creature->GetPozitionX(),m_creature->GetPozitionX(),0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,60000); CAST_PLR(Killer)->KilledMonsterCredit(FREED_WINTERHOOF_LONGRUNNER, 0); } } } } }; CreatureAI *GetAI(Creature *creature) const { return new mob_riven_widow_cocoonAI(creature); } };