Jump to content

Trap invisibility and stealth detection


darkstalker

Recommended Posts

We know that currently that on mangos hunter traps are visible, when they're supposed to be stealthed. For that purpose there is a rogue passive called Detect Traps, thats supposed to make traps visible for them. Reading the spell effects shows is has "Apply Aura: Stealth Detection (1) Value: 70", its a spell with SPELL_AURA_MOD_STEALTH_DETECT, EffectBasePoints0 = 69 and EffectMiscValue0 = 1. The problem here is that this stealth detection is being currently applied to unit detection, not traps (that don't even have stealth). The key here is the MiscValue, that seems to be some kind of stealth mask. Its the only stealth detection spell on the dbc with miscvalue != 0, so it suggest that this value means trap detection. A (hack?) fix for this problem would be something like:

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 46a15e5..d00b027 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -8043,7 +8043,9 @@ bool Unit::isVisibleForOrDetect(Unit const* u, WorldObject const* viewPoint, boo

        //-Stealth Mod(positive like Master of Deception) and Stealth Detection(negative like paranoia)
        //based on wowwiki every 5 mod we have 1 more level diff in calculation
-        visibleDistance += (int32(u->GetTotalAuraModifier(SPELL_AURA_MOD_STEALTH_DETECT)) - stealthMod)/5.0f;
+        // spell 2836 (Detect Traps) not meant to enhace unit detection has MiscValue = 1, all others have 0 (stealth mask?)
+        int32 detectMod = u->GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_STEALTH_DETECT, 0);
+        visibleDistance += (detectMod - stealthMod) / 5.0f;
        visibleDistance = visibleDistance > MAX_PLAYER_STEALTH_DETECT_RANGE ? MAX_PLAYER_STEALTH_DETECT_RANGE : visibleDistance;

        // recheck new distance

to prevent this "extra bonus" to detection of players being added. Any toughts on this? maybe should implement stealth masks for future implementation of trap stealthing.

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