• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetData64函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetData64函数的典型用法代码示例。如果您正苦于以下问题:C++ GetData64函数的具体用法?C++ GetData64怎么用?C++ GetData64使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetData64函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: SetData

	void SetData(uint32 uiType, uint32 uiData)
	{
		switch(uiType)
		{
		case DATA_BALTHARUS_EVENT:
			m_auiEncounter[0] = uiData;
			if(uiData == DONE)
				m_uiBossCounter++;
			if(m_uiBossCounter == 3)
			{
				Creature *pCreature = instance->GetCreature(GetData64(DATA_HALION));
				pCreature->SetReactState(REACT_AGGRESSIVE);
				pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
				pCreature->SetVisibility(VISIBILITY_ON);
			}		
			break;
		case DATA_ZARITHRIAN_EVENT:
			m_auiEncounter[1] = uiData;
			if(uiData == DONE)
				m_uiBossCounter++;
			if(m_uiBossCounter == 3)
			{
				Creature *pCreature = instance->GetCreature(GetData64(DATA_HALION));
				pCreature->SetReactState(REACT_AGGRESSIVE);
				pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
				pCreature->SetVisibility(VISIBILITY_ON);
			}
			break;
		case DATA_RAGEFIRE_EVENT:
			m_auiEncounter[2] = uiData;
			if(uiData == DONE)
				m_uiBossCounter++;
			if(m_uiBossCounter == 3)
			{
				Creature *pCreature = instance->GetCreature(GetData64(DATA_HALION));
				pCreature->SetReactState(REACT_AGGRESSIVE);
				pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
				pCreature->SetVisibility(VISIBILITY_ON);
			}
			break;
		case DATA_HALION_EVENT:
			m_auiEncounter[3] = uiData;
			if(uiData == DONE)
			{
				switch(instance->GetDifficulty())
				{
				case RAID_DIFFICULTY_10MAN_NORMAL:
					DoCompleteAchievement(4817);
				case RAID_DIFFICULTY_10MAN_HEROIC:
					DoCompleteAchievement(4818);
				case RAID_DIFFICULTY_25MAN_NORMAL:
					DoCompleteAchievement(4815);
				case RAID_DIFFICULTY_25MAN_HEROIC:
					DoCompleteAchievement(4816);
				}
			}
		case DATA_XERESTRASZA_EVENT:
			m_uiXerestrasza = uiData;
		}
	}
开发者ID:VenT,项目名称:wow,代码行数:60,代码来源:instance_ruby_sanctum.cpp


示例2: Update

	void Update(uint32 uiDiff)
	{
		if (m_uiLane1Timer < uiDiff)
		{
			if(Creature* pTrigger = instance->GetCreature(GetData64(DATA_LANE1)))
				if (Creature* pTemp = pTrigger->SummonCreature(NPC_POISEN, 3183.495779f, -3143.447998f, 294.062897f, 3.981270f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 9000))
					pTemp->MonsterMove(3165.249023f, -3166.019043f, 294.063446f, 9000);
			m_uiLane1Timer = 4000;
		}else m_uiLane1Timer -= uiDiff; 

		if (m_uiLane2Timer < uiDiff)
		{
			if(Creature* pTrigger = instance->GetCreature(GetData64(DATA_LANE2)))
				if (Creature* pTemp = pTrigger->SummonCreature(NPC_POISEN, 3174.359619f, -3137.360840f, 294.062897f, 4.044f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 9000))
					pTemp->MonsterMove(3155.766113f, -3158.337158f, 294.062897f, 9000);
			m_uiLane2Timer = 4000;
		}else m_uiLane2Timer -= uiDiff; 

		if (m_uiLane3Timer < uiDiff)
		{
			if(Creature* pTrigger = instance->GetCreature(GetData64(DATA_LANE3)))
				if (Creature* pTemp = pTrigger->SummonCreature(NPC_POISEN, 3192.833740f, -3151.343506f, 294.003479f, 4.044f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 9000))
					pTemp->MonsterMove(3173.857178f, -3173.015625f, 294.063354f, 9000);
			m_uiLane3Timer = 4000;
		}else m_uiLane3Timer -= uiDiff;
	}
开发者ID:xXNembiXx,项目名称:scriptdev2_335,代码行数:26,代码来源:instance_naxxramas.cpp


示例3: ShiftPhase

 void ShiftPhase()
 {
     uiAscendantCouncilPhase++;
     if (uiAscendantCouncilPhase == 2)
     {
         ChangeState(GetData64(DATA_FELUDIUS),false,false);
         ChangeState(GetData64(DATA_IGNACIOUS),false,false);
         ChangeState(GetData64(DATA_ARION),true,false);
         ChangeState(GetData64(DATA_TERRASTRA),true,false);
     }
     else if (uiAscendantCouncilPhase == 3)
     {
     }
 }
