Page 1 of 1
Me.ActiveDisc always NULL while a disc is running, unless...
Posted: Fri Jun 17, 2016 1:28 am
by Mmats
Me.ActiveDisc is always NULL while a disc is running, unless you open the ingame combat abilities window (if it wasnt already open). As soon as you open that window, ActiveDisc starts returning the active disc name as expected. I have only confirmed this on test server, not sure about live.
If you need to run a test in game, do the following -
1. make sure the combat abilities window is closed
2. activate any discipline (preferably one that runs more than a few seconds)
3. /echo ${Me.ActiveDisc}
4. open the combat abilities window (ALT+C)
5. /echo ${Me.ActiveDisc}
Re: Me.ActiveDisc always NULL while a disc is running, unles
Posted: Sun Jun 19, 2016 8:13 pm
by EqMule
Thanks I'll have a look
Re: Me.ActiveDisc always NULL while a disc is running, unles
Posted: Mon Jun 27, 2016 11:22 am
by Mmats
Thanks :)
Re: Me.ActiveDisc always NULL while a disc is running, unles
Posted: Fri Jul 01, 2016 2:16 pm
by demonstar55
So we have this in the client
Code: Select all
#define NUM_BUFF_SLOTS 0x61 //97
#define NUM_LONG_BUFFS 0x2a //42
#define NUM_SHORT_BUFFS 0x37 //55
typedef struct _CHARINFO2 {
...
/*0x0064*/ struct _SPELLBUFF Buff[NUM_LONG_BUFFS];
/*0x0ed4*/ struct _SPELLBUFF ShortBuff[NUM_SHORT_BUFFS];
...
} CHARINFO2, *PCHARINFO2;
Now you may notice the client has 30 short buffs, but there are 55 here. That's a lot of extra data. Really these arrays are probably a union and it's really 1 array for NPCs server side and split up for clients like this., but the 2nd array isn't entirely just used for songs, the disc also lives in there!
So if we do
We will find our disc's buff!
This is the same as
Ever since the client changed to a scheme like this, the disc buff has always lived in that array after the usable songs.
I'm not sure the best way to change up the code since the client does seem to use an array of 42 and array of 55 here. Probably should just keep a define for actual number of songs as well and grab the buff from the ShortBuffs[NUM_REAL_SONGS]; or w/e