Shauren/TrinityCore — comment on commit 521c3fc656c4fab5c9400b8fcaa4f09f2e8a845c
File:  line 0
By Kapoeira:

Compile fix for your branch:

```diff

commit 070c149d2385281e4414870c0f182c58335f5f2a
Author: Ridley <404@notfound.com>
Date: Sat Oct 15 19:59:50 2011 +0000

Fixed compile since the merge.

diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp
index 5bf4705..070245a 100755
--- a/src/server/game/Entities/Transport/Transport.cpp
+++ b/src/server/game/Entities/Transport/Transport.cpp
@@ -26,6 +26,7 @@
#include "DBCStores.h"
#include "World.h"
#include "GameObjectAI.h"
+#include "Vehicle.h"

Transport::Transport() : GameObject(), _isStopped(false)
{
@@ -41,7 +42,7 @@ Transport::~Transport()
{
Map* map = passenger->GetMap();
passenger->CleanupsBeforeDelete();
- map->Remove(passenger, true);
+ map->RemoveFromMap(passenger, true);
}
}

@@ -386,7 +387,7 @@ Creature* Transport::CreateNPCPassenger(uint32 entry, float x, float y, float z,
}

creature->setActive(true);
- map->Add(creature);
+ map->AddToMap(creature);
AddPassenger(creature);

sScriptMgr->OnAddCreaturePassenger(this, creature);
diff --git a/src/server/game/Maps/TransportMgr.cpp b/src/server/game/Maps/TransportMgr.cpp
index 12393ec..79b0eba 100644
--- a/src/server/game/Maps/TransportMgr.cpp
+++ b/src/server/game/Maps/TransportMgr.cpp
@@ -60,7 +60,7 @@ void TransportMgr::LoadTransportTemplates()
{
Field* fields = result->Fetch();
uint32 entry = fields[0].GetUInt32();
- GameObjectInfo const* goInfo = ObjectMgr::GetGameObjectInfo(entry);
+ GameObjectTemplate const* goInfo = sObjectMgr->GetGameObjectTemplate(entry);
if (goInfo->moTransport.taxiPathId >= sTaxiPathNodesByPath.size())
{
sLog->outErrorDb("Transport %u (name: %s) has an invalid path specified in `gameobject_template`.`data0` (%u) field, skipped.", entry, goInfo->name, goInfo->moTransport.taxiPathId);
@@ -82,7 +82,7 @@ void TransportMgr::LoadTransportTemplates()
sLog->outString();
}

-void TransportMgr::GeneratePath(GameObjectInfo const* goInfo, TransportTemplate* transport)
+void TransportMgr::GeneratePath(GameObjectTemplate const* goInfo, TransportTemplate* transport)
{
uint32 pathId = goInfo->moTransport.taxiPathId;
TaxiPathNodeList const& path = sTaxiPathNodesByPath[pathId];
@@ -362,7 +362,7 @@ void TransportMgr::SpawnContinentTransports()
uint32 count = 0;
for (TransportTemplates::const_iterator itr = _transportTemplates.begin(); itr != _transportTemplates.end(); ++itr)
// we can safely do this, verified on startup
- if (!ObjectMgr::GetGameObjectInfo(itr->first)->moTransport.inInstance)
+ if (!sObjectMgr->GetGameObjectTemplate(itr->first)->moTransport.inInstance)
if (CreateTransport(itr->first))
++count;

diff --git a/src/server/game/Maps/TransportMgr.h b/src/server/game/Maps/TransportMgr.h
index 473cf77..f6afbcc 100644
--- a/src/server/game/Maps/TransportMgr.h
+++ b/src/server/game/Maps/TransportMgr.h
@@ -21,7 +21,7 @@
#include

struct KeyFrame;
-struct GameObjectInfo;
+struct GameObjectTemplate;
struct TransportTemplate;
class Transport;

@@ -109,7 +109,7 @@ class TransportMgr
TransportMgr& operator=(TransportMgr const&);

// Generates and precaches a path for transport to avoid generation each time transport instance is created
- void GeneratePath(GameObjectInfo const* goInfo, TransportTemplate* transport);
+ void GeneratePath(GameObjectTemplate const* goInfo, TransportTemplate* transport);

// Container storing transport templates
TransportTemplates _transportTemplates;
diff --git a/src/server/scripts/Northrend/CMakeLists.txt b/src/server/scripts/Northrend/CMakeLists.txt
index 63e714d..2749c54 100644
--- a/src/server/scripts/Northrend/CMakeLists.txt
+++ b/src/server/scripts/Northrend/CMakeLists.txt
@@ -165,6 +165,7 @@ set(scripts_STAT_SRCS
Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
+ Northrend/IcecrownCitadel/boss_the_gunship_battle.cpp
Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
Northrend/IcecrownCitadel/boss_festergut.cpp
Northrend/IcecrownCitadel/boss_rotface.cpp
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
index 7d9b913..e34f89d 100755
--- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
@@ -171,7 +171,7 @@ class instance_icecrown_citadel : public InstanceMapScript
{
CreatedInitialTransports = true;
CanCreateTransports = true;
- sTransportMgr->CreateTransport(teamInInstance == HORDE ? GO_ORGRIM_S_HAMMER_HORDE_ICC : GO_THE_SKYBREAKER_ALLIANCE_ICC, instance);
+ sTransportMgr->CreateTransport(TeamInInstance == HORDE ? GO_ORGRIM_S_HAMMER_HORDE_ICC : GO_THE_SKYBREAKER_ALLIANCE_ICC, instance);
CanCreateTransports = false;
}
}
@@ -978,24 +978,6 @@ class instance_icecrown_citadel : public InstanceMapScript
return false;
}

- void ProcessEvent(GameObject* go, uint32 eventId)
- {
- if (Transport* trans = go->ToTransport())
- {
- switch (eventId)
- {
- // Orgrim's Hammer
- case 22663: // spawnpoint
- case 22664: // battle
- case 22665: // at saurfang
- trans->BuildStopMovePacket(instance);
- break;
- default:
- break;
- }
- }
- }
-
bool CheckRequiredBosses(uint32 bossId, Player const* player = NULL) const
{
if (player && AccountMgr::IsGMAccount(player->GetSession()->GetSecurity()))
@@ -1241,7 +1223,7 @@ class instance_icecrown_citadel : public InstanceMapScript
}
}

- void ProcessEvent(WorldObject* /*source*/, uint32 eventId)
+ void ProcessEvent(WorldObject* source, uint32 eventId)
{
switch (eventId)
{
@@ -1277,6 +1259,14 @@ class instance_icecrown_citadel : public InstanceMapScript
}
}
break;
+ // Orgrim's Hammer
+ case 22663: // spawnpoint
+ case 22664: // battle
+ case 22665: // at saurfang
+ if (GameObject* go = source->ToGameObject())
+ if (Transport* t = go->ToTransport())
+ t->BuildStopMovePacket(instance);
+ break;
}
}

```