mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-17 21:50:50 -04:00
Core/Spells: Fixed resurrection order (teleport, then set alive), fixes aggroing creatures nearby and during The Lich King's outro - players who fell off the platform
This commit is contained in:
@@ -5087,6 +5087,8 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
|
||||
if (GetSession()->IsARecruiter() || (GetSession()->GetRecruiterId() != 0))
|
||||
SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_REFER_A_FRIEND);
|
||||
|
||||
setDeathState(ALIVE);
|
||||
|
||||
SetMovement(MOVE_LAND_WALK);
|
||||
SetMovement(MOVE_UNROOT);
|
||||
|
||||
@@ -5116,8 +5118,6 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
|
||||
// update visibility
|
||||
UpdateObjectVisibility();
|
||||
|
||||
setDeathState(ALIVE);
|
||||
|
||||
if (!applySickness)
|
||||
return;
|
||||
|
||||
@@ -18300,7 +18300,7 @@ void Player::SaveToDB(bool create /*=false*/)
|
||||
stmt->setFloat(index++, finiteAlways(GetPositionY()));
|
||||
stmt->setFloat(index++, finiteAlways(GetPositionZ()));
|
||||
stmt->setFloat(index++, finiteAlways(GetOrientation()));
|
||||
|
||||
|
||||
std::ostringstream ss;
|
||||
ss << m_taxi;
|
||||
stmt->setString(index++, ss.str());
|
||||
@@ -18322,7 +18322,7 @@ void Player::SaveToDB(bool create /*=false*/)
|
||||
|
||||
ss.str("");
|
||||
ss << m_taxi.SaveTaxiDestinationsToString();
|
||||
|
||||
|
||||
stmt->setString(index++, ss.str());
|
||||
stmt->setUInt32(index++, GetArenaPoints());
|
||||
stmt->setUInt32(index++, GetHonorPoints());
|
||||
@@ -22478,12 +22478,9 @@ uint32 Player::GetBaseWeaponSkillValue (WeaponAttackType attType) const
|
||||
void Player::ResurectUsingRequestData()
|
||||
{
|
||||
/// Teleport before resurrecting by player, otherwise the player might get attacked from creatures near his corpse
|
||||
if (IS_PLAYER_GUID(m_resurrectGUID))
|
||||
TeleportTo(m_resurrectMap, m_resurrectX, m_resurrectY, m_resurrectZ, GetOrientation());
|
||||
TeleportTo(m_resurrectMap, m_resurrectX, m_resurrectY, m_resurrectZ, GetOrientation());
|
||||
|
||||
//we cannot resurrect player when we triggered far teleport
|
||||
//player will be resurrected upon teleportation
|
||||
if (IsBeingTeleportedFar())
|
||||
if (IsBeingTeleported())
|
||||
{
|
||||
ScheduleDelayedOperation(DELAYED_RESURRECT_PLAYER);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user