A forum for feature requests/discussions and user submitted patches that improve MQ2
Moderator: MacroQuest Developers
-
Amadeus
- The Maestro

- Posts: 2036
- Joined: Sat Jun 29, 2002 3:51 pm
Post
by Amadeus » Sat Aug 30, 2003 9:24 pm
One little change. They added in 16 bytes of what appears to be nothing, right in the middle of the struct. I put it in bold for those that are interested...
New struct, verified:
Code: Select all
// 6-11-2003 Amadeus
// 6-29-2003 "
#define SPELLLIST_STARTOFFSET 0x24
#define TOTAL_SPELL_COUNT 0x0FA0 // # of spells in game
typedef struct _SPELLLIST {
/*0x000*/ DWORD ID;
/*0x004*/ FLOAT Range;
/*0x008*/ BYTE Unknown0x008[12];
/*0x014*/ DWORD CastTime;
/*0x018*/ DWORD FizzleTime;
/*0x01c*/ DWORD RecastTime;
/*0x020*/ DWORD DurationType; //DurationFormula on Lucy
/*0x024*/ DWORD DurationValue1;
/*0x028*/ DWORD Unknown0x028;
/*0x02c*/ DWORD Mana;
/*0x030*/ DWORD Base[12]; //Base1-Base12
/*0x060*/ DWORD Max[12]; //Max1-Max12
/*0x090*/ DWORD BookIcon;
/*0x094*/ DWORD GemIcon;
/*0x098*/ DWORD ReagentId[4]; //ReagentId1-ReagentId4
/*0x0a8*/ DWORD ReagentCount[4]; //ReagentCount1-ReagentCount4
/*0x0b8*/ DWORD Unknown0x0b8[4];
/*0x0c8*/ BYTE Calc[12]; //Calc1-Calc12
/*0x0d4*/ BYTE Unknown0x0d4[3];
/*0x0d7*/ BYTE Deletable;
/*0x0d8*/ BYTE Attrib[12]; //Attrib1-Attrib12
/*0x0e4*/ BYTE UnknownData0x0e4;
/*0x0e5*/ BYTE FizzLeadj;
/*0x0e6*/ BYTE UnknownData0x0e6;
/*0x0e7*/ BYTE Unknown0x0e7;
/*0x0e8*/ BYTE Unknown0x0e8[3];
/*0x0eb*/ BYTE Level[15];
/*0x0fa*/ BYTE Unknown0x0fa[16];
/*0x10a*/ BYTE CastingAnim;
/*0x10b*/ BYTE Unknown0x10b[5];
/*0x110*/ DWORD descnum;
/*0x114*/ DWORD UnknownFlags0x114;
/*0x118*/ BYTE Unknown0x118[12];
/*0x124*/ DWORD UnknownFlags0x124;
/*0x128*/ DWORD UnknownFlags0x128;
/*0x12c*/ DWORD UnknownFlags0x12c;
[b]/*0x130*/ DWORD Unknown0x130[5];[/b]
/*0x144*/ CHAR *Name;
/*0x148*/ CHAR *Target;
/*0x14c*/ CHAR *Unknown0x13c;
/*0x150*/ CHAR *Unknown0x140;
/*0x154*/ CHAR *Unknown0x144; // new struct that indicates casting sound possibly?
/*0x158*/ CHAR *CastOnYou;
/*0x15c*/ CHAR *CastOnAnother;
/*0x160*/ CHAR *WearOff;
/*0x164*/ CHAR *Unknown0x154; // new sprites animation struct?
/*0x168*/ DWORD spaindex;
/*0x16c*/ CHAR *Unknown0x15c; // new "effect" struct?
/*0x170*/ DWORD SpellAnim;
/*0x174*/ DWORD Unknown0x164;
/*0x178*/ DWORD Unknown130; // This is Unknown130 from Lucy
/*0x17c*/ DWORD Unknown0x16c;
/*0x180*/ DWORD SpellIcon;
/*0x184*/ BYTE Unknown0x174[12];
} SPELLLIST, *PSPELLLIST;
Example:
Code: Select all
ID = 1216 (offset 0x0)
Range = 400.000000 (offset 0x4)
CastTime = 250 (offset 0x14)
FizzleTime = 0 (offset 0x18)
RecastTime = 0 (offset 0x1c)
DurationType = 0 (offset 0x20)
DurationValue1 = 0 (offset 0x24)
Mana = 0 (offset 0x2c)
Base1 = -777 (offset 0x30)
Base2 = 0 (offset 0x34)
Base3 = 0 (offset 0x38)
Base4 = 0 (offset 0x3c)
Base5 = 0 (offset 0x40)
Base6 = 0 (offset 0x44)
Base7 = 0 (offset 0x48)
Base8 = 0 (offset 0x4c)
Base9 = 0 (offset 0x50)
Base10 = 0 (offset 0x54)
Base11 = 0 (offset 0x58)
Base12 = 0 (offset 0x5c)
Max1 = 0 (offset 0x60)
Max2 = 0 (offset 0x64)
Max3 = 0 (offset 0x68)
Max4 = 0 (offset 0x6c)
Max5 = 0 (offset 0x70)
Max6 = 0 (offset 0x74)
Max7 = 0 (offset 0x78)
Max8 = 0 (offset 0x7c)
Max9 = 0 (offset 0x80)
Max10 = 0 (offset 0x84)
Max11 = 0 (offset 0x88)
Max12 = 0 (offset 0x8c)
BookIcon = 2504 (offset 0x90)
GemIcon = 2059 (offset 0x94)
ReagentId1 = -1 (offset 0x98)
ReagentId2 = -1 (offset 0x9c)
ReagentId3 = -1 (offset 0xa0)
ReagentId4 = -1 (offset 0xa4)
ReagentCount1 = 1 (offset 0xa8)
ReagentCount2 = 1 (offset 0xac)
ReagentCount3 = 1 (offset 0xb0)
ReagentCount4 = 1 (offset 0xb4)
Calc1 = 100 (offset 0xc8)
Calc2 = 100 (offset 0xc9)
Calc3 = 100 (offset 0xca)
Calc4 = 100 (offset 0xcb)
Calc5 = 100 (offset 0xcc)
Calc6 = 100 (offset 0xcd)
Calc7 = 100 (offset 0xce)
Calc8 = 100 (offset 0xcf)
Calc9 = 100 (offset 0xd0)
Calc10 = 100 (offset 0xd1)
Calc11 = 100 (offset 0xd2)
Calc12 = 100 (offset 0xd3)
Deletable = 0 (offset 0xd7)
Attrib1 = 0 (offset 0xd8)
Attrib2 = 254 (offset 0xd9)
Attrib3 = 254 (offset 0xda)
Attrib4 = 254 (offset 0xdb)
Attrib5 = 254 (offset 0xdc)
Attrib6 = 254 (offset 0xdd)
Attrib7 = 254 (offset 0xde)
Attrib8 = 254 (offset 0xdf)
Attrib9 = 254 (offset 0xe0)
Attrib10 = 254 (offset 0xe1)
Attrib11 = 254 (offset 0xe2)
Attrib12 = 254 (offset 0xe3)
UnknownData0x0e4 = 5 (offset 0xe4)
FizzLeadj = 0 (offset 0xe5)
UnknownData0x0e6 = 24 (offset 0xe6)
Level(Class 1) = 255 (offset 0xeb)
Level(Class 2) = 255 (offset 0xec)
Level(Class 3) = 255 (offset 0xed)
Level(Class 4) = 255 (offset 0xee)
Level(Class 5) = 255 (offset 0xef)
Level(Class 6) = 255 (offset 0xf0)
Level(Class 7) = 255 (offset 0xf1)
Level(Class 8) = 255 (offset 0xf2)
Level(Class 9) = 255 (offset 0xf3)
Level(Class 10) = 255 (offset 0xf4)
Level(Class 11) = 255 (offset 0xf5)
Level(Class 12) = 255 (offset 0xf6)
Level(Class 13) = 255 (offset 0xf7)
Level(Class 14) = 255 (offset 0xf8)
Level(Class 15) = 255 (offset 0xf9)
CastingAnim = 44 (offset 0x10a)
descnum = 0 (offset 0x110)
UnknownFlags0x114 = 0 [] (Offset: 0x114)
UnknownFlags0x124 = 39001 [1 8 16 64 2048 4096 32768 ] (Offset: 0x124)
UnknownFlags0x128 = 0 [] (Offset: 0x128)
UnknownFlags0x12c = 0 [] (Offset: 0x12c)
Name = Guide Bolt (offset *0x144)
Target = PLAYER_1 (offset *0x148)
CastOnYou = You strike out with a mystic force. (offset *0x158)
CastOnAnother = Someone strikes out with a mystic force. (offset *0x15c)
WearOff = (offset *0x160)
spaindex = 15 (offset 0x168)
SpellAnim = 103 (offset 0x170)
SpellIcon = 153 (offset 0x180)
NOTE: No changes needed to ext2.cpp for this change.
Last edited by
Amadeus on Sat Aug 30, 2003 9:47 pm, edited 1 time in total.
-
Amadeus
- The Maestro

