From 28bcf074fc2b343b119e6790ae1d4f8a28e228c5 Mon Sep 17 00:00:00 2001 From: Uleat Date: Mon, 28 Oct 2013 05:00:49 -0400 Subject: [PATCH] Client patch prep work for extending usable skill range --- changelog.txt | 3 +++ common/eq_packet_structs.h | 12 ++++++------ common/patches/Client62.cpp | 17 ++++++++++++++++- common/patches/Client62_structs.h | 10 ++++------ common/patches/RoF.cpp | 15 +++++++++++++++ common/patches/RoF_structs.h | 2 +- common/patches/SoD.cpp | 17 ++++++++++++++++- common/patches/SoD_structs.h | 8 +++----- common/patches/SoF.cpp | 17 ++++++++++++++++- common/patches/SoF_structs.h | 8 +++----- common/patches/Titanium.cpp | 17 ++++++++++++++++- common/patches/Titanium_structs.h | 8 +++----- common/patches/Underfoot.cpp | 17 ++++++++++++++++- common/patches/Underfoot_structs.h | 8 +++----- common/skills.h | 2 +- 15 files changed, 122 insertions(+), 39 deletions(-) diff --git a/changelog.txt b/changelog.txt index 2cca91a88..312abf5b9 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 10/28/2013 == +Uleat: Client patch prep work for extending usable skill range (no apparent issues with Ti through RoF[12-10-2012] testing - i.e., clients showed proper skills and they didn't crash) + == 10/27/2013 == Uleat: Attempted fix for high level (12) debug compile failiures Notes: diff --git a/common/eq_packet_structs.h b/common/eq_packet_structs.h index 0d69c5e4b..81114edc0 100644 --- a/common/eq_packet_structs.h +++ b/common/eq_packet_structs.h @@ -802,8 +802,8 @@ struct SuspendedMinion_Struct static const uint32 MAX_PP_LANGUAGE = 28; static const uint32 MAX_PP_SPELLBOOK = 480; // Increased to 480 to support SoF static const uint32 MAX_PP_MEMSPELL = 9; -static const uint32 MAX_PP_SKILL = 75; -//static const uint32 MAX_PP_SKILL = 100; // actual buffer size +static const uint32 MAX_PP_SKILL = 75; // still in-use server-side - this must remain 75 until all code and database can be changed +//static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 static const uint32 MAX_PP_AA_ARRAY = 240; static const uint32 MAX_GROUP_MEMBERS = 6; static const uint32 MAX_RECAST_TYPES = 20; @@ -941,10 +941,10 @@ struct PlayerProfile_Struct /*4760*/ int32 silver_cursor; // Silver on cursor /*4764*/ int32 copper_cursor; // Copper on cursor /*4768*/ int32 platinum_shared; // Platinum shared between characters -/*4772*/ uint8 unknown4808[24]; // @bp unknown skills? -/*4796*/ uint32 skills[MAX_PP_SKILL]; -/*5096*/ uint8 unknown5132[284]; // @bp unknown skills? -///*5196*/ uint8 unknown5132[184]; // @bp unknown skills? +/*4772*/ uint8 unknown4808[24]; +/*4796*/ uint32 skills[MAX_PP_SKILL]; // currently, 75 dword buffer +/*5096*/ uint8 unknown5132[284]; // this is for 75 dword buffer +///*5196*/ uint8 unknown5132[184]; // this is for 100 dword buffer /*5380*/ uint32 pvp2; // /*5384*/ uint32 unknown5420; // /*5388*/ uint32 pvptype; // diff --git a/common/patches/Client62.cpp b/common/patches/Client62.cpp index ad6276648..d145bf48f 100644 --- a/common/patches/Client62.cpp +++ b/common/patches/Client62.cpp @@ -265,7 +265,22 @@ ENCODE(OP_PlayerProfile) { OUT(gold_cursor); OUT(silver_cursor); OUT(copper_cursor); - OUT_array(skills, structs::MAX_PP_SKILL); + + //OUT_array(skills, structs::MAX_PP_SKILL); // 1:1 direct copy (100 dword) + OUT_array(skills, MAX_PP_SKILL); // copy first 75 from server struct + for(r = MAX_PP_SKILL; r < structs::MAX_PP_SKILL; r++) { eq->skills[r] = (uint32)0; } // zero the rest + + /* + // SKILLS TEST + eq->skills[75] = (uint32)5; // SkillRemoveTrap + eq->skills[76] = (uint32)10; // SkillTripleAttack + eq->skills[77] = (uint32)15; // Skill2HPiercing + eq->skills[78] = (uint32)20; // SkillNone + + for(r = MAX_PP_SKILL + 4; r < structs::MAX_PP_SKILL; r++) { eq->skills[r] = (uint32)0; } + // END TEST + */ + OUT(toxicity); OUT(thirst_level); OUT(hunger_level); diff --git a/common/patches/Client62_structs.h b/common/patches/Client62_structs.h index 6dac41dbd..ded2078b1 100644 --- a/common/patches/Client62_structs.h +++ b/common/patches/Client62_structs.h @@ -626,8 +626,7 @@ struct RaidLeadershipAA_Struct { static const uint32 MAX_PP_LANGUAGE = 28; static const uint32 MAX_PP_SPELLBOOK = 400; static const uint32 MAX_PP_MEMSPELL = 9; -static const uint32 MAX_PP_SKILL = 75; -//static const uint32 MAX_PP_SKILL = 100; // actual buffer size +static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size static const uint32 MAX_PP_AA_ARRAY = 240; static const uint32 MAX_GROUP_MEMBERS = 6; struct PlayerProfile_Struct @@ -723,10 +722,9 @@ struct PlayerProfile_Struct /*4760*/ int32 silver_cursor; // Silver on cursor /*4764*/ int32 copper_cursor; // Copper on cursor /*4768*/ int32 platinum_shared; // Platinum shared between characters -/*4772*/ uint8 unknown3812[24]; // @bp unknown skills? -/*4796*/ uint32 skills[MAX_PP_SKILL]; -/*5096*/ uint8 unknown5096[284]; // @bp unknown skills? -///*5196*/ uint8 unknown5096[184]; // @bp unknown skills? +/*4772*/ uint8 unknown3812[24]; +/*4796*/ uint32 skills[MAX_PP_SKILL]; // 100 dword buffer +/*5196*/ uint8 unknown5096[184]; /*5380*/ uint32 pvp2; // /*5384*/ uint32 unknown4420; // /*5388*/ uint32 pvptype; // diff --git a/common/patches/RoF.cpp b/common/patches/RoF.cpp index 796fbc062..65c52ccbc 100644 --- a/common/patches/RoF.cpp +++ b/common/patches/RoF.cpp @@ -1031,6 +1031,21 @@ ENCODE(OP_PlayerProfile) outapp->WriteUInt32(emu->skills[r]); } + /* + // SKILLS TEST + outapp->WriteUInt32(5); // SkillRemoveTrap + outapp->WriteUInt32(10); // SkillTripleAttack + outapp->WriteUInt32(15); // Skill2HPiercing + outapp->WriteUInt32(20); // SkillNone + + // Write zeroes for the rest of the skills + for(uint32 r = 0; r < structs::MAX_PP_SKILL - MAX_PP_SKILL - 4; r++) + { + outapp->WriteUInt32(emu->skills[r]); + } + // END TEST + */ + outapp->WriteUInt32(25); // Unknown count for(uint32 r = 0; r < 25; r++) diff --git a/common/patches/RoF_structs.h b/common/patches/RoF_structs.h index e2ecb0b5b..cf8f1e804 100644 --- a/common/patches/RoF_structs.h +++ b/common/patches/RoF_structs.h @@ -112,7 +112,7 @@ static const uint32 MAX_NUMBER_GUILDS = 1500; static const uint32 MAX_PP_LANGUAGE = 32; // was 25 static const uint32 MAX_PP_SPELLBOOK = 720; // was 480 static const uint32 MAX_PP_MEMSPELL = 16; // was 12 -static const uint32 MAX_PP_SKILL = 100; // was 75 <- delete this remark once new buffer size active +static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size static const uint32 MAX_PP_AA_ARRAY = 300; static const uint32 MAX_PP_DISCIPLINES = 200; // was 100 static const uint32 MAX_GROUP_MEMBERS = 6; diff --git a/common/patches/SoD.cpp b/common/patches/SoD.cpp index 541900fe0..8506ddc5a 100644 --- a/common/patches/SoD.cpp +++ b/common/patches/SoD.cpp @@ -535,7 +535,22 @@ ENCODE(OP_PlayerProfile) { OUT(gold_cursor); OUT(silver_cursor); OUT(copper_cursor); - OUT_array(skills, structs::MAX_PP_SKILL); + + //OUT_array(skills, structs::MAX_PP_SKILL); // 1:1 direct copy (100 dword) + OUT_array(skills, MAX_PP_SKILL); // copy first 75 from server struct + for(r = MAX_PP_SKILL; r < structs::MAX_PP_SKILL; r++) { eq->skills[r] = (uint32)0; } // zero the rest + + /* + // SKILLS TEST + eq->skills[75] = (uint32)5; // SkillRemoveTrap + eq->skills[76] = (uint32)10; // SkillTripleAttack + eq->skills[77] = (uint32)15; // Skill2HPiercing + eq->skills[78] = (uint32)20; // SkillNone + + for(r = MAX_PP_SKILL + 4; r < structs::MAX_PP_SKILL; r++) { eq->skills[r] = (uint32)0; } + // END TEST + */ + // OUT(unknown04760[236]); OUT(toxicity); OUT(thirst_level); diff --git a/common/patches/SoD_structs.h b/common/patches/SoD_structs.h index 07072562e..685e8f77f 100644 --- a/common/patches/SoD_structs.h +++ b/common/patches/SoD_structs.h @@ -740,8 +740,7 @@ struct BindStruct { static const uint32 MAX_PP_LANGUAGE = 25; // static const uint32 MAX_PP_SPELLBOOK = 480; // Confirmed 60 pages on Live now static const uint32 MAX_PP_MEMSPELL = 10; //was 9 now 10 on Live -static const uint32 MAX_PP_SKILL = 75; -//static const uint32 MAX_PP_SKILL = 100; // actual buffer size +static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size static const uint32 MAX_PP_AA_ARRAY = 300; //was 299 static const uint32 MAX_GROUP_MEMBERS = 6; static const uint32 MAX_RECAST_TYPES = 20; @@ -861,9 +860,8 @@ struct PlayerProfile_Struct /*06484*/ uint32 gold_cursor; // Gold Pieces on cursor /*06488*/ uint32 silver_cursor; // Silver Pieces on cursor /*06492*/ uint32 copper_cursor; // Copper Pieces on cursor -/*06496*/ uint32 skills[MAX_PP_SKILL]; // [300] List of skills -/*06796*/ uint8 unknown04760[236]; -///*06896*/ uint8 unknown04760[136]; +/*06496*/ uint32 skills[MAX_PP_SKILL]; // [400] List of skills // 100 dword buffer +/*06896*/ uint8 unknown04760[136]; /*07032*/ uint32 toxicity; // Potion Toxicity (15=too toxic, each potion adds 3) /*07036*/ uint32 thirst_level; // Drink (ticks till next drink) /*07040*/ uint32 hunger_level; // Food (ticks till next eat) diff --git a/common/patches/SoF.cpp b/common/patches/SoF.cpp index 50aecdd25..f18366d6a 100644 --- a/common/patches/SoF.cpp +++ b/common/patches/SoF.cpp @@ -534,7 +534,22 @@ ENCODE(OP_PlayerProfile) { OUT(gold_cursor); OUT(silver_cursor); OUT(copper_cursor); - OUT_array(skills, structs::MAX_PP_SKILL); + + //OUT_array(skills, structs::MAX_PP_SKILL); // 1:1 direct copy (100 dword) + OUT_array(skills, MAX_PP_SKILL); // copy first 75 from server struct + for(r = MAX_PP_SKILL; r < structs::MAX_PP_SKILL; r++) { eq->skills[r] = (uint32)0; } // zero the rest + + /* + // SKILLS TEST + eq->skills[75] = (uint32)5; // SkillRemoveTrap + eq->skills[76] = (uint32)10; // SkillTripleAttack + eq->skills[77] = (uint32)15; // Skill2HPiercing + eq->skills[78] = (uint32)20; // SkillNone + + for(r = MAX_PP_SKILL + 4; r < structs::MAX_PP_SKILL; r++) { eq->skills[r] = (uint32)0; } + // END TEST + */ + // OUT(unknown04760[236]); OUT(toxicity); OUT(thirst_level); diff --git a/common/patches/SoF_structs.h b/common/patches/SoF_structs.h index 200814d32..3f9b6af8f 100644 --- a/common/patches/SoF_structs.h +++ b/common/patches/SoF_structs.h @@ -718,8 +718,7 @@ struct BindStruct { static const uint32 MAX_PP_LANGUAGE = 25; // static const uint32 MAX_PP_SPELLBOOK = 480; // Confirmed 60 pages on Live now static const uint32 MAX_PP_MEMSPELL = 10; //was 9 now 10 on Live -static const uint32 MAX_PP_SKILL = 75; -//static const uint32 MAX_PP_SKILL = 100; // actual buffer size +static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size static const uint32 MAX_PP_AA_ARRAY = 300; //was 299 static const uint32 MAX_GROUP_MEMBERS = 6; static const uint32 MAX_RECAST_TYPES = 20; @@ -838,9 +837,8 @@ struct PlayerProfile_Struct //23576 Octets /*06484*/ uint32 gold_cursor; // Gold Pieces on cursor /*06488*/ uint32 silver_cursor; // Silver Pieces on cursor /*06492*/ uint32 copper_cursor; // Copper Pieces on cursor -/*06496*/ uint32 skills[MAX_PP_SKILL]; // [300] List of skills -/*06796*/ uint8 unknown04760[236]; -///*06896*/ uint8 unknown04760[136]; +/*06496*/ uint32 skills[MAX_PP_SKILL]; // [400] List of skills // 100 dword buffer +/*06896*/ uint8 unknown04760[136]; /*07032*/ uint32 toxicity; // Potion Toxicity (15=too toxic, each potion adds 3) /*07036*/ uint32 thirst_level; // Drink (ticks till next drink) /*07040*/ uint32 hunger_level; // Food (ticks till next eat) diff --git a/common/patches/Titanium.cpp b/common/patches/Titanium.cpp index 7def0b246..7369377fd 100644 --- a/common/patches/Titanium.cpp +++ b/common/patches/Titanium.cpp @@ -269,7 +269,22 @@ ENCODE(OP_PlayerProfile) { OUT(gold_cursor); OUT(silver_cursor); OUT(copper_cursor); - OUT_array(skills, structs::MAX_PP_SKILL); + + //OUT_array(skills, structs::MAX_PP_SKILL); // 1:1 direct copy (100 dword) + OUT_array(skills, MAX_PP_SKILL); // copy first 75 from server struct + for(r = MAX_PP_SKILL; r < structs::MAX_PP_SKILL; r++) { eq->skills[r] = (uint32)0; } // zero the rest + + /* + // SKILLS TEST + eq->skills[75] = (uint32)5; // SkillRemoveTrap + eq->skills[76] = (uint32)10; // SkillTripleAttack + eq->skills[77] = (uint32)15; // Skill2HPiercing + eq->skills[78] = (uint32)20; // SkillNone + + for(r = MAX_PP_SKILL + 4; r < structs::MAX_PP_SKILL; r++) { eq->skills[r] = (uint32)0; } + // END TEST + */ + // OUT(unknown04760[236]); OUT(toxicity); OUT(thirst_level); diff --git a/common/patches/Titanium_structs.h b/common/patches/Titanium_structs.h index a84f94683..0298ca630 100644 --- a/common/patches/Titanium_structs.h +++ b/common/patches/Titanium_structs.h @@ -648,8 +648,7 @@ struct BindStruct { static const uint32 MAX_PP_LANGUAGE = 28; static const uint32 MAX_PP_SPELLBOOK = 400; static const uint32 MAX_PP_MEMSPELL = 9; -static const uint32 MAX_PP_SKILL = 75; -//static const uint32 MAX_PP_SKILL = 100; // actual buffer size +static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size static const uint32 MAX_PP_AA_ARRAY = 240; static const uint32 MAX_GROUP_MEMBERS = 6; static const uint32 MAX_RECAST_TYPES = 20; @@ -753,9 +752,8 @@ struct PlayerProfile_Struct /*04448*/ uint32 gold_cursor; // Gold Pieces on cursor /*04452*/ uint32 silver_cursor; // Silver Pieces on cursor /*04456*/ uint32 copper_cursor; // Copper Pieces on cursor -/*04460*/ uint32 skills[MAX_PP_SKILL]; // List of skills -/*04760*/ uint8 unknown04760[236]; -///*04860*/ uint8 unknown04760[136]; +/*04460*/ uint32 skills[MAX_PP_SKILL]; // [400] List of skills // 100 dword buffer +/*04860*/ uint8 unknown04760[136]; /*04996*/ uint32 toxicity; // Potion Toxicity (15=too toxic, each potion adds 3) /*05000*/ uint32 thirst_level; // Drink (ticks till next drink) /*05004*/ uint32 hunger_level; // Food (ticks till next eat) diff --git a/common/patches/Underfoot.cpp b/common/patches/Underfoot.cpp index 5420da953..757640189 100644 --- a/common/patches/Underfoot.cpp +++ b/common/patches/Underfoot.cpp @@ -549,7 +549,22 @@ ENCODE(OP_PlayerProfile) { OUT(gold_cursor); OUT(silver_cursor); OUT(copper_cursor); - OUT_array(skills, structs::MAX_PP_SKILL); + + //OUT_array(skills, structs::MAX_PP_SKILL); // 1:1 direct copy (100 dword) + OUT_array(skills, MAX_PP_SKILL); // copy first 75 from server struct + for(r = MAX_PP_SKILL; r < structs::MAX_PP_SKILL; r++) { eq->skills[r] = (uint32)0; } // zero the rest + + /* + // SKILLS TEST + eq->skills[75] = (uint32)5; // SkillRemoveTrap + eq->skills[76] = (uint32)10; // SkillTripleAttack + eq->skills[77] = (uint32)15; // Skill2HPiercing + eq->skills[78] = (uint32)20; // SkillNone + + for(r = MAX_PP_SKILL + 4; r < structs::MAX_PP_SKILL; r++) { eq->skills[r] = (uint32)0; } + // END TEST + */ + // OUT(unknown04760[236]); OUT(toxicity); OUT(thirst_level); diff --git a/common/patches/Underfoot_structs.h b/common/patches/Underfoot_structs.h index 0bdb2b141..07d3660a3 100644 --- a/common/patches/Underfoot_structs.h +++ b/common/patches/Underfoot_structs.h @@ -764,8 +764,7 @@ struct BindStruct { static const uint32 MAX_PP_LANGUAGE = 25; // static const uint32 MAX_PP_SPELLBOOK = 480; // Confirmed 60 pages on Underfoot now static const uint32 MAX_PP_MEMSPELL = 10; //was 9 now 10 on Underfoot -static const uint32 MAX_PP_SKILL = 75; -//static const uint32 MAX_PP_SKILL = 100; // actual buffer size +static const uint32 MAX_PP_SKILL = _SkillPacketArraySize; // 100 - actual skills buffer size static const uint32 MAX_PP_AA_ARRAY = 300; //was 299 static const uint32 MAX_GROUP_MEMBERS = 6; static const uint32 MAX_RECAST_TYPES = 20; @@ -887,9 +886,8 @@ struct PlayerProfile_Struct /*07332*/ uint32 gold_cursor; // Gold Pieces on cursor /*07336*/ uint32 silver_cursor; // Silver Pieces on cursor /*07340*/ uint32 copper_cursor; // Copper Pieces on cursor -/*07344*/ uint32 skills[MAX_PP_SKILL]; // [300] List of skills -/*07644*/ uint8 unknown07644[236]; -///*07744*/ uint8 unknown07644[136]; +/*07344*/ uint32 skills[MAX_PP_SKILL]; // [400] List of skills // 100 dword buffer +/*07744*/ uint8 unknown07644[136]; /*07880*/ uint32 toxicity; // Potion Toxicity (15=too toxic, each potion adds 3) /*07884*/ uint32 thirst_level; // Drink (ticks till next drink) /*07888*/ uint32 hunger_level; // Food (ticks till next eat) diff --git a/common/skills.h b/common/skills.h index ef5ae6e11..c6df0091b 100644 --- a/common/skills.h +++ b/common/skills.h @@ -123,7 +123,7 @@ enum SkillUseTypes : uint32 // Support values // /*-----*/ _SkillServerArraySize = _SkillCount_RoF2, // Should reflect last client '_SkillCount' -// /*-----*/ _SkillPacketArraySize = 100, // Currently supported clients appear to iterate full 100 dword buffer range +/*-----*/ _SkillPacketArraySize = 100, // Currently supported clients appear to iterate full 100 dword buffer range // Superfluous additions to SkillUseTypes..server-use only // /*-----*/ ExtSkillGenericTradeskill = 100