Map local guids 6.x -> 4.3.4
Ported the following commits: https://github.com/TrinityCore/TrinityCore/commit/ca83e14f8b141fab0a13e08f48fca6c1ace0c4c7 https://github.com/TrinityCore/TrinityCore/commit/ee1c1b97be4492ecabe8b15ea6323fc37e4eaa8c https://github.com/TrinityCore/TrinityCore/commit/18e4ab6911468b829b0fc768e532a770263c3717 https://github.com/TrinityCore/TrinityCore/commit/bf37446b3c2ed73b4d3aa9e227d3eff5c53b378b https://github.com/TrinityCore/TrinityCore/commit/cb854a2b7bb7bd96cf9c4d1daf3789f797bf4db8
This commit is contained in:
1 parent
694c89d76d
commit
b3ea9fbbe5
163 files changed
+2448
-2328
No files matched your search
@@ -376,7 +376,7 @@ class boss_prince_keleseth_icc : public CreatureScript
|
||||
|
||||
void InitializeAI() override
|
||||
{
|
||||
if (CreatureData const* data = sObjectMgr->GetCreatureData(me->GetDBTableGUIDLow()))
|
||||
if (CreatureData const* data = sObjectMgr->GetCreatureData(me->GetSpawnId()))
|
||||
if (data->curhealth)
|
||||
_spawnHealth = data->curhealth;
|
||||
|
||||
@@ -591,7 +591,7 @@ class boss_prince_taldaram_icc : public CreatureScript
|
||||
|
||||
void InitializeAI() override
|
||||
{
|
||||
if (CreatureData const* data = sObjectMgr->GetCreatureData(me->GetDBTableGUIDLow()))
|
||||
if (CreatureData const* data = sObjectMgr->GetCreatureData(me->GetSpawnId()))
|
||||
if (data->curhealth)
|
||||
_spawnHealth = data->curhealth;
|
||||
|
||||
@@ -815,7 +815,7 @@ class boss_prince_valanar_icc : public CreatureScript
|
||||
|
||||
void InitializeAI() override
|
||||
{
|
||||
if (CreatureData const* data = sObjectMgr->GetCreatureData(me->GetDBTableGUIDLow()))
|
||||
if (CreatureData const* data = sObjectMgr->GetCreatureData(me->GetSpawnId()))
|
||||
if (data->curhealth)
|
||||
_spawnHealth = data->curhealth;
|
||||
|
||||
|
||||
@@ -492,7 +492,7 @@ public:
|
||||
_caster->CastSpell(_caster, _spellId, true);
|
||||
_caster->GetTransport()->AddObjectToRemoveList();
|
||||
|
||||
if (GameObject* go = HashMapHolder<GameObject>::Find(_otherTransport))
|
||||
if (Transport* go = HashMapHolder<Transport>::Find(_otherTransport))
|
||||
go->AddObjectToRemoveList();
|
||||
|
||||
return true;
|
||||
@@ -770,9 +770,8 @@ class npc_gunship : public CreatureScript
|
||||
|
||||
if (isVictory)
|
||||
{
|
||||
if (GameObject* go = HashMapHolder<GameObject>::Find(instance->GetGuidData(DATA_ICECROWN_GUNSHIP_BATTLE)))
|
||||
if (Transport* otherTransport = go->ToTransport())
|
||||
otherTransport->EnableMovement(true);
|
||||
if (Transport* otherTransport = HashMapHolder<Transport>::Find(instance->GetGuidData(DATA_ICECROWN_GUNSHIP_BATTLE)))
|
||||
otherTransport->EnableMovement(true);
|
||||
|
||||
me->GetTransport()->EnableMovement(true);
|
||||
|
||||
@@ -1035,9 +1034,8 @@ class npc_high_overlord_saurfang_igb : public CreatureScript
|
||||
if (Transport* orgrimsHammer = me->GetTransport())
|
||||
orgrimsHammer->SummonPassenger(NPC_TELEPORT_PORTAL, OrgrimsHammerTeleportPortal, TEMPSUMMON_TIMED_DESPAWN, NULL, 21000);
|
||||
|
||||
if (GameObject* go = HashMapHolder<GameObject>::Find(_instance->GetGuidData(DATA_ICECROWN_GUNSHIP_BATTLE)))
|
||||
if (Transport* skybreaker = go->ToTransport())
|
||||
skybreaker->SummonPassenger(NPC_TELEPORT_EXIT, SkybreakerTeleportExit, TEMPSUMMON_TIMED_DESPAWN, NULL, 23000);
|
||||
if (Transport* skybreaker = HashMapHolder<Transport>::Find(_instance->GetGuidData(DATA_ICECROWN_GUNSHIP_BATTLE)))
|
||||
skybreaker->SummonPassenger(NPC_TELEPORT_EXIT, SkybreakerTeleportExit, TEMPSUMMON_TIMED_DESPAWN, NULL, 23000);
|
||||
|
||||
_events.ScheduleEvent(EVENT_ADDS_BOARD_YELL, 6000);
|
||||
_events.ScheduleEvent(EVENT_ADDS, 60000);
|
||||
@@ -1308,9 +1306,8 @@ class npc_muradin_bronzebeard_igb : public CreatureScript
|
||||
if (Transport* skybreaker = me->GetTransport())
|
||||
skybreaker->SummonPassenger(NPC_TELEPORT_PORTAL, SkybreakerTeleportPortal, TEMPSUMMON_TIMED_DESPAWN, NULL, 21000);
|
||||
|
||||
if (GameObject* go = HashMapHolder<GameObject>::Find(_instance->GetGuidData(DATA_ICECROWN_GUNSHIP_BATTLE)))
|
||||
if (Transport* orgrimsHammer = go->ToTransport())
|
||||
orgrimsHammer->SummonPassenger(NPC_TELEPORT_EXIT, OrgrimsHammerTeleportExit, TEMPSUMMON_TIMED_DESPAWN, NULL, 23000);
|
||||
if (Transport* orgrimsHammer = HashMapHolder<Transport>::Find(_instance->GetGuidData(DATA_ICECROWN_GUNSHIP_BATTLE)))
|
||||
orgrimsHammer->SummonPassenger(NPC_TELEPORT_EXIT, OrgrimsHammerTeleportExit, TEMPSUMMON_TIMED_DESPAWN, NULL, 23000);
|
||||
|
||||
_events.ScheduleEvent(EVENT_ADDS_BOARD_YELL, 6000);
|
||||
_events.ScheduleEvent(EVENT_ADDS, 60000);
|
||||
@@ -1454,9 +1451,8 @@ struct npc_gunship_boarding_addAI : public gunship_npc_AI
|
||||
if (!myTransport)
|
||||
return;
|
||||
|
||||
if (GameObject* go = HashMapHolder<GameObject>::Find(Instance->GetGuidData(DATA_ICECROWN_GUNSHIP_BATTLE)))
|
||||
if (Transport* destTransport = go->ToTransport())
|
||||
destTransport->CalculatePassengerPosition(x, y, z, &o);
|
||||
if (Transport* destTransport = HashMapHolder<Transport>::Find(Instance->GetGuidData(DATA_ICECROWN_GUNSHIP_BATTLE)))
|
||||
destTransport->CalculatePassengerPosition(x, y, z, &o);
|
||||
|
||||
float angle = frand(0, float(M_PI) * 2.0f);
|
||||
x += 2.0f * std::cos(angle);
|
||||
@@ -2352,7 +2348,7 @@ class spell_igb_gunship_fall_teleport : public SpellScriptLoader
|
||||
void SelectTransport(WorldObject*& target)
|
||||
{
|
||||
if (InstanceScript* instance = target->GetInstanceScript())
|
||||
target = HashMapHolder<GameObject>::Find(instance->GetGuidData(DATA_ICECROWN_GUNSHIP_BATTLE));
|
||||
target = HashMapHolder<Transport>::Find(instance->GetGuidData(DATA_ICECROWN_GUNSHIP_BATTLE));
|
||||
}
|
||||
|
||||
void RelocateDest(SpellEffIndex /*effIndex*/)
|
||||
|
||||
@@ -648,7 +648,7 @@ class npc_spinestalker : public CreatureScript
|
||||
// Increase add count
|
||||
if (!me->isDead())
|
||||
{
|
||||
_instance->SetData(DATA_SINDRAGOSA_FROSTWYRMS, me->GetDBTableGUIDLow()); // this cannot be in Reset because reset also happens on evade
|
||||
_instance->SetData(DATA_SINDRAGOSA_FROSTWYRMS, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
|
||||
Reset();
|
||||
}
|
||||
}
|
||||
@@ -671,7 +671,7 @@ class npc_spinestalker : public CreatureScript
|
||||
void JustRespawned() override
|
||||
{
|
||||
ScriptedAI::JustRespawned();
|
||||
_instance->SetData(DATA_SINDRAGOSA_FROSTWYRMS, me->GetDBTableGUIDLow()); // this cannot be in Reset because reset also happens on evade
|
||||
_instance->SetData(DATA_SINDRAGOSA_FROSTWYRMS, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
@@ -784,7 +784,7 @@ class npc_rimefang : public CreatureScript
|
||||
// Increase add count
|
||||
if (!me->isDead())
|
||||
{
|
||||
_instance->SetData(DATA_SINDRAGOSA_FROSTWYRMS, me->GetDBTableGUIDLow()); // this cannot be in Reset because reset also happens on evade
|
||||
_instance->SetData(DATA_SINDRAGOSA_FROSTWYRMS, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
|
||||
Reset();
|
||||
}
|
||||
}
|
||||
@@ -807,7 +807,7 @@ class npc_rimefang : public CreatureScript
|
||||
void JustRespawned() override
|
||||
{
|
||||
ScriptedAI::JustRespawned();
|
||||
_instance->SetData(DATA_SINDRAGOSA_FROSTWYRMS, me->GetDBTableGUIDLow()); // this cannot be in Reset because reset also happens on evade
|
||||
_instance->SetData(DATA_SINDRAGOSA_FROSTWYRMS, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
@@ -951,7 +951,7 @@ class npc_sindragosa_trash : public CreatureScript
|
||||
if (!me->isDead())
|
||||
{
|
||||
if (me->GetEntry() == NPC_FROSTWING_WHELP)
|
||||
_instance->SetData(_frostwyrmId, me->GetDBTableGUIDLow()); // this cannot be in Reset because reset also happens on evade
|
||||
_instance->SetData(_frostwyrmId, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
|
||||
Reset();
|
||||
}
|
||||
}
|
||||
@@ -974,7 +974,7 @@ class npc_sindragosa_trash : public CreatureScript
|
||||
|
||||
// Increase add count
|
||||
if (me->GetEntry() == NPC_FROSTWING_WHELP)
|
||||
_instance->SetData(_frostwyrmId, me->GetDBTableGUIDLow()); // this cannot be in Reset because reset also happens on evade
|
||||
_instance->SetData(_frostwyrmId, me->GetSpawnId()); // this cannot be in Reset because reset also happens on evade
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data) override
|
||||
|
||||
@@ -156,7 +156,7 @@ class RisenArchmageCheck
|
||||
bool operator()(Creature* creature)
|
||||
{
|
||||
return creature->IsAlive() && creature->GetEntry() == NPC_RISEN_ARCHMAGE &&
|
||||
creature->GetDBTableGUIDLow() && !creature->IsInCombat();
|
||||
creature->GetSpawnId() && !creature->IsInCombat();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -244,7 +244,7 @@ class ValithriaDespawner : public BasicEvent
|
||||
creature->DespawnOrUnsummon();
|
||||
return;
|
||||
case NPC_RISEN_ARCHMAGE:
|
||||
if (!creature->GetDBTableGUIDLow())
|
||||
if (!creature->GetSpawnId())
|
||||
{
|
||||
creature->DespawnOrUnsummon();
|
||||
return;
|
||||
@@ -297,7 +297,7 @@ class boss_valithria_dreamwalker : public CreatureScript
|
||||
|
||||
void InitializeAI() override
|
||||
{
|
||||
if (CreatureData const* data = sObjectMgr->GetCreatureData(me->GetDBTableGUIDLow()))
|
||||
if (CreatureData const* data = sObjectMgr->GetCreatureData(me->GetSpawnId()))
|
||||
if (data->curhealth)
|
||||
_spawnHealth = data->curhealth;
|
||||
|
||||
@@ -712,7 +712,7 @@ class npc_risen_archmage : public CreatureScript
|
||||
void EnterCombat(Unit* /*target*/) override
|
||||
{
|
||||
me->FinishSpell(CURRENT_CHANNELED_SPELL, false);
|
||||
if (me->GetDBTableGUIDLow() && _canCallEnterCombat)
|
||||
if (me->GetSpawnId() && _canCallEnterCombat)
|
||||
{
|
||||
std::list<Creature*> archmages;
|
||||
RisenArchmageCheck check;
|
||||
@@ -750,7 +750,7 @@ class npc_risen_archmage : public CreatureScript
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!me->IsInCombat())
|
||||
if (me->GetDBTableGUIDLow())
|
||||
if (me->GetSpawnId())
|
||||
if (!me->GetCurrentSpell(CURRENT_CHANNELED_SPELL))
|
||||
DoCast(me, SPELL_CORRUPTION);
|
||||
|
||||
|
||||
@@ -545,7 +545,7 @@ class npc_highlord_tirion_fordring_lh : public CreatureScript
|
||||
case EVENT_MURADIN_RUN:
|
||||
case EVENT_SAURFANG_RUN:
|
||||
if (Creature* factionNPC = ObjectAccessor::GetCreature(*me, _factionNPC))
|
||||
factionNPC->GetMotionMaster()->MovePath(factionNPC->GetDBTableGUIDLow()*10, false);
|
||||
factionNPC->GetMotionMaster()->MovePath(factionNPC->GetSpawnId()*10, false);
|
||||
me->setActive(false);
|
||||
_damnedKills = 3;
|
||||
break;
|
||||
|
||||
@@ -417,14 +417,14 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
|
||||
if (creature->AI()->GetData(1/*DATA_FROSTWYRM_OWNER*/) == DATA_SPINESTALKER)
|
||||
{
|
||||
SpinestalkerTrash.erase(creature->GetDBTableGUIDLow());
|
||||
SpinestalkerTrash.erase(creature->GetSpawnId());
|
||||
if (SpinestalkerTrash.empty())
|
||||
if (Creature* spinestalk = instance->GetCreature(SpinestalkerGUID))
|
||||
spinestalk->AI()->DoAction(ACTION_START_FROSTWYRM);
|
||||
}
|
||||
else
|
||||
{
|
||||
RimefangTrash.erase(creature->GetDBTableGUIDLow());
|
||||
RimefangTrash.erase(creature->GetSpawnId());
|
||||
if (RimefangTrash.empty())
|
||||
if (Creature* spinestalk = instance->GetCreature(RimefangGUID))
|
||||
spinestalk->AI()->DoAction(ACTION_START_FROSTWYRM);
|
||||
@@ -439,7 +439,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
if (GetBossState(DATA_SINDRAGOSA) == DONE)
|
||||
return;
|
||||
|
||||
FrostwyrmGUIDs.erase(creature->GetDBTableGUIDLow());
|
||||
FrostwyrmGUIDs.erase(creature->GetSpawnId());
|
||||
if (FrostwyrmGUIDs.empty())
|
||||
{
|
||||
instance->LoadGrid(SindragosaSpawnPos.GetPositionX(), SindragosaSpawnPos.GetPositionY());
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
void SpawnGameObject(uint32 entry, Position const& pos)
|
||||
{
|
||||
GameObject* go = new GameObject();
|
||||
if (!go->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), entry, instance,
|
||||
if (!go->Create(instance->GenerateLowGuid<HighGuid::GameObject>(), entry, instance,
|
||||
PHASEMASK_NORMAL, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(),
|
||||
0, 0, 0, 0, 120, GO_STATE_READY))
|
||||
{
|
||||
|
||||
@@ -248,7 +248,7 @@ class spell_ioc_launch : public SpellScriptLoader
|
||||
x = GetExplTargetDest()->GetPositionX();
|
||||
y = GetExplTargetDest()->GetPositionY();
|
||||
z = GetExplTargetDest()->GetPositionZ();
|
||||
GetCaster()->ToCreature()->m_Events.AddEvent(new StartLaunchEvent(x, y, z, GetHitPlayer()->GetGUIDLow()), GetCaster()->ToCreature()->m_Events.CalculateTime(2500));
|
||||
GetCaster()->ToCreature()->m_Events.AddEvent(new StartLaunchEvent(x, y, z, GetHitPlayer()->GetGUID().GetCounter()), GetCaster()->ToCreature()->m_Events.CalculateTime(2500));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
Reference in new issue
Block a user