本文整理汇总了C++中GetBossState函数的典型用法代码示例。如果您正苦于以下问题:C++ GetBossState函数的具体用法?C++ GetBossState怎么用?C++ GetBossState使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetBossState函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:VitasicOLD,项目名称:FunCore,代码行数:13,代码来源:instance_oculus.cpp
示例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;
}
开发者ID:gyullo,项目名称:Ruby,代码行数:22,代码来源:instance_ruby_sanctum.cpp
示例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;
}
}
开发者ID:mryanlam,项目名称:Old-TrinityCore-Project-Script.me-,代码行数:54,代码来源:instance_oculus.cpp
示例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);
}
}
开发者ID:AwkwardDev,项目名称:RE,代码行数:13,代码来源:instance_ruby_sanctum.cpp
示例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;
}
}
开发者ID:Carbenium,项目名称:TrinityCore,代码行数:23,代码来源:instance_nexus.cpp
示例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;
}
开发者ID:FirstCore,项目名称:GaryMoveOut_4.3.4,代码行数:50,代码来源:instance_ulduar.cpp
示例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;
}
}
开发者ID:beyourself,项目名称:DeathCore_6.x,代码行数:14,代码来源:instance_blackrock_spire.cpp
示例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;
}
开发者ID:Abrek,项目名称:My-WoDCore-6.x.x,代码行数:37,代码来源:instance_steam_vault.cpp
示例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;
}
开发者ID:Aravu,项目名称:Talador-Project,代码行数:49,代码来源:instance_blackwing_lair.cpp
示例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;
}
}
开发者ID:Abrek,项目名称:My-WoDCore-6.x.x,代码行数:15,代码来源:instance_stonecore.cpp
示例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;
}
开发者ID:Refuge89,项目名称:TrinityCore,代码行数:16,代码来源:instance_trial_of_the_crusader.cpp
示例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;
}
}
开发者ID:kemlg,项目名称:trinitycore-conciens,代码行数:17,代码来源:instance_zulgurub.cpp
示例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;
}
开发者ID:GlassFace,项目名称:LegacyCore_6.x.x,代码行数:17,代码来源:instance_halls_of_stone.cpp
示例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;
}
开发者ID:mynew,项目名称:Core,代码行数:17,代码来源:instance_halls_of_stone.cpp
示例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;
}
}
开发者ID:Deewad,项目名称:TrinityCore,代码行数:18,代码来源:instance_trial_of_the_crusader.cpp
示例16: Update
void Update(uint32 diff) override
{
if (GetData(TYPE_NORTHREND_BEASTS) == SNAKES_SPECIAL && NotOneButTwoJormungarsTimer)
{
if (NotOneButTwoJormungarsTimer <= diff)
NotOneButTwoJormungarsTimer = 0;
else
NotOneButTwoJormungarsTimer -= diff;
}
if (GetBossState(DATA_FACTION_CRUSADERS) == IN_PROGRESS && ResilienceWillFixItTimer)
{
if (ResilienceWillFixItTimer <= diff)
ResilienceWillFixItTimer = 0;
else
ResilienceWillFixItTimer -= diff;
}
}
开发者ID:Refuge89,项目名称:TrinityCore,代码行数:18,代码来源:instance_trial_of_the_crusader.cpp
示例17: OnGameObjectCreate
void OnGameObjectCreate(GameObject* go)
{
switch (go->GetEntry())
{
case GO_FORCEFIELD:
AddDoor(go, true);
break;
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;
}
}
开发者ID:Helias,项目名称:azerothcore-wotlk,代码行数:18,代码来源:instance_zulgurub.cpp
示例18: ResetBossEncounter
void ResetBossEncounter(uint8 bossId)
{
if (bossId < DATA_CYANIGOSA || bossId > DATA_ZURAMAT)
return;
Creature* boss = GetCreature(bossId);
if (!boss)
return;
switch (bossId)
{
case DATA_CYANIGOSA:
boss->DespawnOrUnsummon();
break;
case DATA_EREKEM:
for (uint32 i = DATA_EREKEM_GUARD_1; i <= DATA_EREKEM_GUARD_2; ++i)
{
if (Creature* guard = instance->GetCreature(GetGuidData(i)))
{
if (guard->isDead())
guard->Respawn();
if (GetBossState(bossId) == DONE)
UpdateKilledBoss(guard);
guard->GetMotionMaster()->MoveTargetedHome();
guard->SetImmuneToAll(true);
}
}
/* fallthrough */
default:
if (boss->isDead())
{
// respawn and update to a placeholder npc to avoid be looted again
boss->Respawn();
UpdateKilledBoss(boss);
}
boss->GetMotionMaster()->MoveTargetedHome();
boss->SetImmuneToAll(true);
break;
}
}
开发者ID:ElunaLuaEngine,项目名称:ElunaTrinityWotlk,代码行数:43,代码来源:instance_violet_hold.cpp
示例19: CheckRequiredBosses
bool CheckRequiredBosses(uint32 bossId, Player const* player = NULL) const
{
if (!InstanceScript::CheckRequiredBosses(bossId, player))
return false;
switch (bossId)
{
case DATA_WILL_OF_EMPEROR:
case DATA_ELEGON:
case DATA_SPIRIT_KINGS:
case DATA_GARAJAL:
case DATA_FENG:
if (GetBossState(bossId - 1) != DONE)
return false;
default:
break;
}
return true;
}
开发者ID:Mystiko,项目名称:MoPCore5.4.8,代码行数:20,代码来源:instance_mogu_shan_vault.cpp
示例20: OnGameObjectCreate
void OnGameObjectCreate(GameObject* gameobject)
{
switch (gameobject->GetEntry())
{
case GO_ALTAR_OF_SLAD_RAN:
_sladRanAltarGUID = gameobject->GetGUID();
gameobject->SetGoState(GetBossState(DATA_SLAD_RAN) == DONE ? GO_STATE_ACTIVE : GO_STATE_READY);
break;
case GO_ALTAR_OF_DRAKKARI:
_drakkariAltarGUID = gameobject->GetGUID();
gameobject->SetGoState(GetBossState(DATA_DRAKKARI_COLOSSUS) == DONE ? GO_STATE_ACTIVE : GO_STATE_READY);
break;
case GO_ALTAR_OF_MOORABI:
_moorabiAltarGUID = gameobject->GetGUID();
gameobject->SetGoState(GetBossState(DATA_MOORABI) == DONE ? GO_STATE_ACTIVE : GO_STATE_READY);
break;
case GO_STATUE_OF_SLAD_RAN:
_bridgeGUIDs[0] = gameobject->GetGUID();
gameobject->SetGoState(_keysInCount == 3 ? GO_STATE_ACTIVE_ALTERNATIVE : (GetBossState(DATA_SLAD_RAN) == DONE ? GO_STATE_READY : GO_STATE_ACTIVE));
break;
case GO_STATUE_OF_DRAKKARI:
_bridgeGUIDs[1] = gameobject->GetGUID();
gameobject->SetGoState(_keysInCount == 3 ? GO_STATE_ACTIVE_ALTERNATIVE : (GetBossState(DATA_DRAKKARI_COLOSSUS) == DONE ? GO_STATE_READY : GO_STATE_ACTIVE));
break;
case GO_STATUE_OF_MOORABI:
_bridgeGUIDs[2] = gameobject->GetGUID();
gameobject->SetGoState(_keysInCount == 3 ? GO_STATE_ACTIVE_ALTERNATIVE : (GetBossState(DATA_MOORABI) == DONE ? GO_STATE_READY : GO_STATE_ACTIVE));
break;
case GO_STATUE_OF_GAL_DARAH:
_bridgeGUIDs[3] = gameobject->GetGUID();
gameobject->SetGoState(_keysInCount == 3 ? GO_STATE_ACTIVE_ALTERNATIVE : GO_STATE_READY);
break;
case GO_GUNDRAK_COLLISION:
_bridgeGUIDs[4] = gameobject->GetGUID();
gameobject->SetGoState(_keysInCount == 3 ? GO_STATE_ACTIVE_ALTERNATIVE : GO_STATE_READY);
break;
case GO_GUNDRAK_BRIDGE:
_bridgeGUIDs[5] = gameobject->GetGUID();
gameobject->SetGoState(GO_STATE_READY);
break;
case GO_ECK_DOORS:
case GO_ECK_UNDERWATER_GATE:
case GO_GAL_DARAH_DOORS0:
case GO_GAL_DARAH_DOORS1:
case GO_GAL_DARAH_DOORS2:
AddDoor(gameobject, true);
break;
}
}
开发者ID:GlassFace,项目名称:sunwell,代码行数:49,代码来源:instance_gundrak.cpp
注:本文中的GetBossState函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论