void SetData(uint32 type, uint32 data) override { switch (type) { case TYPE_FREE_NPC: if (data == DONE) DoUseDoorOrButton(DoorCourtyardGUID); m_auiEncounter[0] = data; break; case TYPE_RETHILGORE: if (data == DONE) DoSpeech(); m_auiEncounter[1] = data; break; case TYPE_FENRUS: switch (data) { case DONE: uiTimer = 1000; uiPhase = 1; break; case 7: DoUseDoorOrButton(DoorSorcererGUID); break; } m_auiEncounter[2] = data; break; case TYPE_NANDOS: if (data == DONE) DoUseDoorOrButton(DoorArugalGUID); m_auiEncounter[3] = data; break; case TYPE_CROWN: if (data == NOT_STARTED) spawnCrazedTimer = urand(7000, 14000); m_auiEncounter[4] = data; break; case TYPE_BATTLE: m_auiEncounter[5] = data; break; } if (data == DONE) { OUT_SAVE_INST_DATA; std::ostringstream saveStream; saveStream << m_auiEncounter[0] << ' ' << m_auiEncounter[1] << ' ' << m_auiEncounter[2] << ' ' << m_auiEncounter[3]; str_data = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; } }
void instance_shadowfang_keep::SetData(uint32 uiType, uint32 uiData) { switch (uiType) { case TYPE_FREE_NPC: if (uiData == DONE) DoUseDoorOrButton(GO_COURTYARD_DOOR); m_auiEncounter[0] = uiData; break; case TYPE_RETHILGORE: if (uiData == DONE) DoSpeech(); m_auiEncounter[1] = uiData; break; case TYPE_FENRUS: if (uiData == DONE) { if (Creature* pFenrus = GetSingleCreatureFromStorage(NPC_FENRUS)) pFenrus->SummonCreature(NPC_ARCHMAGE_ARUGAL, -136.89f, 2169.17f, 136.58f, 2.794f, TEMPSUMMON_TIMED_DESPAWN, 30000); } m_auiEncounter[2] = uiData; break; case TYPE_NANDOS: if (uiData == DONE) DoUseDoorOrButton(GO_ARUGAL_DOOR); m_auiEncounter[3] = uiData; break; case TYPE_INTRO: m_auiEncounter[4] = uiData; break; case TYPE_VOIDWALKER: if (uiData == DONE) { m_auiEncounter[5]++; if (m_auiEncounter[5] > 3) DoUseDoorOrButton(GO_SORCERER_DOOR); } break; } if (uiData == DONE) { OUT_SAVE_INST_DATA; std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; m_strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; } }
void SetData(uint32 uiType, uint32 uiData) { switch(uiType) { case TYPE_FREE_NPC: if (uiData == DONE) DoUseDoorOrButton(m_uiDoorCourtyardGUID); m_auiEncounter[0] = uiData; break; case TYPE_RETHILGORE: if (uiData == DONE) DoSpeech(); m_auiEncounter[1] = uiData; break; case TYPE_FENRUS: if (uiData == DONE) if (Creature* pFenrus = instance->GetCreature(m_uiFenrusGUID)) pFenrus->SummonCreature(NPC_ARCHMAGE_ARUGAL,-136.89f,2169.17f,136.58f,2.794f,TEMPSUMMON_TIMED_DESPAWN,30000); m_auiEncounter[2] = uiData; break; case TYPE_NANDOS: if (uiData == DONE) DoUseDoorOrButton(m_uiDoorArugalGUID); m_auiEncounter[3] = uiData; break; case TYPE_INTRO: m_auiEncounter[4] = uiData; break; case TYPE_VOIDWALKER: if (uiData == DONE) { m_auiEncounter[5]++; if (m_auiEncounter[5] > 3) DoUseDoorOrButton(m_uiDoorSorcererGUID); } break; } if (uiData == DONE) { OUT_SAVE_INST_DATA; std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; } }
void SetData(uint32 type, uint32 data) { switch (type) { case TYPE_FREE_NPC: if (data == DONE) DoUseDoorOrButton(DoorCourtyardGUID); m_auiEncounter[0] = data; break; case TYPE_RETHILGORE: if (data == DONE) DoSpeech(); m_auiEncounter[1] = data; break; case TYPE_FENRUS: switch (data) { case DONE: uiTimer = 1000; uiPhase = 1; break; case 7: DoUseDoorOrButton(DoorSorcererGUID); break; } m_auiEncounter[2] = data; break; case TYPE_NANDOS: if (data == DONE) DoUseDoorOrButton(DoorArugalGUID); m_auiEncounter[3] = data; break; } if (data == DONE) { OUT_SAVE_INST_DATA; std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; str_data = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; } }
void SetData(uint32 uiType, uint32 uiData) { switch(uiType) { case TYPE_FREE_NPC: if (uiData == DONE) DoUseDoorOrButton(m_uiDoorCourtyardGUID); m_auiEncounter[0] = uiData; break; case TYPE_RETHILGORE: if (uiData == DONE) DoSpeech(); m_auiEncounter[1] = uiData; break; case TYPE_FENRUS: if (uiData == DONE) DoUseDoorOrButton(m_uiDoorSorcererGUID); m_auiEncounter[2] = uiData; break; case TYPE_NANDOS: if (uiData == DONE) DoUseDoorOrButton(m_uiDoorArugalGUID); m_auiEncounter[3] = uiData; break; } if (uiData == DONE) { OUT_SAVE_INST_DATA; std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3]; strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; } }
void instance_shadowfang_keep::SetData(uint32 uiType, uint32 uiData) { switch (uiType) { case TYPE_FREE_NPC: if (uiData == DONE) DoUseDoorOrButton(GO_COURTYARD_DOOR); m_auiEncounter[0] = uiData; break; case TYPE_RETHILGORE: if (uiData == DONE) DoSpeech(); m_auiEncounter[1] = uiData; break; case TYPE_FENRUS: if (uiData == DONE) { if (Creature* pFenrus = GetSingleCreatureFromStorage(NPC_FENRUS)) pFenrus->SummonCreature(NPC_ARCHMAGE_ARUGAL, -136.89f, 2169.17f, 136.58f, 2.794f, TEMPSUMMON_TIMED_DESPAWN, 30000); } m_auiEncounter[2] = uiData; break; case TYPE_NANDOS: if (uiData == DONE) DoUseDoorOrButton(GO_ARUGAL_DOOR); m_auiEncounter[3] = uiData; break; case TYPE_INTRO: m_auiEncounter[4] = uiData; break; case TYPE_VOIDWALKER: if (uiData == DONE) { m_auiEncounter[5]++; if (m_auiEncounter[5] > 3) DoUseDoorOrButton(GO_SORCERER_DOOR); } break; case TYPE_APOTHECARY: // Reset apothecary counter on fail if (uiData == IN_PROGRESS) m_uiApothecaryDead = 0; if (uiData == SPECIAL) { ++m_uiApothecaryDead; // Set Hummel as lootable only when the others are dead if (m_uiApothecaryDead == MAX_APOTHECARY) { if (Creature* pHummel = GetSingleCreatureFromStorage(NPC_HUMMEL)) pHummel->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE); SetData(TYPE_APOTHECARY, DONE); } } // We don't want to store the SPECIAL data else m_auiEncounter[6] = uiData; break; } if (uiData == DONE) { OUT_SAVE_INST_DATA; std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6]; m_strInstData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; } }