Jump to content

New "Pets" and "Petstats" for older MaNGOS


Unkle Nuke

Recommended Posts

For any of you that might have been living under a rock for the past couple of years, pasdVn's Github repo branches, pet and petstats have greatly improved many aspects of pets, guardians, and minions for Hunters, Warlocks, and Death Knights. It's in the "under review" section for MaNGOS patches, as it is an ongoing work, but, it's long been a "must have" patch for my server.

pasdVn, you have been very helpful to me so far in answering my questions regarding your patches. At this time, I have been in the process of updating some patches for my server. It is an older version, MaNGOS 0.15 rev. 9134, to maintain compatibility with my database until it is also brought up to date with the latest client version.

I did notice differences between your latest merges of pet and petstats, rev 9443, and the older rev 9226. The new blocks of code in pet 9443 seem they can be added in by hand with little, if any, editing but, I noticed there is a block of code in pet 9226 that is not present in 9443.

Here's the code block from 9226 that's located in SpellAuras.cpp:

@@ -7506,14 +7490,21 @@ void Aura::PeriodicDummyTick()
                //    return;
                // Feeding Frenzy Rank 1
                case 53511:
-                    if ( m_target->GetHealth() * 100 < m_target->GetMaxHealth() * 35 )
+                {
+                    Unit* victim = m_target->getVictim();
+                    if( victim && victim->GetHealth() * 100 < victim->GetMaxHealth() * 35 )
                        m_target->CastSpell(m_target, 60096, true, NULL, this);
                    return;
+                }
+                break;
                // Feeding Frenzy Rank 2
                case 53512:
-                    if ( m_target->GetHealth() * 100 < m_target->GetMaxHealth() * 35 )
+                {
+                    Unit* victim = m_target->getVictim();
+                    if( victim && victim->GetHealth() * 100 < victim->GetMaxHealth() * 35 )
                        m_target->CastSpell(m_target, 60097, true, NULL, this);
                    return;
+                }
                default:
                    break;
            }

Do I need to retain this for compatibility with functions and declarations in MaNGOS 0.15 9134 or has this block of code been deprecated by improvements and fixes in pet 9443? The base code from the 9134 core uses the unmodified parts of the code. Has your patch fixed these Dummy Auras so they are no longer needed?

I'm still fairly new to hand-editing patches and backporting would be so much easier if I knew more about C++ or had a shell script similar to the backport tool for mangos-0.12. Before, I just used git merge and git mergetool, which was sufficient for maintaining my source tree when it was current with the released client patches.

pasdVn, your help would be deeply appreciated. Anyone else that may have some insights into how these patches work with the core, feel free to add your input as well.

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