void ProcessEvent(GameObject* pGO, uint32 uiEventId) { switch(uiEventId) { case EVENT_ACTIVATE_CRYSTAL: bCrystalActivated = true; // Activation by player's will throw event signal ActivateCrystal(); break; } }
void ProcessEvent(WorldObject* /*go*/, uint32 uiEventId) override { switch (uiEventId) { case EVENT_ACTIVATE_CRYSTAL: bCrystalActivated = true; // Activation by player's will throw event signal ActivateCrystal(); break; } }
void SetData(uint32 type, uint32 data) { switch(type) { case DATA_1ST_BOSS_EVENT: m_auiEncounter[0] = data; if (data == DONE) SaveToDB(); break; case DATA_2ND_BOSS_EVENT: m_auiEncounter[1] = data; if (data == DONE) SaveToDB(); break; case DATA_CYANIGOSA_EVENT: m_auiEncounter[2] = data; if (data == DONE) { SaveToDB(); uiMainEventPhase = DONE; if (GameObject* pMainDoor = instance->GetGameObject(uiMainDoor)) pMainDoor->SetGoState(GO_STATE_ACTIVE); if (!bCrystalActivated && uiDoorIntegrity == 100) DoCompleteAchievement(ACHIEV_DEFENSELESS); } break; case DATA_WAVE_COUNT: uiWaveCount = data; bActive = true; break; case DATA_REMOVE_NPC: uiRemoveNpc = data; break; case DATA_PORTAL_LOCATION: uiLocation = (uint8)data; break; case DATA_DOOR_INTEGRITY: uiDoorIntegrity = data; DoUpdateWorldState(WORLD_STATE_VH_PRISON_STATE, uiDoorIntegrity); break; case DATA_NPC_PRESENCE_AT_DOOR_ADD: NpcAtDoorCastingList.push_back(data); break; case DATA_NPC_PRESENCE_AT_DOOR_REMOVE: if(!NpcAtDoorCastingList.empty()) NpcAtDoorCastingList.pop_back(); break; case DATA_MAIN_DOOR: if (GameObject* pMainDoor = instance->GetGameObject(uiMainDoor)) { switch(data) { case GO_STATE_ACTIVE: pMainDoor->SetGoState(GO_STATE_ACTIVE); break; case GO_STATE_READY: pMainDoor->SetGoState(GO_STATE_READY); break; case GO_STATE_ACTIVE_ALTERNATIVE: pMainDoor->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); break; } } break; case DATA_START_BOSS_ENCOUNTER: switch(uiWaveCount) { case 6: StartBossEncounter(uiFirstBoss); break; case 12: StartBossEncounter(uiSecondBoss); break; } break; case DATA_ACTIVATE_CRYSTAL: ActivateCrystal(); break; case DATA_MAIN_EVENT_PHASE: uiMainEventPhase = data; if (data == IN_PROGRESS) // Start event { if (GameObject* pMainDoor = instance->GetGameObject(uiMainDoor)) pMainDoor->SetGoState(GO_STATE_READY); uiWaveCount = 1; bActive = true; uiRemoveNpc = 0; // might not have been reset after a wipe on a boss. } break; } }