开发者ID:ProjectStarGate,项目名称:StarGate-Plus-EMU,代码行数:14,代码来源:instance_bastion_of_twilight.cpp


示例4: OnPlayerEnter

 void OnPlayerEnter(Player* /*player*/)
 {
     if (!GetData64(DATA_HALION_CONTROLLER) && GetBossState(DATA_HALION) != DONE && GetBossState(DATA_GENERAL_ZARITHRIAN) == DONE)
     {
         instance->LoadGrid(HalionControllerSpawnPos.GetPositionX(), HalionControllerSpawnPos.GetPositionY());
         if (Creature* halionController = instance->SummonCreature(NPC_HALION_CONTROLLER, HalionControllerSpawnPos))
             halionController->AI()->DoAction(ACTION_INTRO_HALION);
     }
 }
开发者ID:Archarean,项目名称:TrinityCore,代码行数:9,代码来源:instance_ruby_sanctum.cpp


示例5: MoveNPCIfAlive

		void MoveNPCIfAlive(uint32 entry, float x, float y, float z, float o) {
			if (Creature* npc = instance->GetCreature(GetData64(entry))) {
				if (npc->isAlive()) {
					npc->AddUnitMovementFlag(MOVEMENTFLAG_WALKING);
					npc->GetMotionMaster()->MovePoint(1, x, y, z);
					npc->SetHomePosition(x, y, z, o);
				}
			}
		}
开发者ID:tauri,项目名称:ArkCORE,代码行数:9,代码来源:instance_zulfarrak.cpp


示例6: initBlyCrewMember

 void initBlyCrewMember(uint32 entry, float x, float y, float z)
 {
     if (Creature* crew = GetCreature(GetData64(entry)))
     {
         crew->SetReactState(REACT_AGGRESSIVE);
         crew->SetWalk(true);
         crew->SetHomePosition(x, y, z, 0);
         crew->GetMotionMaster()->MovePoint(1, x, y, z);
         crew->SetFaction(FACTION_FREED);
     }
 }
开发者ID:Mystiko,项目名称:OregonCore,代码行数:11,代码来源:instance_zulfarrak.cpp


示例7: OnPlayerEnter

            void OnPlayerEnter(Player* player)
            {
                if (instance->IsHeroic())
                {
                    player->SendUpdateWorldState(UPDATE_STATE_UI_SHOW, 1);
                    player->SendUpdateWorldState(UPDATE_STATE_UI_COUNT, GetData(TYPE_COUNTER));
                }
                else
                    player->SendUpdateWorldState(UPDATE_STATE_UI_SHOW, 0);

                // make sure Anub'arak isnt missing and floor is destroyed after a crash
                if (GetBossState(BOSS_LICH_KING) == DONE && TrialCounter && GetBossState(BOSS_ANUBARAK) != DONE)
                {
                    Creature* anubArak = Unit::GetCreature(*player, GetData64(NPC_ANUBARAK));
                    if (!anubArak)
                        anubArak = player->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 3, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);

                    if (GameObject* floor = GameObject::GetGameObject(*player, GetData64(GO_ARGENT_COLISEUM_FLOOR)))
                        floor->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
                }
            }
开发者ID:Deewad,项目名称:TrinityCore,代码行数:21,代码来源:instance_trial_of_the_crusader.cpp


示例8: MoveNPCIfAlive

 void MoveNPCIfAlive(uint32 entry, float x, float y, float z, float o)
 {
     if (Creature* npc = instance->GetCreature(GetData64(entry)))
     {
         if (npc->isAlive())
         {
             npc->GetMotionMaster()->MovePoint(1, x, y, z, MOVE_PATHFINDING | MOVE_WALK_MODE);
             npc->SetCombatStartPosition(x, y, z);
             npc->SetHomePosition(x, y, z, npc->GetOrientation());
         }
     }
 }
开发者ID:Maduse,项目名称:server,代码行数:12,代码来源:instance_zulfarrak.cpp


示例9: MoveNPCIfAlive

 void MoveNPCIfAlive(uint32 entry, float x, float y, float z, float o)
 {
    if (Creature* npc = instance->GetCreature(GetData64(entry)))
    {
        if (npc->IsAlive())
        {
             npc->SetWalk(true);
             npc->GetMotionMaster()->MovePoint(1, x, y, z);
             npc->SetHomePosition(x, y, z, o);
        }
     }
 }
开发者ID:Fose,项目名称:TrinityCore,代码行数:12,代码来源:instance_zulfarrak.cpp


