當前位置: 首頁>>代碼示例>>C++>>正文


C++ GetData64函數代碼示例

本文整理匯總了C++中GetData64函數的典型用法代碼示例。如果您正苦於以下問題:C++ GetData64函數的具體用法?C++ GetData64怎麽用?C++ GetData64使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了GetData64函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的GetData64函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。