Jump to content

[9994] Spell::SelectMountByAreaAndSkill bug with special mount


Guest Revils

Recommended Posts

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

fixed a bug/typo in SelectMountByAreaAndSkill that prevent to summon a special flying mount.

For which repository revision was the patch created?

9992

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

none

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

me

diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 0c1d69b..508c147 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -6614,8 +6614,10 @@ void Spell::SelectMountByAreaAndSkill(Unit* target, uint32 spellId75, uint32 spe

                            // speed higher than 280 replace it
                            if (mountSpeed > 280)
+                            {
                                target->CastSpell(target, spellIdSpecial, true);
-                            return;
+                                return;
+                            }
                        }
                    }
                }

simply: if we summon a special flying mount with spellIdSpecial > 0 and we "know" another mount with mountSpeed <= 280 the function will "return" without casting a spell

Link to comment
Share on other sites

Can you when post patches include diff header part... in git format this is somethign like:

diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp

index e8b4529..ce8676c 100644

--- a/src/game/Spell.cpp

+++ b/src/game/Spell.cpp

Ofc, i can apply this small change manually but in more big cases this can be real problem...

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