示例10: OnPlayerEnter

        void OnPlayerEnter(Player * plr)
        {
            if (!plr || !plr->IsInWorld())
                return;

            Position pos = { 5304.132324f, 2001.124634f, 709.341431f, 3.895033f };

            if (plr->HasAura(SPELL_QUELDELARS_ZWANG) && !GetData64(DATA_QUELDELAR_PLR))
            {
                SetData64(DATA_QUELDELAR_PLR, plr->GetGUID());

                if (!instance->GetCreature(QuelDelarGUID))
                    instance->SummonCreature(NPC_QUELDELAR_TRIGGER, pos);
            }

            if (WaveCnt)
                DoUpdateWorldState(WORLD_STATE_HOR, 1);
        }
开发者ID:ivansiwi,项目名称:TrinityCore,代码行数:18,代码来源:instance_halls_of_reflection.cpp


示例11: OnCreatureCreate

 void OnCreatureCreate(Creature* creature, bool /*add*/)
 {
     switch (creature->GetEntry())
     {
     case NPC_EMPEROR: EmperorGUID = creature->GetGUID(); break;
     case NPC_PHALANX: PhalanxGUID = creature->GetGUID(); break;
     case NPC_DOOMREL: TombBossGUIDs[0] = creature->GetGUID(); break;
     case NPC_DOPEREL: TombBossGUIDs[1] = creature->GetGUID(); break;
     case NPC_HATEREL: TombBossGUIDs[2] = creature->GetGUID(); break;
     case NPC_VILEREL: TombBossGUIDs[3] = creature->GetGUID(); break;
     case NPC_SEETHREL: TombBossGUIDs[4] = creature->GetGUID(); break;
     case NPC_GLOOMREL: TombBossGUIDs[5] = creature->GetGUID(); break;
     case NPC_ANGERREL: TombBossGUIDs[6] = creature->GetGUID(); break;
     case NPC_MAGMUS:
         MagmusGUID = creature->GetGUID();
         if (!creature->isAlive())
             HandleGameObject(GetData64(DATA_THRONE_DOOR), true); // if Magmus is dead open door to last boss
         break;
     }
 }
开发者ID:Maczuga,项目名称:SkyFire_one,代码行数:20,代码来源:instance_blackrock_depths.cpp


示例12: Update

    void Update(uint32 diff)
    {
        if(GetData(EVENT_TERONGOREFIEND) == IN_PROGRESS)
        {
            if(sodList.size())
            {
                for(std::map<uint64,uint32>::iterator itr = sodList.begin(); itr != sodList.end(); itr++)
                {
                    if(itr->second <= diff)
                    {
                        if(Unit *teron = instance->GetCreature(GetData64(DATA_TERONGOREFIEND)))
                            teron->CastSpell(teron, 40266, true);

                        sodList.erase(itr);
                    }
                    else
                        itr->second -= diff;
                }
            }
        }
    }
开发者ID:Blumfield,项目名称:ptc2,代码行数:21,代码来源:instance_black_temple.cpp


示例13: OnDestroy

 void OnDestroy(InstanceMap* pMap)
 {
     if (Creature* weakSpot = instance->GetCreature(GetData64(NPC_WEAK_SPOT)))
         weakSpot->_ExitVehicle();
 }
开发者ID:CATACLYSMDEV,项目名称:JadeCore-5.4.8-18291--dev-,代码行数:5,代码来源:instance_gate_setting_sun.cpp


