Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 07-25-2008, 02:04 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default 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.



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.
Reply With Quote
  #2  
Old 07-25-2008, 03:28 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

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();
}
Reply With Quote
  #3  
Old 07-25-2008, 04:07 PM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default

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!
Reply With Quote
  #4  
Old 07-25-2008, 04:17 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Nice, I'll get this all sorted out and in submission in a few days.
Reply With Quote
  #5  
Old 07-25-2008, 04:27 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Wow, thought i'd never see the buffs on pets again - Thanks again!
Reply With Quote
  #6  
Old 07-25-2008, 08:06 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

I remember on live not being able to click off beneficial spells from pet. So its all good. Good work.
Reply With Quote
  #7  
Old 07-27-2008, 05:55 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

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.
Reply With Quote
  #8  
Old 07-27-2008, 06:22 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Thanks KLS! Every bit helps! Sounds like some really nice adjustments.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #9  
Old 07-28-2008, 11:08 AM
zutfen
Fire Beetle
 
Join Date: Jul 2003
Posts: 19
Default

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!
Reply With Quote
  #10  
Old 09-05-2008, 03:00 AM
spider661
Discordant
 
Join Date: Oct 2005
Location: michigain
Posts: 260
Default

does anyone have this patch it seems to be not on the site anymore.
Reply With Quote
  #11  
Old 09-05-2008, 05:13 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

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).
Reply With Quote
  #12  
Old 09-05-2008, 07:34 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

I still got it:
petbuffwindow.patch
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 12:45 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3