From 07fa1bcbdfe65def200c640a6f3e52b755c3b603 Mon Sep 17 00:00:00 2001 From: linencloth Date: Sun, 24 Oct 2010 02:55:50 +0200 Subject: Core/Creature: Implement FarTeleportTo (teleport to an other map) Core/Transport: Cleanup and optimize transport and passenger handling - Only transports will be active objects - Reduced cpu and memory usage - Using FarTeleportTo for creature passengers at transport teleportation - Creatures won't be recreated on teleport --HG-- branch : trunk --- src/server/game/Chat/Commands/Level2.cpp | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'src/server/game/Chat') diff --git a/src/server/game/Chat/Commands/Level2.cpp b/src/server/game/Chat/Commands/Level2.cpp index 8bb73d2c4dd..2e52a9e5c96 100755 --- a/src/server/game/Chat/Commands/Level2.cpp +++ b/src/server/game/Chat/Commands/Level2.cpp @@ -965,22 +965,8 @@ bool ChatHandler::HandleNpcAddCommand(const char* args) { uint32 tguid = chr->GetTransport()->AddNPCPassenger(0, id, chr->GetTransOffsetX(), chr->GetTransOffsetY(), chr->GetTransOffsetZ(), chr->GetTransOffsetO()); if (tguid > 0) - { WorldDatabase.PQuery("INSERT INTO creature_transport (guid, npc_entry, transport_entry, TransOffsetX, TransOffsetY, TransOffsetZ, TransOffsetO) values (%u, %u, %f, %f, %f, %f, %u)", tguid, id, chr->GetTransport()->GetEntry(), chr->GetTransOffsetX(), chr->GetTransOffsetY(), chr->GetTransOffsetZ(), chr->GetTransOffsetO()); - TransportCreatureProto *transportCreatureProto = new TransportCreatureProto; - transportCreatureProto->guid = tguid; - transportCreatureProto->npc_entry = id; - uint32 transportEntry = chr->GetTransport()->GetEntry(); - transportCreatureProto->TransOffsetX = chr->GetTransOffsetX(); - transportCreatureProto->TransOffsetY = chr->GetTransOffsetY(); - transportCreatureProto->TransOffsetZ = chr->GetTransOffsetZ(); - transportCreatureProto->TransOffsetO = chr->GetTransOffsetO(); - transportCreatureProto->emote = 0; - - sMapMgr.m_TransportNPCMap[transportEntry].insert(transportCreatureProto); - sMapMgr.m_TransportNPCs.insert(transportCreatureProto); - } return true; } -- cgit v1.2.3