示例14: OnCreatureCreate

    void OnCreatureCreate(Creature* pCreature, bool add/*, uint32 data, ScriptedInstance* m_pInstance, Map *m_pMap*/)
    {
        std::stringstream ss;
        ss << "pCreature->GetEntry()== " << pCreature->GetEntry();
        outstring_log(ss.str().c_str());

        outstring_log("OnCreatureCreate");
        switch (pCreature->GetEntry())
        {
            case NPC_LEVIATHAN:
                outstring_log("NPC_LEVIATHAN");
                m_uiLeviathanGUID = pCreature->GetGUID();
                break;
            case NPC_LEVIATHAN_TRIGGER:
                m_uiLeviathan_Trigger = pCreature->GetGUID();
                break;
            case NPC_IGNIS:
                m_uiIgnisGUID = pCreature->GetGUID();
                break;
            case NPC_RAZORSCALE:
                m_uiRazorscaleGUID = pCreature->GetGUID();
                if (/*data == FAIL && */instance)
                {
                    if (Creature *commander = instance->GetCreature(GetData64(TYPE_COMMANDER)))
                        commander->SetVisibility(VISIBILITY_ON);
                }
                break;
            case NPC_XT002:
                m_uiXT002GUID = pCreature->GetGUID();
                break;
            case NPC_STEELBREAKER:
                m_uiSteelbreaker = pCreature->GetGUID();
                break;
            case NPC_MOLGEIM:
                m_uiMolgeim = pCreature->GetGUID();
                break;
            case NPC_BRUNDIR:
                m_uiBrundir = pCreature->GetGUID();
                break;
            case NPC_KOLOGARN:
                m_uiKologarnGUID = pCreature->GetGUID();
                break;
            case NPC_KOLOGARN_LEFT_ARM:
                m_uiKologarnLeftGUID = pCreature->GetGUID();
                break;
            case NPC_KOLOGARN_RIGHT_ARM:
                m_uiKologarnRightGUID = pCreature->GetGUID();
                break;
            case NPC_AURIAYA:
                m_uiAuriayaGUID = pCreature->GetGUID();
                break;
            case NPC_MIMIRON:
                m_uiMimironGUID = pCreature->GetGUID();
                break;
            case NPC_HODIR:
                m_uiHodirGUID = pCreature->GetGUID();
                break;
            case NPC_THORIM:
                m_uiThorimGUID = pCreature->GetGUID();
                break;
            case NPC_FREYA:
                m_uiFreyaGUID = pCreature->GetGUID();
                break;
            case NPC_VEZAX:
                m_uiVezaxGUID = pCreature->GetGUID();
                break;
            case NPC_YOGGSARON:
                m_uiYoggSaronGUID = pCreature->GetGUID();
                break;
            case NPC_ALGALON:
                m_uiAlgalonGUID = pCreature->GetGUID();
                break;
            case NPC_COMMANDER:
                m_uiExpCommander = pCreature->GetGUID();
                break;
            case NPC_IRON_CONSTRUCT:
                {
                    pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                    pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
                    pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
                    m_uiIronConstructGUIDs[m_auiConstrCount] = pCreature->GetGUID();
                    m_auiConstrCount++;
                    break;
                }
        }
    }
开发者ID:Elevim,项目名称:RG-332,代码行数:86,代码来源:instance_ulduar.cpp


示例15: SetData


//.........这里部分代码省略.........
                                if (m_uiTrialCounter >= 50)
                                    tributeChest = GO_TRIBUTE_CHEST_25H_99;
                                else
                                    if (m_uiTrialCounter >= 45)
                                        tributeChest = GO_TRIBUTE_CHEST_25H_50;
                                    else
                                        if (m_uiTrialCounter >= 25)
                                            tributeChest = GO_TRIBUTE_CHEST_25H_45;
                                        else
                                            tributeChest = GO_TRIBUTE_CHEST_25H_25;
                            }
                            if (tributeChest)
                                if (Creature* pTirion =  instance->GetCreature(m_uiTirionGUID))
                                    if (GameObject* pChest = pTirion->SummonGameObject(tributeChest, 805.62f, 134.87f, 142.16f, 3.27f, 0, 0, 0, 0, 90000000))
                                        pChest->SetRespawnTime(pChest->GetRespawnDelay());
                            break;
                    }
                    break;
                case TYPE_COUNTER:   m_uiTrialCounter = uiData; uiData = DONE; break;
                case TYPE_EVENT:     m_uiEvent = uiData; uiData = NOT_STARTED; break;
                case TYPE_EVENT_TIMER:      m_uiEventTimer = uiData; uiData = NOT_STARTED; break;
                case TYPE_NORTHREND_BEASTS:
                    m_uiNorthrendBeasts = uiData;
                    switch (uiData)
                    {
                        case GORMOK_DONE:
                            m_uiEvent = 200;
                            SetData(TYPE_NORTHREND_BEASTS, IN_PROGRESS);
                            SetData(TYPE_BEASTS, IN_PROGRESS);
                            break;
                        case SNAKES_IN_PROGRESS: m_uiNotOneButTwoJormungarsTimer = 0; break;
                        case SNAKES_SPECIAL: m_uiNotOneButTwoJormungarsTimer = 10*IN_MILLISECONDS; break;
                        case SNAKES_DONE:
                            if (m_uiNotOneButTwoJormungarsTimer > 0)
                                DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_WORMS_KILLED_IN_10_SECONDS);
                            m_uiEvent = 300;
                            SetData(TYPE_NORTHREND_BEASTS, IN_PROGRESS);
                            SetData(TYPE_BEASTS, IN_PROGRESS);
                            break;
                        case ICEHOWL_DONE:
                            m_uiEvent = 400;
                            SetData(TYPE_NORTHREND_BEASTS, DONE);
                            SetData(TYPE_BEASTS, DONE);
                            break;
                        case FAIL:
                            SetData(TYPE_BEASTS, FAIL);
                            break;
                    }
                    break;
                case DATA_HEALTH_TWIN_SHARED:     m_uiDataDamageTwin = uiData; uiData = NOT_STARTED; break;

                //Achievements
                case DATA_SNOBOLD_COUNT:
                    if (uiData == INCREASE)
                        ++m_uiSnoboldCount;
                    else if (uiData == DECREASE)
                        --m_uiSnoboldCount;
                    break;
                case DATA_MISTRESS_OF_PAIN_COUNT:
                    if (uiData == INCREASE)
                        ++m_uiMistressOfPainCount;
                    else if (uiData == DECREASE)
                        --m_uiMistressOfPainCount;
                    break;
                case DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE:
                    m_bTributeToImmortalityElegible = false;
                    break;
            }
            if (IsEncounterInProgress())
            {
                CloseDoor(GetData64(GO_EAST_PORTCULLIS));
                CloseDoor(GetData64(GO_WEB_DOOR));
            } else {
                OpenDoor(GetData64(GO_EAST_PORTCULLIS));
                OpenDoor(GetData64(GO_WEB_DOOR));
            }

            if (uiType < MAX_ENCOUNTERS)
            {
                sLog->outBasic("[ToCr] m_auiEncounter[uiType %u] %u = uiData %u;", uiType, m_auiEncounter[uiType], uiData);
                if (uiData == FAIL)
                {
                    if (IsRaidWiped())
                    {
                        --m_uiTrialCounter;
                        m_bNeedSave = true;
                        m_uiEvent = (uiType == TYPE_BEASTS? 666 : 0);
                    }
                    uiData = NOT_STARTED;
                }
                m_auiEncounter[uiType] = uiData;

                if (uiData == DONE || m_bNeedSave == true)
                {
                    if (Unit* pAnnouncer = instance->GetCreature(GetData64(NPC_BARRENT)))
                        pAnnouncer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
                    Save();
                }
            }
        }
