mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
[7450] Fixes and improvements in TARGET_BEHIND_VICTIM, SPELL_EFFECT_JUMP2, SPELL_EFFECT_TELEPORT_UNITS work. Author: VladimirMangos
* Move near teleport code for player/creature in Unit::NearTeleportTo
* Allow correctly seelct target and end point orientation for script casted spells with TARGET_BEHIND_VICTIM
* Replace use BuildTeleportAckMsg by BuildHeartBeatMsg for creature teleports. BuildTeleportAckMsg
set active mover for targeted player to affected creature and "freeze" player.
--HG--
branch : trunk
This commit is contained in:
@@ -13491,3 +13491,19 @@ void Unit::SetPhaseMask(uint32 newPhaseMask, bool update)
|
||||
if(Pet* pet = GetPet())
|
||||
pet->SetPhaseMask(newPhaseMask,true);
|
||||
}
|
||||
|
||||
void Unit::NearTeleportTo( float x, float y, float z, float orientation, bool casting /*= false*/ )
|
||||
{
|
||||
if(GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)this)->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
|
||||
{
|
||||
GetMap()->CreatureRelocation((Creature*)this, x, y, z, orientation);
|
||||
|
||||
WorldPacket data;
|
||||
// Work strange for many spells: triggered active mover set for targeted player to creature
|
||||
//BuildTeleportAckMsg(&data, x, y, z, orientation);
|
||||
BuildHeartBeatMsg(&data);
|
||||
SendMessageToSet(&data, false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user