Merge branch 'master' of https://github.com/TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/Entities/Unit/Unit.cpp
This commit is contained in:
@@ -16659,15 +16659,20 @@ void Unit::NearTeleportTo(float x, float y, float z, float orientation, bool cas
|
|||||||
ToPlayer()->TeleportTo(GetMapId(), x, y, z, orientation, TELE_TO_NOT_LEAVE_TRANSPORT | TELE_TO_NOT_LEAVE_COMBAT | TELE_TO_NOT_UNSUMMON_PET | (casting ? TELE_TO_SPELL : 0));
|
ToPlayer()->TeleportTo(GetMapId(), x, y, z, orientation, TELE_TO_NOT_LEAVE_TRANSPORT | TELE_TO_NOT_LEAVE_COMBAT | TELE_TO_NOT_UNSUMMON_PET | (casting ? TELE_TO_SPELL : 0));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UpdatePosition(x, y, z, orientation, true);
|
Position pos = {x, y, z, orientation};
|
||||||
Position pos; // dummy, not used for creatures.
|
|
||||||
SendTeleportPacket(pos);
|
SendTeleportPacket(pos);
|
||||||
|
UpdatePosition(x, y, z, orientation, true);
|
||||||
UpdateObjectVisibility();
|
UpdateObjectVisibility();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unit::SendTeleportPacket(Position& oldPos)
|
void Unit::SendTeleportPacket(Position& pos)
|
||||||
{
|
{
|
||||||
|
Position oldPos = {GetPositionX(), GetPositionY(), GetPositionZMinusOffset(), GetOrientation()};
|
||||||
|
|
||||||
|
if (GetTypeId() == TYPEID_UNIT)
|
||||||
|
Relocate(&pos);
|
||||||
|
|
||||||
ObjectGuid guid = GetGUID();
|
ObjectGuid guid = GetGUID();
|
||||||
ObjectGuid transGuid = GetTransGUID();
|
ObjectGuid transGuid = GetTransGUID();
|
||||||
|
|
||||||
@@ -16723,6 +16728,8 @@ void Unit::SendTeleportPacket(Position& oldPos)
|
|||||||
data << float(GetPositionY());
|
data << float(GetPositionY());
|
||||||
|
|
||||||
if (GetTypeId() == TYPEID_PLAYER)
|
if (GetTypeId() == TYPEID_PLAYER)
|
||||||
|
Relocate(&pos);
|
||||||
|
else
|
||||||
Relocate(&oldPos);
|
Relocate(&oldPos);
|
||||||
|
|
||||||
SendMessageToSet(&data, true);
|
SendMessageToSet(&data, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user