- Posts: 2036
- Joined: Sat Jun 29, 2002 3:51 pm
Post
by Amadeus » Sat Aug 30, 2003 9:28 pm
I should point out that I didn't take the time to check if they added any extra spells to the game (ie, raising the max_spells)
-
EqMule
- Developer

- Posts: 2697
- Joined: Fri Jan 03, 2003 9:57 pm
-
Contact:
Post
by EqMule » Sat Aug 30, 2003 9:50 pm
k thanks, we will use your version of this in the next release of mq

o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received

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

- Posts: 2036
- Joined: Sat Jun 29, 2002 3:51 pm
Post
by Amadeus » Sat Aug 30, 2003 9:53 pm
That's cool ..you mentioned SPELLINFO in one of your posts, I assumed you meant this (SPELLLIST) since spellinfo is pretty short/sweet.
Or, is there something I'm missing?
-
EqMule
- Developer

- Posts: 2697
- Joined: Fri Jan 03, 2003 9:57 pm
-
Contact:
Post
by EqMule » Sat Aug 30, 2003 9:54 pm
yeah hehe this is exactly what i meant i must have misstyped...

o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received

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.
-
Shocks
- a ghoul

- Posts: 101
- Joined: Tue Feb 18, 2003 3:26 pm
-
Contact:
Post
by Shocks » Sun Aug 31, 2003 7:05 pm
Does this happen to be in the current zip ?
-
Amadeus
- The Maestro

