Jump to content

Recommended Posts

Posted

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

This patch fixes the bug when state of pet's spells set to autocast was not restored on the client on pet creation (after login, dismount, etc.) even though on pet action bar spells are marked as autocasted.

For which repository revision was the patch created?

7743

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

http://getmangos.eu/community/viewtopic.php?id=7788

diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp
index b8ea654..a99db44 100644
--- a/src/game/Pet.cpp
+++ b/src/game/Pet.cpp
@@ -1278,6 +1278,10 @@ bool Pet::addSpell(uint32 spell_id, uint16 active, PetSpellState state, PetSpell
        {
            // can be in case spell loading but learned at some previous spell loading
            itr->second->state = PETSPELL_UNCHANGED;
+            // restore previous autocast state 
+            // (applicable only for ActiveStates with castable (0x8000) bit)
+            if (active & 0x8000)
+                ToggleAutocast(spell_id, active & 0x4000); // true if auto cast flag (0x4000) is set
            return false;
        }
        else

  • 39 years later...
Posted

I fix in [7751] problem that exist before but will triggered activly by suggested change: unneeded pet spells saves ansd possible per spell save DB errors.

Hmm, better ofc, if you provided infor about affected spell ids for simplify testing...

[added]Ok, i find case for check.

Patch with some changes (use enums as in other cases insteed hardcoded values) in [7752]. Thank you :)

Posted

You are welcome. I just got too annoyed by the bug, so decided to figure it out.

As for the hardcoded values - you are right, but it seems logical for me to alter that enum due to the description given to its values. Bit-like enum IMO is more preferable.

Anyway, you got the point and the problem is solved.

I'm glad I helped.

Posted
You are welcome. I just got too annoyed by the bug, so decided to figure it out.
This is normal way in open source project development ;)
As for the hardcoded values - you are right, but it seems logical for me to alter that enum due to the description given to its values. Bit-like enum IMO is more preferable.
Maybe, but current way used in many places and better for consistence use one way until this not proved that wrong by some reason or switch in all cases to another way.
Posted

Hey vlad have u checked after u use .start command? or heatstone? it simply does it...

well I haven't tested yet with the new patch..but I belive it works 100%

With respect,

Axel

  • 4 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