Jump to content

[Mangos One] Fearbug


Guest Hundekuchen

Recommended Posts

do you have now an idea how to fix it, or someone else?

not related to threat .

in fact finalize motion master broken .

I could not understand finalizing motionmaster system .

But this patch can fix problem.

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 60c41c6..d500b35 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -10920,6 +10920,8 @@ void Unit::SetFeared(bool apply, uint64 const& casterGUID, uint32 spellID, uint3

        if (GetTypeId() != TYPEID_PLAYER && isAlive())
        {
+            clearUnitState(UNIT_STAT_FLEEING|UNIT_STAT_FLEEING_MOVE);
+
            Creature* c = ((Creature*)this);
            // restore appropriate movement generator
            if (getVictim())
@@ -10956,6 +10958,8 @@ void Unit::SetConfused(bool apply, uint64 const& casterGUID, uint32 spellID)

        if (GetTypeId() != TYPEID_PLAYER && isAlive())
        {
+            clearUnitState(UNIT_STAT_CONFUSED|UNIT_STAT_CONFUSED_MOVE);
+
            // restore appropriate movement generator
            if(getVictim())
                GetMotionMaster()->MoveChase(getVictim());

Link to comment
Share on other sites

  • 1 month later...
×
×
  • 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