void Load(const char* chrIn) { if (!chrIn) { OUT_LOAD_INST_DATA_FAIL; return; } OUT_LOAD_INST_DATA(chrIn); std::istringstream loadStream(chrIn); for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i) { loadStream >> m_auiEncounter[i]; if (m_auiEncounter[i] == IN_PROGRESS || m_auiEncounter[i] == FAIL) m_auiEncounter[i] = NOT_STARTED; } m_auiEncounter[TYPE_XERESTRASZA] = NOT_STARTED; OUT_LOAD_INST_DATA_COMPLETE; OpenAllDoors(); }
void instance_icecrown_spire::OnPlayerEnter(Player *pPlayer) { OpenAllDoors(); enum PhaseControl { HORDE_CONTROL_PHASE_SHIFT_1 = 55773, HORDE_CONTROL_PHASE_SHIFT_2 = 60028, ALLIANCE_CONTROL_PHASE_SHIFT_1 = 55774, ALLIANCE_CONTROL_PHASE_SHIFT_2 = 60027, }; /* if (!sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_GROUP)) return; switch (pPlayer->GetTeam()) { case ALLIANCE: if (pPlayer && pPlayer->IsInWorld() && pPlayer->HasAura(HORDE_CONTROL_PHASE_SHIFT_1)) pPlayer->RemoveAurasDueToSpell(HORDE_CONTROL_PHASE_SHIFT_1); pPlayer->CastSpell(pPlayer, HORDE_CONTROL_PHASE_SHIFT_2, false); break; case HORDE: if (pPlayer && pPlayer->IsInWorld() && pPlayer->HasAura(ALLIANCE_CONTROL_PHASE_SHIFT_1)) pPlayer->RemoveAurasDueToSpell(ALLIANCE_CONTROL_PHASE_SHIFT_1); pPlayer->CastSpell(pPlayer, ALLIANCE_CONTROL_PHASE_SHIFT_2, false); break; }; */ };
void OnGameObjectCreate(GameObject* pGo) { switch(pGo->GetEntry()) { case GO_HALION_PORTAL_1: m_uiHalionPortal1GUID = pGo->GetGUID(); break; case GO_HALION_PORTAL_2: m_uiHalionPortal2GUID = pGo->GetGUID(); break; case GO_HALION_PORTAL_3: m_uiHalionPortal3GUID = pGo->GetGUID(); break; case GO_FLAME_WALLS: m_uiFlameWallsGUID = pGo->GetGUID(); break; case GO_FLAME_RING: m_uiFlameRingGUID = pGo->GetGUID(); break; case GO_FIRE_FIELD: m_uiFireFieldGUID = pGo->GetGUID(); break; } OpenAllDoors(); }
void OnObjectCreate(GameObject* pGo) { switch(pGo->GetEntry()) { case GO_HALION_PORTAL_1: case GO_HALION_PORTAL_2: case GO_HALION_PORTAL_3: case GO_FLAME_WALLS: case GO_FLAME_RING: case GO_FIRE_FIELD: m_mGoEntryGuidStore[pGo->GetEntry()] = pGo->GetObjectGuid(); break; } OpenAllDoors(); }
void instance_icecrown_spire::Load(const char* chrIn) { if (!chrIn) { OUT_LOAD_INST_DATA_FAIL; return; } OUT_LOAD_INST_DATA(chrIn); std::istringstream loadStream(chrIn); for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i) { loadStream >> m_auiEncounter[i]; if (m_auiEncounter[i] == IN_PROGRESS && i >= 1) m_auiEncounter[i] = NOT_STARTED; } OUT_LOAD_INST_DATA_COMPLETE; OpenAllDoors(); }
void SetData(uint32 uiType, uint32 uiData) { switch(uiType) { case TYPE_EVENT: m_auiEncounter[uiType] = uiData; uiData = NOT_STARTED; break; case TYPE_RAGEFIRE: m_auiEncounter[uiType] = uiData; OpenAllDoors(); break; case TYPE_BALTHARUS: m_auiEncounter[uiType] = uiData; OpenAllDoors(); break; case TYPE_XERESTRASZA: m_auiEncounter[uiType] = uiData; if (uiData == IN_PROGRESS) OpenDoor(m_uiFireFieldGUID); else if (uiData == NOT_STARTED) { CloseDoor(m_uiFireFieldGUID); OpenAllDoors(); } else if (uiData == DONE) { OpenAllDoors(); if (m_auiEncounter[TYPE_ZARITHRIAN] == DONE) { m_auiEncounter[TYPE_EVENT] = 200; m_auiEventTimer = 30000; }; } break; case TYPE_ZARITHRIAN: m_auiEncounter[uiType] = uiData; if (uiData == DONE) { OpenDoor(m_uiFlameWallsGUID); m_auiEncounter[TYPE_EVENT] = 200; m_auiEventTimer = 30000; } else if (uiData == IN_PROGRESS) CloseDoor(m_uiFlameWallsGUID); else if (uiData == FAIL) OpenDoor(m_uiFlameWallsGUID); break; case TYPE_HALION: m_auiEncounter[uiType] = uiData; if (uiData == IN_PROGRESS) { CloseDoor(m_uiFlameRingGUID); } else { OpenDoor(m_uiFlameRingGUID); } break; case TYPE_HALION_EVENT: m_auiHalionEvent = uiData; uiData = NOT_STARTED; break; case TYPE_EVENT_TIMER: m_auiEventTimer = uiData; uiData = NOT_STARTED; break; case DATA_ORB_DIRECTION: m_auiOrbDirection = uiData; uiData = NOT_STARTED; break; case DATA_ORB_N: m_auiOrbNState = uiData; uiData = NOT_STARTED; break; case DATA_ORB_S: m_auiOrbSState = uiData; uiData = NOT_STARTED; break; case TYPE_COUNTER: if (uiData == COUNTER_OFF) { UpdateWorldState(false,0); } else { UpdateWorldState(true,uiData); } uiData = NOT_STARTED; break; } if (uiData == DONE) { OUT_SAVE_INST_DATA; std::ostringstream saveStream; for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i) saveStream << m_auiEncounter[i] << " "; strSaveData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; } }
void SetData(uint32 uiType, uint32 uiData) { switch(uiType) { case TYPE_EVENT: m_auiEncounter[uiType] = uiData; uiData = NOT_STARTED; break; case TYPE_RAGEFIRE: m_auiEncounter[uiType] = uiData; OpenAllDoors(); break; case TYPE_BALTHARUS: m_auiEncounter[uiType] = uiData; OpenAllDoors(); break; case TYPE_XERESTRASZA: m_auiEncounter[uiType] = uiData; if (uiData == IN_PROGRESS) DoOpenDoor(GO_FIRE_FIELD); else if (uiData == NOT_STARTED) { DoCloseDoor(GO_FIRE_FIELD); OpenAllDoors(); } else if (uiData == DONE) { OpenAllDoors(); if (m_auiEncounter[TYPE_ZARITHRIAN] == DONE) { m_auiEncounter[TYPE_EVENT] = 200; m_auiEventTimer = 30000; }; } break; case TYPE_ZARITHRIAN: m_auiEncounter[uiType] = uiData; if (uiData == DONE) { DoOpenDoor(GO_FLAME_WALLS); m_auiEncounter[TYPE_EVENT] = 200; m_auiEventTimer = 30000; } else if (uiData == IN_PROGRESS) DoCloseDoor(GO_FLAME_WALLS); else if (uiData == FAIL) DoOpenDoor(GO_FLAME_WALLS); break; case TYPE_HALION: m_auiEncounter[uiType] = uiData; if (uiData == IN_PROGRESS) DoCloseDoor(GO_FLAME_RING); else DoOpenDoor(GO_FLAME_RING); break; case TYPE_HALION_EVENT: m_auiHalionEvent = uiData; uiData = NOT_STARTED; break; case TYPE_EVENT_TIMER: m_auiEventTimer = uiData; uiData = NOT_STARTED; break; case DATA_ORB_DIRECTION: m_auiOrbDirection = uiData; uiData = NOT_STARTED; break; case DATA_ORB_N: m_auiOrbNState = uiData; uiData = NOT_STARTED; break; case DATA_ORB_S: m_auiOrbSState = uiData; uiData = NOT_STARTED; break; case TYPE_COUNTER: if (uiData == COUNTER_OFF) { UpdateWorldState(false,0); } else { UpdateWorldState(true,uiData); } uiData = NOT_STARTED; break; case TYPE_HALION_BERSERK: m_auiHalionBerserk = uiData; break; case TYPE_HALION_DMG_TAKEN_REAL: m_auiHalionDmgTakenReal = uiData; break; case TYPE_HALION_DMG_TAKEN_TWILIGHT: m_auiHalionDmgTakenTwilight = uiData; break; } if (uiData == DONE) { OUT_SAVE_INST_DATA; std::ostringstream saveStream; for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i) saveStream << m_auiEncounter[i] << " "; strSaveData = saveStream.str(); SaveToDB(); OUT_SAVE_INST_DATA_COMPLETE; } }
void instance_icecrown_spire::OnObjectCreate(GameObject* pGo) { switch(pGo->GetEntry()) { case GO_ICEWALL_1: m_uiIcewall1GUID = pGo->GetGUID(); break; case GO_ICEWALL_2: m_uiIcewall2GUID = pGo->GetGUID(); break; case GO_ORATORY_DOOR: m_uiOratoryDoorGUID = pGo->GetGUID(); break; case GO_DEATHWHISPER_ELEVATOR: m_uiDeathWhisperElevatorGUID = pGo->GetGUID(); break; case GO_SAURFANG_DOOR: m_uiSaurfangDoorGUID = pGo->GetGUID(); break; case GO_ORANGE_PLAGUE: m_uiOrangePlagueGUID = pGo->GetGUID(); break; case GO_GREEN_PLAGUE: m_uiGreenPlagueGUID = pGo->GetGUID(); break; case GO_SCIENTIST_DOOR_GREEN: m_uiSDoorGreenGUID = pGo->GetGUID(); break; case GO_SCIENTIST_DOOR_ORANGE: m_uiSDoorOrangeGUID = pGo->GetGUID(); break; case GO_SCIENTIST_DOOR_COLLISION: m_uiSDoorCollisionGUID = pGo->GetGUID(); break; case GO_SCIENTIST_DOOR: m_uiScientistDoorGUID = pGo->GetGUID(); break; case GO_CRIMSON_HALL_DOOR: m_uiCrimsonDoorGUID = pGo->GetGUID(); break; case GO_BLOODWING_DOOR: m_uiBloodwingDoorGUID = pGo->GetGUID(); break; case GO_COUNCIL_DOOR_1: m_uiCounsilDoor1GUID = pGo->GetGUID(); break; case GO_COUNCIL_DOOR_2: m_uiCounsilDoor2GUID = pGo->GetGUID(); break; case GO_FROSTWING_DOOR: m_uiFrostwingDoorGUID = pGo->GetGUID(); break; case GO_GREEN_DRAGON_DOOR_1: m_uiGreenDragonDoor1GUID = pGo->GetGUID(); break; case GO_GREEN_DRAGON_DOOR_2: m_uiGreenDragonDoor2GUID = pGo->GetGUID(); break; case GO_VALITHRIA_DOOR_1: m_uiValithriaDoor1GUID = pGo->GetGUID(); break; case GO_VALITHRIA_DOOR_2: m_uiValithriaDoor2GUID = pGo->GetGUID(); break; case GO_VALITHRIA_DOOR_3: m_uiValithriaDoor3GUID = pGo->GetGUID(); break; case GO_VALITHRIA_DOOR_4: m_uiValithriaDoor4GUID = pGo->GetGUID(); break; case GO_SINDRAGOSA_DOOR_1: m_uiSindragosaDoor1GUID = pGo->GetGUID(); break; case GO_SINDRAGOSA_DOOR_2: m_uiSindragosaDoor2GUID = pGo->GetGUID(); break; case GO_SAURFANG_CACHE_10: if(Difficulty == RAID_DIFFICULTY_10MAN_NORMAL) m_uiSaurfangCacheGUID = pGo->GetGUID(); break; case GO_SAURFANG_CACHE_25: if(Difficulty == RAID_DIFFICULTY_25MAN_NORMAL) m_uiSaurfangCacheGUID = pGo->GetGUID(); break; case GO_SAURFANG_CACHE_10_H: if(Difficulty == RAID_DIFFICULTY_10MAN_HEROIC) m_uiSaurfangCacheGUID = pGo->GetGUID(); break; case GO_SAURFANG_CACHE_25_H: if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) m_uiSaurfangCacheGUID = pGo->GetGUID(); break; case GO_GUNSHIP_ARMORY_A_10: if(Difficulty == RAID_DIFFICULTY_10MAN_NORMAL) m_uiGunshipArmoryAGUID = pGo->GetGUID(); break; case GO_GUNSHIP_ARMORY_A_25: if(Difficulty == RAID_DIFFICULTY_25MAN_NORMAL) m_uiGunshipArmoryAGUID = pGo->GetGUID(); break; case GO_GUNSHIP_ARMORY_A_10H: if(Difficulty == RAID_DIFFICULTY_10MAN_HEROIC) m_uiGunshipArmoryAGUID = pGo->GetGUID(); break; case GO_GUNSHIP_ARMORY_A_25H: if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) m_uiGunshipArmoryAGUID = pGo->GetGUID(); break; case GO_GUNSHIP_ARMORY_H_10: if(Difficulty == RAID_DIFFICULTY_10MAN_NORMAL) m_uiGunshipArmoryHGUID = pGo->GetGUID(); break; case GO_GUNSHIP_ARMORY_H_25: if(Difficulty == RAID_DIFFICULTY_25MAN_NORMAL) m_uiGunshipArmoryHGUID = pGo->GetGUID(); break; case GO_GUNSHIP_ARMORY_H_10H: if(Difficulty == RAID_DIFFICULTY_10MAN_HEROIC) m_uiGunshipArmoryHGUID = pGo->GetGUID(); break; case GO_GUNSHIP_ARMORY_H_25H: if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) m_uiGunshipArmoryHGUID = pGo->GetGUID(); break; case GO_DREAMWALKER_CACHE_10: if(Difficulty == RAID_DIFFICULTY_10MAN_NORMAL) m_uiValitriaCacheGUID = pGo->GetGUID(); break; case GO_DREAMWALKER_CACHE_25: if(Difficulty == RAID_DIFFICULTY_25MAN_NORMAL) m_uiValitriaCacheGUID = pGo->GetGUID(); break; case GO_DREAMWALKER_CACHE_10_H: if(Difficulty == RAID_DIFFICULTY_10MAN_HEROIC) m_uiValitriaCacheGUID = pGo->GetGUID(); break; case GO_DREAMWALKER_CACHE_25_H: if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) m_uiValitriaCacheGUID = pGo->GetGUID(); break; case GO_ICESHARD_1: m_uiIceShard1GUID = pGo->GetGUID(); break; case GO_ICESHARD_2: m_uiIceShard2GUID = pGo->GetGUID(); break; case GO_ICESHARD_3: m_uiIceShard3GUID = pGo->GetGUID(); break; case GO_ICESHARD_4: m_uiIceShard4GUID = pGo->GetGUID(); break; case GO_FROSTY_WIND: m_uiFrostyWindGUID = pGo->GetGUID(); break; case GO_FROSTY_EDGE: m_uiFrostyEdgeGUID = pGo->GetGUID(); break; case GO_ARTHAS_PLATFORM: m_uiArthasPlatformGUID = pGo->GetGUID(); break; case GO_ARTHAS_PRECIPICE: m_uiArthasPrecipiceGUID = pGo->GetGUID(); break; } OpenAllDoors(); }