本文整理汇总了C++中SetBossState函数的典型用法代码示例。如果您正苦于以下问题:C++ SetBossState函数的具体用法?C++ SetBossState怎么用?C++ SetBossState使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SetBossState函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Load
void Load(char const* str)
{
if (!str)
{
OUT_LOAD_INST_DATA_FAIL;
return;
}
OUT_LOAD_INST_DATA(str);
char dataHead1, dataHead2;
std::istringstream loadStream(str);
loadStream >> dataHead1 >> dataHead2;
if (dataHead1 == 'R' && dataHead2 == 'S')
{
for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i)
{
uint32 tmpState;
loadStream >> tmpState;
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
tmpState = NOT_STARTED;
SetBossState(i, EncounterState(tmpState));
}
// Xinef: additional check
if (GetBossState(DATA_HALION_INTRO_DONE) != DONE)
{
SetBossState(DATA_HALION_INTRO1, NOT_STARTED);
SetBossState(DATA_HALION_INTRO2, NOT_STARTED);
}
}
else
示例2: SetData
void SetData(uint32 type, uint32 data)
{
switch (type)
{
case DATA_PLATFORM_KEEPER_RESPAWNED:
++AliveKeepersCount;
break;
case DATA_PLATFORM_KEEPER_DIED:
--AliveKeepersCount;
break;
case DATA_BRIDGE_ACTIVATED:
SetBossState(DATA_BRIDGE_EMERGED, NOT_STARTED);
SetBossState(DATA_BRIDGE_EMERGED, DONE);
break;
case DATA_ACTIVATE_SHIELD:
if (Creature* vashj = instance->GetCreature(LadyVashjGUID))
for (uint8 i = 0; i < 4; ++i)
if (GameObject* gobject = instance->GetGameObject(ShieldGeneratorGUID[i]))
{
gobject->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
vashj->SummonTrigger(gobject->GetPositionX(), gobject->GetPositionY(), gobject->GetPositionZ(), 0.0f, 0);
}
break;
}
}
示例3: SetData
void SetData(uint32 type, uint32)
{
switch (type)
{
case NPC_ECK_THE_FEROCIOUS:
if (GetBossState(DATA_ECK_THE_FEROCIOUS_INIT) != DONE)
{
SetBossState(DATA_ECK_THE_FEROCIOUS_INIT, NOT_STARTED);
SetBossState(DATA_ECK_THE_FEROCIOUS_INIT, DONE);
}
break;
case GO_ALTAR_OF_SLAD_RAN:
if (GameObject* statue = instance->GetGameObject(_bridgeGUIDs[0]))
statue->SetGoState(GO_STATE_READY);
break;
case GO_ALTAR_OF_DRAKKARI:
if (GameObject* statue = instance->GetGameObject(_bridgeGUIDs[1]))
statue->SetGoState(GO_STATE_READY);
break;
case GO_ALTAR_OF_MOORABI:
if (GameObject* statue = instance->GetGameObject(_bridgeGUIDs[2]))
statue->SetGoState(GO_STATE_READY);
break;
}
if (type >= GO_ALTAR_OF_SLAD_RAN)
{
for (uint8 i = 0; i < 3; ++i)
if (GameObject* statue = instance->GetGameObject(_bridgeGUIDs[i]))
if (statue->GetGoState() != GO_STATE_READY)
return;
_activateTimer = 1;
}
}
示例4: Load
void Load(char const* strIn) override
{
if (!strIn)
{
OUT_LOAD_INST_DATA_FAIL;
return;
}
OUT_LOAD_INST_DATA(strIn);
std::istringstream loadStream(strIn);
for (uint8 i = 0; i < EncounterCount; ++i)
{
uint32 tmpState;
loadStream >> tmpState;
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
tmpState = NOT_STARTED;
SetBossState(i, EncounterState(tmpState));
}
loadStream >> TrialCounter;
EventStage = 0;
OUT_LOAD_INST_DATA_COMPLETE;
}
示例5: SetData
void SetData(uint32 type, uint32 data)
{
SetBossState(type, EncounterState(data));
if (data == DONE)
SaveToDB();
}
示例6: Update
void Update(uint32 diff)
{
if (SignalTimerState == IN_PROGRESS)
{
if (SignalTimer <= diff)
{
--SignalTimerMinutes;
SignalTimer = 60000;
if (SignalTimerMinutes)
{
DoUpdateWorldState(WORLDSTATE_SHOW_TIMER, 1);
DoUpdateWorldState(WORLDSTATE_ALGALON_TIMER, SignalTimerMinutes);
}
else
{
SignalTimerState = FAIL;
DoUpdateWorldState(WORLDSTATE_SHOW_TIMER, 0);
if (Creature* Algalon = instance->GetCreature(uiAlgalonGUID))
Algalon->AI()->DoAction(ACTION_ALGALON_ASCEND);
SetBossState(TYPE_ALGALON, FAIL);
}
SaveToDB();
}
else
SignalTimer -= diff;
}
}
示例7: Load
void Load(const char* in)
{
if (!in)
{
OUT_LOAD_INST_DATA_FAIL;
return;
}
OUT_LOAD_INST_DATA(in);
char dataHead1, dataHead2;
std::istringstream loadStream(in);
loadStream >> dataHead1 >> dataHead2;
if (dataHead1 == 'S' && dataHead2 == 'B')
{
for (uint32 i = 0; i < MAX_ENCOUNTERS; ++i)
{
uint32 tmpState;
loadStream >> tmpState;
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
tmpState = NOT_STARTED;
// Below makes the player on-instance-entry display of bosses killed shit work (SMSG_RAID_INSTANCE_INFO).
// Like, say an unbound player joins the party and he tries to enter the dungeon / raid.
// This makes sure binding-to-instance-on-entrance confirmation box will properly display bosses defeated / available.
SetBossState(i, EncounterState(tmpState));
}
}
else OUT_LOAD_INST_DATA_FAIL;
示例8: Load
void Load(const char* strIn) override
{
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 == 'N' && dataHead2 == 'X')
{
for (uint8 i = 0; i < EncounterCount; ++i)
{
uint32 tmpState;
loadStream >> tmpState;
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
tmpState = NOT_STARTED;
SetBossState(i, EncounterState(tmpState));
}
loadStream >> playerDied;
}
OUT_LOAD_INST_DATA_COMPLETE;
}
示例9: Load
void Load(const char* str)
{
if (!str)
{
OUT_LOAD_INST_DATA_FAIL;
return;
}
OUT_LOAD_INST_DATA(str);
char dataHead1, dataHead2;
std::istringstream loadStream(str);
loadStream >> dataHead1 >> dataHead2;
if (dataHead1 == 'E' && dataHead2 == 'E')
{
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));
}
} else OUT_LOAD_INST_DATA_FAIL;
示例10: Load
void Load(const char* str)
{
if (!str)
{
OUT_LOAD_INST_DATA_FAIL;
return;
}
OUT_LOAD_INST_DATA(str);
char dataHead1, dataHead2;
std::istringstream loadStream(str);
loadStream >> dataHead1 >> dataHead2;
if (dataHead1 == 'H' && dataHead2 == 'O')
{
for (uint32 i = 0; i < EncounterCount; ++i)
{
uint32 tmpState;
loadStream >> tmpState;
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
tmpState = NOT_STARTED;
SetBossState(i, EncounterState(tmpState));
}
uint32 tmp;
loadStream >> tmp;
IncreaseDeadElementals(tmp);
}
else
示例11: Load
void Load(const char* data)
{
if (!data)
{
OUT_LOAD_INST_DATA_FAIL;
return;
}
OUT_LOAD_INST_DATA(data);
char dataHead1, dataHead2;
uint16 data0;
std::istringstream loadStream(data);
loadStream >> dataHead1 >> dataHead2 >> data0;
if (dataHead1 == 'E' && dataHead2 == 'E')
{
if (data0 == IN_PROGRESS || data0 > SPECIAL)
data0 = NOT_STARTED;
SetBossState(BOSS_MALYGOS, EncounterState(data0));
}
else
OUT_LOAD_INST_DATA_FAIL;
OUT_LOAD_INST_DATA_COMPLETE;
}
示例12: SetBossState
bool SetBossState(uint32 type, EncounterState state) override
{
if (!InstanceScript::SetBossState(type, state))
return false;
switch (type)
{
case DATA_RAZORGORE_THE_UNTAMED:
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 DATA_NEFARIAN:
switch (state)
{
case NOT_STARTED:
if (Creature* nefarian = GetCreature(DATA_NEFARIAN))
nefarian->DespawnOrUnsummon();
break;
case FAIL:
_events.ScheduleEvent(EVENT_RESPAWN_NEFARIUS, 15 * IN_MILLISECONDS * MINUTE);
SetBossState(DATA_NEFARIAN, NOT_STARTED);
break;
default:
break;
}
break;
}
return true;
}
示例13: 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;
if (i == DATA_COLOSSUS)
SetData(i, tmpState);
else
SetBossState(i, EncounterState(tmpState));
}
}
OUT_LOAD_INST_DATA_COMPLETE;
}
示例14: Load
void Load(char const* str) override
{
if (!str)
{
OUT_LOAD_INST_DATA_FAIL;
return;
}
OUT_LOAD_INST_DATA(str);
char dataHead1, dataHead2;
std::istringstream loadStream(str);
loadStream >> dataHead1 >> dataHead2;
if (dataHead1 == 'S' && dataHead2 == 'L')
{
for (uint32 i = 0; i < EncounterCount; ++i)
{
uint32 tmpState;
loadStream >> tmpState;
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
tmpState = NOT_STARTED;
SetBossState(i, EncounterState(tmpState));
}
}
else
示例15: Load
void Load(const char* strIn)
{
if (!strIn)
{
OUT_LOAD_INST_DATA_FAIL;
return;
}
OUT_LOAD_INST_DATA(strIn);
char dataHead1, dataHead2;
uint32 data14;
std::istringstream loadStream(strIn);
loadStream >> dataHead1 >> dataHead2 >> data14;
if (dataHead1 == 'U' && dataHead2 == 'U')
{
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
{
uint32 tmpState;
loadStream >> tmpState;
loadStream >> uiEncounter[data14]; //colossus pre leviathan
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
tmpState = NOT_STARTED;
SetBossState(i, EncounterState(tmpState));
}
}
OUT_LOAD_INST_DATA_COMPLETE;
}