mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[7450] Fixes and improvements in TARGET_BEHIND_VICTIM, SPELL_EFFECT_JUMP2, SPELL_EFFECT_TELEPORT_UNITS work.
* 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.
This commit is contained in:
parent
571c56ff07
commit
3a5d59c0c7
5 changed files with 93 additions and 70 deletions
|
|
@ -11373,3 +11373,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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue