[SD2] Explicit conversion ObjectGuid to uint64 (gcc build fix)

This commit is contained in:
Olion 2015-04-01 10:14:18 +03:00
parent e28a446f24
commit e842daa30a
14 changed files with 19 additions and 19 deletions

View File

@ -279,7 +279,7 @@ struct spell_go_black_dragon_egg : public SpellScript
}
// Store the eggs which are destroyed, in order to count them for the second phase
pInstance->SetData64(DATA_DRAGON_EGG, pGOTarget->GetObjectGuid());
pInstance->SetData64(DATA_DRAGON_EGG, pGOTarget->GetObjectGuid().GetRawValue());
}
return true;

View File

@ -171,7 +171,7 @@ struct boss_gothik : public CreatureScript
{
if (Player* pPlayer = itr->getSource())
{
m_pInstance->SetData64(TYPE_SIGNAL_4, uint64(pPlayer->GetObjectGuid()));
m_pInstance->SetData64(TYPE_SIGNAL_4, pPlayer->GetObjectGuid().GetRawValue());
if (!m_pInstance->GetData(TYPE_SIGNAL_4) && pPlayer->IsAlive())
{
return true;
@ -314,7 +314,7 @@ struct boss_gothik : public CreatureScript
return;
}
m_pInstance->SetData64(TYPE_SIGNAL_6, uint64(pSummoned->GetObjectGuid()));
m_pInstance->SetData64(TYPE_SIGNAL_6, pSummoned->GetObjectGuid().GetRawValue());
if (Creature* pAnchor = m_pInstance->instance->GetCreature(ObjectGuid(m_pInstance->GetData64(TYPE_SIGNAL_6))))
{
switch (pSummoned->GetEntry())
@ -443,7 +443,7 @@ struct boss_gothik : public CreatureScript
case PHASE_TELEPORTING: // Phase is only reached if m_pInstance is valid
if (m_uiTeleportTimer < uiDiff)
{
m_pInstance->SetData64(TYPE_SIGNAL_7, uint64(m_creature->GetObjectGuid()));
m_pInstance->SetData64(TYPE_SIGNAL_7, m_creature->GetObjectGuid().GetRawValue());
uint32 uiTeleportSpell = m_pInstance->GetData(TYPE_SIGNAL_7) ? SPELL_TELEPORT_LEFT : SPELL_TELEPORT_RIGHT;
if (DoCastSpellIfCan(m_creature, uiTeleportSpell) == CAST_OK)
{
@ -555,7 +555,7 @@ struct spell_anchor : public SpellScript
{
return true;
}
pInstance->SetData64(TYPE_SIGNAL_2, pCreatureTarget->GetObjectGuid());
pInstance->SetData64(TYPE_SIGNAL_2, pCreatureTarget->GetObjectGuid().GetRawValue());
pInstance->SetData(TYPE_SIGNAL_2, uiSpellId);

View File

@ -300,7 +300,7 @@ struct boss_heigan : public CreatureScript
continue;
}
m_pInstance->SetData64(TYPE_SIGNAL_8, uint64(m_creature->GetObjectGuid()));
m_pInstance->SetData64(TYPE_SIGNAL_8, m_creature->GetObjectGuid().GetRawValue());
m_pInstance->SetData(TYPE_SIGNAL_8, uiArea);
//m_pInstance->DoTriggerHeiganTraps(m_creature, uiArea);
}

View File

@ -783,12 +783,12 @@ struct is_naxxramas : public InstanceScript
++(const_cast<instance_naxxramas*>(this))->gtit;
if (gtit == m_mGothTriggerMap.cend())
return 0;
return uint64(gtit->first);
return gtit->first.GetRawValue();
}
break;
case TYPE_SIGNAL_6: //the same design flaw...
if (Creature *anchor = (const_cast<instance_naxxramas*>(this))->GetClosestAnchorForGoth(instance->GetCreature(ObjectGuid(m_tempCreatureGuid)), true))
return uint64(anchor->GetObjectGuid());
return anchor->GetObjectGuid().GetRawValue();
}
return 0;
}

View File

@ -483,7 +483,7 @@ struct npc_deathstalker_faerleia : public CreatureScript
if (npc_deathstalker_faerleiaAI* pFaerleiaAI = dynamic_cast<npc_deathstalker_faerleiaAI*>(pCreature->AI()))
{
pFaerleiaAI->StartEvent(pPlayer->GetObjectGuid());
pFaerleiaAI->StartEvent(pPlayer->GetObjectGuid().GetRawValue());
return true;
}
}

View File