开发者ID:AwkwardDev,项目名称:CataOld,代码行数:101,代码来源:instance_trial_of_the_crusader.cpp


示例16: SetData

        void SetData(uint32 type, uint32 data)
        {
            switch(type)
            {
            case BOSS_GRAND_CHAMPIONS:
                m_auiEncounter[0] = data;
                if (data == SPECIAL)
                {
                    for (std::list<uint64>::const_iterator itr = VehicleList.begin(); itr != VehicleList.end(); ++itr)
                        if (Creature* summon = instance->GetCreature(*itr))
                            summon->RemoveFromWorld();
                } else if (data == IN_PROGRESS)
                {
                    for (uint8 i=0; i<3; i++)
                        if (Creature* boss = instance->GetCreature(grandChampionGUID[i]))
                            AggroAllPlayers(boss);
                } else if (data == DONE)
                {
                    DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_ACHIEVEMENT_CHAMPIONS);
                    if (Creature* announcer =  instance->GetCreature(uiAnnouncerGUID))
                    {
                        announcer->GetMotionMaster()->MovePoint(0, 742.742f, 630.207f, 411.172f);
                        announcer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
                        announcer->SummonGameObject(instance->IsHeroic()? GO_CHAMPIONS_LOOT_H : GO_CHAMPIONS_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, 0, 0, 0, 0, 90000000);
                    }
                }
                break;
            case BOSS_ARGENT_CHALLENGE_E:
                m_auiEncounter[1] = data;
                if (data == DONE)
                {
                    if (Creature* announcer = instance->GetCreature(uiAnnouncerGUID))
                    {
                        DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_ACHIEVEMENT_EADRIC);
                        announcer->GetMotionMaster()->MovePoint(0, 742.742f, 630.207f, 411.172f);
                        announcer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
                        announcer->SummonGameObject(instance->IsHeroic()? GO_EADRIC_LOOT_H : GO_EADRIC_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, 0, 0, 0, 0, 90000000);
                    }
                }
                break;
            case BOSS_ARGENT_CHALLENGE_P:
                m_auiEncounter[2] = data;
                if (data == DONE)
                {
                    if (Creature* announcer = instance->GetCreature(uiAnnouncerGUID))
                    {
                        DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_ACHIEVEMENT_PALETRESS);
                        DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_ACHIEVEMENT_MEMORIES);
                        announcer->GetMotionMaster()->MovePoint(0, 742.742f, 630.207f, 411.172f);
                        announcer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
                        announcer->SummonGameObject(instance->IsHeroic()? GO_PALETRESS_LOOT_H : GO_PALETRESS_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, 0, 0, 0, 0, 90000000);
                    }
                }
                break;
            case BOSS_BLACK_KNIGHT:
                m_auiEncounter[3] = data;
                if (data == DONE)
                    DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_ACHIEVEMENT_BLACK_KNIGHT);
                break;
            case DATA_GRAND_CHAMPION_ENTRY:
                for (uint8 i=0; i<3; i++)
                {
                    if (grandChampionEntry[i] == 0)
                    {
                        grandChampionEntry[i] = data;
                        return;
                    }
                }
                break;
            case DATA_MEMORY_ENTRY:
                memoryEntry = data;
                break;
            case DATA_I_VE_HAD_WORSE:
                achievementHadWorse = (bool)data;
                break;
            }

            if (type != DATA_I_VE_HAD_WORSE)
            {
                if (data == DONE || data == FAIL)
                    HandleGameObject(GetData64(DATA_PORTCULLIS), true);
                else if (data == IN_PROGRESS)
                    HandleGameObject(GetData64(DATA_PORTCULLIS), false);

                if (data == DONE)
                    SaveToDB();
            }
        }
