Jump to content

Possible fix - Shadow Dance


Auntie Mangos

Recommended Posts

  • Replies 53
  • Created
  • Last Reply

Top Posters In This Topic

so which is better fiyx for shadow dance this one whis was posted by jizar or this one http://getmangos.eu/community/viewtopic.php?id=8415&highlight=shadow+dance whis was posted by pelle but made by astellar ????

THX

both the same fixxes...

identically with the other.

diff -- git a / src / game / SpellAuras . cpp b / src / game / SpellAuras . cpp
index 3a0862d . .0d28cb8 100644
--- a / src / game / SpellAuras . cpp
+++ b / src / game / SpellAuras . cpp
@@ - 2637 , 6 + 2637 , 9 @@ void Aura :: HandleAuraModShapeshift ( bool apply , bool Real )
case FORM_SHADOW :
case FORM_STEALTH :
break;
+        case FORM_SHADOWDANCE :
+ PowerType = POWER_ENERGY ;
+            break;
case FORM_TREE :
modelid = 864 ;
break;
@@ - 2682 , 7 + 2685 , 8 @@ void Aura :: HandleAuraModShapeshift ( bool apply , bool Real )
if( m_target -> m_ShapeShiftFormSpellId )
m_target -> RemoveAurasDueToSpell ( m_target -> m_ShapeShiftFormSpellId , this );

- m_target -> SetByteValue ( UNIT_FIELD_BYTES_2 , 3 , form );
+ // For Shadow Dance we must apply Stealth form (30) instead of current (13)
+ m_target -> SetByteValue ( UNIT_FIELD_BYTES_2 , 3 , ( form == FORM_SHADOWDANCE ) ? uint8 ( FORM_STEALTH ) : form );

if( modelid > 0 )
m_target -> SetDisplayId ( modelid );
@@ - 2747 , 6 + 2751 , 10 @@ void Aura :: HandleAuraModShapeshift ( bool apply , bool Real )
m_target -> SetPower ( POWER_RAGE , Rage_val );
break;
}
+ // Shadow Dance - apply stealth mode stand flag
+                case FORM_SHADOWDANCE :
+ m_target -> SetStandFlags ( UNIT_STAND_FLAGS_CREEP );
+                    break;
default:
break;
}
@@ - 2779 , 6 + 2787 , 10 @@ void Aura :: HandleAuraModShapeshift ( bool apply , bool Real )
if( Aura * dummy = m_target -> GetDummyAura ( 37324 ) )
m_target -> CastSpell ( m_target , 37325 , true , NULL , dummy );
break;
+ // Shadow Dance - remove stealth mode stand flag
+            case FORM_SHADOWDANCE :
+ m_target -> RemoveStandFlags ( UNIT_STAND_FLAGS_CREEP );
+                break;
default:
break;
}
diff -- git a / src / game / Unit . h b / src / game / Unit . h
index faefbef . .3f0e578 100644
--- a / src / game / Unit . h
+++ b / src / game / Unit . h
@@ - 167 , 6 + 167 , 7 @@ enum ShapeshiftForm
FORM_GHOUL = 0x07 ,
FORM_DIREBEAR = 0x08 ,
FORM_CREATUREBEAR = 0x0E ,
+ FORM_SHADOWDANCE = 0x0D ,
FORM_CREATURECAT = 0x0F ,
FORM_GHOSTWOLF = 0x10 ,
FORM_BATTLESTANCE = 0x11 , 

Link to comment
Share on other sites

  • 39 years later...

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

Rogue's shadow dance

For which repository revision was the patch created?

works on 8360

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.

Got it from Russian mangos (http://mangos.ru/forum/showthread.php?t=20792)

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp 
index 3a0862d..0d28cb8 100644 
--- a/src/game/SpellAuras.cpp 
+++ b/src/game/SpellAuras.cpp 
@@ -2637,6 +2637,9 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real) 
        case FORM_SHADOW: 
        case FORM_STEALTH: 
            break; 
+        case FORM_SHADOWDANCE: 
+            PowerType = POWER_ENERGY; 
+            break; 
        case FORM_TREE: 
            modelid = 864; 
            break; 
@@ -2682,7 +2685,8 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real) 
        if(m_target->m_ShapeShiftFormSpellId) 
            m_target->RemoveAurasDueToSpell(m_target->m_ShapeShiftFormSpellId, this); 

-        m_target->SetByteValue(UNIT_FIELD_BYTES_2, 3, form); 
+        // For Shadow Dance we must apply Stealth form (30) instead of current (13) 
+        m_target->SetByteValue(UNIT_FIELD_BYTES_2, 3, (form == FORM_SHADOWDANCE) ? uint8(FORM_STEALTH) : form); 

        if(modelid > 0) 
            m_target->SetDisplayId(modelid); 
