void instance_scholomance::OnCreatureEvade(Creature* pCreature) { switch (pCreature->GetEntry()) { case NPC_KIRTONOS: SetData(TYPE_KIRTONOS, FAIL); break; case NPC_RATTLEGORE: SetData(TYPE_RATTLEGORE, FAIL); break; case NPC_RAS_FROSTWHISPER: SetData(TYPE_RAS_FROSTWHISPER, FAIL); break; case NPC_THEOLEN_KRASTINOV: SetData(TYPE_THEOLEN, FAIL); break; case NPC_LOREKEEPER_POLKELT: SetData(TYPE_POLKELT, FAIL); break; case NPC_RAVENIAN: SetData(TYPE_RAVENIAN, FAIL); break; case NPC_ILLUCIA_BAROV: SetData(TYPE_ILLUCIA_BAROV, FAIL); break; case NPC_ALEXEI_BAROV: SetData(TYPE_ALEXEI_BAROV, FAIL); break; case NPC_INSTRUCTOR_MALICIA: SetData(TYPE_MALICIA, FAIL); break; case NPC_DARKMASTER_GANDLING: SetData(TYPE_GANDLING, FAIL); break; case NPC_RISEN_GUARDIAN: for (GandlingEventMap::iterator itr = m_mGandlingData.begin(); itr != m_mGandlingData.end(); ++itr) { // if there are no minions for a room, skip it if (!itr->second.m_sAddGuids.empty()) { // set data to fail in case of player death if (itr->second.m_sAddGuids.find(pCreature->GetGUIDLow()) != itr->second.m_sAddGuids.end()) { HandlePortalEvent(itr->first, FAIL); break; } } } break; } }
void instance_scholomance::OnCreatureEnterCombat(Creature* pCreature) { switch (pCreature->GetEntry()) { case NPC_KIRTONOS: SetData(TYPE_KIRTONOS, IN_PROGRESS); break; case NPC_RATTLEGORE: SetData(TYPE_RATTLEGORE, IN_PROGRESS); break; case NPC_RAS_FROSTWHISPER: SetData(TYPE_RAS_FROSTWHISPER, IN_PROGRESS); break; case NPC_THEOLEN_KRASTINOV: SetData(TYPE_THEOLEN, IN_PROGRESS); break; case NPC_LOREKEEPER_POLKELT: SetData(TYPE_POLKELT, IN_PROGRESS); break; case NPC_RAVENIAN: SetData(TYPE_RAVENIAN, IN_PROGRESS); break; case NPC_ILLUCIA_BAROV: SetData(TYPE_ILLUCIA_BAROV, IN_PROGRESS); break; case NPC_ALEXEI_BAROV: SetData(TYPE_ALEXEI_BAROV, IN_PROGRESS); break; case NPC_INSTRUCTOR_MALICIA: SetData(TYPE_MALICIA, IN_PROGRESS); break; case NPC_DARKMASTER_GANDLING: SetData(TYPE_GANDLING, IN_PROGRESS); break; case NPC_RISEN_GUARDIAN: for (auto& itr : m_mGandlingData) { // if there are no minions for a room, skip it if (!itr.second.m_sAddGuids.empty()) { // set data to fail in case of player death if (itr.second.m_sAddGuids.find(pCreature->GetGUIDLow()) != itr.second.m_sAddGuids.end()) { HandlePortalEvent(itr.first, IN_PROGRESS); break; } } } break; } }
void instance_scholomance::OnCreatureDeath(Creature* pCreature) { switch (pCreature->GetEntry()) { case NPC_KIRTONOS: SetData(TYPE_KIRTONOS, DONE); break; case NPC_RATTLEGORE: SetData(TYPE_RATTLEGORE, DONE); break; case NPC_RAS_FROSTWHISPER: SetData(TYPE_RAS_FROSTWHISPER, DONE); break; case NPC_THEOLEN_KRASTINOV: SetData(TYPE_THEOLEN, DONE); break; case NPC_LOREKEEPER_POLKELT: SetData(TYPE_POLKELT, DONE); break; case NPC_RAVENIAN: SetData(TYPE_RAVENIAN, DONE); break; case NPC_ILLUCIA_BAROV: SetData(TYPE_ILLUCIA_BAROV, DONE); break; case NPC_ALEXEI_BAROV: SetData(TYPE_ALEXEI_BAROV, DONE); break; case NPC_INSTRUCTOR_MALICIA: SetData(TYPE_MALICIA, DONE); break; case NPC_DARKMASTER_GANDLING: SetData(TYPE_GANDLING, DONE); break; case NPC_BONE_MINION: for (GandlingEventMap::iterator itr = m_mGandlingData.begin(); itr != m_mGandlingData.end(); ++itr) { // if there are no minions for a room, skip it if (!itr->second.m_sAddGuids.empty()) { // search for the dead minion and erase it if (itr->second.m_sAddGuids.find(pCreature->GetGUIDLow()) != itr->second.m_sAddGuids.end()) { itr->second.m_sAddGuids.erase(pCreature->GetGUIDLow()); // if the current list is empty; set event id as done if (itr->second.m_sAddGuids.empty()) { HandlePortalEvent(itr->first, DONE); break; } } } } break; } }