_SPELLLIST revamp and explanation....ready to roll!

A forum for feature requests/discussions and user submitted patches that improve MQ2

Moderator: MacroQuest Developers

Amadeus
The Maestro
The Maestro
Posts: 2036
Joined: Sat Jun 29, 2002 3:51 pm

_SPELLLIST revamp and explanation....ready to roll!

Post by Amadeus » Mon May 12, 2003 5:23 am

Ok -- final posting as I finally figured out how this works, and it seems to be working fine :) Most may know this, but I'll explain how it works so that others won't have to go through the same hassle.

First, the current offset for Spells in eqgame.ini is correct. However, what is easy to overlook is a define in MQ.h:

Code: Select all

#define   SPELLLIST_STARTOFFSET      0x24
So, what you do is go to the memory location pointed to by the current Spells offset, go another 0x24, then you'll be sitting at the first of 3920 4-byte pointers, each pointing to each of the spells in spells_en.txt in order (ie, 0x2c is ID3, 0x30 is ID4, etc) following the structure posted below.

This should compile with a couple modifications in EQLib.cpp (just comment out the lines that scream at you unless you know what they were originally, then please help us out because I can't fathom what they refer to in the current structure), and it should work.

I should point out also that the lengths of Name, Target, etc.. in the following structure seems to be variable depending on the particular spell.

SEE THREAD AT http://macroquest2.com/phpBB2/viewtopic.php?t=2248

EDIT: Fixes, additions, revamps

EDIT: Final comments at beginning of post.
Last edited by Amadeus on Sat May 17, 2003 12:59 am, edited 5 times in total.

EqMule
Developer
Developer
Posts: 2697
Joined: Fri Jan 03, 2003 9:57 pm
Contact:

GOOD JOB!

Post by EqMule » Mon May 12, 2003 12:07 pm

ok im not commenting on this structure, yet, because I havent tried it, however, Id like to thank you for your work so far, the cvsversion I checked out today actually works! no more problem with bankslots or who or anything. the only thing Im not 100% sure about is the SPAWNINFO structure:

Code: Select all

/*0x17c*/   BYTE    Unknown0x17c[23];
/*0x193*/   BYTE    Linkdead;
/*0x194*/   BYTE    Unknown0x194[6];
I would like someone to confirm it... and it might just be possible that the structure should just end with this line instead...

Code: Select all

/*0x17c*/   BYTE    Unknown0x17c[20];
anyway, I dont think its gonna have any major impact, but we should be cautious, it could mess with the /who command if the size is wrong...
My status o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received Image donations for this month's patches.

Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.

Amadeus
The Maestro
The Maestro
Posts: 2036
Joined: Sat Jun 29, 2002 3:51 pm

Post by Amadeus » Mon May 12, 2003 7:58 pm

I think that's a good idea eqmule...I'll submit it in next time to dont.