Jump to content

Remove safe fall aura at landing


Guest Toinan67

Recommended Posts

Hi,

I chose not to create this thread in the "under review" section since I'm not sure of myself at all.

I've noticed that when you land on the ground with a parachute (example : this one), the parachute is not removed.

On retail, the parachute is removed when you land. I know there are some spells which don't have to be removed, like priest's levitate, but here is a possible fix for this :

diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 79ecd25..a7c98c7 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -21347,6 +21347,8 @@ void Player::HandleFall(MovementInfo const& movementInfo)
            DEBUG_LOG("FALLDAMAGE z=%f sz=%f pZ=%f FallTime=%d mZ=%f damage=%d SF=%d" , movementInfo.GetPos()->z, height, GetPositionZ(), movementInfo.GetFallTime(), height
        }
    }
+
+    RemoveSpellsCausingAura(SPELL_AURA_SAFE_FALL);
}

So question is : what auras (SPELL_AURA_SAFE_FALL, SPELL_AURA_FEATHER_FALL, SPELL_AURA_HOVER, ...) need to be removed at landing?

Link to comment
Share on other sites

Isn't SPELL_AURA_SAFE_FALL used only for devices, like the parachute? Since mage's Slow Fall and priest's Levitate are spells with a duration, they shouldn't be canceled until the timer expires. Aren't those and similar spells handled by SPELL_AURA_FEATHER_FALL and SPELL_AURA_HOVER?

Otherwise, wouldn't it have to done with something like CASE-SWITCH to cover only those devices or spell effects that should expire when landing?

Link to comment
Share on other sites

There is another issue with SAFE_FALL aura, when you falling under SAFE_FALL aura en remove this aura before landing, you take the damage of the whole fall. I don't know if it is blizzlike but i think when SAFE_FALL is removed you should get dalage only for the fall remaining. I know i'm a bit offtopic but i don't think this is enought to start a new thread.

Link to comment
Share on other sites

@Shauren: I didn't find this interrupt flag...is it missing in the core? Was it deleted before?

With Shauren's mod :


diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 5eccd94..a99cb7b 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -21363,6 +21363,8 @@ void Player::HandleFall(MovementInfo const& movementInfo)
            DEBUG_LOG("FALLDAMAGE z=%f sz=%f pZ=%f FallTime=%d mZ=%f damage=%d SF=%d" , movementInfo.GetPos()->z, height, GetPosition
        }
    }
+
+    RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_LANDING);
}

void Player::UpdateAchievementCriteria( AchievementCriteriaTypes type, uint32 miscvalue1/*=0*/, uint32 miscvalue2/*=0*/, Unit *unit/*
diff --git a/src/game/Unit.h b/src/game/Unit.h
index d04f8f1..61e89d4 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -82,7 +82,8 @@ enum SpellAuraInterruptFlags
    AURA_INTERRUPT_FLAG_UNK21                       = 0x00200000,   // 21
    AURA_INTERRUPT_FLAG_UNK22                       = 0x00400000,   // 22
    AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT            = 0x00800000,   // 23   removed by entering pvp combat
-    AURA_INTERRUPT_FLAG_DIRECT_DAMAGE               = 0x01000000    // 24   removed by any direct damage
+    AURA_INTERRUPT_FLAG_DIRECT_DAMAGE               = 0x01000000,   // 24   removed by any direct damage
+    AURA_INTERRUPT_FLAG_LANDING                     = 0x02000000    // 25   removed by hitting the ground
};

Link to comment
Share on other sites

There is another issue with SAFE_FALL aura, when you falling under SAFE_FALL aura en remove this aura before landing, you take the damage of the whole fall. I don't know if it is blizzlike but i think when SAFE_FALL is removed you should get dalage only for the fall remaining. I know i'm a bit offtopic but i don't think this is enought to start a new thread.

Yes there is, its that Drink thats is available during Christmas in Shattrath, and yes safe fall is used for/or was flying over Wintrgrasp and Dalaran as well as a couple Holiday things including Cannon Shot when you shot way past target area and didn't get wings...But the safest fall is from as high as you can get sraight into water!

Link to comment
Share on other sites

There is another issue with SAFE_FALL aura, when you falling under SAFE_FALL aura en remove this aura before landing, you take the damage of the whole fall. I don't know if it is blizzlike but i think when SAFE_FALL is removed you should get dalage only for the fall remaining. I know i'm a bit offtopic but i don't think this is enought to start a new thread.

Maybe this ?

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 86ff966..518b113 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -7697,6 +7697,10 @@ void Aura::HandleAuraSafeFall( bool Apply, bool Real )
{
    // implemented in WorldSession::HandleMovementOpcodes

+    //start fall from current height
+    if(!Apply && target->GetTypeId() == TYPEID_PLAYER)
+        ((Player*)target)->SetFallInformation(0, target->GetPositionZ());
+
    // only special case
    if(Apply && Real && GetId() == 32474 && GetTarget()->GetTypeId() == TYPEID_PLAYER)
        ((Player*)GetTarget())->ActivateTaxiPathTo(506, GetId());

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use