Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*####mob_riven_widow_cocon####*/
- enum
- {
- NPC_FREED_WINTERHOOF_LONGRUNNER = 24211,
- QUEST_RIVENWOOD_CAPTIVES = 11296
- };
- const uint32 riven_widow_coconVictims[3] =
- {
- 23990, 23989, 23991
- };
- struct MANGOS_DLL_DECL mob_riven_widow_cocon_victimAI : public ScriptedAI
- {
- mob_riven_widow_cocon_victimAI(Creature* pCreature) : ScriptedAI(pCreature)
- {
- SetCombatMovement(false);
- Reset();
- }
- void Reset() { }
- void MoveInLineOfSight(Unit* pWho) { }
- void JustDied(Unit* pKiller)
- {
- if (pKiller->GetTypeId() == TYPEID_PLAYER)
- {
- if (((Player*)pKiller)->GetQuestStatus(QUEST_RIVENWOOD_CAPTIVES) == QUEST_STATUS_INCOMPLETE)
- {
- if (!urand(0, 3))
- {
- m_creature->SummonCreature(NPC_FREED_WINTERHOOF_LONGRUNNER, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
- ((Player*)pKiller)->KilledMonsterCredit(NPC_FREED_WINTERHOOF_LONGRUNNER, m_creature->GetGUID());
- }
- else
- m_creature->SummonCreature(riven_widow_coconVictims[rand()%3], 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,60000);
- }
- }
- }
- };
- CreatureAI* GetAI_mob_riven_widow_cocon_victim(Creature* pCreature)
- {
- return new mob_riven_widow_cocon_victimAI(pCreature);
- }
- void AddSC_howling_fjord()
- {
- Script* newscript;
- newscript = new Script;
- newscript->Name = "mob_riven_widow_cocon_victim";
- newscript->GetAI = &GetAI_mob_riven_widow_cocon_victim;
- newscript->RegisterSelf();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement