Jump to content

[fix][9060] Stealth/Prowl detection

Auntie Mangos

Recommended Posts

What bug does the patch fix? What features does the patch add?

fixes detecting stealthed units after restealth

For which repository revision was the patch created?


Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.


Who has been writing this patch? Please include either forum user names or email addresses.


diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 0c7d24e..261d369 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -220,7 +220,7 @@ void Unit::Update( uint32 p_time )
            // m_CombatTimer set at aura start and it will be freeze until aura removing
            if ( m_CombatTimer <= p_time )
-                ClearInCombat();
+                CombatStop();
                m_CombatTimer -= p_time;

this might be not the right place or the best way to fix it, but heres what i got from debug :

i had mage and druid in duel,

1)mage starts to cast fireball

2)mages m_attacking is now druid

3)mages m_attacking->AddAttacker(self)

4)druid has m_attacking null cause he is not attacking

5)combat fades (ClearInCombat - flags only)

6)druid casts prowl(yeah he gets AttackStop(); call in Spell::finish but it won't help cause he needs m_attackers delete on self)

7)now we end up having druid with m_attacking==NULL but with not empty m_attackers

8)I don't think mage's m_attacking is also cleared but AttackStop is never called for him

9)bool Unit::isVisibleForOrDetect(Unit const* u, WorldObject const* viewPoint, bool detect, bool inVisibleList, bool is3dDistance) const

   // If is attacked then stealth is lost, some creature can use stealth too
   if( !getAttackers().empty() )
       return true;

there the check fails because m_attackers list was never cleared

Link to comment
Share on other sites

  • 39 years later...
There is another (maybe related problem) that might be caused by this: get 2 chars of opposite faction, attack one, wait till out of combat and logout victim. The victim char will die on logout.

this is happening with the fix or on clean?

       else if (!_player->getAttackers().empty())

in void WorldSession::LogoutPlayer(bool Save) .. yeah guess its related

Link to comment
Share on other sites

  • 2 weeks later...
When you enter stealth or prowl it appears like a debuff and you can't leave stealth/prowl using steath/prowl button, only using attacks getting damage or shapestift (druid).

UDB 386

MaNGOS 9100 Linux_x64

SD2 1536

yeah i had this same problem on mines. did you have any core modifications? cuz that was what i was beginning to assume it would have been. but not too sure on that after looking at this patch

PSDB 279

Mangos 9110 windows_x86

SD2 1539

Link to comment
Share on other sites

This topic is now closed to further replies.
  • 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