开发者ID:Havenard,项目名称:tmpFaceCore,代码行数:88,代码来源:instance_trial_of_the_champion.cpp


示例17: MovementInform

    void MovementInform(Creature* creature, uint32 uiType, uint32 uiPointId)
    {
        if (uiType != POINT_MOTION_TYPE)
            return;

        switch (uiPointId)
        {
        case 0:
            switch (creature->GetEntry())
            {
            case NPC_RIFTWALKER:
                if (Creature* riftTarget = GetCreature(riftTargets[0]))
                {
                    creature->CastSpell(riftTarget, SPELL_OPEN_PORTAL_KJ, false);
                    riftTarget->GetMotionMaster()->MovePoint(0, aOutroLocations[9].m_fX, aOutroLocations[9].m_fY, aOutroLocations[9].m_fZ + 13.0f);
                }
                break;
            case NPC_SOLDIER:
                if (creature->GetGUID() == soldiersGuid[0] || creature->GetGUID() == soldiersGuid[10])
                    creature->SetStandState(UNIT_STAND_STATE_KNEEL);

                if (Creature* portal = GetCreature(portalGuid))
                    creature->SetFacingTo(creature->GetAngle(aOutroLocations[5].m_fX, aOutroLocations[5].m_fY));

                break;
            }
            break;
        case 1:
            switch (creature->GetEntry())
            {
            case NPC_RIFTWALKER:
                if (Creature* riftTarget = GetCreature(riftTargets[1]))
                {
                    creature->CastSpell(riftTarget, SPELL_OPEN_PORTAL_KJ, false);
                    riftTarget->GetMotionMaster()->MovePoint(0, aOutroLocations[10].m_fX, aOutroLocations[10].m_fY, aOutroLocations[10].m_fZ + 13.0f);
                }
                break;
            case NPC_CORE_ENTROPIUS:
                if (Creature* pVelen = GetCreature(prophetGuid))
                    pVelen->InterruptNonMeleeSpells(false);
                break;
            case CREATURE_PROPHET:
                creature->ForcedDespawn(1000);

                // Note: portal should despawn only after all the soldiers have reached this point and "teleported" outside
                if (Creature* pPortal = GetCreature(portalGuid))
                    pPortal->ForcedDespawn(30000);

                for (uint8 i = 0; i < 2; i++)
                {
                    if (Creature* rift = GetCreature(riftGuid[i]))
                        rift->ForcedDespawn(1000);
                }

                if (Creature *controller = GetCreature(GetData64(DATA_KILJAEDEN_CONTROLLER)))
                    controller->ForcedDespawn(300000);
                break;
            }
            break;
        case 2:
            if (creature->GetEntry() == NPC_SOLDIER)
                creature->ForcedDespawn(1000);
            break;
        case 10:
            if (creature->GetEntry() == NPC_SOLDIER)
                 creature->SetFacingTo(SoldierMiddle[0].m_fO);
            break;
        case 11:
            if (creature->GetEntry() == NPC_SOLDIER)
                creature->SetFacingTo(SoldierMiddle[1].m_fO);
            break;
        }
    }
开发者ID:Adeer,项目名称:OregonCore,代码行数:73,代码来源:instance_sunwell_plateau.cpp


示例18: SetBossState


