本文整理汇总了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;
}
}
示例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;
}
示例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)
{
}
}
示例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);
}
}
示例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);
}
}
}
示例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);
}
}
示例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);
}
}
示例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());
}
}
}
示例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);
}
}
}
示例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);
}
示例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;
}
}
示例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;
}
}
}
}
示例13: OnDestroy
void OnDestroy(InstanceMap* pMap)
{
if (Creature* weakSpot = instance->GetCreature(GetData64(NPC_WEAK_SPOT)))
weakSpot->_ExitVehicle();
}
示例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;
}
}
}
示例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();
}
}
}