Thread: SoF support
View Single Post
  #7  
Old 03-03-2009, 12:01 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Andrew80k, or anyone else that wants to try it, here are the encodes/decodes for buff related structures. Simply add these to the files listed (anywhere in the file near where the other similar encode/decode is) and then recompile and test if it works:

SoF_ops.h
Code:
E(OP_Buff)
D(OP_Buff)
SoF.cpp
Code:
ENCODE(OP_Buff) {
        ENCODE_LENGTH_EXACT(SpellBuffFade_Struct);
        SETUP_DIRECT_ENCODE(SpellBuffFade_Struct, structs::SpellBuffFade_Struct);
        OUT(slot);
        OUT(level);
        OUT(effect);
        OUT(spellid);
        OUT(duration);
//	OUT(playerId); // Global ID of Player that cast the buff - This isn't set to be used yet
        OUT(slotid);
        OUT(bufffade);
        FINISH_ENCODE();
}

DECODE(OP_Buff) {
        DECODE_LENGTH_ATLEAST(structs::SpellBuffFade_Struct);
        SETUP_DIRECT_DECODE(SpellBuffFade_Struct, structs::SpellBuffFade_Struct);
        IN(slot);
        IN(level);
        IN(effect);
        IN(spellid);
        IN(duration);
//	IN(playerId); // Global ID of Player that cast the buff - This isn't set to be used yet
        IN(slotid);
        IN(bufffade);
        FINISH_DIRECT_DECODE();
}
If the SoF structures I have set in the SoF_structs.h file are correct, these encodes/decodes should probably work to fix all current buff related issues in SoF. If no one is able to try it and confirm if it fixed it or not before I get home, I will be testing it myself later. If this works when I test it, I will get it updated on the SVN ASAP.

I am sure there are probably a few more encode/decode structure issues like this from the structures I modified for SoF based on what the ShowEQ structs were set to. By adding in the proper encodes/decodes, I think it should be able to knock out most of the smaller issues like this pretty quickly. I am not 100% sure that both OP_Buff and OP_BuffFadeMsg need both an encode and a decode, but it doesn't hurt to have both set that way. I would have to check how they are sent on Titanium and/or EQLive to see for sure if both are needed like that.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 03-05-2009 at 12:17 PM..
Reply With Quote