//.........这里部分代码省略.........
                                EventStage = 6000;
                                uint32 tributeChest = 0;
                                if (instance->GetSpawnMode() == RAID_DIFFICULTY_10MAN_HEROIC)
                                {
                                    if (TrialCounter >= 50)
                                        tributeChest = GO_TRIBUTE_CHEST_10H_99;
                                    else
                                    {
                                        if (TrialCounter >= 45)
                                            tributeChest = GO_TRIBUTE_CHEST_10H_50;
                                        else
                                        {
                                            if (TrialCounter >= 25)
                                                tributeChest = GO_TRIBUTE_CHEST_10H_45;
                                            else
                                                tributeChest = GO_TRIBUTE_CHEST_10H_25;
                                        }
                                    }
                                }
                                else if (instance->GetSpawnMode() == RAID_DIFFICULTY_25MAN_HEROIC)
                                {
                                    if (TrialCounter >= 50)
                                        tributeChest = GO_TRIBUTE_CHEST_25H_99;
                                    else
                                    {
                                        if (TrialCounter >= 45)
                                            tributeChest = GO_TRIBUTE_CHEST_25H_50;
                                        else
                                        {
                                            if (TrialCounter >= 25)
                                                tributeChest = GO_TRIBUTE_CHEST_25H_45;
                                            else
                                                tributeChest = GO_TRIBUTE_CHEST_25H_25;
                                        }
                                    }
                                }

                                if (tributeChest)
                                    if (Creature* tirion =  instance->GetCreature(TirionGUID))
                                        if (GameObject* chest = tirion->SummonGameObject(tributeChest, 805.62f, 134.87f, 142.16f, 3.27f, 0, 0, 0, 0, WEEK))
                                            chest->SetRespawnTime(chest->GetRespawnDelay());
                                break;
                            }
                            default:
                                break;
                        }
                        break;
                    default:
                        break;
                }

                if (IsEncounterInProgress())
                {
                    CloseDoor(GetData64(GO_EAST_PORTCULLIS));
                    CloseDoor(GetData64(GO_WEB_DOOR));
                }
                else
                {
                    OpenDoor(GetData64(GO_EAST_PORTCULLIS));
                    OpenDoor(GetData64(GO_WEB_DOOR));
                }

                if (type < MAX_ENCOUNTERS)
                {
                    TC_LOG_INFO(LOG_FILTER_TSCR, "[ToCr] BossState(type %u) %u = state %u;", type, GetBossState(type), state);
                    if (state == FAIL)
                    {
                        if (instance->IsHeroic())
                        {
                            --TrialCounter;
                            // decrease attempt counter at wipe
                            Map::PlayerList const &PlayerList = instance->GetPlayers();
                            for (Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr)
                                if (Player* player = itr->getSource())
                                    player->SendUpdateWorldState(UPDATE_STATE_UI_COUNT, TrialCounter);

                            // if theres no more attemps allowed
                            if (!TrialCounter)
                            {
                                if (Unit* announcer = instance->GetCreature(GetData64(NPC_BARRENT)))
                                    announcer->ToCreature()->DespawnOrUnsummon();

                                if (Creature* anubArak = instance->GetCreature(GetData64(NPC_ANUBARAK)))
                                    anubArak->DespawnOrUnsummon();
                            }
                        }
                        NeedSave = true;
                        EventStage = (type == BOSS_BEASTS ? 666 : 0);
                        state = NOT_STARTED;
                    }

                    if (state == DONE || NeedSave)
                    {
                        if (Unit* announcer = instance->GetCreature(GetData64(NPC_BARRENT)))
                            announcer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
                        Save();
                    }
                }
                return true;
            }
开发者ID:Deewad,项目名称:TrinityCore,代码行数:101,代码来源:instance_trial_of_the_crusader.cpp