@@ -2747,6 +2751,10 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real) 
                        m_target->SetPower(POWER_RAGE, Rage_val); 
                    break; 
                } 
+                // Shadow Dance - apply stealth mode stand flag 
+                case FORM_SHADOWDANCE: 
+                    m_target->SetStandFlags(UNIT_STAND_FLAGS_CREEP); 
+                    break; 
                default: 
                    break; 
            } 
@@ -2779,6 +2787,10 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real) 
                if(Aura* dummy = m_target->GetDummyAura(37324) ) 
                    m_target->CastSpell(m_target, 37325, true, NULL, dummy); 
                break; 
+            // Shadow Dance - remove stealth mode stand flag 
+            case FORM_SHADOWDANCE: 
+                m_target->RemoveStandFlags(UNIT_STAND_FLAGS_CREEP); 
+                break; 
            default: 
                break; 
        } 
diff --git a/src/game/Unit.h b/src/game/Unit.h 
index faefbef..3f0e578 100644 
--- a/src/game/Unit.h 
+++ b/src/game/Unit.h 
@@ -167,6 +167,7 @@ enum ShapeshiftForm 
    FORM_GHOUL              = 0x07, 
    FORM_DIREBEAR           = 0x08, 
    FORM_CREATUREBEAR       = 0x0E, 
+    FORM_SHADOWDANCE        = 0x0D, 
    FORM_CREATURECAT        = 0x0F, 
    FORM_GHOSTWOLF          = 0x10, 
    FORM_BATTLESTANCE       = 0x11,  

This is the error i get when complying

2>..\\..\\src\\game\\SpellAuras.cpp(2724) : error C2065: 'FORM_SHADOWDANCE' : undeclared identifier

2>..\\..\\src\\game\\SpellAuras.cpp(2724) : error C2051: case expression not constant

2>..\\..\\src\\game\\SpellAuras.cpp(2795) : error C2065: 'FORM_SHADOWDANCE' : undeclared identifier

2>..\\..\\src\\game\\SpellAuras.cpp(2861) : error C2065: 'FORM_SHADOWDANCE' : undeclared identifier

2>..\\..\\src\\game\\SpellAuras.cpp(2861) : error C2051: case expression not constant

2>..\\..\\src\\game\\SpellAuras.cpp(2897) : error C2065: 'FORM_SHADOWDANCE' : undeclared identifier

2>..\\..\\src\\game\\SpellAuras.cpp(2897) : error C2051: case expression not constant

HELP ME FIX THIS PLZ ....

Link to comment
Share on other sites

I added it (manually) and it didnt gave any error.

Try adding it again.

========== Build: 11 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

luck

edit: btw, i tested it, it "works" but not like it should be.

When you enter shadow dance, you are NOT stealthed (which is ok) but you have like... stealth movements, (while walking, etc)

but yeah, it kinda works.

Link to comment
Share on other sites

Spell have aura SPELL_AURA_MOD_IGNORE_SHAPESHIFT that provide removing form req. for spells.

So setting form is cliary horriable hack. But set UNIT_STAND_FLAGS_CREE maybe ok.

ignoring the 275 aura's stalth form don't work, i tryed many times, probably there is a further check...

btw this patch work well, you have only the "animation" of stealth moves but walk speed is normal.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 4 weeks later...

ok, and this patch works correct?

diff -- git a / src / game / SpellAuras . cpp b / src / game / SpellAuras . cpp
index 3a0862d . .0d28cb8 100644
--- a / src / game / SpellAuras . cpp
+++ b / src / game / SpellAuras . cpp
@@ - 2637 , 6 + 2637 , 9 @@ void Aura :: HandleAuraModShapeshift ( bool apply , bool Real )
case FORM_SHADOW :
case FORM_STEALTH :
break;
+        case FORM_SHADOWDANCE :
+ PowerType = POWER_ENERGY ;
+            break;
case FORM_TREE :
modelid = 864 ;
break;
@@ - 2682 , 7 + 2685 , 8 @@ void Aura :: HandleAuraModShapeshift ( bool apply , bool Real )
if( m_target -> m_ShapeShiftFormSpellId )
m_target -> RemoveAurasDueToSpell ( m_target -> m_ShapeShiftFormSpellId , this );

- m_target -> SetByteValue ( UNIT_FIELD_BYTES_2 , 3 , form );
+ // For Shadow Dance we must apply Stealth form (30) instead of current (13)
+ m_target -> SetByteValue ( UNIT_FIELD_BYTES_2 , 3 , ( form == FORM_SHADOWDANCE ) ? uint8 ( FORM_STEALTH ) : form );

