[7533] Redirect movement packet in proper way to controlled target. Author: VladimirMangos

* In creature case ignore fall/etc damage
    * In player case apply fall damage/etc to controlled player, apply other movement effect to it also.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-24 17:42:22 -06:00
parent 941e5b9dbd
commit 1c6c199f5d
3 changed files with 53 additions and 65 deletions
-27
View File
@@ -20048,33 +20048,6 @@ bool ItemPosCount::isContainedIn(ItemPosCountVec const& vec) const
//-------------TRINITY---------------
//***********************************
void Player::HandleFallUnderMap()
{
if(InBattleGround()
&& GetBattleGround()
&& GetBattleGround()->HandlePlayerUnderMap(this))
{
// do nothing, the handle already did if returned true
}
else
{
// NOTE: this is actually called many times while falling
// even after the player has been teleported away
// TODO: discard movement packets after the player is rooted
if(isAlive())
{
EnvironmentalDamage(DAMAGE_FALL_TO_VOID, GetMaxHealth());
// change the death state to CORPSE to prevent the death timer from
// starting in the next player update
KillPlayer();
BuildPlayerRepop();
}
// cancel the death timer here if started
RepopAtGraveyard();
}
}
void Player::StopCastingBindSight()
{
if(WorldObject* target = GetViewpoint())