Added ScriptName to transports table for script system rewrite
--HG-- branch : trunk
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
|
||||
void MapManager::LoadTransports()
|
||||
{
|
||||
QueryResult_AutoPtr result = WorldDatabase.Query("SELECT entry, name, period FROM transports");
|
||||
QueryResult_AutoPtr result = WorldDatabase.Query("SELECT entry, name, period, ScriptName FROM transports");
|
||||
|
||||
uint32 count = 0;
|
||||
|
||||
@@ -60,6 +60,7 @@ void MapManager::LoadTransports()
|
||||
uint32 entry = fields[0].GetUInt32();
|
||||
std::string name = fields[1].GetCppString();
|
||||
t->m_period = fields[2].GetUInt32();
|
||||
t->ScriptId = objmgr.GetScriptId(fields[3].GetString());
|
||||
|
||||
const GameObjectInfo *goinfo = objmgr.GetGameObjectInfo(entry);
|
||||
|
||||
@@ -182,6 +183,7 @@ void MapManager::LoadTransportNPCs()
|
||||
Transport::Transport() : GameObject()
|
||||
{
|
||||
m_updateFlag = (UPDATEFLAG_TRANSPORT | UPDATEFLAG_HIGHGUID | UPDATEFLAG_HAS_POSITION | UPDATEFLAG_ROTATION);
|
||||
ScriptId = 0;
|
||||
}
|
||||
|
||||
bool Transport::Create(uint32 guidlow, uint32 mapid, float x, float y, float z, float ang, uint32 animprogress, uint32 dynflags)
|
||||
|
||||
@@ -59,6 +59,7 @@ class Transport : public GameObject
|
||||
void UpdateNPCPositions();
|
||||
void BuildStartMovePacket(Map const *targetMap);
|
||||
void BuildStopMovePacket(Map const *targetMap);
|
||||
uint32 GetScriptId() const { return ScriptId; }
|
||||
private:
|
||||
struct WayPoint
|
||||
{
|
||||
@@ -89,6 +90,7 @@ class Transport : public GameObject
|
||||
PlayerSet m_passengers;
|
||||
|
||||
uint32 currenttguid;
|
||||
uint32 ScriptId;
|
||||
public:
|
||||
WayPointMap m_WayPoints;
|
||||
uint32 m_nextNodeTime;
|
||||
|
||||
Reference in New Issue
Block a user