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));
|
||||
else
|
||||
{
|
||||
UpdatePosition(x, y, z, orientation, true);
|
||||
Position pos; // dummy, not used for creatures.
|
||||
Position pos = {x, y, z, orientation};
|
||||
SendTeleportPacket(pos);
|
||||
UpdatePosition(x, y, z, orientation, true);
|
||||
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 transGuid = GetTransGUID();
|
||||
|
||||
@@ -16723,6 +16728,8 @@ void Unit::SendTeleportPacket(Position& oldPos)
|
||||
data << float(GetPositionY());
|
||||
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
Relocate(&pos);
|
||||
else
|
||||
Relocate(&oldPos);
|
||||
|
||||
SendMessageToSet(&data, true);
|
||||
|
||||
Reference in New Issue
Block a user