Core/Transports: undo all custom transport changes as preparation for cherry picks
This commit is contained in:
1 parent
74c60fa456
commit
6e9ec1a4bf
46 files changed
+618
-1469
No files matched your search
@@ -26,71 +26,6 @@
|
||||
#include "ObjectMgr.h"
|
||||
#include "SpellInfo.h"
|
||||
|
||||
enum DeeprunTram
|
||||
{
|
||||
MAP_DEEPRUN_TRAM = 369,
|
||||
|
||||
GO_SUBWAY = 176080,
|
||||
MAX_SUBWAY_COUNT = 6
|
||||
};
|
||||
|
||||
Position const SubwaysPos[MAX_SUBWAY_COUNT] =
|
||||
{
|
||||
{ 4.580650f, 28.20970f, 7.01107f, 1.5708f },
|
||||
{ 4.528070f, 8.435290f, 7.01107f, 1.5708f },
|
||||
{ -45.4005f, 2492.790f, 6.98860f, 1.5708f },
|
||||
{ -45.4007f, 2512.150f, 6.98860f, 1.5708f },
|
||||
{ -45.3934f, 2472.930f, 6.98860f, 1.5708f },
|
||||
{ 4.498830f, -11.3475f, 7.01107f, 1.5708f }
|
||||
};
|
||||
|
||||
static QuaternionData worldRotation = QuaternionData(0.0f, 0.0f, 0.7071066f, 0.7071069f);
|
||||
static QuaternionData parentRotation = QuaternionData(0.0f, 0.0f, 1.0f, -0.0000000437114f);
|
||||
|
||||
class world_map_deeprun_tram: public WorldMapScript
|
||||
{
|
||||
public:
|
||||
world_map_deeprun_tram() : WorldMapScript("world_map_deeprun_tram", MAP_DEEPRUN_TRAM)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
_initializedTrams = false;
|
||||
}
|
||||
|
||||
void OnPlayerEnter(Map* map, Player* /*player*/) override
|
||||
{
|
||||
if (!_initializedTrams)
|
||||
{
|
||||
_initializedTrams = true;
|
||||
|
||||
for (uint8 i = 0; i < MAX_SUBWAY_COUNT; ++i)
|
||||
{
|
||||
GameObject* transport = new Transport();
|
||||
|
||||
if (!transport->Create(map->GenerateLowGuid<HighGuid::Transport>(), GO_SUBWAY + i, map, SubwaysPos[i], worldRotation, 255, GO_STATE_READY))
|
||||
{
|
||||
delete transport;
|
||||
continue;
|
||||
}
|
||||
|
||||
transport->SetParentRotation(parentRotation);
|
||||
|
||||
uint32 spawnId = sObjectMgr->GenerateGameObjectSpawnId();
|
||||
transport->SetSpawnId(spawnId);
|
||||
|
||||
transport->setActive(true);
|
||||
transport->SetFarVisible(true);
|
||||
map->AddToMap(transport);
|
||||
}
|
||||
}
|
||||
}
|
||||
private:
|
||||
bool _initializedTrams;
|
||||
};
|
||||
|
||||
enum Gilneas
|
||||
{
|
||||
MAP_GILNEAS = 654,
|
||||
@@ -162,6 +97,5 @@ class world_map_gilneas: public WorldMapScript
|
||||
|
||||
void AddSC_world_map_scripts()
|
||||
{
|
||||
new world_map_deeprun_tram();
|
||||
new world_map_gilneas();
|
||||
}
|
||||
Reference in new issue
Block a user