当前位置: 首页>>代码示例>>C++>>正文


C++ SetBossState函数代码示例

本文整理汇总了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
开发者ID:DSlayerMan,项目名称:Sunwell,代码行数:35,代码来源:instance_ruby_sanctum.cpp

示例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;
                }
            }
开发者ID:DSlayerMan,项目名称:Sunwell,代码行数:25,代码来源:instance_serpent_shrine.cpp

示例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;
                }
            }
开发者ID:Helias,项目名称:azerothcore-wotlk,代码行数:34,代码来源:instance_gundrak.cpp

示例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;
            }
开发者ID:Refuge89,项目名称:TrinityCore,代码行数:26,代码来源:instance_trial_of_the_crusader.cpp

示例5: SetData

            void SetData(uint32 type, uint32 data)
            {
                SetBossState(type, EncounterState(data));

                if (data == DONE)
                    SaveToDB();
            }
开发者ID:Cailiaock,项目名称:5.4.7-Wow-source,代码行数:7,代码来源:instance_stormstout_brewery.cpp

示例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;
            }
        }
开发者ID:Expecto,项目名称:chaoscore,代码行数:28,代码来源:instance_ulduar.cpp

示例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;
开发者ID:Cailiaock,项目名称:5.4.7-Wow-source,代码行数:32,代码来源:instance_stormstout_brewery.cpp

示例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;
            }
开发者ID:Caydan,项目名称:WoWSCore548,代码行数:32,代码来源:instance_naxxramas.cpp

示例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;
开发者ID:Jason01ex,项目名称:ZoneLimit,代码行数:27,代码来源:instance_eye_of_eternity.cpp

示例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
开发者ID:Dramacydal,项目名称:Trinitycore-5.3.0,代码行数:30,代码来源:instance_halls_of_origination.cpp

示例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;
        }
开发者ID:Firearm,项目名称:TrinityCore,代码行数:28,代码来源:instance_eye_of_eternity.cpp

示例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;
        }
开发者ID:kemlg,项目名称:trinitycore-conciens,代码行数:34,代码来源:instance_blackwing_lair.cpp

示例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;
            }
开发者ID:Laintime,项目名称:BattleArenas,代码行数:33,代码来源:instance_ulduar.cpp

示例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
开发者ID:Arkania,项目名称:ArkCORE-NG,代码行数:27,代码来源:instance_shadow_labyrinth.cpp

示例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;
        }
开发者ID:mmihail,项目名称:trinitycore10353,代码行数:30,代码来源:instance_ulduar.cpp


注:本文中的SetBossState函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。