示例19: SetData

    void SetData(uint32 idx, uint32 data)
    {
        if (idx == SCARAB_DEATH)
        {
            scarabsDeaths.push_back(time(NULL));
            if (scarabsDeaths.size() >= 40)
            {
                for (int i=0; i<(int)scarabsDeaths.size(); ++i)
                {
                    time_t scarab1 = scarabsDeaths[i];
                    uint32 count = 0;

                    for (int j=0; j<(int)scarabsDeaths.size(); ++j)
                    {
                        if (i == j)
                            continue;

                        time_t scarab2 = scarabsDeaths[j];

                        if ((scarab2 > scarab1 ? scarab2 - scarab1 : scarab1 - scarab2) <= 30)
                            ++count;

                        if (count >= 40)
                        {
                            if (instance->GetSpawnMode() == 0 || instance->GetSpawnMode() == 2)
                                DoCompleteAchievement(3800);
                            if (instance->GetSpawnMode() == 1 || instance->GetSpawnMode() == 3)
                                DoCompleteAchievement(3816);

                            break;
                        }
                    }

                    if (count >= 40)
                        break;
                }
            }

            return;
        }

        if (idx == UPDATE_DEATHS_COUNT)
        {
            ++deathsCount;
            return;
        }

        if (idx == TIME_ACIDMAW_DEAD || idx == TIME_DREADSCALE_DEAD)
        {
            if (idx == TIME_ACIDMAW_DEAD)
                acidmawDead = time(NULL);
            if (idx == TIME_DREADSCALE_DEAD)
                dreadscaleDead = time(NULL);

            if (acidmawDead && dreadscaleDead)
            {
                time_t interval = acidmawDead >= dreadscaleDead ? acidmawDead - dreadscaleDead : dreadscaleDead - acidmawDead;
                if (interval <= 10)
                {
                    //Not One, But Two Jormungars
                    uint32 achi = 0;
                    if (instance->GetSpawnMode() == 0 || instance->GetSpawnMode() == 2) //10 man normal/hero
                        achi = 3936;
                    else if (instance->GetSpawnMode() == 1 || instance->GetSpawnMode() == 3) //25 man normal/hero
                        achi = 3937;

                    if (achi)
                        DoCompleteAchievement(achi);
                }
            }
        }

        if (idx != RESET_TO_FIGHT)
            return;
        else
        {
            //prevent for '--attempts' for multiple function calls (ie in case of wipe during champions fight, when function is called 6-10 times)
            if (GetBossState(data) != FAIL)
            {
                if (attempts)
                    --attempts;
            }

            if (data == DATA_ANUBARAK)
            {
                scarabsDeaths.clear();
                return;
            }
        }

        for (int i=BOSS_GORMOK; i<=BOSS_DARK_TWIN; ++i)
        {
            if (Creature* boss = instance->GetCreature(GetData64(i)))
                boss->DespawnOrUnsummon();
        }

        if (Creature* gadajacy = instance->GetCreature(GetData64(GADAJACY)))
        {
            if (!gadajacy->isAlive())
                gadajacy->Respawn(true);
//.........这里部分代码省略.........
开发者ID:Jekls,项目名称:trinity,代码行数:101,代码来源:instance_trial_of_the_crusader.cpp


示例20: Update

    void Update(uint32 diff)
    {
        // KilJaeden Outro
        if (m_Outrotimer <= diff)
        {
            switch (GetData(DATA_OUTRO_KJ))
            {
                case POINT_KILJAEDEN_DIE:
                    // While Kil'Jaeden die
                    if (Creature* Anveena = GetCreature(GetData64(DATA_ANVEENA)))
                        Anveena->ForcedDespawn(); //this should already be done but let's do it again in case phase was gm rushed

                    m_Outrotimer = 15000;
                    SetData(DATA_OUTRO_KJ, POINT_TELEPORT_KALECGOS);
                    break;
                case POINT_TELEPORT_KALECGOS:
                    if (Creature* pKalec = GetCreature(GetData64(DATA_KALECGOS_KJ)))
                    {
                        pKalec->SetVisible(true);
                        pKalec->CastSpell(pKalec, SPELL_KALEC_TELEPORT, true);
                        pKalec->SendMovementFlagUpdate();
                    }

                    if (Creature* pKJ = GetCreature(GetData64(DATA_KILJAEDEN)))
                        pKJ->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); //allow loot

                    m_Outrotimer = 2000;
                    SetData(DATA_OUTRO_KJ, SAY_KALECGOS_GOODBYE);
                    break;
                case SAY_KALECGOS_GOODBYE:
                    if (Creature* pKalec = GetCreature(GetData64(DATA_KALECGOS_KJ)))
                        DoScriptText(-1580090, pKalec);

                    m_Outrotimer = 15000;
                    SetData(DATA_OUTRO_KJ, POINT_SUMMON_SHATTERED);
                    break;
                case POINT_SUMMON_SHATTERED:
                    if (Creature *controller = GetCreature(GetData64(DATA_KILJAEDEN_CONTROLLER)))
                    {
                        if (Creature* portal = controller->SummonCreature(NPC_BOSS_PORTAL, aOutroLocations[0].m_fX, aOutroLocations[0].m_fY, aOutroLocations[0].m_fZ, aOutroLocations[0].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0))
                            portalGuid = portal->GetGUID();

                        for (uint8 i = 1; i < 3; i++)
                        {
                            if (TempSummon * riftWalker = controller->SummonCreature(NPC_RIFTWALKER, aOutroLocations[i].m_fX, aOutroLocations[i].m_fY, aOutroLocations[i].m_fZ, aOutroLocations[i].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0))
                            {
                                riftGuid[i - 1] = riftWalker->GetGUID();

                                if (i == 1)
                                    riftWalker->GetMotionMaster()->MovePoint(0, aOutroLocations[7].m_fX, aOutroLocations[7].m_fY, aOutroLocations[7].m_fZ);
                                else
                                    riftWalker->GetMotionMaster()->MovePoint(1, aOutroLocations[8].m_fX, aOutroLocations[8].m_fY, aOutroLo 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetDataField函数代码示例发布时间:2022-05-30
下一篇:
C++ GetDIBits函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap