本文整理匯總了C++中GetBossState函數的典型用法代碼示例。如果您正苦於以下問題:C++ GetBossState函數的具體用法?C++ GetBossState怎麽用?C++ GetBossState使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了GetBossState函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: GetData
uint32 GetData(uint32 type)
{
switch (type)
{
case DATA_UROM_PLATAFORM:
return platformUrom;
// used by condition system
case DATA_UROM_EVENT:
return GetBossState(DATA_UROM_EVENT);
}
return 0;
}
示例2: CheckRequiredBosses
bool CheckRequiredBosses(uint32 bossId, Player const* player = NULL) const
{
if (player && player->isGameMaster())
return true;
switch (bossId)
{
case DATA_GENERAL_ZARITHRIAN:
if (GetBossState(DATA_BALTHARUS_THE_WARBORN) != DONE || GetBossState(DATA_SAVIANA_RAGEFIRE) != DONE)
return false;
break;
case DATA_HALION:
if (GetBossState(DATA_BALTHARUS_THE_WARBORN) != DONE || GetBossState(DATA_SAVIANA_RAGEFIRE) != DONE
|| GetBossState(DATA_GENERAL_ZARITHRIAN) != DONE)
return false;
break;
default:
break;
}
return true;
}
示例3: OnCreatureCreate
void OnCreatureCreate(Creature* creature)
{
switch (creature->GetEntry())
{
case NPC_DRAKOS:
drakosGUID = creature->GetGUID();
break;
case NPC_VAROS:
varosGUID = creature->GetGUID();
if (GetBossState(DATA_DRAKOS_EVENT) == DONE)
creature->SetPhaseMask(1, true);
break;
case NPC_UROM:
uromGUID = creature->GetGUID();
if (GetBossState(DATA_VAROS_EVENT) == DONE)
creature->SetPhaseMask(1, true);
break;
case NPC_EREGOS:
eregosGUID = creature->GetGUID();
if (GetBossState(DATA_UROM_EVENT) == DONE)
creature->SetPhaseMask(1, true);
break;
case NPC_CENTRIFUGE_CONSTRUCT:
if (creature->isAlive())
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, ++centrifugueConstructCounter);
break;
case NPC_BELGARISTRASZ:
belgaristraszGUID = creature->GetGUID();
if (GetBossState(DATA_DRAKOS_EVENT) == DONE)
creature->SetWalk(true),
creature->GetMotionMaster()->MovePoint(0, 941.453f, 1044.1f, 359.967f),
creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
break;
case NPC_ETERNOS:
eternosGUID = creature->GetGUID();
if (GetBossState(DATA_DRAKOS_EVENT) == DONE)
creature->SetWalk(true),
creature->GetMotionMaster()->MovePoint(0, 943.202f, 1059.35f, 359.967f),
creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
break;
case NPC_VERDISA:
verdisaGUID = creature->GetGUID();
if (GetBossState(DATA_DRAKOS_EVENT) == DONE)
creature->SetWalk(true),
creature->GetMotionMaster()->MovePoint(0, 949.188f, 1032.91f, 359.967f),
creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
break;
case NPC_GREATER_WHELP:
if (GetBossState(DATA_UROM_EVENT) == DONE)
creature->SetPhaseMask(1, true);
gwhelpList.push_back(creature->GetGUID());
break;
}
}
示例4: OnUnitDeath
void OnUnitDeath(Unit* unit) override
{
Creature* creature = unit->ToCreature();
if (!creature)
return;
if (creature->GetEntry() == NPC_GENERAL_ZARITHRIAN && GetBossState(DATA_HALION) != DONE)
{
instance->LoadGrid(HalionControllerSpawnPos.GetPositionX(), HalionControllerSpawnPos.GetPositionY());
if (Creature* halionController = instance->SummonCreature(NPC_HALION_CONTROLLER, HalionControllerSpawnPos))
halionController->AI()->DoAction(ACTION_INTRO_HALION);
}
}
示例5: OnGameObjectCreate
void OnGameObjectCreate(GameObject* go) override
{
switch (go->GetEntry())
{
case GO_ANOMALUS_CONTAINMET_SPHERE:
AnomalusContainmentSphere = go->GetGUID();
if (GetBossState(DATA_ANOMALUS) == DONE)
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
break;
case GO_ORMOROKS_CONTAINMET_SPHERE:
OrmoroksContainmentSphere = go->GetGUID();
if (GetBossState(DATA_ORMOROK) == DONE)
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
break;
case GO_TELESTRAS_CONTAINMET_SPHERE:
TelestrasContainmentSphere = go->GetGUID();
if (GetBossState(DATA_MAGUS_TELESTRA) == DONE)
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
break;
default:
break;
}
}
示例6: Load
void Load(char const* strIn)
{
if (!strIn)
{
OUT_LOAD_INST_DATA_FAIL;
return;
}
OUT_LOAD_INST_DATA(strIn);
char dataHead1, dataHead2;
std::istringstream loadStream(strIn);
loadStream >> dataHead1 >> dataHead2;
if (dataHead1 == 'U' && dataHead2 == 'U')
{
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
{
uint32 tmpState;
loadStream >> tmpState;
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
tmpState = NOT_STARTED;
SetBossState(i, EncounterState(tmpState));
}
uint32 tempState;
loadStream >> tempState;
if (tempState == IN_PROGRESS || tempState > SPECIAL)
tempState = NOT_STARTED;
SetData(DATA_COLOSSUS, tempState);
loadStream >> _algalonTimer;
loadStream >> tempState;
_algalonSummoned = tempState != 0;
if (_algalonSummoned && GetBossState(BOSS_ALGALON) != DONE)
{
_summonAlgalon = true;
if (_algalonTimer && _algalonTimer <= 60)
{
_events.ScheduleEvent(EVENT_UPDATE_ALGALON_TIMER, 60000);
DoUpdateWorldState(WORLD_STATE_ALGALON_TIMER_ENABLED, 1);
DoUpdateWorldState(WORLD_STATE_ALGALON_DESPAWN_TIMER, _algalonTimer);
}
}
}
OUT_LOAD_INST_DATA_COMPLETE;
}
示例7: SetData
void SetData(uint32 type, uint32 data) override
{
switch (type)
{
case AREATRIGGER:
if (data == AREATRIGGER_DRAGONSPIRE_HALL)
{
if (GetBossState(DATA_DRAGONSPIRE_ROOM) != DONE)
Events.ScheduleEvent(EVENT_DARGONSPIRE_ROOM_STORE, 1000);
}
default:
break;
}
}
示例8: SetBossState
bool SetBossState(uint32 type, EncounterState state) override
{
if (!InstanceScript::SetBossState(type, state))
return false;
switch (type)
{
case DATA_HYDROMANCER_THESPIA:
if (state == DONE)
if (GameObject* panel = GetGameObject(DATA_ACCESS_PANEL_HYDRO))
panel->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
if (state == SPECIAL)
{
if (GetBossState(DATA_MEKGINEER_STEAMRIGGER) == SPECIAL)
HandleGameObject(MainChambersDoorGUID, true);
TC_LOG_DEBUG("scripts", "Instance Steamvault: Access panel used.");
}
break;
case DATA_MEKGINEER_STEAMRIGGER:
if (state == DONE)
if (GameObject* panel = GetGameObject(DATA_ACCESS_PANEL_MEK))
panel->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
if (state == SPECIAL)
{
if (GetBossState(DATA_HYDROMANCER_THESPIA) == SPECIAL)
HandleGameObject(MainChambersDoorGUID, true);
TC_LOG_DEBUG("scripts", "Instance Steamvault: Access panel used.");
}
break;
default:
break;
}
return true;
}
示例9: SetBossState
bool SetBossState(uint32 type, EncounterState state) override
{
if (!InstanceScript::SetBossState(type, state))
return false;
switch (type)
{
case BOSS_RAZORGORE:
HandleGameObject(RazorgoreDoorGUID, state == DONE);
if (state == DONE)
{
for (GuidList::const_iterator itr = EggList.begin(); itr != EggList.end(); ++itr)
if (GameObject* egg = instance->GetGameObject((*itr)))
egg->SetPhaseMask(2, true);
}
SetData(DATA_EGG_EVENT, NOT_STARTED);
break;
case BOSS_VAELASTRAZ:
HandleGameObject(VaelastraszDoorGUID, state == DONE);
break;
case BOSS_BROODLORD:
HandleGameObject(BroodlordDoorGUID, state == DONE);
break;
case BOSS_FIREMAW:
case BOSS_EBONROC:
case BOSS_FLAMEGOR:
HandleGameObject(ChrommagusDoorGUID, GetBossState(BOSS_FIREMAW) == DONE && GetBossState(BOSS_EBONROC) == DONE && GetBossState(BOSS_FLAMEGOR) == DONE);
break;
case BOSS_CHROMAGGUS:
HandleGameObject(NefarianDoorGUID, state == DONE);
break;
case BOSS_NEFARIAN:
switch (state)
{
case NOT_STARTED:
if (Creature* nefarian = instance->GetCreature(NefarianGUID))
nefarian->DespawnOrUnsummon();
break;
case FAIL:
_events.ScheduleEvent(EVENT_RESPAWN_NEFARIUS, 15*IN_MILLISECONDS*MINUTE);
SetBossState(BOSS_NEFARIAN, NOT_STARTED);
break;
default:
break;
}
break;
}
return true;
}
示例10: OnGameObjectCreate
void OnGameObjectCreate(GameObject* go) override
{
switch (go->GetEntry())
{
case GAMEOBJECT_CORBORUS_ROCKDOOR:
corborusRockDoorGUID = go->GetGUID();
go->SetGoState(GetBossState(DATA_CORBORUS) != DONE ? GO_STATE_READY : GO_STATE_ACTIVE);
break;
case GAMEOBJECT_SLABHIDE_ROCK_WALL:
slabhideRockWallGUIDs.push_back(go->GetGUID());
break;
default:
break;
}
}
示例11: Save
void Save()
{
OUT_SAVE_INST_DATA;
std::ostringstream saveStream;
for (uint8 i = 0; i < EncounterCount; ++i)
saveStream << GetBossState(i) << ' ';
saveStream << TrialCounter;
SaveDataBuffer = saveStream.str();
SaveToDB();
OUT_SAVE_INST_DATA_COMPLETE;
NeedSave = false;
}
示例12: OnGameObjectCreate
void OnGameObjectCreate(GameObject* go) override
{
InstanceScript::OnGameObjectCreate(go);
switch (go->GetEntry())
{
case GO_GONG_OF_BETHEKK:
_goGongOfBethekkGUID = go->GetGUID();
if (GetBossState(DATA_ARLOKK) == DONE)
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
else
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
break;
default:
break;
}
}
示例13: CheckRequiredBosses
bool CheckRequiredBosses(uint32 bossId, Player const* player = nullptr) const override
{
if (_SkipCheckRequiredBosses(player))
return true;
switch (bossId)
{
case DATA_SJONNIR:
if (GetBossState(DATA_TRIBUNAL_OF_AGES) != DONE)
return false;
break;
default:
break;
}
return true;
}
示例14: CheckRequiredBosses
bool CheckRequiredBosses(uint32 bossId, Player const* player = nullptr) const override
{
if (player && player->GetSession()->HasPermission(rbac::RBAC_PERM_SKIP_CHECK_INSTANCE_REQUIRED_BOSSES))
return true;
switch (bossId)
{
case DATA_SJONNIR:
if (GetBossState(DATA_TRIBUNAL_OF_AGES) != DONE)
return false;
break;
default:
break;
}
return true;
}
示例15: Update
void Update(uint32 diff)
{
if (GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL && NotOneButTwoJormungarsTimer)
{
if (NotOneButTwoJormungarsTimer <= diff)
NotOneButTwoJormungarsTimer = 0;
else
NotOneButTwoJormungarsTimer -= diff;
}
if (GetBossState(BOSS_CRUSADERS) == SPECIAL && ResilienceWillFixItTimer)
{
if (ResilienceWillFixItTimer <= diff)
ResilienceWillFixItTimer = 0;
else
ResilienceWillFixItTimer -= diff;
}
}