EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   Bug Fix: Show pet buffs icons in pet window (https://www.eqemulator.org/forums/showthread.php?t=25778)

Derision 07-25-2008 02:04 PM

Bug Fix: Show pet buffs icons in pet window
 
This fix is to display the spell icons for buffs on your pet in the pet window.

http://www.rama.demon.co.uk/petwindow.jpg

I found the 6.2 opcode for this in the same packet collect that had the 6.2
charm opcode in it and was able to figure out the struct enough to get it to
work. The Opcode is the same for both 6.2 and Titanium.

Add:

Code:

OP_PetBuffWindow=0x4e31
to both patch_6.2.conf and patch_Titanium.conf, and apply this source code patch.

http://www.rama.demon.co.uk/petbuffwindow.patch

Let me know if it doesn't work as it should.

One thing I noticed is you can't remove beneficial spells by clicking on them. I don't know
whether this is meant to be possible. I did a packet collect on the 6.2 client and couldn't
see any packets being sent when I clicked on a buff.

As well as sending the buff packet when buffs are applied and fade, it is sent to the client
every tic in BuffProcess(). I did this because I couldn't get the buffs to show up again when
you logged off with a buffed pet and logged back on. I tried sending them from Client::FinishConnState2,
but that didn't work.

Derision 07-25-2008 03:28 PM

After looking over this again, the call to SendPetBuffsToClient in Mob::BuffFadeByEffect is redundant, since BuffFadeByEffect calls BuffFadeBySlot, and the pet window buff packet is already sent in that routine.

So, after applying the patch, you can delete these lines:

spells.cpp, Line 2614:
Code:

void Mob::BuffFadeByEffect(int effectid, int skipslot)
{
        int i;

        for(i = 0; i < BUFF_COUNT; i++)
        {
                if(buffs[i].spellid == SPELL_UNKNOWN)
                        continue;
                if(IsEffectInSpell(buffs[i].spellid, effectid) && i != skipslot)
                        BuffFadeBySlot(i, false);
        }
        // Delete the following 3 lines as they are redundant.
        if(IsPet() && GetOwner() && GetOwner()->IsClient()) {   
                SendPetBuffsToClient();                                   
        }
                                                                         
        //we tell BuffFadeBySlot not to recalc, so we can do it only once when were done
        CalcBonuses();
}


So_1337 07-25-2008 04:07 PM

Another great submission. If you keep this up, we're going to have a whole slew of functionality that wasn't there before just by connecting a few missing op_codes. Keep up the great work!

KLS 07-25-2008 04:17 PM

Nice, I'll get this all sorted out and in submission in a few days.

Angelox 07-25-2008 04:27 PM

Wow, thought i'd never see the buffs on pets again - Thanks again!

joligario 07-25-2008 08:06 PM

I remember on live not being able to click off beneficial spells from pet. So its all good. Good work.

KLS 07-27-2008 05:55 PM

Something I'm changing: not sending a pet buff update every client buff tic. I don't see the point really, also adding a pet buff update at connect finishing since without the buff tic update it wont show up on zoning without it.

Save roughly 2k/min per client connected this way which may not be a lot but if we keep adding things like it because they're "not a lot" they add up.

trevius 07-27-2008 06:22 PM

Thanks KLS! Every bit helps! Sounds like some really nice adjustments.

zutfen 07-28-2008 11:08 AM

Bravo! Even "little" developments like this is an exciting progression!
I'm always excited when things like this get added in.

The work on Opcodes in recent weeks has been phenomenal!

Thanks for your work on this!

spider661 09-05-2008 03:00 AM

does anyone have this patch it seems to be not on the site anymore.

Derision 09-05-2008 05:13 AM

It's been incorporated into the official source and binaries for a while, so I was tidying up my webspace and deleted it. If you aren't running recent code and still need it, I'll see if I can find it and re-upload it when I get home from work (7 or 8 hours from now).

Angelox 09-05-2008 07:34 AM

I still got it:
petbuffwindow.patch


All times are GMT -4. The time now is 06:09 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.