- Posts: 2036
- Joined: Sat Jun 29, 2002 3:51 pm
Post
by Amadeus » Sun Aug 31, 2003 7:07 pm
Open the MQ.h file within the zip and check :)
If the line that's bolded above doesnt' look like what you see in your MQ.h then you just need to add the [5] to it.
-
Shocks
- a ghoul

- Posts: 101
- Joined: Tue Feb 18, 2003 3:26 pm
-
Contact:
Post
by Shocks » Sun Aug 31, 2003 7:31 pm
So the bold line change is the change. It is in the zip.
Does this have anything to do with spellinfo such as gem # of a spell?
-
Amadeus
- The Maestro

- Posts: 2036
- Joined: Sat Jun 29, 2002 3:51 pm
Post
by Amadeus » Sun Aug 31, 2003 7:41 pm
It's impossible to know what you're asking from your statement. Post what doesn't seem to work for you, and we'll look into it.
-
Shocks
- a ghoul

- Posts: 101
- Joined: Tue Feb 18, 2003 3:26 pm
-
Contact:
Post
by Shocks » Sun Aug 31, 2003 7:48 pm
This is whats not working for me.
/echo $char(gem,"Ensare")
It returns 0 as if I did not have ready to cast.
-
Amadeus
- The Maestro

- Posts: 2036
- Joined: Sat Jun 29, 2002 3:51 pm
Post
by Amadeus » Sun Aug 31, 2003 7:58 pm
What does the current CHARINFO look like in the cvs/zip file?
-
Shocks
- a ghoul

