Core/Players: Don't set instanceId to 0 when player is on transport during loading, there CAN be transports inside instances

Core/Scripts: Added waypoint id to OnRelocate transport hook
Core/Scripts: Make use of ZoneScript::GetGameObjectEntry at gameobject creation (makes it possible to override gameobject entries in instances)
Core/Transports: Call InstanceScript::EventInform for transport events
Core/Transports: Use guid from db for transports, not just its entry - adds partial support for instancing them (still cannot use transports table for it, but can spawn manually now)
Scripts/Icecrown Citadel: Fixed crash in Deathbringer Saurfang when event is started by more than one person (can't do this anymore)

Closes isssue #3749.

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-09-02 10:40:32 +02:00
parent 320cd16f20
commit 0f9fe8dbeb
12 changed files with 100 additions and 41 deletions
+3 -6
View File
@@ -16066,10 +16066,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
// currently we do not support transport in bg
else if (transGUID)
{
// There are no transports on instances
instanceId = 0;
m_movementInfo.t_guid = MAKE_NEW_GUID(transGUID, 0, HIGHGUID_TRANSPORT);
m_movementInfo.t_guid = MAKE_NEW_GUID(transGUID, 0, HIGHGUID_MO_TRANSPORT);
m_movementInfo.t_pos.Relocate(fields[26].GetFloat(), fields[27].GetFloat(), fields[28].GetFloat(), fields[29].GetFloat());
if (!Trinity::IsValidMapCoord(
@@ -16078,7 +16075,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
// transport size limited
m_movementInfo.t_pos.m_positionX > 250 || m_movementInfo.t_pos.m_positionY > 250 || m_movementInfo.t_pos.m_positionZ > 250)
{
sLog.outError("Player (guidlow %d) have invalid transport coordinates (X: %f Y: %f Z: %f O: %f). Teleport to default race/class locations.",
sLog.outError("Player (guidlow %d) have invalid transport coordinates (X: %f Y: %f Z: %f O: %f). Teleport to bind location.",
guid,GetPositionX()+m_movementInfo.t_pos.m_positionX,GetPositionY()+m_movementInfo.t_pos.m_positionY,
GetPositionZ()+m_movementInfo.t_pos.m_positionZ,GetOrientation()+m_movementInfo.t_pos.m_orientation);
@@ -16098,7 +16095,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
}
if (!m_transport)
{
sLog.outError("Player (guidlow %d) have problems with transport guid (%u). Teleport to default race/class locations.",
sLog.outError("Player (guidlow %d) have problems with transport guid (%u). Teleport to bind location.",
guid,transGUID);
RelocateToHomebind();