@ -186,7 +186,7 @@ struct boss_archaedas : public CreatureScript
{
if (m_uiAwakeDwarfTimer < uiDiff)
{
m_pInstance->SetData64(TYPE_SIGNAL, uint64(m_creature->GetObjectGuid()));
m_pInstance->SetData64(TYPE_SIGNAL, m_creature->GetObjectGuid().GetRawValue());
if (Creature* pEarthen = m_pInstance->instance->GetCreature(ObjectGuid(m_pInstance->GetData64(TYPE_SIGNAL))))
{
if (DoCastSpellIfCan(pEarthen, SPELL_AWAKEN_EARTHEN_DWARF) == CAST_OK)

View File

@ -260,7 +260,7 @@ struct is_uldaman : public InstanceScript
case DATA_EVENT_STARTER:
return m_playerGuid.GetRawValue();
case TYPE_SIGNAL:
return GetClosestDwarfNotInCombat() ? GetClosestDwarfNotInCombat()->GetObjectGuid() : 0;
return GetClosestDwarfNotInCombat() ? GetClosestDwarfNotInCombat()->GetObjectGuid().GetRawValue() : 0;
}
return 0;
}
@ -385,7 +385,7 @@ struct event_spell_altar_boss_aggro : public MapEventScript
{
if (InstanceData* pInstance = ((Player*)pSource)->GetInstanceData())
{
pInstance->SetData64(DATA_EVENT_STARTER, pSource->GetObjectGuid());
pInstance->SetData64(DATA_EVENT_STARTER, pSource->GetObjectGuid().GetRawValue());
pInstance->SetData(TYPE_SIGNAL, uiEventId);
//pInstance->StartEvent(uiEventId, (Player*)pSource);
return true;

View File

@ -202,7 +202,7 @@ struct is_zulgurub : public InstanceScript
case TYPE_SIGNAL_2:
case TYPE_SIGNAL_3:
if (Creature *p = (const_cast<instance_zulgurub*>(this))->SelectRandomPantherTrigger(type == TYPE_SIGNAL_2))
return uint64(p->GetObjectGuid());
return p->GetObjectGuid().GetRawValue();
break;
default:
break;

View File

@ -324,7 +324,7 @@ struct go_tutenkash_gong : public GameObjectScript
{
if (ScriptedInstance *m_pInstance = (ScriptedInstance*)pPlayer->GetInstanceData())
{
m_pInstance->SetData64(TYPE_GONG_USED, uint64(pPlayer->GetObjectGuid()));
m_pInstance->SetData64(TYPE_GONG_USED, pPlayer->GetObjectGuid().GetRawValue());
//m_pInstance->SetData(TYPE_GONG_USED, 0); called from SetData64 now
}

View File

@ -219,7 +219,7 @@ struct npc_general_andorov : public CreatureScript
void DoInitializeFollowers()
{
if (m_pInstance)
m_pInstance->SetData64(TYPE_SIGNAL, uint64(m_creature->GetObjectGuid())); //implemented in the instance script
m_pInstance->SetData64(TYPE_SIGNAL, m_creature->GetObjectGuid().GetRawValue()); //implemented in the instance script
}
// Wrapper to start the event

View File

@ -322,7 +322,7 @@ struct npc_piznik : public CreatureScript
{
if (npc_piznikAI* ppiznikAI = dynamic_cast<npc_piznikAI*>(pCreature->AI()))
{
ppiznikAI->StartEvent(pPlayer->GetObjectGuid());
ppiznikAI->StartEvent(pPlayer->GetObjectGuid().GetRawValue());
}
}
return true;

View File

@ -1173,7 +1173,7 @@ struct npc_regthar_deathgate : public CreatureScript
DoScriptText(SAY_START_REGTHAR, pCreature, pPlayer);
pPlayer->CLOSE_GOSSIP_MENU();
if (npc_regthar_deathgateAI* pRegtharAI = dynamic_cast<npc_regthar_deathgateAI*>(pCreature->AI()))
pRegtharAI->StartEvent(pPlayer->GetObjectGuid());
pRegtharAI->StartEvent(pPlayer->GetObjectGuid().GetRawValue());
}
return true;
}

View File

@ -141,7 +141,7 @@ struct boss_zumrah : public CreatureScript
if (m_uiSpawnZombieTimer <= uiDiff)
{
// Use a nearby grave to spawn zombies
m_pInstance->SetData64(TYPE_SIGNAL, uint64(m_creature->GetObjectGuid()));
m_pInstance->SetData64(TYPE_SIGNAL, m_creature->GetObjectGuid().GetRawValue());
if (GameObject* pGrave = m_pInstance->instance->GetGameObject(ObjectGuid(m_pInstance->GetData64(TYPE_SIGNAL))))
{
m_creature->CastSpell(pGrave->GetPositionX(), pGrave->GetPositionY(), pGrave->GetPositionZ(), SPELL_SUMMON_ZOMBIES, true, NULL, NULL, pGrave->GetObjectGuid());

View File

@ -378,7 +378,7 @@ struct is_zulfarrak : public InstanceScript
// Sort the graves
lGravesInRange.sort(ObjectDistanceOrder(searcher));
return (*lGravesInRange.begin())->GetObjectGuid();
return (*lGravesInRange.begin())->GetObjectGuid().GetRawValue();
}
uint32 m_auiEncounter[MAX_ENCOUNTER];