void JustDied(Unit* victim) { DoScriptText(SAY_DEATH, m_creature); if (pInstance) pInstance->SetData(DATA_MOROES_EVENT, DONE); DeSpawnAdds(); //remove aura from spell Garrote when Moroes dies Map *map = m_creature->GetMap(); if (map->IsDungeon()) { Map::PlayerList const &PlayerList = map->GetPlayers(); if (PlayerList.isEmpty()) return; for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) { if (i->getSource()->isAlive() && i->getSource()->HasAura(SPELL_GARROTE,0)) i->getSource()->RemoveAurasDueToSpell(SPELL_GARROTE); } } }
void SpawnAdds() { DeSpawnAdds(); if (isAddlistEmpty()) { std::list<uint32> AddList; for (uint8 i = 0; i < 6; ++i) AddList.push_back(Adds[i]); Trinity::Containers::RandomResizeList(AddList, 4); uint8 i = 0; for (std::list<uint32>::const_iterator itr = AddList.begin(); itr != AddList.end() && i < 4; ++itr, ++i) { uint32 entry = *itr; if (Creature* creature = me->SummonCreature(entry, Locations[i], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000)) { AddGUID[i] = creature->GetGUID(); AddId[i] = entry; } } } else { for (uint8 i = 0; i < 4; ++i) { if (Creature* creature = me->SummonCreature(AddId[i], Locations[i], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000)) AddGUID[i] = creature->GetGUID(); } } }
void JustDied(Unit* victim) { DoYell(SAY_DEATH, LANG_UNIVERSAL, NULL); DoPlaySoundToSet(m_creature, SOUND_DEATH); if (pInstance) pInstance->SetData(DATA_MOROES_EVENT, DONE); DeSpawnAdds(); }
void JustDied(Unit* /*victim*/) { DoScriptText(SAY_DEATH, me); if (pInstance) pInstance->SetData(TYPE_MOROES, DONE); DeSpawnAdds(); //remove aura from spell Garrote when Moroes dies if (pInstance) pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_GARROTE); }
void JustDied(Unit* /*killer*/) { Talk(SAY_DEATH); if (instance) instance->SetData(TYPE_MOROES, DONE); DeSpawnAdds(); //remove aura from spell Garrote when Moroes dies if (instance) instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_GARROTE); }
void Reset() { Vanish_Timer = 35000; Blind_Timer = 40000; Gouge_Timer = 35000; Wait_Timer = 0; CheckAdds_Timer = 5000; Enrage = false; InVanish = false; if (me->GetHealth() > 0) { DeSpawnAdds(); SpawnAdds(); } if (pInstance) pInstance->SetData(TYPE_MOROES, NOT_STARTED); }
void SpawnAdds() { DeSpawnAdds(); if(isAddlistEmpty()) { Creature *pCreature = NULL; std::vector<uint32> AddList; for(uint8 i = 0; i < 6; ++i) AddList.push_back(Adds[i]); while(AddList.size() > 4) AddList.erase((AddList.begin())+(rand()%AddList.size())); uint8 i = 0; for(std::vector<uint32>::iterator itr = AddList.begin(); itr != AddList.end(); ++itr) { uint32 entry = *itr; pCreature = m_creature->SummonCreature(entry, Locations[i][0], Locations[i][1], POS_Z, Locations[i][2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); if (pCreature) { AddGUID[i] = pCreature->GetGUID(); AddId[i] = entry; } ++i; } }else { for(int i = 0; i < 4; i++) { Creature *pCreature = m_creature->SummonCreature(AddId[i], Locations[i][0], Locations[i][1], POS_Z, Locations[i][2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000); if (pCreature) { AddGUID[i] = pCreature->GetGUID(); } } } }