Add basic support for NPCs on transports; DB data required.
Currently no support for combat while the transport is in motion. Based on a patch by Socolin. Fixes issue #168 --HG-- branch : trunk
This commit is contained in:
@@ -52,6 +52,9 @@ MapManager::~MapManager()
|
||||
for (TransportSet::iterator i = m_Transports.begin(); i != m_Transports.end(); ++i)
|
||||
delete *i;
|
||||
|
||||
for (TransportNPCSet::iterator i = m_TransportNPCs.begin(); i != m_TransportNPCs.end(); ++i)
|
||||
delete *i;
|
||||
|
||||
Map::DeleteStateMachine();
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "MapUpdater.h"
|
||||
|
||||
class Transport;
|
||||
struct TransportCreatureProto;
|
||||
|
||||
class MapManager
|
||||
{
|
||||
@@ -125,6 +126,7 @@ class MapManager
|
||||
void DoDelayedMovesAndRemoves();
|
||||
|
||||
void LoadTransports();
|
||||
void LoadTransportNPCs();
|
||||
|
||||
typedef std::set<Transport *> TransportSet;
|
||||
TransportSet m_Transports;
|
||||
@@ -132,6 +134,11 @@ class MapManager
|
||||
typedef std::map<uint32, TransportSet> TransportMap;
|
||||
TransportMap m_TransportsByMap;
|
||||
|
||||
typedef std::set<TransportCreatureProto *> TransportNPCSet;
|
||||
TransportNPCSet m_TransportNPCs;
|
||||
typedef std::map<uint32, TransportNPCSet> TransportNPCMap;
|
||||
TransportNPCMap m_TransportNPCMap;
|
||||
|
||||
bool CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck = false);
|
||||
void RemoveBonesFromMap(uint32 mapid, uint64 guid, float x, float y);
|
||||
uint32 GenerateInstanceId() { return ++i_MaxInstanceId; }
|
||||
|
||||
Reference in New Issue
Block a user