- Posts: 101
- Joined: Tue Feb 18, 2003 3:26 pm
-
Contact:
Post
by Shocks » Sun Aug 31, 2003 8:08 pm
Is this what you mean. New to this.
typedef struct _CHARINFO {
/*0x0000*/ BYTE Unknown00000;
/*0x0001*/ BYTE Unknown00001;
/*0x0002*/ CHAR Name[64];
/*0x0042*/ CHAR Lastname[70];
/*0x0088*/ DWORD Gender;
/*0x008c*/ DWORD Race;
/*0x0090*/ DWORD Class;
/*0x0094*/ DWORD AAPoints; // WRONG!!!!
/*0x0098*/ DWORD Level;
/*0x009c*/ DWORD Exp;
/*0x00a0*/ DWORD PracticePoints;
/*0x00a4*/ DWORD Mana;
/*0x00a8*/ DWORD BaseHP;
/*0x00ac*/ DWORD Stunned;
/*0x00b0*/ DWORD BaseSTR;
/*0x00b4*/ DWORD BaseSTA;
/*0x00b8*/ DWORD BaseCHA;
/*0x00bc*/ DWORD BaseDEX;
/*0x00c0*/ DWORD BaseINT;
/*0x00c4*/ DWORD BaseAGI;
/*0x00c8*/ DWORD BaseWIS;
/*0x00cc*/ DWORD Face;
/*0x00d0*/ DWORD Unknown0x00d0[2];
/*0x00d8*/ BYTE Unknown0x00d8[36]; // There is definately something here...
/*0x00fc*/ BYTE languages[32]; // List of languages
/*0x011c*/ struct _SPELLBUFF Buff[15];
/*0x020c*/ DWORD SpellBook[512];
/*0x0a0c*/ DWORD MemorizedSpells[8];
/*0x0a2c*/ DWORD Unknown0x0a2c[9];
/*0x0a50*/ FLOAT y;
/*0x0a54*/ FLOAT x;
/*0x0a58*/ FLOAT z;
/*0x0a5c*/ FLOAT heading;
/*0x0a60*/ DWORD standstate; // is this right?
/*0x0a64*/ DWORD Plat;
/*0x0a68*/ DWORD Gold;
/*0x0a6c*/ DWORD Silver;
/*0x0a70*/ DWORD Copper;
/*0x0a74*/ DWORD BankPlat;
/*0x0a78*/ DWORD BankGold;
/*0x0a7c*/ DWORD BankSilver;
/*0x0a80*/ DWORD BankCopper;
/*0x0a84*/ DWORD Unknown0x0a84[4];
/*0x0a94*/ DWORD BankSharedPlat;
/*0x0a98*/ DWORD Unknown0x0a98[7];
/*0x0ab4*/ DWORD Skill[125];
/*0x0ca8*/ DWORD UnknownData0x0ca8;
/*0x0cac*/ FLOAT UnknownData0x0cac;
/*0x0cb0*/ FLOAT UnknownData0x0cb0;
/*0x0cb4*/ FLOAT UnknownData0x0cb4;
/*0x0cb8*/ FLOAT UnknownData0x0cb8;
/*0x0cbc*/ DWORD Unknown0x0cbc[16];
/*0x0cfc*/ DWORD UnknownData0x0cfc;
/*0x0d00*/ DWORD UnknownData0x0d00;
/*0x0d04*/ DWORD Unknown0x0d04[3];
/*0x0d10*/ DWORD UnknownData0x0d10; // binary flag perhaps
/*0x0d14*/ DWORD Unknown0x0d14[4];
/*0x0d24*/ DWORD UnknownData0x0d24;
/*0x0d28*/ DWORD Unknown0x0d28[5];
/*0x0d3c*/ DWORD UnknownData0x0d3c;
/*0x0d40*/ DWORD Unknown0x0d40;
/*0x0d44*/ DWORD UnknownData0x0d44;
/*0x0d48*/ DWORD Unknown0x0d48;
/*0x0d4c*/ DWORD UnknownData0x0d4c;
/*0x0d50*/ DWORD Unknown0x0d50[3];
/*0x0d5c*/ DWORD hungerlevel;
/*0x0d60*/ DWORD thirstlevel;
/*0x0d64*/ DWORD Unknown0x0d64[5];
/*0x0d78*/ DWORD zoneId;
/*0x0d7c*/ struct _SPAWNINFO* pSpawn;
/*0x0d80*/ PITEMINFO* Inventory[30];
/*0x0df8*/ PITEMINFO* Cursor;
/*0x0dfc*/ DWORD Unknown0x0dfc;
/*0x0e00*/ DWORD STR;
/*0x0e04*/ DWORD STA;
/*0x0e08*/ DWORD CHA;
/*0x0e0c*/ DWORD DEX;
/*0x0e10*/ DWORD INT;
/*0x0e14*/ DWORD AGI;
/*0x0e18*/ DWORD WIS;
/*0x0e1c*/ DWORD UnknownData0x0e1c;
/*0x0e20*/ DWORD SaveMagic;
/*0x0e24*/ DWORD SaveFire;
/*0x0e28*/ DWORD SaveCold;
/*0x0e2c*/ DWORD SavePoison;
/*0x0e30*/ DWORD SaveDisease;
/*0x0e34*/ DWORD CurrWeight;
/*0x0e38*/ DWORD Unknown0x0e38;
/*0x0e3c*/ DWORD UnknownData0x0e3c;
/*0x0e40*/ DWORD UnknownData0x0e40;
/*0x0e44*/ DWORD Unknown0x0e44[15];
/*0x0e80*/ DWORD UnknownData0x0e80;
SPELLBUFF ShortBuff[6];
/*0x0e84*/ DWORD Unknown0x0e84[67];
/*0x0ff0*/ DWORD UnknownData0x0ff0;
/*0x0ff4*/ DWORD Unknown0x0ff4[11];
/*0x1020*/ DWORD UnknownData0x1020; // binary flag perhaps
/*0x1024*/ DWORD Unknown0x1024;
/*0x1028*/ DWORD UnknownData0x1028;
/*0x102c*/ DWORD Unknown0x102c[19];
/*0x1078*/ DWORD UnknownData0x1078;
/*0x107c*/ DWORD Unknown0x107c[2];
/*0x1084*/ DWORD UnknownData0x1084;
/*0x1088*/ DWORD Unknown0x1088;
/*0x108c*/ DWORD UnknownData0x108c;
/*0x1090*/ DWORD Unknown0x1090[6];
/*0x10a8*/ DWORD UnknownData0x10a8;
/*0x10ac*/ DWORD Unknown0x10ac[20];
/*0x10fc*/ DWORD UnknownData0x10fc;
/*0x1100*/ DWORD Unknown0x1100[3];
/*0x110c*/ DWORD UnknownData0x110c;
/*0x1110*/ DWORD Unknown0x1110[39];
/*0x11ac*/ DWORD UnknownData0x11ac;
/*0x11b0*/ DWORD UnknownData0x11b0;
/*0x11b4*/ DWORD Unknown0x11b4[62];
/*0x12ac*/ DWORD ZoneBoundId;
/*0x12b0*/ DWORD Unknown0x12b0[4];
/*0x12c0*/ FLOAT ZoneBoundY;
/*0x12c4*/ DWORD Unknown0x12c4[4];
/*0x12d4*/ FLOAT ZoneBoundX;
/*0x12d8*/ DWORD Unknown0x12d8[4];
/*0x12e8*/ FLOAT ZoneBoundZ;
/*0x12ec*/ FLOAT UnknownData0x12ec;
/*0x12f0*/ FLOAT UnknownData0x12f0;
/*0x12f4*/ FLOAT UnknownData0x12f4;
/*0x12f8*/ FLOAT UnknownData0x12f8;
/*0x12fc*/ FLOAT UnknownData0x12fc;
/*0x1300*/ DWORD Unknown0x1300[4];
/*0x1310*/ FLOAT UnknownData0x1310;
/*0x1314*/ DWORD Diety;
/*0x1318*/ DWORD GuildID;
/*0x131c*/ FLOAT UnknownData0x131c;
/*0x1320*/ FLOAT UnknownData0x1320;
/*0x1324*/ DWORD UnknownData0x1324;
/*0x1328*/ DWORD UnknownData0x1328;
/*0x132c*/ DWORD Unknown0x132c[7];
/*0x1348*/ DWORD UnknownData0x1348; // This value looks familiar...
/*0x134c*/ DWORD Unknown0x134c[2];
/*0x1354*/ DWORD UnknownData0x1354; // This looks familiar too...
/*0x1358*/ DWORD Unknown0x1358[103];
/*0x14f4*/ DWORD AAExp; //confirmed: AAExp/330 = %
/*0x14f8*/ DWORD Unknown0x14f8[730]; // There is a lot of data here...
/*0x2060*/ CHAR Server[40];
DWORD Unknown00031[7885];
PITEMINFO* Bank[NUM_BANK_SLOTS];
} CHARINFO, *PCHARINFO;
-
Amadeus
- The Maestro

- Posts: 2036
- Joined: Sat Jun 29, 2002 3:51 pm
Post
by Amadeus » Sun Aug 31, 2003 8:14 pm
I should have looked before asking that question, it diden't really matter.
Anyway, looking at the code it looks as though that that particular parser command uses the PEQCASTSPELLWINDOW struct, which I don't think has been reviewed as yet.
That code looks somewhat new, so someone around should be able to debug it faster than I.
-
EqMule
- Developer

- Posts: 2697
- Joined: Fri Jan 03, 2003 9:57 pm
-
Contact:
Post
by EqMule » Sun Aug 31, 2003 9:08 pm
/echo $char(gem,"Ensnare")
works now... I assume you meant ensnare...

o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received

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

- Posts: 2036
- Joined: Sat Jun 29, 2002 3:51 pm
Post
by Amadeus » Sun Aug 31, 2003 10:27 pm
hehehe..I can't believe I didn't catch that!