if( modelid > 0 )
m_target -> SetDisplayId ( modelid );
@@ - 2747 , 6 + 2751 , 10 @@ void Aura :: HandleAuraModShapeshift ( bool apply , bool Real )
m_target -> SetPower ( POWER_RAGE , Rage_val );
break;
}
+ // Shadow Dance - apply stealth mode stand flag
+                case FORM_SHADOWDANCE :
+ m_target -> SetStandFlags ( UNIT_STAND_FLAGS_CREEP );
+                    break;
default:
break;
}
@@ - 2779 , 6 + 2787 , 10 @@ void Aura :: HandleAuraModShapeshift ( bool apply , bool Real )
if( Aura * dummy = m_target -> GetDummyAura ( 37324 ) )
m_target -> CastSpell ( m_target , 37325 , true , NULL , dummy );
break;
+ // Shadow Dance - remove stealth mode stand flag
+            case FORM_SHADOWDANCE :
+ m_target -> RemoveStandFlags ( UNIT_STAND_FLAGS_CREEP );
+                break;
default:
break;
}
diff -- git a / src / game / Unit . h b / src / game / Unit . h
index faefbef . .3f0e578 100644
--- a / src / game / Unit . h
+++ b / src / game / Unit . h
@@ - 167 , 6 + 167 , 7 @@ enum ShapeshiftForm
FORM_GHOUL = 0x07 ,
FORM_DIREBEAR = 0x08 ,
FORM_CREATUREBEAR = 0x0E ,
+ FORM_SHADOWDANCE = 0x0D ,
FORM_CREATURECAT = 0x0F ,
FORM_GHOSTWOLF = 0x10 ,
FORM_BATTLESTANCE = 0x11 ,

Link to comment
Share on other sites

ok, and this patch works correct?

diff -- git a / src / game / SpellAuras . cpp b / src / game / SpellAuras . cpp
index 3a0862d . .0d28cb8 100644
--- a / src / game / SpellAuras . cpp
+++ b / src / game / SpellAuras . cpp
@@ - 2637 , 6 + 2637 , 9 @@ void Aura :: HandleAuraModShapeshift ( bool apply , bool Real )
case FORM_SHADOW :
case FORM_STEALTH :
break;
+        case FORM_SHADOWDANCE :
+ PowerType = POWER_ENERGY ;
+            break;
case FORM_TREE :
modelid = 864 ;
break;
@@ - 2682 , 7 + 2685 , 8 @@ void Aura :: HandleAuraModShapeshift ( bool apply , bool Real )
if( m_target -> m_ShapeShiftFormSpellId )
m_target -> RemoveAurasDueToSpell ( m_target -> m_ShapeShiftFormSpellId , this );

- m_target -> SetByteValue ( UNIT_FIELD_BYTES_2 , 3 , form );
+ // For Shadow Dance we must apply Stealth form (30) instead of current (13)
+ m_target -> SetByteValue ( UNIT_FIELD_BYTES_2 , 3 , ( form == FORM_SHADOWDANCE ) ? uint8 ( FORM_STEALTH ) : form );

if( modelid > 0 )
m_target -> SetDisplayId ( modelid );
@@ - 2747 , 6 + 2751 , 10 @@ void Aura :: HandleAuraModShapeshift ( bool apply , bool Real )
m_target -> SetPower ( POWER_RAGE , Rage_val );
break;
}
+ // Shadow Dance - apply stealth mode stand flag
+                case FORM_SHADOWDANCE :
+ m_target -> SetStandFlags ( UNIT_STAND_FLAGS_CREEP );
+                    break;
default:
break;
}
@@ - 2779 , 6 + 2787 , 10 @@ void Aura :: HandleAuraModShapeshift ( bool apply , bool Real )
if( Aura * dummy = m_target -> GetDummyAura ( 37324 ) )
m_target -> CastSpell ( m_target , 37325 , true , NULL , dummy );
break;
+ // Shadow Dance - remove stealth mode stand flag
+            case FORM_SHADOWDANCE :
+ m_target -> RemoveStandFlags ( UNIT_STAND_FLAGS_CREEP );
+                break;
default:
break;
}
diff -- git a / src / game / Unit . h b / src / game / Unit . h
index faefbef . .3f0e578 100644
--- a / src / game / Unit . h
+++ b / src / game / Unit . h
@@ - 167 , 6 + 167 , 7 @@ enum ShapeshiftForm
FORM_GHOUL = 0x07 ,
FORM_DIREBEAR = 0x08 ,
FORM_CREATUREBEAR = 0x0E ,
+ FORM_SHADOWDANCE = 0x0D ,
FORM_CREATURECAT = 0x0F ,
FORM_GHOSTWOLF = 0x10 ,
FORM_BATTLESTANCE = 0x11 ,

bump this patch work on 8742

Link to comment
Share on other sites

  • 2 weeks later...
Guest
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