1 Commits
11.01 ... 10.01

Author SHA1 Message Date
ChaosMarc
94b7f1f9bb updated from 10.00 to 10.01 by Yohann 2017-01-11 08:44:46 +01:00
142 changed files with 4399 additions and 3823 deletions

View File

@@ -1,6 +1,5 @@
/*====================================================================== /*======================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
Declares the type for a STDCALL or FASTCALL function pointer Declares the type for a STDCALL or FASTCALL function pointer
called N with arguments list P, returning R, namedInDLL D and at @A called N with arguments list P, returning R, namedInDLL D and at @A
@@ -148,142 +147,142 @@
//F7(STD, D2Common,00000,00000,00000,00000,10001,00000,00000,00000, DWORD, D2GetActIDFromLevel, (DWORD levelID)); //F7(STD, D2Common,00000,00000,00000,00000,10001,00000,00000, DWORD, D2GetActIDFromLevel, (DWORD levelID));
F7(STD, D2Common,00000,00000,00000,10188,11084,11109,10346,10907, DWORD, D2Common11084, (Room* ptRoom, DWORD zero)); F7(STD, D2Common,00000,00000,00000,10188,11084,11109,10346, DWORD, D2Common11084, (Room* ptRoom, DWORD zero));
F7(STD, D2Common,10057,10057,10057,10332,11021,10511,10826,10691, DWORD, D2GetLevelID, (Room* ptRoom)); F7(STD, D2Common,10057,10057,10057,10332,11021,10511,10826, DWORD, D2GetLevelID, (Room* ptRoom));
F7(STD, D2Common,10138,10138,10138,10623,10491,11043,10654,10716, Room*, D2GetDropRoom, (Room* ptRoom, Position*, Position*, DWORD, DWORD, DWORD, DWORD)); F7(STD, D2Common,10138,10138,10138,10623,10491,11043,10654, Room*, D2GetDropRoom, (Room* ptRoom, Position*, Position*, DWORD, DWORD, DWORD, DWORD));
//F7(STD, D2Common,10149,10149,10149,00000,00000,00000,00000,00000, Inventory*, D2GetInventory, (Unit* ptUnit)); //F7(STD, D2Common,10149,10149,10149,00000,00000,00000,00000, Inventory*, D2GetInventory, (Unit* ptUnit));
F7(STD, D2Common,10242,10242,10242,00000,00000,00000,00000,00000, Unit*, D2Common10242, (Inventory* ptInventory, Unit* ptItem, DWORD bIsClient)); F7(STD, D2Common,10242,10242,10242,00000,00000,00000,00000, Unit*, D2Common10242, (Inventory* ptInventory, Unit* ptItem, DWORD bIsClient));
F7(STD, D2Common,10246,10246,10246,10855,10813,10289,10133,10402, Unit*, D2CanPutItemInInv, (Inventory* ptInventory, Unit* ptItem, DWORD p3, DWORD zero, Unit* ptUnit, const char* file, DWORD line)); F7(STD, D2Common,10246,10246,10246,10855,10813,10289,10133, Unit*, D2CanPutItemInInv, (Inventory* ptInventory, Unit* ptItem, DWORD p3, DWORD zero, Unit* ptUnit, const char* file, DWORD line));
F7(STD, D2Common,10243,10243,10243,10461,10827,10936,10646,10490, Unit*, D2InvRemoveItem, (Inventory* ptInventory, Unit* ptItem)); F7(STD, D2Common,10243,10243,10243,10461,10827,10936,10646, Unit*, D2InvRemoveItem, (Inventory* ptInventory, Unit* ptItem));
F7(STD, D2Common,10249,10249,10249,10880,11068,10436,11107,10963, DWORD, D2InvAddItem, (Inventory* ptInventory, Unit* ptItem, DWORD posX, DWORD posY, DWORD vValueC, DWORD bIsClient, BYTE page));//result : boolean 0=echec ; vValueC = 0 for Game.dll, 1 for Clientdll F7(STD, D2Common,10249,10249,10249,10880,11068,10436,11107, DWORD, D2InvAddItem, (Inventory* ptInventory, Unit* ptItem, DWORD posX, DWORD posY, DWORD vValueC, DWORD bIsClient, BYTE page));//result : boolean 0=echec ; vValueC = 0 for Game.dll, 1 for Clientdll
F7(STD, D2Common,10250,10250,10250,00000,00000,00000,00000,00000, DWORD, D2Common10250, (const char* file, DWORD line, Inventory* ptInventory, DWORD posX, DWORD posY, DWORD vValueC, DWORD bIsClient, BYTE page));// result : boolean 0=echec ; vValueC = 0 for Game.dll, 1 for Clientdll F7(STD, D2Common,10250,10250,10250,00000,00000,00000,00000, DWORD, D2Common10250, (const char* file, DWORD line, Inventory* ptInventory, DWORD posX, DWORD posY, DWORD vValueC, DWORD bIsClient, BYTE page));// result : boolean 0=echec ; vValueC = 0 for Game.dll, 1 for Clientdll
//F7(STD, D2Common,10257,10257,10257,00000,00000,00000,00000,00000, Unit*, D2GetItemFromBodyLoc, (Inventory* ptInventory, DWORD bodyloc)); //F7(STD, D2Common,10257,10257,10257,00000,00000,00000,00000, Unit*, D2GetItemFromBodyLoc, (Inventory* ptInventory, DWORD bodyloc));
F7(STD, D2Common,10273,10273,10273,00000,00000,00000,00000,00000, DWORD, D2Common10273, (Inventory* ptInventory, void* unknow)); F7(STD, D2Common,10273,10273,10273,00000,00000,00000,00000, DWORD, D2Common10273, (Inventory* ptInventory, void* unknow));
F7(STD, D2Common,10277,10277,10277,10402,10535,11151,10460,11040, Unit*, D2InventoryGetFirstItem, (Inventory* ptInventory)); F7(STD, D2Common,10277,10277,10277,10402,10535,11151,10460, Unit*, D2InventoryGetFirstItem, (Inventory* ptInventory));
F7(STD, D2Common,10304,10304,10304,10934,11140,10770,10464,10879, Unit*, D2UnitGetNextItem, (Unit* ptItem)); F7(STD, D2Common,10304,10304,10304,10934,11140,10770,10464, Unit*, D2UnitGetNextItem, (Unit* ptItem));
F7(STD, D2Common,10305,10305,10305,11095,10748,10852,11147,10897, Unit*, D2GetRealItem, (Unit* ptUnit)); F7(STD, D2Common,10305,10305,10305,11095,10748,10852,11147, Unit*, D2GetRealItem, (Unit* ptUnit));
//F7(STD, D2Common,10321,10321,10321,00000,00000,00000,00000,00000, SkillData*, D2GetLeftSkill, (Unit* ptChar)); //F7(STD, D2Common,10321,10321,10321,00000,00000,00000,00000, SkillData*, D2GetLeftSkill, (Unit* ptChar));
//F7(STD, D2Common,10322,10322,10322,00000,00000,00000,00000,00000, SkillData*, D2GetRightSkill, (Unit* ptChar)); //F7(STD, D2Common,10322,10322,10322,00000,00000,00000,00000, SkillData*, D2GetRightSkill, (Unit* ptChar));
F7(STD, D2Common,10326,10326,00000,00000,00000,00000,00000,00000, DWORD, D2GetPosX, (Unit* ptUnit));//NOT IN 1.10 F7(STD, D2Common,10326,10326,00000,00000,00000,00000,00000, DWORD, D2GetPosX, (Unit* ptUnit));//NOT IN 1.10
//F7(STD, D2Common,10328,10328,10328,00000,00000,00000,00000,00000, void, D2SetPosX, (Unit* ptUnit, DWORD pos)); //F7(STD, D2Common,10328,10328,10328,00000,00000,00000,00000, void, D2SetPosX, (Unit* ptUnit, DWORD pos));
F7(STD, D2Common,10329,10329,00000,00000,00000,00000,00000,00000, DWORD, D2GetPosY, (Unit* ptUnit));//NOT IN 1.10 F7(STD, D2Common,10329,10329,00000,00000,00000,00000,00000, DWORD, D2GetPosY, (Unit* ptUnit));//NOT IN 1.10
//F7(STD, D2Common,10331,10331,10331,00000,00000,00000,00000,00000, void, D2SetPosY, (Unit* ptUnit, DWORD pos)); //F7(STD, D2Common,10331,10331,10331,00000,00000,00000,00000, void, D2SetPosY, (Unit* ptUnit, DWORD pos));
F7(STD, D2Common,10332,10332,10332,11080,10056,10543,10141,11166, void, D2GetPosition, (Unit* ptUnit, Position* pos)); F7(STD, D2Common,10332,10332,10332,11080,10056,10543,10141, void, D2GetPosition, (Unit* ptUnit, Position* pos));
F7(STD, D2Common,10339,10339,10339,10455,10864,10941,11060,11025, DWORD, D2GetMaxGoldBank, (Unit* ptUnit)); F7(STD, D2Common,10339,10339,10339,10455,10864,10941,11060, DWORD, D2GetMaxGoldBank, (Unit* ptUnit));
F7(STD, D2Common,10342,10342,10342,10172,10933,10366,10331,10846, Room*, D2GetRoom, (Unit* ptUnit)); F7(STD, D2Common,10342,10342,10342,10172,10933,10366,10331, Room*, D2GetRoom, (Unit* ptUnit));
//F7(STD, D2Common,10348,10348,10348,00000,00000,00000,00000,00000, void, D2SetUnitMode, (Unit* ptUnit, DWORD mode)); //F7(STD, D2Common,10348,10348,10348,00000,00000,00000,00000, void, D2SetUnitMode, (Unit* ptUnit, DWORD mode));
//F7(STD, D2Common,10394,10394,10394,00000,00000,00000,00000,00000, ObjectsBIN*,D2GetObjectsBIN, (Unit* ptObject)); //F7(STD, D2Common,10394,10394,10394,00000,00000,00000,00000, ObjectsBIN*,D2GetObjectsBIN, (Unit* ptObject));
F7(STD, D2Common,10420,10420,10420,10218,10079,11097,10356,10404, PlayerData*,D2InitPlayerData, (Unit* ptChar)); F7(STD, D2Common,10420,10420,10420,10218,10079,11097,10356, PlayerData*,D2InitPlayerData, (Unit* ptChar));
//F7(STD, D2Common,10421,10421,10421,10914,10329,00000,00000,00000, DWORD, D2FreePlayerData, (DWORD game1C, Unit* ptChar)); //F7(STD, D2Common,10421,10421,10421,10914,10329,00000,00000, DWORD, D2FreePlayerData, (DWORD game1C, Unit* ptChar));
F7(STD, D2Common,10424,10424,10424,10562,10800,10860,10920,11103, PlayerData*,D2GetPlayerData, (Unit* ptChar)); F7(STD, D2Common,10424,10424,10424,10562,10800,10860,10920, PlayerData*,D2GetPlayerData, (Unit* ptChar));
F7(STD, D2Common,10431,10431,10431,00000,00000,00000,00000,00000, DWORD, D2GetDefence, (Unit* ptChar)); F7(STD, D2Common,10431,10431,10431,00000,00000,00000,00000, DWORD, D2GetDefence, (Unit* ptChar));
F7(STD, D2Common,10433,10433,10433,00000,00000,00000,00000,00000, DWORD, D2GetChanceToBlock, (Unit* ptChar, DWORD isLODGame)); F7(STD, D2Common,10433,10433,10433,00000,00000,00000,00000, DWORD, D2GetChanceToBlock, (Unit* ptChar, DWORD isLODGame));
F7(STD, D2Common,10439,10439,10439,10343,11131,10729,10049,11159, DWORD, D2GetMaxGold, (Unit* ptUnit)); F7(STD, D2Common,10439,10439,10439,10343,11131,10729,10049, DWORD, D2GetMaxGold, (Unit* ptUnit));
F7(STD, D2Common,00000,00000,00000,10440,10572,10481,11090,10193, DWORD, D2Common10572, (Unit* ptObject, DWORD value)); F7(STD, D2Common,00000,00000,00000,10440,10572,10481,11090, DWORD, D2Common10572, (Unit* ptObject, DWORD value));
//F7(STD, D2Common,10463,10463,10463,00000,00000,00000,00000,00000, DWORD, D2SetStatWithNoTest, ( Stats* ptStats, DWORD statID, DWORD statValue, DWORD statIndex)); //F7(STD, D2Common,10463,10463,10463,00000,00000,00000,00000, DWORD, D2SetStatWithNoTest, ( Stats* ptStats, DWORD statID, DWORD statValue, DWORD statIndex));
//F7(STD, D2Common,10464,10464,10464,00000,00000,00000,00000,00000, void, D2AddStat, (Stats* ptStats, DWORD statID, DWORD statValue, DWORD statIndex)); //F7(STD, D2Common,10464,10464,10464,00000,00000,00000,00000, void, D2AddStat, (Stats* ptStats, DWORD statID, DWORD statValue, DWORD statIndex));
//F7(STD, D2Common,10465,10465,10465,00000,00000,00000,00000,00000, DWORD, D2SetStat, (Stats* ptStats, DWORD statID, DWORD statValue, DWORD statIndex)); //F7(STD, D2Common,10465,10465,10465,00000,00000,00000,00000, DWORD, D2SetStat, (Stats* ptStats, DWORD statID, DWORD statValue, DWORD statIndex));
//F7(STD, D2Common,10466,10466,10466,00000,00000,00000,00000,00000, int, D2GetStat, (Stats* ptStats, DWORD statID, DWORD statIndex)); //F7(STD, D2Common,10466,10466,10466,00000,00000,00000,00000, int, D2GetStat, (Stats* ptStats, DWORD statID, DWORD statIndex));
//F7(STD, D2Common,10470,10470,10470,00000,00000,00000,00000,00000, Stats*, D2AllocNewStats, (DWORD nUnitId, DWORD flags, DWORD uk18, DWORD nUnitType, DWORD nItemNum)); //F7(STD, D2Common,10470,10470,10470,00000,00000,00000,00000, Stats*, D2AllocNewStats, (DWORD nUnitId, DWORD flags, DWORD uk18, DWORD nUnitType, DWORD nItemNum));
F7(STD, D2Common,00000,00000,00000,10471,11160,10866,10258,10040, BYTE, D2GetObjectFlags, (Unit* ptObject)); F7(STD, D2Common,00000,00000,00000,10471,11160,10866,10258, BYTE, D2GetObjectFlags, (Unit* ptObject));
F7(STD, D2Common,00000,00000,00000,10572,11048,10150,10111,10033, void, D2SetObjectFlags, (Unit* ptObject, BYTE flags)); F7(STD, D2Common,00000,00000,00000,10572,11048,10150,10111, void, D2SetObjectFlags, (Unit* ptObject, BYTE flags));
//F7(STD, D2Common,10471,10471,10471,00000,00000,00000,00000,00000, DWORD, D2Common10471, (void*)); //F7(STD, D2Common,10471,10471,10471,00000,00000,00000,00000, DWORD, D2Common10471, (void*));
//F7(STD, D2Common,10472,10472,10472,00000,00000,00000,00000,00000, DWORD, D2Common10472, (void*)); //F7(STD, D2Common,10472,10472,10472,00000,00000,00000,00000, DWORD, D2Common10472, (void*));
//F7(STD, D2Common,10475,10475,10475,00000,00000,00000,00000,00000, void, D2UpdateDisabledStat, (Stats* ptCharStats, Stats* ptStats, DWORD one)); //F7(STD, D2Common,10475,10475,10475,00000,00000,00000,00000, void, D2UpdateDisabledStat, (Stats* ptCharStats, Stats* ptStats, DWORD one));
//F7(STD, D2Common,10481,10481,10481,00000,00000,00000,00000,00000, void*, D2Common10481, (Unit* ptUnit, DWORD flags)); //F7(STD, D2Common,10481,10481,10481,00000,00000,00000,00000, void*, D2Common10481, (Unit* ptUnit, DWORD flags));
//F7(STD, D2Common,10484,10484,10484,00000,00000,00000,00000,00000, Stats*, D2GetAffixStats, (Unit* ptItem, DWORD, DWORD)); //F7(STD, D2Common,10484,10484,10484,00000,00000,00000,00000, Stats*, D2GetAffixStats, (Unit* ptItem, DWORD, DWORD));
//F7(STD, D2Common,10485,10485,10485,00000,00000,00000,00000,00000, void, D2FreeStats, (Stats* ptStats)); //F7(STD, D2Common,10485,10485,10485,00000,00000,00000,00000, void, D2FreeStats, (Stats* ptStats));
F7(STD, D2Common,10487,10487,10487,00000,00000,00000,00000,00000, DWORD, D2isInState, (Unit* ptChar, DWORD isLODGame)); F7(STD, D2Common,10487,10487,10487,00000,00000,00000,00000, DWORD, D2isInState, (Unit* ptChar, DWORD isLODGame));
//F7(STD, D2Common,10517,10517,10517,00000,00000,00000,00000,00000, void, D2SetPlayerStat, (Unit* ptChar, DWORD statID, int amount, DWORD index)); //F7(STD, D2Common,10517,10517,10517,00000,00000,00000,00000, void, D2SetPlayerStat, (Unit* ptChar, DWORD statID, int amount, DWORD index));
F7(STD, D2Common,10518,10518,10518,10109,10627,10762,10551,10645, void, D2AddPlayerStat, (Unit* ptChar, DWORD statID, int amount, DWORD index));//ONLY 1.11b F7(STD, D2Common,10518,10518,10518,10109,10627,10762,10551, void, D2AddPlayerStat, (Unit* ptChar, DWORD statID, int amount, DWORD index));//ONLY 1.11b
F7(STD, D2Common,10519,10519,10519,11092,10061,10658,10973,10550, int, D2GetPlayerStat, (Unit* ptChar, DWORD statID, DWORD index));//ONLY 1.11b F7(STD, D2Common,10519,10519,10519,11092,10061,10658,10973, int, D2GetPlayerStat, (Unit* ptChar, DWORD statID, DWORD index));//ONLY 1.11b
//F7(STD, D2Common,10520,10520,10520,00000,00000,00000,00000,00000, int, D2GetPlayerStat20, (Unit* ptChar, DWORD statID, DWORD index)); //F7(STD, D2Common,10520,10520,10520,00000,00000,00000,00000, int, D2GetPlayerStat20, (Unit* ptChar, DWORD statID, DWORD index));
F7(STD, D2Common,10521,10521,10521,10733,10550,10494,10587,10216, int, D2GetPlayerBaseStat, (Unit* ptChar, DWORD statID, DWORD index));//ONLY 1.11b F7(STD, D2Common,10521,10521,10521,10733,10550,10494,10587, int, D2GetPlayerBaseStat, (Unit* ptChar, DWORD statID, DWORD index));//ONLY 1.11b
//F7(STD, D2Common,10527,10527,10527,00000,00000,00000,00000,00000, DWORD, D2Common10527, (Unit* ptUnit)); //F7(STD, D2Common,10527,10527,10527,00000,00000,00000,00000, DWORD, D2Common10527, (Unit* ptUnit));
F7(STD, D2Common,10539,10539,10539,00000,00000,00000,00000,00000, DWORD, D2haveDefenceBonus, (Unit* ptChar)); F7(STD, D2Common,10539,10539,10539,00000,00000,00000,00000, DWORD, D2haveDefenceBonus, (Unit* ptChar));
F7(STD, D2Common,10540,10540,10540,00000,00000,00000,00000,00000, DWORD, D2haveFireResBonus, (Unit* ptChar)); F7(STD, D2Common,10540,10540,10540,00000,00000,00000,00000, DWORD, D2haveFireResBonus, (Unit* ptChar));
F7(STD, D2Common,10541,10541,10541,00000,00000,00000,00000,00000, DWORD, D2haveColdResBonus, (Unit* ptChar)); F7(STD, D2Common,10541,10541,10541,00000,00000,00000,00000, DWORD, D2haveColdResBonus, (Unit* ptChar));
F7(STD, D2Common,10542,10542,10542,00000,00000,00000,00000,00000, DWORD, D2haveLightResBonus, (Unit* ptChar)); F7(STD, D2Common,10542,10542,10542,00000,00000,00000,00000, DWORD, D2haveLightResBonus, (Unit* ptChar));
F7(STD, D2Common,10543,10543,10543,00000,00000,00000,00000,00000, DWORD, D2havePoisonResBonus, (Unit* ptChar)); F7(STD, D2Common,10543,10543,10543,00000,00000,00000,00000, DWORD, D2havePoisonResBonus, (Unit* ptChar));
F7(STD, D2Common,10546,10546,10546,00000,00000,00000,00000,00000, DWORD, D2haveDefenceMalus, (Unit* ptChar)); F7(STD, D2Common,10546,10546,10546,00000,00000,00000,00000, DWORD, D2haveDefenceMalus, (Unit* ptChar));
F7(STD, D2Common,10547,10547,10547,00000,00000,00000,00000,00000, DWORD, D2haveFireResMalus, (Unit* ptChar)); F7(STD, D2Common,10547,10547,10547,00000,00000,00000,00000, DWORD, D2haveFireResMalus, (Unit* ptChar));
F7(STD, D2Common,10548,10548,10548,00000,00000,00000,00000,00000, DWORD, D2haveColdResMalus, (Unit* ptChar)); F7(STD, D2Common,10548,10548,10548,00000,00000,00000,00000, DWORD, D2haveColdResMalus, (Unit* ptChar));
F7(STD, D2Common,10549,10549,10549,00000,00000,00000,00000,00000, DWORD, D2haveLightResMalus, (Unit* ptChar)); F7(STD, D2Common,10549,10549,10549,00000,00000,00000,00000, DWORD, D2haveLightResMalus, (Unit* ptChar));
F7(STD, D2Common,10550,10550,10550,00000,00000,00000,00000,00000, DWORD, D2havePoisonResMalus, (Unit* ptChar)); F7(STD, D2Common,10550,10550,10550,00000,00000,00000,00000, DWORD, D2havePoisonResMalus, (Unit* ptChar));
//F7(STD, D2Common,10552,10552,10552,00000,00000,00000,00000,00000, DWORD, D2Common10552, (Unit* ptUnit)); //F7(STD, D2Common,10552,10552,10552,00000,00000,00000,00000, DWORD, D2Common10552, (Unit* ptUnit));
//F7(STD, D2Common,10567,10567,10567,00000,00000,00000,00000,00000, DWORD, D2CanBeBroken, (Unit* ptItem)); //F7(STD, D2Common,10567,10567,10567,00000,00000,00000,00000, DWORD, D2CanBeBroken, (Unit* ptItem));
//F7(STD, D2Common,10573,10573,10573,00000,00000,00000,00000,00000, void, D2CopyStats, (Stats* ptDestStats, Stats* ptSrcStats)); //F7(STD, D2Common,10573,10573,10573,00000,00000,00000,00000, void, D2CopyStats, (Stats* ptDestStats, Stats* ptSrcStats));
//F7(STD, D2Common,10574,10574,10574,00000,00000,00000,00000,00000, void*, D2SetEnabledStat, (Unit* ptItem, DWORD statId, DWORD disabled)); //F7(STD, D2Common,10574,10574,10574,00000,00000,00000,00000, void*, D2SetEnabledStat, (Unit* ptItem, DWORD statId, DWORD disabled));
//F7(STD, D2Common,10575,10575,10575,00000,00000,00000,00000,00000, void, D2FreeBinFiles, ()); //F7(STD, D2Common,10575,10575,10575,00000,00000,00000,00000, void, D2FreeBinFiles, ());
//F7(STD, D2Common,10576,10576,10576,00000,00000,00000,00000,00000, void, D2LoadBinFiles, (DWORD zero1, DWORD zero2, bool)); //F7(STD, D2Common,10576,10576,10576,00000,00000,00000,00000, void, D2LoadBinFiles, (DWORD zero1, DWORD zero2, bool));
//F7(STD, D2Common,00000,00000,00000,10651,10651,00000,00000,00000, DWORD, D2CheckQuestState, (void* ptQuest, DWORD index, DWORD value)); //F7(STD, D2Common,00000,00000,00000,10651,10651,00000,00000, DWORD, D2CheckQuestState, (void* ptQuest, DWORD index, DWORD value));
F7(STD, D2Common,10578,10578,10578,10653,10496,10244,10849,10037, void*, D2CompileTxtFile, (DWORD unused, const char* filename, BINField* ptFields, DWORD* ptRecordCount, DWORD recordLength)); F7(STD, D2Common,10578,10578,10578,10653,10496,10244,10849, void*, D2CompileTxtFile, (DWORD unused, const char* filename, BINField* ptFields, DWORD* ptRecordCount, DWORD recordLength));
F7(STD, D2Common,10600,10600,10600,10573,10262,10887,10695,10994, ItemsBIN*, D2GetItemsBIN, (DWORD itemID)); F7(STD, D2Common,10600,10600,10600,10573,10262,10887,10695, ItemsBIN*, D2GetItemsBIN, (DWORD itemID));
//F7(STD, D2Common,10601,10601,10601,00000,00000,00000,00000,00000, ItemsBIN*, D2GetByCodeItemStatsBIN, (DWORD code, DWORD* itemID)); //F7(STD, D2Common,10601,10601,10601,00000,00000,00000,00000, ItemsBIN*, D2GetByCodeItemStatsBIN, (DWORD code, DWORD* itemID));
//F7(STD, D2Common,10604,10604,10604,00000,00000,00000,00000,00000, AffixBIN*, D2GetAffixBIN, (int affixID)); //F7(STD, D2Common,10604,10604,10604,00000,00000,00000,00000, AffixBIN*, D2GetAffixBIN, (int affixID));
F7(STD, D2Common,10616,10616,10616,10500,10523,10774,10806,10619, GemsBIN*, D2GetGemsBIN, (DWORD gemID)); F7(STD, D2Common,10616,10616,10616,10500,10523,10774,10806, GemsBIN*, D2GetGemsBIN, (DWORD gemID));
F7(STD, D2Common,11232,11232,11232,10746,10258,10913,10783,10393, CubeMainBIN*,D2GetCubeMainBIN, (DWORD cubemainID)); F7(STD, D2Common,11232,11232,11232,10746,10258,10913,10783, CubeMainBIN*,D2GetCubeMainBIN, (DWORD cubemainID));
F7(STD, D2Common,11233,11233,11233,10639,11135,10390,10675,10235, int, D2GetNbCubeMainBIN, ()); F7(STD, D2Common,11233,11233,11233,10639,11135,10390,10675, int, D2GetNbCubeMainBIN, ());
//F7(STD, D2Common,10737,10737,10737,00000,00000,00000,00000,00000, LevelsBIN*, D2GetLevelsBIN, (DWORD levelID)); //F7(STD, D2Common,10737,10737,10737,00000,00000,00000,00000, LevelsBIN*, D2GetLevelsBIN, (DWORD levelID));
F7(STD, D2Common,10628,10628,10628,00000,00000,00000,00000,00000, DWORD, D2GetNextLevelXP, (DWORD classID, DWORD level)); F7(STD, D2Common,10628,10628,10628,00000,00000,00000,00000, DWORD, D2GetNextLevelXP, (DWORD classID, DWORD level));
F7(STD, D2Common,10629,10629,10629,00000,00000,00000,00000,00000, DWORD, D2GetMaxLevel, (DWORD classID)); F7(STD, D2Common,10629,10629,10629,00000,00000,00000,00000, DWORD, D2GetMaxLevel, (DWORD classID));
F7(STD, D2Common,10655,10655,10655,10655,10309,10297,10218,10694, DifficultyLevelsBIN*, D2GetDifficultyLevelsBIN, (DWORD difficultyLevel)); F7(STD, D2Common,10655,10655,10655,10655,10309,10297,10218, DifficultyLevelsBIN*, D2GetDifficultyLevelsBIN, (DWORD difficultyLevel));
//F7(STD, D2Common,10659,10659,10659,00000,00000,00000,00000,00000, TreasureClassBIN*, D2GetTreasureClassBIN, (WORD id, DWORD uk)); //F7(STD, D2Common,10659,10659,10659,00000,00000,00000,00000, TreasureClassBIN*, D2GetTreasureClassBIN, (WORD id, DWORD uk));
//F7(STD, D2Common,10668,10668,10668,10450,10953,00000,00000,00000, SuperUniqueBIN*, D2GetSuperUniqueBIN, (WORD id)); //F7(STD, D2Common,10668,10668,10668,10450,10953,00000,00000, SuperUniqueBIN*, D2GetSuperUniqueBIN, (WORD id));
F7(STD, D2Common,10695,10695,10695,10927,10899,10276,10106,10911, DWORD, D2GetItemQuality, (Unit* ptItem)); F7(STD, D2Common,10695,10695,10695,10927,10899,10276,10106, DWORD, D2GetItemQuality, (Unit* ptItem));
F7(STD, D2Common,10707,10707,10707,10911,10303,10989,10202,10458, DWORD, D2TestFlags, (Unit* ptUnit, DWORD flags, DWORD line, const char* file)); F7(STD, D2Common,10707,10707,10707,10911,10303,10989,10202, DWORD, D2TestFlags, (Unit* ptUnit, DWORD flags, DWORD line, const char* file));
//F7(STD, D2Common,10708,10708,10708,00000,00000,00000,00000,00000, void, D2SetFlags, (Unit* ptUnit, DWORD flags, DWORD bitNewValue)); //F7(STD, D2Common,10708,10708,10708,00000,00000,00000,00000, void, D2SetFlags, (Unit* ptUnit, DWORD flags, DWORD bitNewValue));
//F7(STD, D2Common,10709,10709,10709,00000,00000,00000,00000,00000, DWORD, D2GetFlags, (Unit* ptUnit)); //F7(STD, D2Common,10709,10709,10709,00000,00000,00000,00000, DWORD, D2GetFlags, (Unit* ptUnit));
//F7(STD, D2Common,10711,10711,10711,00000,00000,00000,00000,00000, void, D2ItemSetFlags, (Unit* ptItem, DWORD flags, DWORD toSet));// toSet = 0 for set to 0 the selected flags else set to 1 //F7(STD, D2Common,10711,10711,10711,00000,00000,00000,00000, void, D2ItemSetFlags, (Unit* ptItem, DWORD flags, DWORD toSet));// toSet = 0 for set to 0 the selected flags else set to 1
F7(STD, D2Common,10717,10717,10717,10898,10100,10410,10086,10008, DWORD, D2GetItemLevel, (Unit* ptItem)); F7(STD, D2Common,10717,10717,10717,10898,10100,10410,10086, DWORD, D2GetItemLevel, (Unit* ptItem));
F7(STD, D2Common,10719,10719,10719,10820,10505,10370,10020,10810, BYTE, D2ItemGetPage, (Unit* ptUnit)); F7(STD, D2Common,10719,10719,10719,10820,10505,10370,10020, BYTE, D2ItemGetPage, (Unit* ptUnit));
F7(STD, D2Common,10720,10720,10720,10485,10608,10223,10012,11026, void, D2ItemSetPage, (Unit* ptItem, BYTE page)); F7(STD, D2Common,10720,10720,10720,10485,10608,10223,10012, void, D2ItemSetPage, (Unit* ptItem, BYTE page));
F7(STD, D2Common,10731,10731,10731,11017,10890,10231,10744,10601, DWORD, D2CheckItemType, (Unit* ptItem, DWORD itype)); F7(STD, D2Common,10731,10731,10731,11017,10890,10231,10744, DWORD, D2CheckItemType, (Unit* ptItem, DWORD itype));
F7(STD, D2Common,10732,10732,10732,10692,10685,10280,10620,10075, int, D2GetUniqueID, (Unit* ptItem)); F7(STD, D2Common,10732,10732,10732,10692,10685,10280,10620, int, D2GetUniqueID, (Unit* ptItem));
F7(STD, D2Common,10734,10734,10734,00000,00000,00000,00000,00000, void, D2SetAnim, (Unit* ptUnit, int anim)); F7(STD, D2Common,10734,10734,10734,00000,00000,00000,00000, void, D2SetAnim, (Unit* ptUnit, int anim));
//F7(STD, D2Common,10749,10749,10749,00000,00000,00000,00000,00000, void, D2GetWidthHeight, (Unit* ptItem, BYTE* Width, BYTE* Height); //F7(STD, D2Common,10749,10749,10749,00000,00000,00000,00000, void, D2GetWidthHeight, (Unit* ptItem, BYTE* Width, BYTE* Height);
//F7(STD, D2Common,10751,10751,10751,00000,00000,00000,00000,00000, DWORD, D2GetItemType, (Unit* ptUnit)); //F7(STD, D2Common,10751,10751,10751,00000,00000,00000,00000, DWORD, D2GetItemType, (Unit* ptUnit));
//F7(STD, D2Common,10757,10757,10757,00000,00000,00000,00000,00000, DWORD, D2GetItemLevelReq, (Unit* ptChar, Unit* ptItem)); //F7(STD, D2Common,10757,10757,10757,00000,00000,00000,00000, DWORD, D2GetItemLevelReq, (Unit* ptChar, Unit* ptItem));
F7(STD, D2Common,10619,10619,10619,10687,10877,10321,11032,10981, int*, D2GetNbRunesBIN, ());//return the point on th number F7(STD, D2Common,10619,10619,10619,10687,10877,10321,11032, int*, D2GetNbRunesBIN, ());//return the point on th number
F7(STD, D2Common,10620,10620,10620,10775,10296,10622,10006,10405, RunesBIN*, D2GetRunesBIN, (int runesID)); F7(STD, D2Common,10620,10620,10620,10775,10296,10622,10006, RunesBIN*, D2GetRunesBIN, (int runesID));
//F7(STD, D2Common,10792,10792,10792,00000,00000,00000,00000,00000, DWORD, D2CanBeRare, (Unit* ptItem)); //F7(STD, D2Common,10792,10792,10792,00000,00000,00000,00000, DWORD, D2CanBeRare, (Unit* ptItem));
//F7(STD, D2Common,10810,10810,10810,00000,00000,00000,00000,00000, BYTE, D2CheckHasInv, (Unit* ptItem)); //F7(STD, D2Common,10810,10810,10810,00000,00000,00000,00000, BYTE, D2CheckHasInv, (Unit* ptItem));
//F7(STD, D2Common,10813,10813,10813,00000,00000,00000,00000,00000, DWORD, D2GetStaffMods, (Unit* ptItem)); //F7(STD, D2Common,10813,10813,10813,00000,00000,00000,00000, DWORD, D2GetStaffMods, (Unit* ptItem));
//F7(STD, D2Common,10816,10816,10816,10816,11085,00000,00000,00000, DWORD, D2GetNbSocket, (Unit* ptItem)); //F7(STD, D2Common,10816,10816,10816,10816,11085,00000,00000, DWORD, D2GetNbSocket, (Unit* ptItem));
//F7(STD, D2Common,10840,10840,10840,00000,00000,00000,00000,00000, DWORD, D2Common10840, (Unit* ptItem, Unit* ptChar)); //F7(STD, D2Common,10840,10840,10840,00000,00000,00000,00000, DWORD, D2Common10840, (Unit* ptItem, Unit* ptChar));
//F7(STD, D2Common,10855,10855,10855,00000,00000,00000,00000,00000, void, D2AddAffix, (DWORD, DWORD, Unit* ptItem, AffixBIN* ptAffix, DWORD, DWORD)); //F7(STD, D2Common,10855,10855,10855,00000,00000,00000,00000, void, D2AddAffix, (DWORD, DWORD, Unit* ptItem, AffixBIN* ptAffix, DWORD, DWORD));
//F7(STD, D2Common,10872,10872,10872,00000,00000,00000,00000,00000, DWORD, D2WarpPlayer, (Path* ptPath, Unit* ptChar, Room* ptRoom, DWORD x, DWORD y)); //F7(STD, D2Common,10872,10872,10872,00000,00000,00000,00000, DWORD, D2WarpPlayer, (Path* ptPath, Unit* ptChar, Room* ptRoom, DWORD x, DWORD y));
//F7(STD, D2Common,10875,10875,10875,00000,00000,00000,00000,00000, WORD, D2GetItemVersion, (Unit* ptItem)); //F7(STD, D2Common,10875,10875,10875,00000,00000,00000,00000, WORD, D2GetItemVersion, (Unit* ptItem));
F7(STD, D2Common,11163,11163,11163,10880,11068,10436,11107,10963, DWORD, D2isEtheral, (Unit* ptItem));//ONLY UNTIL 1.10 F7(STD, D2Common,11163,11163,11163,10880,11068,10436,11107, DWORD, D2isEtheral, (Unit* ptItem));//ONLY UNTIL 1.10
F7(STD, D2Common,10881,10881,10881,10956,11156,10218,10987,10665, DWORD, D2SaveItem, (Unit* ptItem, saveBitField* data, DWORD startSize, DWORD p4, DWORD p5, DWORD p6)); F7(STD, D2Common,10881,10881,10881,10956,11156,10218,10987, DWORD, D2SaveItem, (Unit* ptItem, saveBitField* data, DWORD startSize, DWORD p4, DWORD p5, DWORD p6));
//F7(STD, D2Common,10916,10916,10916,00000,00000,00000,00000,00000, void, DoNothing916, ()); //F7(STD, D2Common,10916,10916,10916,00000,00000,00000,00000, void, DoNothing916, ());
//F7(STD, D2Common,10940,10940,10940,10027,10105,10953,00000,00000, void, D2Common10027, (Unit* ptChar, DWORD skillID)); //F7(STD, D2Common,10940,10940,10940,10027,10105,10953,00000, void, D2Common10027, (Unit* ptChar, DWORD skillID));
//F7(STD, D2Common,10950,10950,10950,00000,00000,00000,00000,00000, SkillData*, D2GetSkillPointer, (Unit* ptChar, WORD SkillID)); //F7(STD, D2Common,10950,10950,10950,00000,00000,00000,00000, SkillData*, D2GetSkillPointer, (Unit* ptChar, WORD SkillID));
//F7(STD, D2Common,10952,10952,10952,10950,10256,10858,00000,00000, SkillData*, D2IncSkillBaseLevel, (Unit* ptChar, DWORD skillID)); //F7(STD, D2Common,10952,10952,10952,10950,10256,10858,00000, SkillData*, D2IncSkillBaseLevel, (Unit* ptChar, DWORD skillID));
F7(STD, D2Common,10953,10953,10953,10099,10255,10210,10302,10335, void, D2SetSkillBaseLevel,(Unit* ptChar, DWORD skillID, DWORD slvl, DWORD bRemove, char*, DWORD)); F7(STD, D2Common,10953,10953,10953,10099,10255,10210,10302, void, D2SetSkillBaseLevel,(Unit* ptChar, DWORD skillID, DWORD slvl, DWORD bRemove, char*, DWORD));
//F7(STD, D2Common,10963,10963,10963,00000,00000,00000,00000,00000, DWORD, D2GetSkillID, (SkillData* ptSkill, const char* file, DWORD line)); //F7(STD, D2Common,10963,10963,10963,00000,00000,00000,00000, DWORD, D2GetSkillID, (SkillData* ptSkill, const char* file, DWORD line));
//F7(FAST, D2Common,10966,10966,10966,00000,00000,00000,00000,00000, SkillsBIN*, D2GetSkillsBIN, (SkillData* ptSkill)); //F7(FAST, D2Common,10966,10966,10966,00000,00000,00000,00000, SkillsBIN*, D2GetSkillsBIN, (SkillData* ptSkill));
F7(STD, D2Common,10968,10968,10968,10700,10109,10904,10306,10007, DWORD, D2GetSkillLevel, (Unit* ptChar, SkillData* ptSkill, DWORD includingBonus)); F7(STD, D2Common,10968,10968,10968,10700,10109,10904,10306, DWORD, D2GetSkillLevel, (Unit* ptChar, SkillData* ptSkill, DWORD includingBonus));
//F7(STD, D2Common,11023,11023,11023,00000,00000,00000,00000,00000, DWORD, D2GetCriticalStrikeFromMasteries, (Unit* ptChar, Unit* ptItem, DWORD zero, DWORD two)); //F7(STD, D2Common,11023,11023,11023,00000,00000,00000,00000, DWORD, D2GetCriticalStrikeFromMasteries, (Unit* ptChar, Unit* ptItem, DWORD zero, DWORD two));
//F7(STD, D2Common,11007,11007,11007,00000,00000,00000,00000,00000, bool, D2TestQuestState, (void* ptQuest, DWORD QuestID, DWORD QuestState)); //F7(STD, D2Common,11007,11007,11007,00000,00000,00000,00000, bool, D2TestQuestState, (void* ptQuest, DWORD QuestID, DWORD QuestState));
//F7(STD, D2Common,11041,11041,11041,00000,00000,00000,00000,00000, int, D2GetPlayerSkillID, (DWORD playerID, DWORD skillNumber)); //F7(STD, D2Common,11041,11041,11041,00000,00000,00000,00000, int, D2GetPlayerSkillID, (DWORD playerID, DWORD skillNumber));
//F7(STD, D2Common,11042,11042,11042,00000,00000,00000,00000,00000, int, D2GetNbSkillsPerPlayer, (DWORD playerID)); //F7(STD, D2Common,11042,11042,11042,00000,00000,00000,00000, int, D2GetNbSkillsPerPlayer, (DWORD playerID));
//F7(STD, D2Common,11269,11269,11269,00000,00000,00000,00000,00000, DWORD, D2GetAllIndexFromStat, (Stats* ptStats, DWORD statID, D2Stat* allIndex, DWORD maxIndex)); //F7(STD, D2Common,11269,11269,11269,00000,00000,00000,00000, DWORD, D2GetAllIndexFromStat, (Stats* ptStats, DWORD statID, D2Stat* allIndex, DWORD maxIndex));
//F7(STD, D2Common,11270,11270,11270,00000,00000,00000,00000,00000, DWORD, D2GetAllIndexFromStatID, (Unit* ptItem, DWORD statID, D2Stat* allIndex, DWORD)); //F7(STD, D2Common,11270,11270,11270,00000,00000,00000,00000, DWORD, D2GetAllIndexFromStatID, (Unit* ptItem, DWORD statID, D2Stat* allIndex, DWORD));
F7(STD, D2Common,11276,11276,11276,10254,10074,10111,10435,11081, DWORD, D2GetSkillCost, (Unit* ptChar, int skpoints, DWORD skillID, DWORD curSkillLevel));//not 10447 F7(STD, D2Common,11276,11276,11276,10254,10074,10111,10435, DWORD, D2GetSkillCost, (Unit* ptChar, int skpoints, DWORD skillID, DWORD curSkillLevel));//not 10447
A7(FAST, D2Common,00000,00000,82C80, 15D0, 1800, 1220, 12D0, 17B0, CharStatsBIN*, D2GetCharStatsBIN, (DWORD charID)); A7(FAST, D2Common,00000,00000,82C80, 15D0, 1800, 1220, 12D0, CharStatsBIN*, D2GetCharStatsBIN, (DWORD charID));
A7(FAST, D2Common,00000,00000,12410,5D7D0,1A100,116C0,1C020,5B0E0, DWORD, D2CompileCubeInput, (CubeInput* cubeinput, char* s, DWORD p1, DWORD p2)); A7(FAST, D2Common,00000,00000,12410,5D7D0,1A100,116C0,1C020, DWORD, D2CompileCubeInput, (CubeInput* cubeinput, char* s, DWORD p1, DWORD p2));
A7(FAST, D2Common,00000,00000,12910,5D210,19B40,11100,1BA60,5AB20, DWORD, D2CompileCubeOutput, (CubeOutput* cubeoutput, char* s, DWORD p1, DWORD p2)); A7(FAST, D2Common,00000,00000,12910,5D210,19B40,11100,1BA60, DWORD, D2CompileCubeOutput, (CubeOutput* cubeoutput, char* s, DWORD p1, DWORD p2));
A7(FAST, D2Common,00000,00000,2B1A0, 11F0, 1380, 1140, 1300, 1160, ItemTypesBIN*, D2GetItemTypesBIN, (DWORD itemTypesId)); A7(FAST, D2Common,00000,00000,2B1A0, 11F0, 1380, 1140, 1300, ItemTypesBIN*, D2GetItemTypesBIN, (DWORD itemTypesId));
//A7(FAST, D2Common,00000,00000,62FD0,00000,00000,00000,00000,00000, void, D2EncodeValueCheckMax, (saveBitField* data, DWORD value, DWORD bitSize)); //A7(FAST, D2Common,00000,00000,62FD0,00000,00000,00000,00000, void, D2EncodeValueCheckMax, (saveBitField* data, DWORD value, DWORD bitSize));
A7(FAST, D2Common,00000,00000,642B0, 13F0, 12F0, 1540, 17A0, 17E0, ItemStatCostBIN*,D2GetItemStatCostBIN, (DWORD id)); A7(FAST, D2Common,00000,00000,642B0, 13F0, 12F0, 1540, 17A0, ItemStatCostBIN*,D2GetItemStatCostBIN, (DWORD id));
//A7(FAST, D2Common,00000,00000,764A0,00000,00000,00000,00000,00000, void*, D2Common764A0, (Stats* ptStats, DWORD stat, ItemStatCostBIN* itemStatCost ,DWORD)); //A7(FAST, D2Common,00000,00000,764A0,00000,00000,00000,00000, void*, D2Common764A0, (Stats* ptStats, DWORD stat, ItemStatCostBIN* itemStatCost ,DWORD));
//A7(STD, D2Common,00000,00000,76E30,00000,00000,00000,00000,00000, void, D2PreUpdateDisabledStat, (Stats* ptStats)); //A7(STD, D2Common,00000,00000,76E30,00000,00000,00000,00000, void, D2PreUpdateDisabledStat, (Stats* ptStats));
//A7(FAST, D2Common,00000,00000,76C10,00000,00000,00000,00000,00000, void, D2ApplyStat,(Stats* ptCharStats, DWORD statId, DWORD value, Unit* ptItem)); //A7(FAST, D2Common,00000,00000,76C10,00000,00000,00000,00000, void, D2ApplyStat,(Stats* ptCharStats, DWORD statId, DWORD value, Unit* ptItem));
A7(FAST, D2Common,738A4,739B4,84268, 96E0, 98D0, 9900, 9900, B5E0, void*, D2ReadFile,(DWORD unused, char* filename, DWORD* size, const char*, DWORD)); A7(FAST, D2Common,738A4,739B4,84268, 96E0, 98D0, 9900, 9900, void*, D2ReadFile,(DWORD unused, char* filename, DWORD* size, const char*, DWORD));
//A7(FAST, D2Common,00000,00000, 94D0,00000,00000,00000,00000,00000, void*, D2GetStringIDForTxtFile,(const char * string)); //A7(FAST, D2Common,00000,00000, 94D0,00000,00000,00000,00000, void*, D2GetStringIDForTxtFile,(const char * string));
A7(STD, D2Common,1F500,1F510,29FA0,71EB0,32AA0,7D2A0,59870,80C40, void, D2LoadSuperuniques,(DWORD mempool));//FASCALL UNTIL 1.10 A7(STD, D2Common,1F500,1F510,29FA0,71EB0,32AA0,7D2A0,59870, void, D2LoadSuperuniques,(DWORD mempool));//FASCALL UNTIL 1.10
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -308,25 +307,25 @@ A7(STD, D2Common,1F500,1F510,29FA0,71EB0,32AA0,7D2A0,59870,80C40, void, D2Loa
//E2F(D2Client,5BA90, void, D2ReloadGambleScreen, ());//1.11b //E2F(D2Client,5BA90, void, D2ReloadGambleScreen, ());//1.11b
//E2F(D2Client,1FEB0, void, D2OpenNPCMenu, (Unit* ptNPC));//1.11b by ESI //E2F(D2Client,1FEB0, void, D2OpenNPCMenu, (Unit* ptNPC));//1.11b by ESI
A7(FAST, D2Client, 1000, 1000, 1000,75D00,A9070,BEF70,2B420,A9480, void*, D2LoadImage, (const char* filename, DWORD filetype)); A7(FAST, D2Client, 1000, 1000, 1000,75D00,A9070,BEF70,2B420, void*, D2LoadImage, (const char* filename, DWORD filetype));
A7(FAST, D2Client, 1150, 1150, 1140,00000,00000,00000,00000,00000, void, D2FreeImage, (void* image));//6FAA1140 A7(FAST, D2Client, 1150, 1150, 1140,00000,00000,00000,00000, void, D2FreeImage, (void* image));//6FAA1140
A7(FAST, D2Client, D640, D630, DB50,73620,5E4E0,79670,147A0,B6890, void, D2SendMsgToAll,(BYTE* data));//1.11 and 1.11b by ESI !! A7(FAST, D2Client, D640, D630, DB50,73620,5E4E0,79670,147A0, void, D2SendMsgToAll,(BYTE* data));//1.11 and 1.11b by ESI !!
//A7(STD, D2Client,00000,00000,15A80,00000,00000,00000,00000,00000, int, D2GetAvgChanceMonsterWillHitYou, ());//6FAB5A80 //A7(STD, D2Client,00000,00000,15A80,00000,00000,00000,00000, int, D2GetAvgChanceMonsterWillHitYou, ());//6FAB5A80
A7(STD, D2Client,00000,00000,15A80,00000,00000,00000,00000,00000, DWORD, D2GetLastMonsterIDFight, ());//6FAB5A80 A7(STD, D2Client,00000,00000,15A80,00000,00000,00000,00000, DWORD, D2GetLastMonsterIDFight, ());//6FAB5A80
A7(STD, D2Client,29800,297F0,2FD60,828A0,89320,6B280,BCEA0,BF640, void, D2PrintStatsPage, ()); A7(STD, D2Client,29800,297F0,2FD60,828A0,89320,6B280,BCEA0, void, D2PrintStatsPage, ());
//A7(FAST, D2Client,00000,00000,45990,00000,00000,00000,00000,00000, Unit*, D245990, (Inventory*,DWORD idItem);//6FAE5990 //A7(FAST, D2Client,00000,00000,45990,00000,00000,00000,00000, Unit*, D245990, (Inventory*,DWORD idItem);//6FAE5990
A7(FAST, D2Client,4BB20,4BB20,521C0,B8CB0,21250,88EA0,54E10,2CE40, DWORD, D2PrintStat,(Unit* ptItem, Stats* ptStats, DWORD statID, DWORD statIndex, DWORD statValue, LPWSTR lpText));//statID=EAX, lpText=ESI 1.11b A7(FAST, D2Client,4BB20,4BB20,521C0,B8CB0,21250,88EA0,54E10, DWORD, D2PrintStat,(Unit* ptItem, Stats* ptStats, DWORD statID, DWORD statIndex, DWORD statValue, LPWSTR lpText));//statID=EAX, lpText=ESI 1.11b
A7(FAST, D2Client,85A60,84DE0,80430,9EEB0,62070,8B7A0,BF5F0,18820, LPWSTR, D2SetColorPopup, (LPWSTR popupText, DWORD color));//1.11 and 1.11b BY EDI A7(FAST, D2Client,85A60,84DE0,80430,9EEB0,62070,8B7A0,BF5F0, LPWSTR, D2SetColorPopup, (LPWSTR popupText, DWORD color));//1.11 and 1.11b BY EDI
//A7(FAST, D2Client,00000,00000,869F0,00000,00000,00000,00000,00000, Unit*, D2ClientGetObject, (DWORD itemNum, DWORD type));//6FB269F0 //A7(FAST, D2Client,00000,00000,869F0,00000,00000,00000,00000, Unit*, D2ClientGetObject, (DWORD itemNum, DWORD type));//6FB269F0
A7(FAST, D2Client,B4360,B36E0,B5820,3ACC0,54210,31FA0,88A70,26270, DWORD, D2PlaySound, (DWORD id, DWORD, DWORD, DWORD, DWORD)); A7(FAST, D2Client,B4360,B36E0,B5820,3ACC0,54210,31FA0,88A70, DWORD, D2PlaySound, (DWORD id, DWORD, DWORD, DWORD, DWORD));
//A7(FAST, D2Client,B9970,B8CF0,BB0F0,00000,00000,00000,00000,00000, void, D2FillRect,(DWORD x, DWORD y, DWORD Width, DWORD Height, DWORD color, DWORD transTbl)); //A7(FAST, D2Client,B9970,B8CF0,BB0F0,00000,00000,00000,00000, void, D2FillRect,(DWORD x, DWORD y, DWORD Width, DWORD Height, DWORD color, DWORD transTbl));
A7(FAST, D2Client,00000,00000,00000,00000,571C0,18450,46150,790D0, Unit*, D2GetCurrentNPC, ()); A7(FAST, D2Client,00000,00000,00000,00000,571C0,18450,46150, Unit*, D2GetCurrentNPC, ());
A7(FAST, D2Client,00000,00000,00000,73260,5DE40,791A0,143E0,B61F0, void, D2SendToServerXX,(DWORD size, BYTE * data));//by EBX A7(FAST, D2Client,00000,00000,00000,73260,5DE40,791A0,143E0, void, D2SendToServerXX,(DWORD size, BYTE * data));//by EBX
A7(FAST, D2Client,88940,87CC0,83260,A1F30,65690,8EF00,C2790,1C190, void, D2TogglePage, (DWORD a, DWORD b, DWORD c)); A7(FAST, D2Client,88940,87CC0,83260,A1F30,65690,8EF00,C2790, void, D2TogglePage, (DWORD a, DWORD b, DWORD c));
A7(FAST, D2Client,00000,00000,00000,A6520,710C0,A6640,8CD00,90C10, void, D2ClickOnStashButton, (DWORD x, DWORD y));//BY x=ESI y=EDI A7(FAST, D2Client,00000,00000,00000,A6520,710C0,A6640,8CD00, void, D2ClickOnStashButton, (DWORD x, DWORD y));//BY x=ESI y=EDI
A7(STD, D2Client,897B0,88B30,84110,9E3B0,621C0,8B8F0,BEAF0,18AA0, void*, D2LoadBuySelBtn, ()); A7(STD, D2Client,897B0,88B30,84110,9E3B0,621C0,8B8F0,BEAF0, void*, D2LoadBuySelBtn, ());
A7(FAST, D2Client,00000,00000,00000,8E480,5BA90,1CC00,4ABE0,7DC60, void, D2ReloadGambleScreen, ()); A7(FAST, D2Client,00000,00000,00000,8E480,5BA90,1CC00,4ABE0, void, D2ReloadGambleScreen, ());
//A7(FAST, D2Client,00000,00000,00000,00000,1FEB0,5CDD0,00000,00000, void, D2OpenNPCMenu, (Unit* ptNPC));//by ESI //A7(FAST, D2Client,00000,00000,00000,00000,1FEB0,5CDD0,00000, void, D2OpenNPCMenu, (Unit* ptNPC));//by ESI
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -370,43 +369,43 @@ A7(FAST, D2Client,00000,00000,00000,8E480,5BA90,1CC00,4ABE0,7DC60, void, D2Relo
//E2S(D2Game,E66D0, void, D2SaveGame, (Game* ptGame));//1.11b //E2S(D2Game,E66D0, void, D2SaveGame, (Game* ptGame));//1.11b
F7(FAST, D2Game,10059,10059,10059,10039,10007,10037,10049,10002, void, D2SetNbPlayers, (DWORD nbPlayers)); F7(FAST, D2Game,10059,10059,10059,10039,10007,10037,10049, void, D2SetNbPlayers, (DWORD nbPlayers));
//A7(FAST, D2Game,00000,00000,01DE0,00000,00000,00000,00000,00000, void*, D2GetClientByClientID, (Game* ptGame, DWORD clientID));//6FC31DE0 //A7(FAST, D2Game,00000,00000,01DE0,00000,00000,00000,00000, void*, D2GetClientByClientID, (Game* ptGame, DWORD clientID));//6FC31DE0
A7(FAST, D2Game,00000,00000, 6C60,E3DA0,E8210,EB060,49930,E5070, void, D2AddClient, (DWORD clientID));//BY EAX A7(FAST, D2Game,00000,00000, 6C60,E3DA0,E8210,EB060,49930, void, D2AddClient, (DWORD clientID));//BY EAX
A7(STD, D2Game,00000,00000, 94E0,E0520,E49A0,A6360,2AAE0,BC700, Game*, D2GetGameByClientID, (DWORD clientID));//6FC394E0 A7(STD, D2Game,00000,00000, 94E0,E0520,E49A0,A6360,2AAE0, Game*, D2GetGameByClientID, (DWORD clientID));//6FC394E0
A7(FAST, D2Game,00000,00000, B0E0,DF250,E36D0,A5080,29820,BB510, void, D2BroadcastFunction, (Game* ptGame, void* fct, void* param));//00DAB0E0 A7(FAST, D2Game,00000,00000, B0E0,DF250,E36D0,A5080,29820, void, D2BroadcastFunction, (Game* ptGame, void* fct, void* param));//00DAB0E0
A7(FAST, D2Game, C380, C650, C710,41420,A0D50,7D220,8A3E0,DB780, DWORD, D2SendPacket, (void* ptNetClient, LPVOID pData, DWORD size));//EAX=ptNetClient [ESP]=pData A7(FAST, D2Game, C380, C650, C710,41420,A0D50,7D220,8A3E0, DWORD, D2SendPacket, (void* ptNetClient, LPVOID pData, DWORD size));//EAX=ptNetClient [ESP]=pData
A7(FAST, D2Game, D650, D920, DB50,44D00,A3F20,802E0,8D5F0,DD4F0, void, D2SetSkillBaseLevelOnClient, (void* ptClient, Unit* ptChar, DWORD skillID, DWORD sLvl, DWORD bRemove));//by EAX,ESI,EBX A7(FAST, D2Game, D650, D920, DB50,44D00,A3F20,802E0,8D5F0, void, D2SetSkillBaseLevelOnClient, (void* ptClient, Unit* ptChar, DWORD skillID, DWORD sLvl, DWORD bRemove));//by EAX,ESI,EBX
//A7(FAST, D2Game,00000,00000,0E6F0,00000,00000,00000,00000,00000, void, D2UpdateClientItem, (NetClient* ptNetClient, Unit* ptChar, Unit* ptItem,DWORD,DWORD,DWORD));//6FC3E6F0 //A7(FAST, D2Game,00000,00000,0E6F0,00000,00000,00000,00000, void, D2UpdateClientItem, (NetClient* ptNetClient, Unit* ptChar, Unit* ptItem,DWORD,DWORD,DWORD));//6FC3E6F0
//A7(FAST, D2Game,00000,00000,10FB0,00000,00000,00000,00000,00000, DWORD, D2UpdateInventory, (Game* ptGame, Unit* ptChar, void* ptNetClient, Inventory* pInventory));//6FC40FB0 //A7(FAST, D2Game,00000,00000,10FB0,00000,00000,00000,00000, DWORD, D2UpdateInventory, (Game* ptGame, Unit* ptChar, void* ptNetClient, Inventory* pInventory));//6FC40FB0
//A7(FAST, D2Game,00000,00000,110E0,00000,00000,00000,00000,00000, DWORD, D2UpdateItem, (Unit* ptChar, Unit* ptItem, Unit* ptSocketedItem, void* ptNetClient));//6FC410E0 //A7(FAST, D2Game,00000,00000,110E0,00000,00000,00000,00000, DWORD, D2UpdateItem, (Unit* ptChar, Unit* ptItem, Unit* ptSocketedItem, void* ptNetClient));//6FC410E0
A7(STD, D2Game,00000,00000,00000,27230,109F0,AE930,A22E0,15F40, DWORD, D2LinkPortal, (Game* ptGame, Unit* ptObject, DWORD levelEndID, DWORD levelStartID)); A7(STD, D2Game,00000,00000,00000,27230,109F0,AE930,A22E0, DWORD, D2LinkPortal, (Game* ptGame, Unit* ptObject, DWORD levelEndID, DWORD levelStartID));
A7(FAST, D2Game,00000,00000,128F0,38D90,43E60,11FF0,D2070,B2F70, DWORD, D2VerifIfNotCarry1, (Unit* ptItem, ItemsBIN* itemsData, Unit* ptFirstItem));// BY EBX=itemsData EAX=ptFirstItem [ESP]=ptItem A7(FAST, D2Game,00000,00000,128F0,38D90,43E60,11FF0,D2070, DWORD, D2VerifIfNotCarry1, (Unit* ptItem, ItemsBIN* itemsData, Unit* ptFirstItem));// BY EBX=itemsData EAX=ptFirstItem [ESP]=ptItem
//A7(FAST, D2Game,00000,00000,1ED80,00000,00000,00000,00000,00000, Unit*, D2CreateItem, (Game* ptGame, ItemGenerationData* itemGenerationData, DWORD));//6FC4ED80 //A7(FAST, D2Game,00000,00000,1ED80,00000,00000,00000,00000, Unit*, D2CreateItem, (Game* ptGame, ItemGenerationData* itemGenerationData, DWORD));//6FC4ED80
A7(FAST, D2Game,00000,00000,22070, 1090, 1DF0, 11F0, 1280, 1340, Room*, D2TestPositionInRoom, (Room* ptRoom, DWORD x, DWORD y)); A7(FAST, D2Game,00000,00000,22070, 1090, 1DF0, 11F0, 1280, Room*, D2TestPositionInRoom, (Room* ptRoom, DWORD x, DWORD y));
//A7(FAST, D2Game,00000,00000,22410,00000,00000,00000,00000,00000, void, D2AddStaffModAffixes, (Unit* ptItem, ItemGenerationData* itemParam));//6FC52410 //A7(FAST, D2Game,00000,00000,22410,00000,00000,00000,00000, void, D2AddStaffModAffixes, (Unit* ptItem, ItemGenerationData* itemParam));//6FC52410
//A7(FAST, D2Game,00000,00000,22C00,00000,00000,00000,00000,00000, WORD, D2GetNewAffix, (Unit* ptItem, DWORD testIfSpawnable, DWORD mustSelectOne, DWORD addToItem, DWORD isPrefix, int affixID, WORD autoAffixGroupID));//6FC52C00 //A7(FAST, D2Game,00000,00000,22C00,00000,00000,00000,00000, WORD, D2GetNewAffix, (Unit* ptItem, DWORD testIfSpawnable, DWORD mustSelectOne, DWORD addToItem, DWORD isPrefix, int affixID, WORD autoAffixGroupID));//6FC52C00
//A7(FAST, D2Game,00000,00000,23610,00000,00000,00000,00000,00000, WORD, D2GetRareAffixName, (Unit* ptItem, DWORD wantPrefix));//6FC53610 //A7(FAST, D2Game,00000,00000,23610,00000,00000,00000,00000, WORD, D2GetRareAffixName, (Unit* ptItem, DWORD wantPrefix));//6FC53610
//A7(FAST, D2Game,00000,00000,3AD10,00000,00000,00000,00000,00000, DWORD, D2GetSuperUniqueMonsterID, (Game* ptGame, Unit* ptMonster));//6FC6AD10 //A7(FAST, D2Game,00000,00000,3AD10,00000,00000,00000,00000, DWORD, D2GetSuperUniqueMonsterID, (Game* ptGame, Unit* ptMonster));//6FC6AD10
A7(FAST, D2Game,00000,00000,3F220,4ABE0,EC7E0,40B90,24950,CDE20, DWORD, D2SpawnMonster, (Game* ptGame, Room* ptRoom, DWORD zero1, DWORD x, DWORD y, DWORD minusOne, DWORD superuniqueID, DWORD zero2));//wrong param A7(FAST, D2Game,00000,00000,3F220,4ABE0,EC7E0,40B90,24950, DWORD, D2SpawnMonster, (Game* ptGame, Room* ptRoom, DWORD zero1, DWORD x, DWORD y, DWORD minusOne, DWORD superuniqueID, DWORD zero2));//wrong param
A7(STD, D2Game,00000,00000,00000,D6D10,235C0, D410,200E0,59980, void, D2Game235C0, (Game* ptGame, Room* ptRoom)); A7(STD, D2Game,00000,00000,00000,D6D10,235C0, D410,200E0, void, D2Game235C0, (Game* ptGame, Room* ptRoom));
//A7(FAST, D2Game,00000,00000,4C7B0,00000,00000,00000,00000,00000, Unit*, D2GetSkillItem, (Unit* ptChar));//6FC7C7B0 //A7(FAST, D2Game,00000,00000,4C7B0,00000,00000,00000,00000, Unit*, D2GetSkillItem, (Unit* ptChar));//6FC7C7B0
//A7(FAST, D2Game,00000,00000,5A500,00000,00000,00000,00000,00000, DWORD, D2SavePlayer, (Game* ptGame, Unit* ptChar, char* playername, DWORD zero));//6FC8A500 //A7(FAST, D2Game,00000,00000,5A500,00000,00000,00000,00000, DWORD, D2SavePlayer, (Game* ptGame, Unit* ptChar, char* playername, DWORD zero));//6FC8A500
A7(FAST, D2Game,4F100,4F500,5B8A0,B9D70,25D50,44950,54810,3A4C0, DWORD, D2LoadInventory, (Game* ptGame, Unit* pChar, saveBitField* pdata, DWORD p2, DWORD maxSize, DWORD p4, DWORD *ptNbBytesRead));//6FC8B8A0 A7(FAST, D2Game,4F100,4F500,5B8A0,B9D70,25D50,44950,54810, DWORD, D2LoadInventory, (Game* ptGame, Unit* pChar, saveBitField* pdata, DWORD p2, DWORD maxSize, DWORD p4, DWORD *ptNbBytesRead));//6FC8B8A0
A7(FAST, D2Game,7BAE0,7BFD0,8BB00,97620,BEF80,93650,E03A0,6DC40, Unit*, D2GameGetObject, (Game* ptGame, DWORD type, DWORD itemNum));//6FCBBB00 A7(FAST, D2Game,7BAE0,7BFD0,8BB00,97620,BEF80,93650,E03A0, Unit*, D2GameGetObject, (Game* ptGame, DWORD type, DWORD itemNum));//6FCBBB00
//A7(FAST, D2Game,00000,00000,9F320,501C0,F1C50,F1A50,F3220,00000, Unit*, D2GetOwnerMonster, (Unit* ptMonster)); //A7(FAST, D2Game,00000,00000,9F320,501C0,F1C50,F1A50,F3220, Unit*, D2GetOwnerMonster, (Unit* ptMonster));
//A7(FAST, D2Game,00000,00000,E08D0,00000,00000,00000,00000,00000, void, D2UpdateSkillDataAfterUnassignment, (Game* ptGame, Unit* ptChar, DWORD skillID));//6FD108D0 //A7(FAST, D2Game,00000,00000,E08D0,00000,00000,00000,00000, void, D2UpdateSkillDataAfterUnassignment, (Game* ptGame, Unit* ptChar, DWORD skillID));//6FD108D0
A7(FAST, D2Game,00000,00000,00000,99760,C09E0,94E70,E1D90,6FE10, Unit*, D2CreateUnit, (DWORD type, DWORD id, DWORD x, DWORD y, Game* ptGame, Room* ptRoom, DWORD uk1, DWORD uk2, DWORD uk3)); A7(FAST, D2Game,00000,00000,00000,99760,C09E0,94E70,E1D90, Unit*, D2CreateUnit, (DWORD type, DWORD id, DWORD x, DWORD y, Game* ptGame, Room* ptRoom, DWORD uk1, DWORD uk2, DWORD uk3));
A7(FAST, D2Game,00000,00000,00000,9B480,34920,D1AA0,70180,941E0, void, D2OpenPandPortal, (Game* ptGame, Unit* ptChar)); A7(FAST, D2Game,00000,00000,00000,9B480,34920,D1AA0,70180, void, D2OpenPandPortal, (Game* ptGame, Unit* ptChar));
A7(FAST, D2Game,00000,00000,00000,9B470,34910,D1A90,70170,941D0, void, D2OpenPandFinalPortal, (Game* ptGame, Unit* ptChar)); A7(FAST, D2Game,00000,00000,00000,9B470,34910,D1A90,70170, void, D2OpenPandFinalPortal, (Game* ptGame, Unit* ptChar));
A7(FAST, D2Game,00000,00000,00000,84730,85AA0,DBE90,A9610,31920, void, D2MephIA, (Game* ptGame, Unit* ptMonster, DWORD*)); A7(FAST, D2Game,00000,00000,00000,84730,85AA0,DBE90,A9610, void, D2MephIA, (Game* ptGame, Unit* ptMonster, DWORD*));
A7(FAST, D2Game,00000,00000,00000,75980,D7BD0,CD0F0,85B60,4EAD0, void, D2DiabloIA, (Game* ptGame, Unit* ptMonster, DWORD*)); A7(FAST, D2Game,00000,00000,00000,75980,D7BD0,CD0F0,85B60, void, D2DiabloIA, (Game* ptGame, Unit* ptMonster, DWORD*));
A7(FAST, D2Game,00000,00000,00000,EAB20,2BC80,B3B90,B8610,C8850, void, D2BaalIA, (Game* ptGame, Unit* ptMonster, DWORD*)); A7(FAST, D2Game,00000,00000,00000,EAB20,2BC80,B3B90,B8610, void, D2BaalIA, (Game* ptGame, Unit* ptMonster, DWORD*));
A7(FAST, D2Game,00000,00000,00000,70320,D2D70,C2A90,7B4E0,49480, void, D2UberMephIA, (Game* ptGame, Unit* ptMonster, DWORD*)); A7(FAST, D2Game,00000,00000,00000,70320,D2D70,C2A90,7B4E0, void, D2UberMephIA, (Game* ptGame, Unit* ptMonster, DWORD*));
A7(FAST, D2Game,00000,00000,00000,7F200,7FE60,D6250,A39D0,2C3F0, void, D2UberDiabloIA, (Game* ptGame, Unit* ptMonster, DWORD*)); A7(FAST, D2Game,00000,00000,00000,7F200,7FE60,D6250,A39D0, void, D2UberDiabloIA, (Game* ptGame, Unit* ptMonster, DWORD*));
A7(FAST, D2Game,00000,00000,00000,E92B0,2A300,B2210,B6C80,C6EC0, void, D2UberBaalIA, (Game* ptGame, Unit* ptMonster, DWORD*)); A7(FAST, D2Game,00000,00000,00000,E92B0,2A300,B2210,B6C80, void, D2UberBaalIA, (Game* ptGame, Unit* ptMonster, DWORD*));
//A7(FAST, D2Game,00000,00000,00000,00000,92420,00000,00000,00000, void, D2ReloadGambleScreenGame, (Unit* ptNPC, Game* ptGame, Unit* ptChar, DWORD, DWORD one)); //A7(FAST, D2Game,00000,00000,00000,00000,92420,00000,00000, void, D2ReloadGambleScreenGame, (Unit* ptNPC, Game* ptGame, Unit* ptChar, DWORD, DWORD one));
A7(STD, D2Game,00000,00000, 89C0,E2390,E66D0,A8090,2C830,BE660, void, D2SaveGame, (Game* ptGame) ); A7(STD, D2Game,00000,00000, 89C0,E2390,E66D0,A8090,2C830, void, D2SaveGame, (Game* ptGame) );
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -414,8 +413,8 @@ A7(STD, D2Game,00000,00000, 89C0,E2390,E66D0,A8090,2C830,BE660, void, D2SaveGa
//D2S(D2Net,10020, DWORD, D2SendToServer, (DWORD size, DWORD one, void* data));//ONLY 1.11b //D2S(D2Net,10020, DWORD, D2SendToServer, (DWORD size, DWORD one, void* data));//ONLY 1.11b
//D2S(D2Net,10018, DWORD, D2SendToClient, (DWORD zero, DWORD clientID, void* data, DWORD size));//ONLY 1.11b //D2S(D2Net,10018, DWORD, D2SendToClient, (DWORD zero, DWORD clientID, void* data, DWORD size));//ONLY 1.11b
F7(STD, D2Net, 10005,10005,10005,10035,10020,10036,10024,10015, DWORD, D2SendToServer, (DWORD size, DWORD one, void* data));//(DWORD zero, void* data, DWORD size) for 1.10 and before F7(STD, D2Net, 10005,10005,10005,10035,10020,10036,10024, DWORD, D2SendToServer, (DWORD size, DWORD one, void* data));//(DWORD zero, void* data, DWORD size) for 1.10 and before
F7(STD, D2Net, 10006,10006,10006,10018,10018,10015,10002,10012, DWORD, D2SendToClient, (DWORD zero, DWORD clientID, void* data, DWORD size)); F7(STD, D2Net, 10006,10006,10006,10018,10018,10015,10002, DWORD, D2SendToClient, (DWORD zero, DWORD clientID, void* data, DWORD size));
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -440,25 +439,25 @@ F7(STD, D2Net, 10006,10006,10006,10018,10018,10015,10002,10012, DWORD, D2SendT
////D2S(Fog,10217, int, D2GetIDFromLookUpTable, (void* table, char* string, bool));//6FF53840 ////D2S(Fog,10217, int, D2GetIDFromLookUpTable, (void* table, char* string, bool));//6FF53840
//D2S(Fog,10265, int, D2GetInstructionPointer, ());//ONLY 1.11/1.11b NOT 1.10 //D2S(Fog,10265, int, D2GetInstructionPointer, ());//ONLY 1.11/1.11b NOT 1.10
F7(STD, Fog, 10023,10023,10023,00000,00000,00000,00000,00000, void, D2FogAssertOld, (const char* ptMessage, DWORD eip, DWORD line));//(STDCALL until 1.10) F7(STD, Fog, 10023,10023,10023,00000,00000,00000,00000, void, D2FogAssertOld, (const char* ptMessage, DWORD eip, DWORD line));//(STDCALL until 1.10)
F7(FAST, Fog, 00000,00000,00000,10024,10024,10024,10024,10024, void, D2FogAssert, (const char* ptMessage, DWORD eip, DWORD line)); F7(FAST, Fog, 00000,00000,00000,10024,10024,10024,10024, void, D2FogAssert, (const char* ptMessage, DWORD eip, DWORD line));
F7(FAST, Fog, 10042,10042,10042,10042,10042,10042,10042,10042, void*, D2FogMemAlloc, (DWORD dwMemSize, LPCSTR lpszErrFile, DWORD ErrLine, DWORD Zero)); F7(FAST, Fog, 10042,10042,10042,10042,10042,10042,10042, void*, D2FogMemAlloc, (DWORD dwMemSize, LPCSTR lpszErrFile, DWORD ErrLine, DWORD Zero));
F7(FAST, Fog, 10043,10043,10043,10043,10043,10043,10043,10043, void*, D2FogMemDeAlloc, (void* ptMemLoc, LPCSTR lpszErrFile, DWORD ErrLine, DWORD Zero)); F7(FAST, Fog, 10043,10043,10043,10043,10043,10043,10043, void*, D2FogMemDeAlloc, (void* ptMemLoc, LPCSTR lpszErrFile, DWORD ErrLine, DWORD Zero));
F7(FAST, Fog, 10045,10045,10045,10045,10045,10045,10045,10045, void*, D2AllocMem, (DWORD,DWORD dwMemSize, LPCSTR lpszErrFile, DWORD ErrLine, DWORD Zero)); F7(FAST, Fog, 10045,10045,10045,10045,10045,10045,10045, void*, D2AllocMem, (DWORD,DWORD dwMemSize, LPCSTR lpszErrFile, DWORD ErrLine, DWORD Zero));
F7(FAST, Fog, 10046,10046,10046,10046,10046,10046,10046,10046, void*, D2FreeMem, (DWORD,void* ptMemLoc, LPCSTR lpszErrFile, DWORD ErrLine, DWORD Zero)); F7(FAST, Fog, 10046,10046,10046,10046,10046,10046,10046, void*, D2FreeMem, (DWORD,void* ptMemLoc, LPCSTR lpszErrFile, DWORD ErrLine, DWORD Zero));
F7(FAST, Fog, 10102,10102,10102,10102,10102,10102,10102,10102, DWORD, D2MPQOpenFile, (char* ptPath, void** buf)); F7(FAST, Fog, 10102,10102,10102,10102,10102,10102,10102, DWORD, D2MPQOpenFile, (char* ptPath, void** buf));
F7(FAST, Fog, 10103,10103,10103,10103,10103,10103,10103,10103, DWORD, D2MPQCloseFile, (void* mpqfile)); F7(FAST, Fog, 10103,10103,10103,10103,10103,10103,10103, DWORD, D2MPQCloseFile, (void* mpqfile));
F7(FAST, Fog, 10104,10104,10104,10104,10104,10104,10104,10104, DWORD, D2MPQReadFile, (void* mpqfile, BYTE* buffer, DWORD nbToRead, DWORD* nbRead,DWORD,DWORD,DWORD)); F7(FAST, Fog, 10104,10104,10104,10104,10104,10104,10104, DWORD, D2MPQReadFile, (void* mpqfile, BYTE* buffer, DWORD nbToRead, DWORD* nbRead,DWORD,DWORD,DWORD));
F7(FAST, Fog, 10105,10105,10105,10105,10105,10105,10105,10105, DWORD, D2MPQGetSizeFile, (void* mpqfile, DWORD* toReset)); F7(FAST, Fog, 10105,10105,10105,10105,10105,10105,10105, DWORD, D2MPQGetSizeFile, (void* mpqfile, DWORD* toReset));
F7(FAST, Fog, 10115,10115,10115,10115,10115,10115,10115,10115, void, D2FogGetSavePath, (char* ptPath, DWORD maxsize)); F7(FAST, Fog, 10115,10115,10115,10115,10115,10115,10115, void, D2FogGetSavePath, (char* ptPath, DWORD maxsize));
F7(FAST, Fog, 10116,10116,10116,10116,10116,10116,10116,10116, void, D2FogGetInstallPath, (char* ptPath, DWORD maxsize)); F7(FAST, Fog, 10116,10116,10116,10116,10116,10116,10116, void, D2FogGetInstallPath, (char* ptPath, DWORD maxsize));
//F7(STD, Fog, 10126,10126,10126,10126,10126,10126,10126,10126, DWORD, D2InitBitField, (saveBitField* data, BYTE* buf, DWORD bufsize));//6FF536C0 //F7(STD, Fog, 10126,10126,10126,10126,10126,10126,10126, DWORD, D2InitBitField, (saveBitField* data, BYTE* buf, DWORD bufsize));//6FF536C0
//F7(STD, Fog, 10127,10127,10127,10127,10127,10127,10127,10127, DWORD, D2GetBitFieldSize, (saveBitField* data));//6FF536C0 //F7(STD, Fog, 10127,10127,10127,10127,10127,10127,10127, DWORD, D2GetBitFieldSize, (saveBitField* data));//6FF536C0
//F7(STD, Fog, 10128,10128,10128,10128,10128,10128,10128,10128, void, D2EncodeValue, (saveBitField* data, DWORD value, DWORD bitSize));//6FF536C0 //F7(STD, Fog, 10128,10128,10128,10128,10128,10128,10128, void, D2EncodeValue, (saveBitField* data, DWORD value, DWORD bitSize));//6FF536C0
//F7(STD, Fog, 10130,10130,10130,10130,10130,10130,10130,10130, DWORD, D2DecodeValue, (saveBitField* data,DWORD readingSize));//6FF53840 //F7(STD, Fog, 10130,10130,10130,10130,10130,10130,10130, DWORD, D2DecodeValue, (saveBitField* data,DWORD readingSize));//6FF53840
F7(STD, Fog, 10212,10212,10212,10212,10212,10212,10212,10212, void, D2Fog10212, (DWORD unknow)); F7(STD, Fog, 10212,10212,10212,10212,10212,10212,10212, void, D2Fog10212, (DWORD unknow));
//F7(STD, Fog, 10217,10217,10217,10217,10217,10217,10217,10217, int, D2GetIDFromLookUpTable, (void* table, char* string, bool));//6FF53840 //F7(STD, Fog, 10217,10217,10217,10217,10217,10217,10217, int, D2GetIDFromLookUpTable, (void* table, char* string, bool));//6FF53840
F7(STD, Fog, 00000,00000,00000,10265,10265,10265,10265,10265, int, D2GetInstructionPointer, ()); F7(STD, Fog, 00000,00000,00000,10265,10265,10265,10265, int, D2GetInstructionPointer, ());
//Fog10213 getIndexFromLookupTable (&table,code,bool) //Fog10213 getIndexFromLookupTable (&table,code,bool)
@@ -477,19 +476,18 @@ F7(STD, Fog, 00000,00000,00000,10265,10265,10265,10265,10265, int, D2GetInstru
////E2F(D2Lang,2CD0, DWORD, D2unicodenwidth, (char* ptChar, DWORD size));//6FC12CD0_unicodenwidth ////E2F(D2Lang,2CD0, DWORD, D2unicodenwidth, (char* ptChar, DWORD size));//6FC12CD0_unicodenwidth
////E2S(D2Lang,1670, DWORD, D2swprintf, (DWORD bufSize, LPWSTR buf, LPWSTR string, ...));//6FC11670_sprintf ////E2S(D2Lang,1670, DWORD, D2swprintf, (DWORD bufSize, LPWSTR buf, LPWSTR string, ...));//6FC11670_sprintf
//F7(FAST, D2Lang, 10003,10003,10003,00000,00000,00000,00000,10011, LPWSTR, D2GetStringFromString, (const char* ptString));//6FC13BC0 //F7(FAST, D2Lang, 10003,10003,10003,00000,00000,00000,00000, LPWSTR, D2GetStringFromString, (const char* ptString));//6FC13BC0
F7(FAST, D2Lang, 10003,10003,10003,10002,10004,10010,10011,10011, LPWSTR, D2GetStringFromString, (const char* ptString));//6FC13BC0 LAutour F7(FAST, D2Lang, 10004,10004,10004,10005,10000,10005,10003, LPWSTR, D2GetStringFromIndex, (WORD dwIndexNum));
F7(FAST, D2Lang, 10004,10004,10004,10005,10000,10005,10003,10004, LPWSTR, D2GetStringFromIndex, (WORD dwIndexNum)); //F7(STD, D2Lang, 10006,10006,10006,00000,00000,00000,00000, void, D2GetStringLang, (LPSTR ptLang, DWORD Zero));//6FC13FB0
//F7(STD, D2Lang, 10006,10006,10006,00000,00000,00000,00000,00000, void, D2GetStringLang, (LPSTR ptLang, DWORD Zero));//6FC13FB0 F7(STD, D2Lang, 10007,10007,10007,10009,10013,10002,10009, DWORD, D2GetLang, ());
F7(STD, D2Lang, 10007,10007,10007,10009,10013,10002,10009,10001, DWORD, D2GetLang, ());//14b 00522A20 F7(STD, D2Lang, 10010,10010,10010,00000,00000,00000,00000, DWORD, D2PrintBigNumber, (LPWSTR ptBuf , DWORD number, DWORD size));//6FC14210
F7(STD, D2Lang, 10010,10010,10010,00000,00000,00000,00000,00000, DWORD, D2PrintBigNumber, (LPWSTR ptBuf , DWORD number, DWORD size));//6FC14210 //F7(STD, D2Lang, 10013,10013,10013,00000,00000,00000,00000, DWORD, D2GetStringAndIndexFromString, (const char* ptString , LPWSTR result));//6FC13960
//F7(STD, D2Lang, 10013,10013,10013,00000,00000,00000,00000,10005, DWORD, D2GetStringAndIndexFromString, (const char* ptString , LPWSTR result));//6FC13960 //A7(FAST, D2Lang, 00000,00000,029B0,00000,00000,00000,00000, DWORD, D2UnicodeWidth, (DWORD MemLoc, WORD Size));//6FC129B0
//A7(FAST, D2Lang, 00000,00000,029B0,00000,00000,00000,00000,00000, DWORD, D2UnicodeWidth, (DWORD MemLoc, WORD Size));//6FC129B0 //A7(FAST, D2Lang, 00000,00000,02E60,00000,00000,00000,00000, LPWSTR, D2GetStrFromIndex , (void* ptFile, void* ptMemLoc, DWORD dwIndexNum));//6FC12E60
//A7(FAST, D2Lang, 00000,00000,02E60,00000,00000,00000,00000,00000, LPWSTR, D2GetStrFromIndex , (void* ptFile, void* ptMemLoc, DWORD dwIndexNum));//6FC12E60 //A7(FAST, D2Lang, 00000,00000,03640,00000,00000,00000,00000, TblHeader*, D2LoadTblFile, (LPCSTR lpszFileName));//6FC13640
//A7(FAST, D2Lang, 00000,00000,03640,00000,00000,00000,00000,00000, TblHeader*, D2LoadTblFile, (LPCSTR lpszFileName));//6FC13640 //A7(FAST, D2Lang, 00000,00000,03A90,00000,00000,00000,00000, WORD, D2GetStrAndIndexFromString, (void* ptFile, void* ptMemLoc, LPSTR String, LPWSTR RetString));//6FC13A90
//A7(FAST, D2Lang, 00000,00000,03A90,00000,00000,00000,00000,00000, WORD, D2GetStrAndIndexFromString, (void* ptFile, void* ptMemLoc, LPSTR String, LPWSTR RetString));//6FC13A90 //A7(FAST, D2Lang, 00000,00000,02CD0,00000,00000,00000,00000, DWORD, D2unicodenwidth, (char* ptChar, DWORD size));//6FC12CD0_unicodenwidth
//A7(FAST, D2Lang, 00000,00000,02CD0,00000,00000,00000,00000,00000, DWORD, D2unicodenwidth, (char* ptChar, DWORD size));//6FC12CD0_unicodenwidth //A7(STD, D2Lang, 00000,00000,01670,00000,00000,00000,00000, DWORD, D2swprintf, (DWORD bufSize, LPWSTR buf, LPWSTR string, ...));//6FC11670_sprintf
//A7(STD, D2Lang, 00000,00000,01670,00000,00000,00000,00000,00000, DWORD, D2swprintf, (DWORD bufSize, LPWSTR buf, LPWSTR string, ...));//6FC11670_sprintf
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Storm : 6FFB0000 //Storm : 6FFB0000
@@ -498,10 +496,10 @@ F7(STD, D2Lang, 10010,10010,10010,00000,00000,00000,00000,00000, DWORD, D2Prin
//D2S(Storm,503, void, D2Storm503, (DWORD, DWORD, DWORD)); //+1.11 //D2S(Storm,503, void, D2Storm503, (DWORD, DWORD, DWORD)); //+1.11
//D2S(Storm,511, void, D2FreeWinMessage, (sWinMessage* msg));//1.11/1.11b //D2S(Storm,511, void, D2FreeWinMessage, (sWinMessage* msg));//1.11/1.11b
//F7(STD, Storm, 253, 253, 253, 253, 253, 253, 000, 000, void, D2StormMPQCloseFile, (void* mpqfile)); //F7(STD, Storm, 253, 253, 253, 253, 253, 253, 000, void, D2StormMPQCloseFile, (void* mpqfile));
F7(STD, Storm, 268, 268, 268, 268, 268, 268, 268, 268, DWORD, D2StormMPQOpenFile, (DWORD zero, LPCSTR fileName, DWORD dwSearchScope, void** buffer)) F7(STD, Storm, 268, 268, 268, 268, 268, 268, 268, DWORD, D2StormMPQOpenFile, (DWORD zero, LPCSTR fileName, DWORD dwSearchScope, void** buffer))
F7(STD, Storm, 503, 503, 503, 503, 503, 503, 503, 503, void, D2Storm503, (DWORD, DWORD, DWORD)); F7(STD, Storm, 503, 503, 503, 503, 503, 503, 503, void, D2Storm503, (DWORD, DWORD, DWORD));
F7(STD, Storm, 511, 511, 511, 511, 511, 511, 511, 511, void, D2FreeWinMessage, (sWinMessage* msg)); F7(STD, Storm, 511, 511, 511, 511, 511, 511, 511, void, D2FreeWinMessage, (sWinMessage* msg));
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -513,12 +511,12 @@ F7(STD, Storm, 511, 511, 511, 511, 511, 511, 511, 511, void, D2FreeWi
//D2S(D2gfx,10000, void, D2FillArea,(DWORD x1, DWORD y1, DWORD x2, DWORD y2, DWORD color, DWORD transTbl));//ONLY 1.11b //D2S(D2gfx,10000, void, D2FillArea,(DWORD x1, DWORD y1, DWORD x2, DWORD y2, DWORD color, DWORD transTbl));//ONLY 1.11b
//D2S(D2gfx,10044, void, D2PrintImage,(sDrawImageInfo* data, DWORD x, DWORD y, DWORD p4, DWORD p5, DWORD p6) );//ONLY 1.11b //D2S(D2gfx,10044, void, D2PrintImage,(sDrawImageInfo* data, DWORD x, DWORD y, DWORD p4, DWORD p5, DWORD p6) );//ONLY 1.11b
F7(STD, D2gfx, 10005,10005,10005,10000,10063,10043,10031,10012, DWORD, D2GetResolution,() ); F7(STD, D2gfx, 10005,10005,10005,10000,10063,10043,10031, DWORD, D2GetResolution,() );
//F7,STD, D2gfx, 10023,10023,10023,00000,00000,00000,00000,00000, DWORD, D2CreateMainWindow,(DWORD,DWORD) ); //F7,STD, D2gfx, 10023,10023,10023,00000,00000,00000,00000, DWORD, D2CreateMainWindow,(DWORD,DWORD) );
//F7(STD, D2gfx, 10026,10026,10026,00000,00000,00000,00000,00000, DWORD, D2ShowWindow,() ); //F7(STD, D2gfx, 10026,10026,10026,00000,00000,00000,00000, DWORD, D2ShowWindow,() );
//F7,STD, D2gfx, 10027,10027,10027,00000,00000,00000,00000,00000, HWND, D2GetWindowHandle,() );//6FA749C0 //F7,STD, D2gfx, 10027,10027,10027,00000,00000,00000,00000, HWND, D2GetWindowHandle,() );//6FA749C0
F7(STD, D2gfx, 10055,10055,10055,10028,10000,10062,10014,10028, void, D2FillArea,(DWORD x1, DWORD y1, DWORD x2, DWORD y2, DWORD color, DWORD transTbl)); F7(STD, D2gfx, 10055,10055,10055,10028,10000,10062,10014, void, D2FillArea,(DWORD x1, DWORD y1, DWORD x2, DWORD y2, DWORD color, DWORD transTbl));
F7(STD, D2gfx, 10072,10072,10072,10047,10044,10024,10041,10042, void, D2PrintImage,(sDrawImageInfo* data, DWORD x, DWORD y, DWORD p4, DWORD p5, DWORD p6) ); F7(STD, D2gfx, 10072,10072,10072,10047,10044,10024,10041, void, D2PrintImage,(sDrawImageInfo* data, DWORD x, DWORD y, DWORD p4, DWORD p5, DWORD p6) );
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -532,36 +530,36 @@ F7(STD, D2gfx, 10072,10072,10072,10047,10044,10024,10041,10042, void, D2PrintI
//D2F(D2Win,10132, DWORD, D2PrintTextPopup,(LPWSTR s, DWORD x, DWORD y, DWORD uk, DWORD type, DWORD color) );//6F8AB080 //D2F(D2Win,10132, DWORD, D2PrintTextPopup,(LPWSTR s, DWORD x, DWORD y, DWORD uk, DWORD type, DWORD color) );//6F8AB080
//D2S(D2Win,10113, void*, D2CreateTextBox,(DWORD* data) );//ONLY 1.11b //D2S(D2Win,10113, void*, D2CreateTextBox,(DWORD* data) );//ONLY 1.11b
F7(FAST, D2Win, 10046,10046,10046,10061,10075,10015,10022,10051, void, D2PrintLineOnTextBox,(void* screen, char* s, DWORD color) ); F7(FAST, D2Win, 10046,10046,10046,10061,10075,10015,10022, void, D2PrintLineOnTextBox,(void* screen, char* s, DWORD color) );
F7(FAST, D2Win, 10117,10117,10117,10020,10064,10001,10150,10076, void, D2PrintString,(LPWSTR s, DWORD x, DWORD y, DWORD color, DWORD bfalse) ); F7(FAST, D2Win, 10117,10117,10117,10020,10064,10001,10150, void, D2PrintString,(LPWSTR s, DWORD x, DWORD y, DWORD color, DWORD bfalse) );
F7(FAST, D2Win, 10121,10121,10121,10034,10128,10132,10028,10150, DWORD, D2GetPixelLen,(LPWSTR s) ); F7(FAST, D2Win, 10121,10121,10121,10034,10128,10132,10028, DWORD, D2GetPixelLen,(LPWSTR s) );
F7(FAST, D2Win, 10127,10127,10127,10141,10170,10010,10184,10047, DWORD, D2SetFont,(DWORD fontID) ); F7(FAST, D2Win, 10127,10127,10127,10141,10170,10010,10184, DWORD, D2SetFont,(DWORD fontID) );
F7(FAST, D2Win, 10129,10129,10129,10118,10039,10031,10085,10137, void, D2PrintPopup,(LPWSTR s, DWORD x, DWORD y, DWORD color, DWORD center) ); F7(FAST, D2Win, 10129,10129,10129,10118,10039,10031,10085, void, D2PrintPopup,(LPWSTR s, DWORD x, DWORD y, DWORD color, DWORD center) );
F7(FAST, D2Win, 10131,10131,10131,00000,00000,00000,00000,00000, void, D2GetPixelRect,(LPWSTR s, DWORD* x, DWORD* y) );//6F8AB260 F7(FAST, D2Win, 10131,10131,10131,00000,00000,00000,00000, void, D2GetPixelRect,(LPWSTR s, DWORD* x, DWORD* y) );//6F8AB260
F7(FAST, D2Win, 10132,10132,10132,00000,00000,00000,00000,00000, DWORD, D2PrintTextPopup,(LPWSTR s, DWORD x, DWORD y, DWORD uk, DWORD type, DWORD color) );//6F8AB080 F7(FAST, D2Win, 10132,10132,10132,00000,00000,00000,00000, DWORD, D2PrintTextPopup,(LPWSTR s, DWORD x, DWORD y, DWORD uk, DWORD type, DWORD color) );//6F8AB080
F7(STD, D2Win, 10017,10017,10017,10147,10113,10098,10098,10164, void*, D2CreateTextBox,(DWORD* data) ); F7(STD, D2Win, 10017,10017,10017,10147,10113,10098,10098, void*, D2CreateTextBox,(DWORD* data) );
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//D2CMP : ????0000 //D2CMP : ????0000
//D2S(D2CMP,10014, DWORD, D2CMP10014, (void* image) );//ONLY 1.11 //D2S(D2CMP,10014, DWORD, D2CMP10014, (void* image) );//ONLY 1.11
F7(STD, D2CMP, 10032,10032,10032,10021,10014,10106,10065,10020, DWORD, D2CMP10014, (void* image) ); F7(STD, D2CMP, 10032,10032,10032,10021,10014,10106,10065, DWORD, D2CMP10014, (void* image) );
//ONLY UNTIL 1.10 : //ONLY UNTIL 1.10 :
A7(FAST, D2Client, BA00, B9F0, C080,00000,00000,00000,00000,00000, DWORD, D2isLODGame, ());//6FAAC080 A7(FAST, D2Client, BA00, B9F0, C080,00000,00000,00000,00000, DWORD, D2isLODGame, ());//6FAAC080
A7(FAST, D2Client, 00000,00000, C090,00000,00000,00000,00000,00000, BYTE, D2GetDifficultyLevel, ());//6FAAC090 1.09 should be BA10 (b) BA00 (d) A7(FAST, D2Client, 00000,00000, C090,00000,00000,00000,00000, BYTE, D2GetDifficultyLevel, ());//6FAAC090 1.09 should be BA10 (b) BA00 (d)
A7(STD, D2Client, B6670,B59F0,B7BC0,00000,00000,00000,00000,00000, DWORD, D2GetMouseX, ());//6FB57BC0 A7(STD, D2Client, B6670,B59F0,B7BC0,00000,00000,00000,00000, DWORD, D2GetMouseX, ());//6FB57BC0
A7(STD, D2Client, B6680,B5A00,B7BD0,00000,00000,00000,00000,00000, DWORD, D2GetMouseY, ());//6FB57BD0 A7(STD, D2Client, B6680,B5A00,B7BD0,00000,00000,00000,00000, DWORD, D2GetMouseY, ());//6FB57BD0
A7(STD, D2Client, 8DC40,8CFC0,883D0,00000,00000,00000,00000,00000, Unit*, D2GetClientPlayer, ());//6FB283D0 A7(STD, D2Client, 8DC40,8CFC0,883D0,00000,00000,00000,00000, Unit*, D2GetClientPlayer, ());//6FB283D0
A7(FAST, D2Client, B920, B910, BF60,00000,00000,00000,00000,00000, void, D2CleanStatMouseUp, ());//6FAABF60 A7(FAST, D2Client, B920, B910, BF60,00000,00000,00000,00000, void, D2CleanStatMouseUp, ());//6FAABF60
A7(FAST, D2Client, D210, D200, D990,00000,00000,00000,00000,00000, void, D2SendToServer3, (BYTE type, WORD p));//6FAAD990 A7(FAST, D2Client, D210, D200, D990,00000,00000,00000,00000, void, D2SendToServer3, (BYTE type, WORD p));//6FAAD990
//A7(FAST, D2Client, 00000,00000, DA20,00000,00000,00000,00000,00000, void, D2SendToServer5, (BYTE type, DWORD p));//6FAADA20 //A7(FAST, D2Client, 00000,00000, DA20,00000,00000,00000,00000, void, D2SendToServer5, (BYTE type, DWORD p));//6FAADA20
//A7(FAST, D2Client, 00000,00000, D9E0,00000,00000,00000,00000,00000, void, D2SendToServer7, (BYTE type, WORD p1, WORD p2, WORD p3));//6FAAD9E0 //A7(FAST, D2Client, 00000,00000, D9E0,00000,00000,00000,00000, void, D2SendToServer7, (BYTE type, WORD p1, WORD p2, WORD p3));//6FAAD9E0
//A7(FAST, D2Client, 00000,00000, DA40,00000,00000,00000,00000,00000, void, D2SendToServer9, (BYTE type, DWORD p1, DWORD p2));//6FAADA40 //A7(FAST, D2Client, 00000,00000, DA40,00000,00000,00000,00000, void, D2SendToServer9, (BYTE type, DWORD p1, DWORD p2));//6FAADA40
//A7(FAST, D2Client, 00000,00000, DA70,00000,00000,00000,00000,00000, void, D2SendToServer13,(BYTE type, DWORD p1, DWORD p2, DWORD p3));//6FAADA70 //A7(FAST, D2Client, 00000,00000, DA70,00000,00000,00000,00000, void, D2SendToServer13,(BYTE type, DWORD p1, DWORD p2, DWORD p3));//6FAADA70
A7(FAST, D2Game, 7C2C0,7C7B0,8C2E0,00000,00000,00000,00000,00000, NetClient*, D2GetClient, (Unit* ptUnit, char* lpszErrFile, DWORD ErrLine));//6FCBC2E0 A7(FAST, D2Game, 7C2C0,7C7B0,8C2E0,00000,00000,00000,00000, NetClient*, D2GetClient, (Unit* ptUnit, char* lpszErrFile, DWORD ErrLine));//6FCBC2E0
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////// VARIABLES //////// //////// VARIABLES ////////
@@ -583,23 +581,22 @@ A7(FAST, D2Game, 7C2C0,7C7B0,8C2E0,00000,00000,00000,00000,00000, NetClient*, D2
//E2C(D2Client,11C1E0,Unit*, ptClientChar);//1.11b //E2C(D2Client,11C1E0,Unit*, ptClientChar);//1.11b
//C7(D2Common,000000,000000, 96A20, 9B74C, 9EE8C, 9B500, 99E1C, DataTables*,SgptDataTables); //03836A20 - 037A0000 //01EE6A20 //C7(D2Common,000000,000000, 96A20, 9B74C, 9EE8C, 9B500, 99E1C, DataTables*,SgptDataTables); //03836A20 - 037A0000 //01EE6A20
C7(D2Client, D50E8, D40E0, D40F0, F5C60, F4FC8, DC6E4, DBC4C, F7038, DWORD, ResolutionY);//0x258 = 600 C7(D2Client, D50E8, D40E0, D40F0, F5C60, F4FC8, DC6E4, DBC4C, DWORD, ResolutionY);//0x258 = 600
C7(D2Client, D50EC, D40E4, D40F4, F5C5C, F4FC4, DC6E0, DBC48, F7034, DWORD, ResolutionX);//0x320 = 800 C7(D2Client, D50EC, D40E4, D40F4, F5C5C, F4FC4, DC6E0, DBC48, DWORD, ResolutionX);//0x320 = 800
C7(D2Client,125AD8,124958,11A74C,11BD28,11BEFC,11BD2C,11B9A4,11D358, DWORD, NegWindowStartY);//0xFFFFFFC4 = -60 C7(D2Client,125AD8,124958,11A74C,11BD28,11BEFC,11BD2C,11B9A4, DWORD, NegWindowStartY);//0xFFFFFFC4 = -60
C7(D2Client,125AD4,124954,11A748,11BD24,11BEF8,11BD28,11B9A0,11D354, DWORD, WindowStartX);//0x50 = 80 C7(D2Client,125AD4,124954,11A748,11BD24,11BEF8,11BD28,11B9A0, DWORD, WindowStartX);//0x50 = 80
//C7(D2Launch, 55818, 56088, 2CD5C,000000, 2CD5C,000000,000000,00000, DWORD, GameTypeMode);//0x50 = 80 //6FA3CD5C-6FA10000 //C7(D2Launch, 55818, 56088, 2CD5C,000000, 2CD5C,000000,000000, DWORD, GameTypeMode);//0x50 = 80 //6FA3CD5C-6FA10000
C7(D2Game, F2A80, F2918,113FB8,111718,1115E0,1105E0,1107B8,1105E0, NetClient*, ClientTable); C7(D2Game, F2A80, F2918,113FB8,111718,1115E0,1105E0,1107B8, NetClient*, ClientTable);
//C7(D2Client,000000,000000,000000,000000,104225,000000,000000,00000, DWORD, CurrentNPCNum); //C7(D2Client,000000,000000,000000,000000,104225,000000,000000, DWORD, CurrentNPCNum);
C7(D2Client,000000,000000,000000, FB3F4,11A2F4,10330C,119854,1087B4, DWORD, IsLodGame); C7(D2Client,000000,000000,000000, FB3F4,11A2F4,10330C,119854, DWORD, IsLodGame);
C7(D2Client,000000,000000,10795C,11BFB8,11C2A8,11BFF4,000000,000000, BYTE, DifficultyLevel); C7(D2Client,000000,000000,10795C,11BFB8,11C2A8,11BFF4,000000, BYTE, DifficultyLevel);
//C7(D2Client,000000,000000,10795C,11BFB8,11C2A8,11BFF4,000000,11D1D8, BYTE, DifficultyLevel); C7(D2Client,000000,000000,000000,10A40C,11B414,101634,11B824, DWORD, MouseY);//0x258 = 600
C7(D2Client,000000,000000,000000,10A40C,11B414,101634,11B824,11C94C, DWORD, MouseY);//0x258 = 600 C7(D2Client,000000,000000,000000,10A410,11B418,101638,11B828, DWORD, MouseX);//0x320 = 800
C7(D2Client,000000,000000,000000,10A410,11B418,101638,11B828,11C950, DWORD, MouseX);//0x320 = 800 C7(D2Client,000000,000000,000000,11C4F0,11C1E0,11C3D0,11BBFC, Unit*, ptClientChar);
C7(D2Client,000000,000000,000000,11C4F0,11C1E0,11C3D0,11BBFC,11D050, Unit*, ptClientChar);
C7(D2Client, DB918, DA828,000000,000000,000000,000000,000000,000000, DWORD, NbStatDesc); C7(D2Client, DB918, DA828,000000,000000,000000,000000,000000, DWORD, NbStatDesc);
C7(D2Client, DAF98, D9EA8,000000,000000,000000,000000,000000,000000, DWORD, StatDescTable); C7(D2Client, DAF98, D9EA8,000000,000000,000000,000000,000000, DWORD, StatDescTable);
/* NEXT NOT TESTED IN 1.10 (1.09b fct) /* NEXT NOT TESTED IN 1.10 (1.09b fct)
D2_STD(D2Common10066, void, D2RemoveFromRoom, (DrlgRoom1* hRoom, DWORD untitype, DWORD unitID), 0x6FD7CFD0); D2_STD(D2Common10066, void, D2RemoveFromRoom, (DrlgRoom1* hRoom, DWORD untitype, DWORD unitID), 0x6FD7CFD0);

View File

@@ -13,9 +13,6 @@
struct CBPlayerData; struct CBPlayerData;
struct CBItemData; struct CBItemData;
struct Unit; struct Unit;
struct SkillsBIN;
struct SkillData;
struct ObjectsBIN;
/*=================================================================*/ /*=================================================================*/
/* Skill Structure. */ /* Skill Structure. */
@@ -348,14 +345,12 @@ struct NetClient
WORD isHardCoreGame:1; WORD isHardCoreGame:1;
}; };
}; };
BYTE uk2; //+0C BYTE uk2[0x170]; //+0C
char name[0x10]; //+0D
BYTE uk3[0x15F]; //+1D
BYTE* savefile; //+17C BYTE* savefile; //+17C
DWORD finalSize; //+180 DWORD finalSize; //+180
DWORD counter; //+184 DWORD counter; //+184
DWORD currentSize; //+188 DWORD currentSize; //+188
BYTE uk4[0x1C]; //+18C BYTE uk3[0x1C]; //+18C
Game* ptGame; //+1A8 Game* ptGame; //+1A8
//+1A8 is ptGame //+1A8 is ptGame
//+4A8 ptNextClient //+4A8 ptNextClient

View File

@@ -1,86 +0,0 @@
/*=================================================================
File created by Yohann NICOLAS.
Get Game version.
=================================================================*/
//#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include "VersionInfo.h"
#include <windows.h>
#pragma comment(lib, "Version.Lib")
const char* VersionStrings[16] = { "1.00","1.07","1.08","1.09","1.09b","1.09d","1.10","1.11","1.11b","1.12","1.13c","1.13d","1.14a","1.14b","1.14c","1.14d" };
const char* GetVersionString(int version)
{
return VersionStrings[version];
}
eGameVersion GetD2Version(LPCVOID pVersionResource)
{
UINT uLen;
VS_FIXEDFILEINFO* ptFixedFileInfo;
if (!VerQueryValue(pVersionResource, "\\", (LPVOID*)&ptFixedFileInfo, &uLen))
return UNKNOW;
if (uLen == 0)
return UNKNOW;
WORD major = HIWORD(ptFixedFileInfo->dwFileVersionMS);
WORD minor = LOWORD(ptFixedFileInfo->dwFileVersionMS);
WORD revision = HIWORD(ptFixedFileInfo->dwFileVersionLS);
WORD subrevision = LOWORD(ptFixedFileInfo->dwFileVersionLS);
if (major != 1)
return UNKNOW;
if (minor == 0 && revision == 7 && subrevision == 0) return V107;
if (minor == 0 && revision == 8 && subrevision == 28) return V108;
if (minor == 0 && revision == 9 && subrevision == 19) return V109;
if (minor == 0 && revision == 9 && subrevision == 20) return V109b;
if (minor == 0 && revision == 9 && subrevision == 22) return V109d;
if (minor == 0 && revision == 10 && subrevision == 39) return V110;
if (minor == 0 && revision == 11 && subrevision == 45) return V111;
if (minor == 0 && revision == 11 && subrevision == 46) return V111b;
if (minor == 0 && revision == 12 && subrevision == 49) return V112;
if (minor == 0 && revision == 13 && subrevision == 60) return V113c;
if (minor == 0 && revision == 13 && subrevision == 64) return V113d;
if (minor == 14 && revision == 0 && subrevision == 64) return V114a;
if (minor == 14 && revision == 1 && subrevision == 68) return V114b;
if (minor == 14 && revision == 2 && subrevision == 70) return V114c;
if (minor == 14 && revision == 3 && subrevision == 71) return V114d;
return UNKNOW;
}
eGameVersion GetD2Version(char* gameExe)
{
DWORD len = GetFileVersionInfoSize(gameExe, NULL);
if (len == 0)
return UNKNOW;
BYTE* pVersionResource = new BYTE[len];
GetFileVersionInfo(gameExe, NULL, len, pVersionResource);
eGameVersion version = GetD2Version(pVersionResource);
delete pVersionResource;
return version;
}
eGameVersion GetD2Version()
{
HMODULE hModule = GetModuleHandle(NULL);
HRSRC hResInfo = FindResource(hModule, MAKEINTRESOURCE(VS_VERSION_INFO), RT_VERSION);
HGLOBAL hResData = LoadResource(hModule, hResInfo);
LPVOID pVersionResource = LockResource(hResData);
//DWORD dwSize = SizeofResource(hInst, hResInfo);
//LPVOID pVersionResource = LocalAlloc(LMEM_FIXED, dwSize);
//CopyMemory(pVersionResource, pRes, dwSize);
eGameVersion version = GetD2Version(pVersionResource);
FreeResource(hResData);
//LocalFree(pVersionResource);
return version;
}
///////////////////////// END OF FILE ///////////////////////

View File

@@ -1,34 +0,0 @@
/*=================================================================
File created by Yohann NICOLAS.
Get Game version.
=================================================================*/
#pragma once
enum eGameVersion
{
UNKNOW = -1,
V100 = 0,
V107,
V108,
V109,
V109b,
V109d,
V110,
V111,
V111b,
V112,
V113c,
V113d,
V114a,
V114b,
V114c,
V114d
};
const char* GetVersionString(int version);
eGameVersion GetD2Version(char* gamePath);
eGameVersion GetD2Version();
///////////////////////// END OF FILE ///////////////////////

View File

@@ -11,7 +11,6 @@ enum UpdateClientConst
{ {
UC_SELECT_STASH=0x18, UC_SELECT_STASH=0x18,
UC_SHARED_GOLD, UC_SHARED_GOLD,
UC_PAGE_NAME,
UC_ADD_STAT, UC_ADD_STAT,
UC_ADD_SYNERGY, UC_ADD_SYNERGY,
UC_TEST1, UC_TEST1,
@@ -41,27 +40,16 @@ enum UpdateServerConst
US_SELECT_PREVIOUS_INDEX2, US_SELECT_PREVIOUS_INDEX2,
US_SELECT_NEXT_INDEX2, US_SELECT_NEXT_INDEX2,
US_WORLDEVENT, US_WORLDEVENT,
US_SAVE, US_STARTSAVE,
US_MAXGOLD, US_MAXGOLD,
US_PUTGOLD, US_PUTGOLD,
US_TAKEGOLD, US_TAKEGOLD,
US_RENAME,
US_PAGENAME,
US_SET_INDEX,
US_RESET_INDEX,
US_INSERT_PAGE,
US_DELETE_PAGE,
US_SWAP3,
US_SWAP2,
US_SWAP1,
US_SWAP0,
US_SWAP0_TOGGLE,
US_TOGGLE1,
US_TOGGLE2,
US_TOGGLE3,
US_TEST1, //For CB US_TEST1, //For CB
US_TEST2, //For CB US_TEST2, //For CB
US_TEST3 //For CB US_TEST3, //For CB
US_TOGGLE,
US_SWAP,
US_SWAPLAST = 0xFFFF
}; };
/*================================= END OF FILE =================================*/ /*================================= END OF FILE =================================*/

View File

@@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found. the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.> {one line to give the program's name and a brief idea of what it does.}
Copyright (C) <year> <name of author> Copyright (C) {year} {name of author}
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode: notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author> {project} Copyright (C) {year} {fullname}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details. under certain conditions; type `show c' for details.

View File

@@ -1,13 +1,14 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
Use a more big stash Use a more big stash
=================================================================*/ =================================================================*/
#include "plugYFiles.h" // Install_PlugYFiles()
#include "common.h" #include "common.h"
#include "error.h"
#include "d2functions.h"
#include "plugYFiles.h" // Install_PlugYFiles()
bool active_bigStash = false; bool active_bigStash = false;
bool active_bigStash_tested = false; bool active_bigStash_tested = false;
@@ -77,17 +78,16 @@ void Install_BigStash()
log_msg("Patch D2Common & D2Client for make 10x10 squares in the stash. (BigStash)\n"); log_msg("Patch D2Common & D2Client for make 10x10 squares in the stash. (BigStash)\n");
// modification of stash grid // modification of stash grid
mem_seek R7(D2Common, C9F3, CA03, 14ED3, 5FCB5, 2A505, 1BDB5, 82CA5, 6CC25); mem_seek R7(D2Common, C9F3, CA03, 14ED3, 5FCB5, 2A505, 1BDB5, 82CA5);
MEMC_REF4( D2CompileTxtFile, caller_modifStashGrid); MEMC_REF4( D2CompileTxtFile, caller_modifStashGrid);
//01B64ED2 |. E8 99AEFFFF CALL D2Common.#10578 //01B64ED2 |. E8 99AEFFFF CALL D2Common.#10578
//6FDAFCB4 |. E8 A7C3FCFF CALL D2Common.#10653 //6FDAFCB4 |. E8 A7C3FCFF CALL D2Common.#10653
//6FD7A504 |. E8 5743FEFF CALL D2Common.#10496 ; \#10496 //6FD7A504 |. E8 5743FEFF CALL D2Common.#10496 ; \#10496
//6FD6BDB4 |. E8 97600200 CALL D2Common.#10244 ; \#10244 //6FD6BDB4 |. E8 97600200 CALL D2Common.#10244 ; \#10244
//6FDD2CA4 |. E8 97C2FDFF CALL D2Common.#10849 ; \#10849 //6FDD2CA4 |. E8 97C2FDFF CALL D2Common.#10849 ; \#10849
//6FDBCC24 |. E8 B7FEF9FF CALL D2Common.#10037 ; \#10037
// modification of stash background // modification of stash background
mem_seek R7(D2Client, 45B1C, 45B1C, 4C61C, A643C, 749BC, A9D7C, 8CC1C, 943FC); mem_seek R7(D2Client, 45B1C, 45B1C, 4C61C, A643C, 749BC, A9D7C, 8CC1C);
memt_byte( 0x68, 0xE8 ); // CALL caller_changeTradeStash memt_byte( 0x68, 0xE8 ); // CALL caller_changeTradeStash
MEMT_REF4( 0x00000104, caller_changeTradeStash); MEMT_REF4( 0x00000104, caller_changeTradeStash);
//6FAEC61C |. 68 04010000 PUSH 104 //6FAEC61C |. 68 04010000 PUSH 104
@@ -95,7 +95,6 @@ void Install_BigStash()
//6FB249BC |. 68 04010000 PUSH 104 //6FB249BC |. 68 04010000 PUSH 104
//6FB59D7C |. 68 04010000 PUSH 104 //6FB59D7C |. 68 04010000 PUSH 104
//6FB3CC1C |. 68 04010000 PUSH 104 //6FB3CC1C |. 68 04010000 PUSH 104
//6FB443FC |. 68 04010000 PUSH 104
log_msg("\n"); log_msg("\n");

View File

@@ -6,6 +6,8 @@
=================================================================*/ =================================================================*/
/* /*
#include "common.h" #include "common.h"
#include "error.h"
#include "d2functions.h"
#include <stdio.h> #include <stdio.h>
#define BUFFER_SIZE 0x4000 #define BUFFER_SIZE 0x4000

View File

@@ -1,19 +1,19 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
Updating server. Updating server.
=================================================================*/ =================================================================*/
#include "common.h"
#include "error.h"
#include "d2functions.h"
#include "updateServer.h" #include "updateServer.h"
#include "updateClient.h" #include "updateClient.h"
#include "infinityStash.h" #include "infinityStash.h"
#include "newInterfaces.h" #include "newInterfaces.h"
#include "newInterface_CubeListing.h" #include "newInterface_CubeListing.h"
#include "extraOptions.h" #include "extraOptions.h"
#include "windowed.h"
#include "common.h"
bool active_Commands=true; bool active_Commands=true;
@@ -22,34 +22,28 @@ bool active_savegame=false;
#define MAX_CMD_SIZE 200 #define MAX_CMD_SIZE 200
const char * CMD_SAVE="/save"; const char * CMD_RENAME="/rename";
const char * CMD_PAGENAME = "/pagename";
const char * CMD_LISTCUBEFORMULA="/listcube";
const char * CMD_SELECTPAGE="/page"; const char * CMD_SELECTPAGE="/page";
const char * CMD_SWAP = "/swap";
const char * CMD_TOGGLE = "/toggle";
const char * CMD_RELOAD="/reload";
const char * CMD_LOCK_MOUSE = "/lockmouse"; const char * CMD_LOCK_MOUSE = "/lockmouse";
const char * CMD_LOCK_MOUSE2 = "/lock"; const char * CMD_LOCK_MOUSE2 = "/lock";
const char * CMD_UNLOCK_MOUSE = "/unlockmouse";
const char * CMD_UNLOCK_MOUSE2 = "/unlock";
const char * CMD_RENAME_CHAR="/renamechar"; const char * CMD_STARTSAVE="/save";
const char * CMD_REPAGE_NAME = "/renamepage"; const char * CMD_MAXGOLD="/maxgold";
const char * CMD_SET_INDEX = "/setindex";
const char * CMD_RESET_INDEX = "/resetindex";
const char * CMD_INSERT_PAGE = "/insertpage";
const char * CMD_DELETE_PAGE = "/deletepage";
const char * CMD_SWAP = "/swap";
const char * CMD_TOGGLE = "/toggle";
const char * CMD_DISPLAY_MANA_LIFE = "/dml"; const char * CMD_DISPLAY_MANA_LIFE = "/dml";
const char * CMD_DISPLAY_LIFE_MANA = "/dlm"; const char * CMD_DISPLAY_LIFE_MANA = "/dlm";
const char * CMD_DISPLAY_LIFE = "/dl"; const char * CMD_DISPLAY_LIFE = "/dl";
const char * CMD_DISPLAY_MANA = "/dm"; const char * CMD_DISPLAY_MANA = "/dm";
const char * CMD_LISTCUBEFORMULA="/listcube";
//const char * CMD_RELOAD="/reload";
//const char * CMD_MAXGOLD="/maxgold";
/* /*
$+21C8 02020648 |. 6A 01 PUSH 1 $+21C8 02020648 |. 6A 01 PUSH 1
$+21CA 0202064A |. 52 PUSH EDX $+21CA 0202064A |. 52 PUSH EDX
@@ -59,116 +53,6 @@ $+21CD 0202064D |. 8BC3 MOV EAX,EBX
$+21CF 0202064F |. E8 2CDEFFFF CALL D2Game.0201E480 $+21CF 0202064F |. E8 2CDEFFFF CALL D2Game.0201E480
*/ */
/*
struct D2NPCRecordStrc
{
DWORD value;
};
struct D2NPCDataStrc
{
DWORD value;
};
D2NPCRecordStrc* __fastcall STORES_GetRecord(Game* pGame, int nNPC, int* pIndex)
{
if (pGame == NULL)
return NULL;
if (pIndex != NULL)
*pIndex = 0;
D2NPCDataStrc* pControl = pGame->pVendorControl;
if (pControl == NULL)
return NULL;
D2NPCRecordStrc* pList = pControl->pVendors;
if (pList == NULL)
return NULL;
const int nCount = INLINE_GetCustomTXT()->nNPCCount;
for (int i = 0; i < nCount; i++)
{
if (pList->nNPC == nNPC)
{
if (pIndex != NULL)
*pIndex = i;
return pList;
}
pList++;
}
return NULL;
}
Inventory* __fastcall STORES_GetGambleInventory(Game* pGame, Unit* pPlayer, Unit* pNPC)
{
if (pGame == NULL || pPlayer == NULL || pNPC == NULL)
return NULL;
D2NPCRecordStrc* pRecord = STORES_GetRecord(pGame, pNPC->nUnitIndex, NULL);
if (pRecord == NULL || !pRecord->bGambleInit)
return NULL;
D2NPCGambleStrc* pGamble = pRecord->pGamble;
int nGUID = pPlayer->dwGUID;
while (pGamble != NULL)
{
if (pGamble->dwGUID == nGUID)
return pGamble->pInventory;
pGamble = pGamble->pNext;
}
return NULL;
}
void __fastcall STORES_UpdateInventoryItems(D2UnitStrc* pNPC, D2InventoryStrc* pInventory, BOOL bPlayDropSounds = FALSE)
{
D2UnitStrc* pItem = pInventory->pFirstItem;
while (pItem != NULL)
{
if (pItem->nUnitType == UNIT_ITEM)
{
pItem->fUnitFlagsEx |= UNITFLAG_SHOPITEM;
if (ITEMS_CheckSocketable(pItem))
ITEMS_SetFlag(pItem, ITEMFLAG_NEWITEM, TRUE);
ITEMS_UpdateTrade(pNPC->pInventory, pItem); //D2Common.#10283
if (bPlayDropSounds)
{
FileItemTable* pRecord = INLINE_GetItemRecord(pItem->nUnitIndex);
if (pRecord != NULL)
D2PlaySound(pRecord->nDropSound, pInventory->pOwner, 0, 0, 0);
}
}
pItem = pItem->pItemData->pNext;
}
}
void gambleReload(Unit* ptChar)
{
D2UnitStrc* pNPC = UNITS_GetServer(pGame, UNIT_MONSTER, pPacket->dwInteractGUID);
if (pNPC != NULL)
{
if (pNPC->dwGUID == pPlayer->dwInteractGUID)
{
D2NPCRecord* pNPCRecord = NPC_GetRecord(pGame, pNPC->nUnitIndex);
if (pNPCRecord->bGambleInit)
{
D2FillTradeOrGamble(pGame, pNPC, pPlayer, TRUE); //D2Game.0x6FCCAE20
D2InventoryStrc* pInv = STORES_GetGambleInventory(pGame, pPlayer, pNPC);
STORES_UpdateInventoryItems(pNPC, pInv, TRUE);
D2RefreshUnitInventory(pNPC, TRUE); //D2Common.#10357
}
}
}
}
*/
void gambleReload(Unit* ptChar) void gambleReload(Unit* ptChar)
{ {
Unit* ptNPC = D2GetCurrentNPC(); Unit* ptNPC = D2GetCurrentNPC();
@@ -259,14 +143,30 @@ void updateSharedGold(DWORD goldAmount)
PCPY->sharedGold = goldAmount; PCPY->sharedGold = goldAmount;
} }
bool renameCharacter(Unit* ptChar, const char* newName) /****************************************************************************************************/
int STDCALL commands (char* ptText)
{ {
int len = strlen(newName); Unit* ptChar = D2GetClientPlayer();
char command[MAX_CMD_SIZE];
ZeroMemory(command,MAX_CMD_SIZE);
strncpy(command,ptText,MAX_CMD_SIZE-1);
_strlwr(command);
if (!strncmp(command, CMD_RENAME, strlen(CMD_RENAME)) && ptClientNameChar != NULL)
{
char* param = &command[strlen(CMD_RENAME)];
int len = strlen(param);
if (param[0] != ' ')
return 1;
param++;
len--;
if (len < 2 || len > 15) if (len < 2 || len > 15)
return 0; return 0;
for (int i = 0; i < len; i++) for (int i = 0; i < len; i++)
{ {
char c = newName[i]; char c = param[i];
if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c == '_'))) if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c == '_')))
return 1; return 1;
} }
@@ -279,7 +179,7 @@ bool renameCharacter(Unit* ptChar, const char* newName)
D2FogGetSavePath(szCurrentFile, MAX_PATH); D2FogGetSavePath(szCurrentFile, MAX_PATH);
D2FogGetSavePath(szNewFile, MAX_PATH); D2FogGetSavePath(szNewFile, MAX_PATH);
strcat(szCurrentFile, ptChar->ptPlayerData->name); strcat(szCurrentFile, ptChar->ptPlayerData->name);
strcat(szNewFile, newName); strcat(szNewFile, param);
strcat(szCurrentFile, "."); strcat(szCurrentFile, ".");
strcat(szNewFile, "."); strcat(szNewFile, ".");
int curLen = strlen(szCurrentFile); int curLen = strlen(szCurrentFile);
@@ -314,30 +214,42 @@ bool renameCharacter(Unit* ptChar, const char* newName)
} }
// Update server // Update server
for (int i = 0; i <= len; i++) for (int i = 0; i <= len; i++)
updateServer(US_RENAME + (newName[i] << 8)); {
updateServer(US_RENAME + (param[i] << 8));
}
// Update client // Update client
log_msg("Rename on Client : %s -> %s\n", ptChar->ptPlayerData->name, newName); log_msg("Rename on Client : %s -> %s\n", ptChar->ptPlayerData->name, param);
strcpy(ptChar->ptPlayerData->name, newName); strcpy(ptChar->ptPlayerData->name, param);
strcpy(ptClientNameChar, param);
updateServer(US_SAVE); updateServer(US_SAVE);
return 0; return 0;
} }
/****************************************************************************************************/
int STDCALL commands (char* ptText) if (!strncmp(command, CMD_PAGENAME,strlen(CMD_PAGENAME)))
{ {
log_msg("Command : %s\n", ptText); if (!active_multiPageStash) return 1;
Unit* ptChar = D2GetClientPlayer(); char* param = &command[strlen(CMD_PAGENAME)];
DWORD len = strlen(param);
char command[MAX_CMD_SIZE]; Stash* ptStash = PCPY->currentStash;
ZeroMemory(command,MAX_CMD_SIZE); if (!ptStash) return 0;
strncpy(command,ptText,MAX_CMD_SIZE-1); if (len>1 && param[0] == ' ')
_strlwr(command);
if (!strcmp(command, CMD_SAVE))
{ {
if (onRealm) return 1; D2FogMemDeAlloc(ptStash->name,__FILE__,__LINE__,0);
updateServer(US_SAVE); ptStash->name = (char *)malloc(len);//D2FogMemAlloc(len,__FILE__,__LINE__,0);
strcpy(ptStash->name,&param[1]);
} else {
D2FogMemDeAlloc(ptStash->name,__FILE__,__LINE__,0);
ptStash->name = NULL;
}
return 0;
}
if (!strcmp(command,CMD_LISTCUBEFORMULA))
{
if (!active_listAllCubeFormula) return 1;
listAllCubeFormula();
return 0; return 0;
} }
@@ -348,86 +260,16 @@ int STDCALL commands (char* ptText)
return 0; return 0;
} }
if (!strcmp(command, CMD_LOCK_MOUSE) || !strcmp(command, CMD_LOCK_MOUSE2)) if (!strncmp(command, CMD_TOGGLE, strlen(CMD_TOGGLE)))
{ {
if (onRealm) return 1; if (!active_sharedStash) return 1;
lockMouseCursor(); int page = atoi(&command[strlen(CMD_TOGGLE)]) - 1;
return 0; if (page < 0)
}
if (!strcmp(command, CMD_UNLOCK_MOUSE) || !strcmp(command, CMD_UNLOCK_MOUSE2))
{
if (onRealm) return 1;
unlockMouseCursor();
return 0;
}
if (!strncmp(command, CMD_RENAME_CHAR, strlen(CMD_RENAME_CHAR)))
{
const char* param = &command[strlen(CMD_RENAME_CHAR)];
if (param[0] != ' ')
return 1; return 1;
param++; updateServer(US_SWAP3 + ((page & 0xFF000000) >> 16));
return renameCharacter(ptChar, param); updateServer(US_SWAP2 + ((page & 0xFF0000) >> 8));
} updateServer(US_SWAP1 + (page & 0xFF00));
updateServer(US_SWAP0_TOGGLE + ((page & 0xFF) << 8));
if (!strncmp(command, CMD_REPAGE_NAME,strlen(CMD_REPAGE_NAME)))
{
if (!active_multiPageStash) return 1;
char* param = &command[strlen(CMD_REPAGE_NAME)];
Stash* ptStash = PCPY->currentStash;
if (!ptStash)
return 0;
int len = strlen(param);
while (len > 0 && param[0] == ' ')
{
param++;
len--;
}
if (len > 0 && len <= 15)
{
log_msg("Rename current page on Client : %s -> %s\n", ptStash->name, param);
renameCurrentStash(ptChar, param);
for (int i = 0; i <= len; i++)
updateServer(US_PAGENAME + (param[i] << 8));
}
else if (len == 0)
{
log_msg("Rename current page on Client: %s\n", ptStash->name);
renameCurrentStash(ptChar, NULL);
updateServer(US_PAGENAME);
}
return 0;
}
if (!strcmp(command, CMD_SET_INDEX))
{
if (!active_multiPageStash) return 1;
updateServer(US_SET_INDEX);
return 0;
}
if (!strcmp(command, CMD_RESET_INDEX))
{
if (!active_multiPageStash) return 1;
updateServer(US_RESET_INDEX);
return 0;
}
if (!strcmp(command, CMD_INSERT_PAGE))
{
if (!active_multiPageStash) return 1;
insertStash(ptChar);
updateServer(US_INSERT_PAGE);
return 0;
}
if (!strcmp(command, CMD_DELETE_PAGE))
{
if (!active_multiPageStash) return 1;
if (deleteStash(ptChar))
updateServer(US_DELETE_PAGE);
return 0; return 0;
} }
@@ -444,16 +286,31 @@ int STDCALL commands (char* ptText)
return 0; return 0;
} }
if (!strncmp(command, CMD_TOGGLE, strlen(CMD_TOGGLE))) if (!strcmp(command,CMD_RELOAD))
{ {
if (!active_sharedStash) return 1; if (onRealm) return 1;
int page = atoi(&command[strlen(CMD_TOGGLE)]) - 1; gambleReload(ptChar);
if (page < 0) return 0;
return 1; }
updateServer(US_SWAP3 + ((page & 0xFF000000) >> 16));
updateServer(US_SWAP2 + ((page & 0xFF0000) >> 8)); if (!strcmp(command, CMD_LOCK_MOUSE) || !strcmp(command, CMD_LOCK_MOUSE2))
updateServer(US_SWAP1 + (page & 0xFF00)); {
updateServer(US_SWAP0_TOGGLE + ((page & 0xFF) << 8)); if (onRealm) return 1;
lockMouseCursor();
return 0;
}
if (!strcmp(command,CMD_STARTSAVE))
{
if (onRealm) return 1;
updateServer(US_SAVE);
return 0;
}
if (!strcmp(command,CMD_MAXGOLD))
{
if (onRealm) return 1;
updateServer(US_MAXGOLD);
return 0; return 0;
} }
@@ -475,27 +332,6 @@ int STDCALL commands (char* ptText)
return 0; return 0;
} }
if (!strcmp(command, CMD_LISTCUBEFORMULA))
{
if (!active_listAllCubeFormula) return 1;
listAllCubeFormula();
return 0;
}
//if (!strcmp(command,CMD_RELOAD))
//{
// if (onRealm) return 1;
// gambleReload(ptChar);
// return 0;
//}
//if (!strcmp(command,CMD_MAXGOLD))
//{
// if (onRealm) return 1;
// updateServer(US_MAXGOLD);
// return 0;
//}
return 1; return 1;
} }
@@ -523,19 +359,6 @@ MANAGESOUNDCHAOSDEBUG:
RETN 8 RETN 8
}} }}
FCT_ASM ( caller_Commands_113d )
TEST EAX,EAX
JE MANAGESOUNDCHAOSDEBUG
PUSH EDI
CALL commands
TEST EAX,EAX
JNZ MANAGESOUNDCHAOSDEBUG
ADD DWORD PTR SS:[ESP],7
MANAGESOUNDCHAOSDEBUG:
RETN 8
}}
void Install_Commands() void Install_Commands()
{ {
static int isInstalled = false; static int isInstalled = false;
@@ -549,9 +372,9 @@ void Install_Commands()
active_savegame = version_D2Common >= V111; active_savegame = version_D2Common >= V111;
// Run custom commmand // Run custom commmand
mem_seek R7(D2Client, 2C120, 2C110, 32BDD, C1EE6, 91C16, 86926, 70AE6, B1FD6); mem_seek R7(D2Client, 2C120, 2C110, 32BDD, C1EE6, 91C16, 86926, 70AE6);
memt_byte( 0x83, 0xE8 ); // CALL memt_byte( 0x83, 0xE8 ); // CALL
MEMT_REF4( 0xC08508C4 , version_D2Client == V113d ? caller_Commands_113d : version_D2Client >= V111 ? caller_Commands_111 : caller_Commands); MEMT_REF4( 0xC08508C4 , version_D2Client >= V111 ? caller_Commands_111 : caller_Commands);
//6FB71EE6 . 83C4 08 ADD ESP,8 //6FB71EE6 . 83C4 08 ADD ESP,8
//6FB71EE7 . 85C0 TEST EAX,EAX //6FB71EE7 . 85C0 TEST EAX,EAX
//6FB41C16 |. 83C4 08 ADD ESP,8 //6FB41C16 |. 83C4 08 ADD ESP,8
@@ -562,8 +385,6 @@ void Install_Commands()
//6FB20AE9 |. 85C0 TEST EAX,EAX //6FB20AE9 |. 85C0 TEST EAX,EAX
//6FB20AE6 |. 83C4 08 ADD ESP,8 //6FB20AE6 |. 83C4 08 ADD ESP,8
//6FB20AE9 |. 85C0 TEST EAX,EAX //6FB20AE9 |. 85C0 TEST EAX,EAX
//6FB61FD6 |. 83C4 08 ADD ESP,8
//6FB61FD9 |. 85C0 TEST EAX,EAX
log_msg("\n"); log_msg("\n");

View File

@@ -6,6 +6,10 @@
=================================================================*/ =================================================================*/
#include "common.h" #include "common.h"
#include "error.h"
#include "d2functions.h"
s_shifting shifting;
bool isOnRect(DWORD x, DWORD y, DWORD x0, DWORD y0, DWORD l, DWORD h) bool isOnRect(DWORD x, DWORD y, DWORD x0, DWORD y0, DWORD l, DWORD h)
{return (x>=x0) && (x<x0+l) && (y>y0-h) && (y<=y0);} {return (x>=x0) && (x<x0+l) && (y>y0-h) && (y<=y0);}
@@ -18,4 +22,468 @@ void freeMessage(sWinMessage* msg)
D2FreeWinMessage(msg); D2FreeWinMessage(msg);
} }
LPWSTR getString(LPWSTR eng, LPWSTR esp, LPWSTR deu, LPWSTR fra, LPWSTR por, LPWSTR ita, LPWSTR jpn, LPWSTR kor, LPWSTR sin, LPWSTR chi, LPWSTR pol, LPWSTR rus)
{
switch(D2GetLang())
{
case LNG_ENG: return eng;
case LNG_ESP: return esp;
case LNG_DEU: return deu;
case LNG_FRA: return fra;
case LNG_POR: return por;
case LNG_ITA: return ita;
case LNG_JPN: return jpn;
case LNG_KOR: return kor;
case LNG_SIN: return sin;
case LNG_CHI: return chi;
case LNG_POL: return pol;
case LNG_RUS: return rus;
case LNG_DEF:
default: return eng;
}
}
#define LANGUAGE(I,ENG,FRA,DEU,ITA,ESP,POL/*,CHI*/) case I : return getString(L##ENG,L##ESP,L##DEU,L##FRA,L##ENG,L##ITA,L##ENG,L##ENG,L##ENG,L##ENG,L##POL,L##ENG)
LPWSTR getTranslatedString(int stringID)
{
switch(stringID)
{
/* LANGUAGE2( STR_STATS_UNASSIGN_WITH_LIMIT,
"+Alt: ;,+Shift: %d \x70B9\x6570",//"+Alt: Unassign, +Shift: by %d points",
// "+Alt: \x91CD\x5206\x914D;,+Shift: %d \x70B9\x6570",//"+Alt: Unassign, +Shift: by %d points",
"+Alt: D<>sallocation, +Shift: par %d points,",
"+Alt: Zur<75>cksetzen, +Shift: um %d Punkte",
"+Alt: Rimuovi, +Shift: Assegna %d punti",
"+Alt: Quita, +Shift: por %d puntos",
"+Alt: \37325\20998\37197;,+Shift:%d \28857\25968");
*/
LANGUAGE( STR_STATS_UNASSIGN_WITH_LIMIT,
"+Alt: Unassign, +Shift: by %d points",
"+Alt: D<>sallocation, +Shift: par %d points",
"+Alt: Zur<75>cksetzen, +Shift: um %d Punkte",
"+Alt: Rimuovi, +Shift: Assegna %d punti",
"+Alt: Quita, +Shift: por %d puntos",
"+Alt: Odejmij, +Shift: %d punkt<6B>w");
// "+Alt: ????, +Shift: %d ??");
LANGUAGE( STR_STATS_UNASSIGN_WITHOUT_LIMIT,
"+Alt: Unassign, +Shift: all remaining points",
"+Alt: D<>sallocation, +Shift: Tous les points restants",
"+Alt: Zur<75>cksetzen, +Shift: Alle verbleibenden Punkte",
"+Alt: Rimuovi, +Shift: Assegna tutti i punti rimanenti",
"+Alt: Quita, +Shift: Todos los puntos restantes",
"+Alt: Odejmij, +Shift: wszystkie pozostale punkty");
// "+Alt: ????, +Shift: ???");
LANGUAGE( STR_STATS_BASE_MIN,
"Base: %d (Min: %d)",
"Base: %d (Min: %d)",
"Basiswert: %d (Min: %d)",
"Base: %d (Min: %d)",
"Base: %d (Min: %d)",
"Bazowo: %d (Minimum: %d)");
// "??: %d(??: %d)");
LANGUAGE( STR_SKILLS_UNASSIGN,
"Un-allocate all skills points",
"D<EFBFBD>salloue tous les points d'aptitudes",
"Alle Fertigkeitspunkte zur<75>cksetzen",
"Rimuovi tutte le abilit<69>",
"Quita todos los puntos de habilidades",
"Rozdaj od nowa wszystkie punkty umiejetnosci");
// "????????");
LANGUAGE( STR_STASH_PREVIOUS_PAGE,
"Previous Page (+shift: First Page)",
"Page pr<70>c<EFBFBD>dente (+shift: Premi<6D>re page)",
"Vorherige Seite (+shift: Erste Seite)",
"Pagina Precedente (+shift: Prima Pagina)",
"Pagina anterior (+shift: Primera Pagina)",
"Poprzednia Strona (+shift: Pierwsza Strona)");
// "??? (+shift: ??)");
LANGUAGE( STR_STASH_NEXT_PAGE,
"Next Page (+shift: Last not empty Page)",
"Page suivante (+shift: Derni<6E>re page non vide)",
"N<EFBFBD>chste Seite (+shift: Letzte nicht leere Seite )",
"Pagina Successiva (+shift: Ultima Pagina non vuota)",
"Pagina Siguiente (+shift: Ultima pagina non vacia)",
"Nastepna Strona (+shift: Ostatnia nie pusta Strona)");
// "??? (+shift: ?????");
LANGUAGE( STR_TOGGLE_TO_PERSONAL,
"Toggle to Personal Stash",
"Voir coffre personnel",
"Wechselt zum pers<72>nlichen Goldschatz",
"Vai all'Inventario Personale",
"Ver el cofre personal",
"Przejdz do Skrzyni Osobistej");
// "????????");
LANGUAGE( STR_TOGGLE_TO_SHARED,
"Toggle to Shared Stash",
"Voir coffre partag<61>",
"Wechselt zum gemeinsamen Goldschatz",
"Vai all'Inventario Condiviso",
"Ver el cofre compartido",
"Przejdz do Skrzyni Wsp<73>lnej");
// "????????");
LANGUAGE( STR_STASH_PREVIOUS_INDEX,
"Previous Index : by %d Pages (+Shift: %d)",
"Index pr<70>c<EFBFBD>dent : par %d pages (+shift: %d)",
"Vorheriger Index: in %d Seiten (+shift: %d)",
"Schermata Precedente : Indietro di %d Pagine (+Shift: %d)",
"Indice anterior : por %d paginas (+shift: %d)",
"Poprzednia Strona : po %d Stron (+Shift: %d)");
// "???? : %d ? (+Shift:%d)");
LANGUAGE( STR_STASH_NEXT_INDEX,
"Next Index : by %d Pages (+shift: %d)",
"Index suivant : par %d pages (+shift: %d)",
"N<EFBFBD>chster Index: in %d Seiten (+shift: %d)",
"Schermata Successiva : Avanti di %d Pagine (+shift: %d)",
"Indice siguiente : por %d paginas (+shift: %d)",
"Nastepna Strona : po %d Stron (+shift: %d)");
// "???? : %d ? (+shift:%d)");
LANGUAGE( STR_PUT_GOLD,
"Put Gold",
"Poser de l'Or",
"Gib Gold",
"Immetti Oro",
"Poner oro",
"Zdeponuj Zloto");
// "????");
LANGUAGE( STR_TAKE_GOLD,
"Take Gold",
"Prendre de l'Or",
"Nehme Gold",
"Ritira Oro",
"Tomar oro",
"Wyplac zloto");
// "????");
LANGUAGE( STR_PERSONAL_PAGE_NUMBER,
"Personal Page n<>%u",
"Page perso n<>%u",
"Pers<EFBFBD>nliche Seite n<>%u",
"Pagina Personale n<>%u",
"Pagina personal n<>%u",
"Strona Osobista n<>%u");
// "????? n<>%u");
LANGUAGE( STR_SHARED_PAGE_NUMBER,
"Shared Page n<>%u",
"Page partag<61>e n<>%u",
"Gemeinsame Seite n<>%u",
"Pagina Condivisa n<>%u",
"Pagina personal n<>%u",
"Strona Wsp<73>lna n<>%u");
// "????? n<>%u");
LANGUAGE( STR_NO_SELECTED_PAGE,
"No selected page",
"Aucune page s<>lectionn<6E>e",
"Keine ausgew<65>hlte Seite",
"Nessuna pagina selezionata",
"Ninguna pagina seleccionada",
"Nie zaznaczono strony");
// "????");
LANGUAGE( STR_SHARED_GOLD_QUANTITY,
"Shared Gold : %u",
"Or partag<61> : %u",
"Gemeinsamen Gold : %u",
"Oro Condiviso : %u",
"Oro compartido : %u",
"Wsp<EFBFBD>lne Zloto : %u");
// "????: %u");
LANGUAGE( STR_PREVIOUS_PAGE,
"Previous Page",
"Page pr<70>c<EFBFBD>dente",
"Vorherige Seite",
"Pagina Precedente",
"Pagina anterior",
"Poprzednia Strona");
// "???");
LANGUAGE( STR_NEXT_PAGE,
"Next Page",
"Page suivante",
"N<EFBFBD>chste Seite",
"Pagina Successiva",
"Pagina siguiente",
"Nastepna Strona");
// "???");
default : return L"";
}
}
/*=================================================================*/
const char* SNONE="";
const char* c_shie[3]={"Shield (Not Class Specific)",SNONE,SNONE};
const char* c_tors[3]={"Body Armor",SNONE,SNONE};
const char* c_gold[3]={"Gold",SNONE,SNONE};
const char* c_bowq[3]={"Arrow",SNONE,SNONE};
const char* c_xboq[3]={"Bolt",SNONE,SNONE};
const char* c_play[3]={"Ear",SNONE,SNONE};
const char* c_herb[3]={"Herb",SNONE,SNONE};
const char* c_poti[3]={"Potion",SNONE,SNONE};
const char* c_ring[3]={"Ring",SNONE,SNONE};
const char* c_elix[3]={"Elixir",SNONE,SNONE};
const char* c_amul[3]={"Amulet",SNONE,SNONE};
const char* c_char[3]={"Charm",SNONE,SNONE};
const char* c_boot[3]={"Boot",SNONE,SNONE};
const char* c_glov[3]={"Glove",SNONE,SNONE};
const char* c_book[3]={"Book",SNONE,SNONE};
const char* c_belt[3]={"Belt",SNONE,SNONE};
const char* c_gem[3]={"Gem",SNONE,SNONE};
const char* c_torc[3]={"Torch",SNONE,SNONE};
const char* c_scro[3]={"Scroll",SNONE,SNONE};
const char* c_scep[3]={"Scepter",SNONE,SNONE};
const char* c_wand[3]={"Wand",SNONE,SNONE};
const char* c_staf[3]={"Staff",SNONE,SNONE};
const char* c_bow[3]={"Bow",SNONE,SNONE};
const char* c_axe[3]={"Axe",SNONE,SNONE};
const char* c_club[3]={"Club",SNONE,SNONE};
const char* c_swor[3]={"Sword",SNONE,SNONE};
const char* c_hamm[3]={"Hammer",SNONE,SNONE};
const char* c_knif[3]={"Knife",SNONE,SNONE};
const char* c_spea[3]={"Spear",SNONE,SNONE};
const char* c_pole[3]={"Polearm",SNONE,SNONE};
const char* c_xbow[3]={"Crossbow",SNONE,SNONE};
const char* c_mace[3]={"Mace",SNONE,SNONE};
const char* c_helm[3]={"Helm",SNONE,SNONE};
const char* c_tpot[3]={"Missile Potion",SNONE,SNONE};
const char* c_ques[3]={"Quest Item",SNONE,SNONE};
const char* c_body[3]={"Body Part",SNONE,SNONE};
const char* c_key[3]={"Key",SNONE,SNONE};
const char* c_tkni[3]={"Throwing Knife",SNONE,SNONE};
const char* c_taxe[3]={"Throwing Axe",SNONE,SNONE};
const char* c_jave[3]={"Javelin",SNONE,SNONE};
const char* c_weap[3]={"Weapon",SNONE,SNONE};
const char* c_mele[3]={"Melee Weapon",SNONE,SNONE};
const char* c_miss[3]={"Missile Weapon",SNONE,SNONE};
const char* c_thro[3]={"Throwing Weapon",SNONE,SNONE};
const char* c_comb[3]={"Combo Weapon",SNONE,SNONE};
const char* c_armo[3]={"Armor",SNONE,SNONE};
const char* c_shld[3]={"Any Shield",SNONE,SNONE};
const char* c_misc[3]={"Miscellaneous",SNONE,SNONE};
const char* c_sock[3]={"Socket Filler",SNONE,SNONE};
const char* c_seco[3]={"Second Hand Item",SNONE,SNONE};
const char* c_rod[3]={"Staves And Rods",SNONE,SNONE};
const char* c_misl[3]={"Missile",SNONE,SNONE};
const char* c_blun[3]={"Blunt",SNONE,SNONE};
const char* c_jewl[3]={"Jewel",SNONE,SNONE};
const char* c_clas[3]={"Class Specific",SNONE,SNONE};
const char* c_amaz[3]={"Amazon Item",SNONE,SNONE};
const char* c_barb[3]={"Barbarian Item",SNONE,SNONE};
const char* c_necr[3]={"Necromancer Item",SNONE,SNONE};
const char* c_pala[3]={"Paladin Item",SNONE,SNONE};
const char* c_sorc[3]={"Sorceress Item",SNONE,SNONE};
const char* c_assn[3]={"Assassin Item",SNONE,SNONE};
const char* c_drui[3]={"Druid Item",SNONE,SNONE};
const char* c_h2h[3]={"Claw",SNONE,SNONE};
const char* c_orb[3]={"Orb",SNONE,SNONE};
const char* c_head[3]={"Voodoo Heads",SNONE,SNONE};
const char* c_ashd[3]={"Paladin Shield",SNONE,SNONE};
const char* c_phlm[3]={"Barbarian Helm",SNONE,SNONE};
const char* c_pelt[3]={"Druid Helm",SNONE,SNONE};
const char* c_cloa[3]={"Cloak",SNONE,SNONE};
const char* c_rune[3]={"Rune",SNONE,SNONE};
const char* c_circ[3]={"Circlet",SNONE,SNONE};
const char* c_hpot[3]={"Healing Potion",SNONE,SNONE};
const char* c_mpot[3]={"Mana Potion",SNONE,SNONE};
const char* c_rpot[3]={"Rejuvenation potion",SNONE,SNONE};
const char* c_spot[3]={"Stamina Potion",SNONE,SNONE};
const char* c_apot[3]={"Antidote Potion",SNONE,SNONE};
const char* c_wpot[3]={"Thawing Potion",SNONE,SNONE};
const char* c_scha[3]={"Small Charm",SNONE,SNONE};
const char* c_mcha[3]={"Large Charm",SNONE,SNONE};
const char* c_lcha[3]={"Grand Charm",SNONE,SNONE};
const char* c_abow[3]={"Amazon Bow",SNONE,SNONE};
const char* c_aspe[3]={"Amazon Spear",SNONE,SNONE};
const char* c_ajav[3]={"Amazon Javelin",SNONE,SNONE};
const char* c_h2h2[3]={"Assassin Claw",SNONE,SNONE};
const char* c_mboq[3]={"Magic Arrow",SNONE,SNONE};
const char* c_mxbq[3]={"Magic Bolt",SNONE,SNONE};
const char* c_gem0[3]={"Chipped Gem",SNONE,SNONE};
const char* c_gem1[3]={"Flawed Gem",SNONE,SNONE};
const char* c_gem2[3]={"Normal Gem",SNONE,SNONE};
const char* c_gem3[3]={"Flawless Gem",SNONE,SNONE};
const char* c_gem4[3]={"Perfect Gem",SNONE,SNONE};
const char* c_gema[3]={"Amethyst",SNONE,SNONE};
const char* c_gemd[3]={"Diamond",SNONE,SNONE};
const char* c_geme[3]={"Emerald",SNONE,SNONE};
const char* c_gemr[3]={"Ruby",SNONE,SNONE};
const char* c_gems[3]={"Sapphire",SNONE,SNONE};
const char* c_gemt[3]={"Topaz",SNONE,SNONE};
const char* c_gemz[3]={"Skull",SNONE,SNONE};
const char* getTypeString (DWORD code)
{
DWORD lang = 0;//D2GetLang();
if ((lang == LNG_FRA) || (lang == LNG_DEU)) lang--;
else lang = 0;
switch (code)
{
case BIN('s','h','i','e') : return c_shie[0];
case BIN('t','o','r','s') : return c_tors[0];
case BIN('g','o','l','d') : return c_gold[0];
case BIN('b','o','w','q') : return c_bowq[0];
case BIN('x','b','o','q') : return c_xboq[0];
case BIN('p','l','a','y') : return c_play[0];
case BIN('h','e','r','b') : return c_herb[0];
case BIN('p','o','t','i') : return c_poti[0];
case BIN('r','i','n','g') : return c_ring[0];
case BIN('e','l','i','x') : return c_elix[0];
case BIN('a','m','u','l') : return c_amul[0];
case BIN('c','h','a','r') : return c_char[0];
case BIN('b','o','o','t') : return c_boot[0];
case BIN('g','l','o','v') : return c_glov[0];
case BIN('b','o','o','k') : return c_book[0];
case BIN('b','e','l','t') : return c_belt[0];
case BIN('g','e','m',' ') : return c_gem[0];
case BIN('t','o','r','c') : return c_torc[0];
case BIN('s','c','r','o') : return c_scro[0];
case BIN('s','c','e','p') : return c_scep[0];
case BIN('w','a','n','d') : return c_wand[0];
case BIN('s','t','a','f') : return c_staf[0];
case BIN('b','o','w',' ') : return c_bow[0];
case BIN('a','x','e',' ') : return c_axe[0];
case BIN('c','l','u','b') : return c_club[0];
case BIN('s','w','o','r') : return c_swor[0];
case BIN('h','a','m','m') : return c_hamm[0];
case BIN('k','n','i','f') : return c_knif[0];
case BIN('s','p','e','a') : return c_spea[0];
case BIN('p','o','l','e') : return c_pole[0];
case BIN('x','b','o','w') : return c_xbow[0];
case BIN('m','a','c','e') : return c_mace[0];
case BIN('h','e','l','m') : return c_helm[0];
case BIN('t','p','o','t') : return c_tpot[0];
case BIN('q','u','e','s') : return c_ques[0];
case BIN('b','o','d','y') : return c_body[0];
case BIN('k','e','y',' ') : return c_key[0];
case BIN('t','k','n','i') : return c_tkni[0];
case BIN('t','a','x','e') : return c_taxe[0];
case BIN('j','a','v','e') : return c_jave[0];
case BIN('w','e','a','p') : return c_weap[0];
case BIN('m','e','l','e') : return c_mele[0];
case BIN('m','i','s','s') : return c_miss[0];
case BIN('t','h','r','o') : return c_thro[0];
case BIN('c','o','m','b') : return c_comb[0];
case BIN('a','r','m','o') : return c_armo[0];
case BIN('s','h','l','d') : return c_shld[0];
case BIN('m','i','s','c') : return c_misc[0];
case BIN('s','o','c','k') : return c_sock[0];
case BIN('s','e','c','o') : return c_seco[0];
case BIN('r','o','d',' ') : return c_rod[0];
case BIN('m','i','s','l') : return c_misl[0];
case BIN('b','l','u','n') : return c_blun[0];
case BIN('j','e','w','l') : return c_jewl[0];
case BIN('c','l','a','s') : return c_clas[0];
case BIN('a','m','a','z') : return c_amaz[0];
case BIN('b','a','r','b') : return c_barb[0];
case BIN('n','e','c','r') : return c_necr[0];
case BIN('p','a','l','a') : return c_pala[0];
case BIN('s','o','r','c') : return c_sorc[0];
case BIN('a','s','s','n') : return c_assn[0];
case BIN('d','r','u','i') : return c_drui[0];
case BIN('h','2','h',' ') : return c_h2h[0];
case BIN('h','2','h','2') : return c_h2h2[0];
case BIN('o','r','b',' ') : return c_orb[0];
case BIN('h','e','a','d') : return c_head[0];
case BIN('a','s','h','d') : return c_ashd[0];
case BIN('p','h','l','m') : return c_phlm[0];
case BIN('p','e','l','t') : return c_pelt[0];
case BIN('c','l','o','a') : return c_cloa[0];
case BIN('r','u','n','e') : return c_rune[0];
case BIN('c','i','r','c') : return c_circ[0];
case BIN('h','p','o','t') : return c_hpot[0];
case BIN('m','p','o','t') : return c_mpot[0];
case BIN('r','p','o','t') : return c_rpot[0];
case BIN('s','p','o','t') : return c_spot[0];
case BIN('a','p','o','t') : return c_apot[0];
case BIN('w','p','o','t') : return c_wpot[0];
case BIN('s','c','h','a') : return c_scha[0];
case BIN('m','c','h','a') : return c_mcha[0];
case BIN('l','c','h','a') : return c_lcha[0];
case BIN('a','b','o','w') : return c_abow[0];
case BIN('a','s','p','e') : return c_aspe[0];
case BIN('a','j','a','v') : return c_ajav[0];
case BIN('m','b','o','q') : return c_mboq[0];
case BIN('m','x','b','q') : return c_mxbq[0];
case BIN('g','e','m','0') : return c_gem0[0];
case BIN('g','e','m','1') : return c_gem1[0];
case BIN('g','e','m','2') : return c_gem2[0];
case BIN('g','e','m','3') : return c_gem3[0];
case BIN('g','e','m','4') : return c_gem4[0];
case BIN('g','e','m','a') : return c_gema[0];
case BIN('g','e','m','d') : return c_gemd[0];
case BIN('g','e','m','e') : return c_geme[0];
case BIN('g','e','m','r') : return c_gemr[0];
case BIN('g','e','m','s') : return c_gems[0];
case BIN('g','e','m','t') : return c_gemt[0];
case BIN('g','e','m','z') : return c_gemz[0];
default: return NULL;
}
}
char* getTypeAString (WORD id, char* lpText, DWORD size)
{
ItemTypesBIN* itemTypeData = D2GetItemTypesBIN(id);
if (!itemTypeData)
{
strncpy(lpText, "Bad Type", size);
return lpText;
}
const char* string = getTypeString(itemTypeData->code);
if (!string)
{
struct {
DWORD code;
BYTE zero;
} code;
code.code = itemTypeData->code;
code.zero = 0;
strncpy(lpText, (char*)&code, size);
} else
strncpy(lpText, string, size);
return lpText;
}
LPWSTR getTypeUString (WORD id, LPWSTR lpText, DWORD size)
{
ItemTypesBIN* itemTypeData = D2GetItemTypesBIN(id);
if (!itemTypeData)
{
mbstowcs(lpText, "Bad Type", size);
return lpText;
}
const char* string = getTypeString(itemTypeData->code);
if (!string)
{
struct {
DWORD code;
BYTE zero;
} code;
code.code = itemTypeData->code;
code.zero = 0;
mbstowcs(lpText, (char*)&code, size);
} else
mbstowcs(lpText, string, size);
return lpText;
}
/*================================= END OF FILE =================================*/ /*================================= END OF FILE =================================*/

489
PlugY/CommonUTF8.cpp Normal file
View File

@@ -0,0 +1,489 @@
/*=================================================================
File created by Yohann NICOLAS.
Common functions.
=================================================================*/
#include "common.h"
#include "error.h"
#include "d2functions.h"
s_shifting shifting;
bool isOnRect(DWORD x, DWORD y, DWORD x0, DWORD y0, DWORD l, DWORD h)
{return (x>=x0) && (x<x0+l) && (y>y0-h) && (y<=y0);}
void freeMessage(sWinMessage* msg)
{
msg->managed=1;
msg->unmanaged=0;
D2FreeWinMessage(msg);
}
LPWSTR getString(LPWSTR eng, LPWSTR esp, LPWSTR deu, LPWSTR fra, LPWSTR por, LPWSTR ita, LPWSTR jpn, LPWSTR kor, LPWSTR sin, LPWSTR chi, LPWSTR pol, LPWSTR rus)
{
switch(D2GetLang())
{
case LNG_ENG: return eng;
case LNG_ESP: return esp;
case LNG_DEU: return deu;
case LNG_FRA: return fra;
case LNG_POR: return por;
case LNG_ITA: return ita;
case LNG_JPN: return jpn;
case LNG_KOR: return kor;
case LNG_SIN: return sin;
case LNG_CHI: return chi;
case LNG_POL: return pol;
case LNG_RUS: return rus;
case LNG_DEF:
default: return eng;
}
}
#define LANGUAGE(I,ENG,FRA,DEU,ITA,ESP,POL,CHI) case I : return getString(L##ENG,L##ESP,L##DEU,L##FRA,L##ENG,L##ITA,L##ENG,L##ENG,L##ENG,L##ENG,L##POL,L##ENG)
LPWSTR getTranslatedString(int stringID)
{
switch(stringID)
{
/* LANGUAGE2( STR_STATS_UNASSIGN_WITH_LIMIT,
"+Alt: ;,+Shift: %d \x70B9\x6570",//"+Alt: Unassign, +Shift: by %d points",
// "+Alt: \x91CD\x5206\x914D;,+Shift: %d \x70B9\x6570",//"+Alt: Unassign, +Shift: by %d points",
"+Alt: Désallocation, +Shift: par %d points,",
"+Alt: Zurücksetzen, +Shift: um %d Punkte",
"+Alt: Rimuovi, +Shift: Assegna %d punti",
"+Alt: Quita, +Shift: por %d puntos",
"+Alt: \37325\20998\37197;,+Shift:%d \28857\25968");
*/
LANGUAGE( STR_STATS_UNASSIGN_WITH_LIMIT,
"+Alt: Unassign, +Shift: by %d points",
"+Alt: Désallocation, +Shift: par %d points",
"+Alt: Zurücksetzen, +Shift: um %d Punkte",
"+Alt: Rimuovi, +Shift: Assegna %d punti",
"+Alt: Quita, +Shift: por %d puntos",
"+Alt: Odejmij, +Shift: %d punktów");
// "+Alt: 取消加点, +Shift: %d 点数");
LANGUAGE( STR_STATS_UNASSIGN_WITHOUT_LIMIT,
"+Alt: Unassign, +Shift: all remaining points",
"+Alt: Désallocation, +Shift: Tous les points restants",
"+Alt: Zurücksetzen, +Shift: Alle verbleibenden Punkte",
"+Alt: Rimuovi, +Shift: Assegna tutti i punti rimanenti",
"+Alt: Quita, +Shift: Todos los puntos restantes",
"+Alt: Odejmij, +Shift: wszystkie pozostale punkty");
// "+Alt: 取消加点, +Shift: 所有剩");
LANGUAGE( STR_STATS_BASE_MIN,
"Base: %d (Min: %d)",
"Base: %d (Min: %d)",
"Basiswert: %d (Min: %d)",
"Base: %d (Min: %d)",
"Base: %d (Min: %d)",
"Bazowo: %d (Minimum: %d)");
// "基础: %d(最小: %d)");
LANGUAGE( STR_SKILLS_UNASSIGN,
"Un-allocate all skills points",
"Désalloue tous les points d'aptitudes",
"Alle Fertigkeitspunkte zurücksetzen",
"Rimuovi tutte le abilità",
"Quita todos los puntos de habilidades",
"Rozdaj od nowa wszystkie punkty umiejetnosci");
// "取消所有技能加点");
LANGUAGE( STR_STASH_PREVIOUS_PAGE,
"Previous Page (+shift: First Page)",
"Page précédente (+shift: Première page)",
"Vorherige Seite (+shift: Erste Seite)",
"Pagina Precedente (+shift: Prima Pagina)",
"Pagina anterior (+shift: Primera Pagina)",
"Poprzednia Strona (+shift: Pierwsza Strona)");
// "上一页 (+shift: 首页)");
LANGUAGE( STR_STASH_NEXT_PAGE,
"Next Page (+shift: Last not empty Page)",
"Page suivante (+shift: Dernière page non vide)",
"Nächste Seite (+shift: Letzte nicht leere Seite )",
"Pagina Successiva (+shift: Ultima Pagina non vuota)",
"Pagina Siguiente (+shift: Ultima pagina non vacia)",
"Nastepna Strona (+shift: Ostatnia nie pusta Strona)");
// "下一页 (+shift: 最后非空页");
LANGUAGE( STR_TOGGLE_TO_PERSONAL,
"Toggle to Personal Stash",
"Voir coffre personnel",
"Wechselt zum persönlichen Goldschatz",
"Vai all'Inventario Personale",
"Ver el cofre personal",
"Przejdz do Skrzyni Osobistej");
// "切换到个人储物箱");
LANGUAGE( STR_TOGGLE_TO_SHARED,
"Toggle to Shared Stash",
"Voir coffre partagé",
"Wechselt zum gemeinsamen Goldschatz",
"Vai all'Inventario Condiviso",
"Ver el cofre compartido",
"Przejdz do Skrzyni Wspólnej");
// "切换到共享储物箱");
LANGUAGE( STR_STASH_PREVIOUS_INDEX,
"Previous Index : by %d Pages (+Shift: %d)",
"Index précédent : par %d pages (+shift: %d)",
"Vorheriger Index: in %d Seiten (+shift: %d)",
"Schermata Precedente : Indietro di %d Pagine (+Shift: %d)",
"Indice anterior : por %d paginas (+shift: %d)",
"Poprzednia Strona : po %d Stron (+Shift: %d)");
// "向前索引 : %d 页 (+Shift:%d)");
LANGUAGE( STR_STASH_NEXT_INDEX,
"Next Index : by %d Pages (+shift: %d)",
"Index suivant : par %d pages (+shift: %d)",
"Nächster Index: in %d Seiten (+shift: %d)",
"Schermata Successiva : Avanti di %d Pagine (+shift: %d)",
"Indice siguiente : por %d paginas (+shift: %d)",
"Nastepna Strona : po %d Stron (+shift: %d)");
// "向后索引 : %d 页 (+shift:%d)");
LANGUAGE( STR_PUT_GOLD,
"Put Gold",
"Poser de l'Or",
"Gib Gold",
"Immetti Oro",
"Poner oro",
"Zdeponuj Zloto");
// "放入金币");
LANGUAGE( STR_TAKE_GOLD,
"Take Gold",
"Prendre de l'Or",
"Nehme Gold",
"Ritira Oro",
"Tomar oro",
"Wyplac zloto");
// "取出金币");
LANGUAGE( STR_PERSONAL_PAGE_NUMBER,
"Personal Page n°%u",
"Page perso n°%u",
"Persönliche Seite n°%u",
"Pagina Personale n°%u",
"Pagina personal n°%u",
"Strona Osobista n°%u");
// "个人储物箱 n°%u");
LANGUAGE( STR_SHARED_PAGE_NUMBER,
"Shared Page n°%u",
"Page partagée n°%u",
"Gemeinsame Seite n°%u",
"Pagina Condivisa n°%u",
"Pagina personal n°%u",
"Strona Wspólna n°%u");
// "共享储物箱 n°%u");
LANGUAGE( STR_NO_SELECTED_PAGE,
"No selected page",
"Aucune page sélectionnée",
"Keine ausgewählte Seite",
"Nessuna pagina selezionata",
"Ninguna pagina seleccionada",
"Nie zaznaczono strony");
// "未使用页");
LANGUAGE( STR_SHARED_GOLD_QUANTITY,
"Shared Gold : %u",
"Or partagé : %u",
"Gemeinsamen Gold : %u",
"Oro Condiviso : %u",
"Oro compartido : %u",
"Wspólne Zloto : %u");
// "共享金币: %u");
LANGUAGE( STR_PREVIOUS_PAGE,
"Previous Page",
"Page précédente",
"Vorherige Seite",
"Pagina Precedente",
"Pagina anterior",
"Poprzednia Strona");
// "上一页");
LANGUAGE( STR_NEXT_PAGE,
"Next Page",
"Page suivante",
"Nächste Seite",
"Pagina Successiva",
"Pagina siguiente",
"Nastepna Strona");
// "下一页");
default : return L"";
}
}
/*=================================================================*/
const char* SNONE="";
const char* c_shie[3]={"Shield (Not Class Specific)",SNONE,SNONE};
const char* c_tors[3]={"Body Armor",SNONE,SNONE};
const char* c_gold[3]={"Gold",SNONE,SNONE};
const char* c_bowq[3]={"Arrow",SNONE,SNONE};
const char* c_xboq[3]={"Bolt",SNONE,SNONE};
const char* c_play[3]={"Ear",SNONE,SNONE};
const char* c_herb[3]={"Herb",SNONE,SNONE};
const char* c_poti[3]={"Potion",SNONE,SNONE};
const char* c_ring[3]={"Ring",SNONE,SNONE};
const char* c_elix[3]={"Elixir",SNONE,SNONE};
const char* c_amul[3]={"Amulet",SNONE,SNONE};
const char* c_char[3]={"Charm",SNONE,SNONE};
const char* c_boot[3]={"Boot",SNONE,SNONE};
const char* c_glov[3]={"Glove",SNONE,SNONE};
const char* c_book[3]={"Book",SNONE,SNONE};
const char* c_belt[3]={"Belt",SNONE,SNONE};
const char* c_gem[3]={"Gem",SNONE,SNONE};
const char* c_torc[3]={"Torch",SNONE,SNONE};
const char* c_scro[3]={"Scroll",SNONE,SNONE};
const char* c_scep[3]={"Scepter",SNONE,SNONE};
const char* c_wand[3]={"Wand",SNONE,SNONE};
const char* c_staf[3]={"Staff",SNONE,SNONE};
const char* c_bow[3]={"Bow",SNONE,SNONE};
const char* c_axe[3]={"Axe",SNONE,SNONE};
const char* c_club[3]={"Club",SNONE,SNONE};
const char* c_swor[3]={"Sword",SNONE,SNONE};
const char* c_hamm[3]={"Hammer",SNONE,SNONE};
const char* c_knif[3]={"Knife",SNONE,SNONE};
const char* c_spea[3]={"Spear",SNONE,SNONE};
const char* c_pole[3]={"Polearm",SNONE,SNONE};
const char* c_xbow[3]={"Crossbow",SNONE,SNONE};
const char* c_mace[3]={"Mace",SNONE,SNONE};
const char* c_helm[3]={"Helm",SNONE,SNONE};
const char* c_tpot[3]={"Missile Potion",SNONE,SNONE};
const char* c_ques[3]={"Quest Item",SNONE,SNONE};
const char* c_body[3]={"Body Part",SNONE,SNONE};
const char* c_key[3]={"Key",SNONE,SNONE};
const char* c_tkni[3]={"Throwing Knife",SNONE,SNONE};
const char* c_taxe[3]={"Throwing Axe",SNONE,SNONE};
const char* c_jave[3]={"Javelin",SNONE,SNONE};
const char* c_weap[3]={"Weapon",SNONE,SNONE};
const char* c_mele[3]={"Melee Weapon",SNONE,SNONE};
const char* c_miss[3]={"Missile Weapon",SNONE,SNONE};
const char* c_thro[3]={"Throwing Weapon",SNONE,SNONE};
const char* c_comb[3]={"Combo Weapon",SNONE,SNONE};
const char* c_armo[3]={"Armor",SNONE,SNONE};
const char* c_shld[3]={"Any Shield",SNONE,SNONE};
const char* c_misc[3]={"Miscellaneous",SNONE,SNONE};
const char* c_sock[3]={"Socket Filler",SNONE,SNONE};
const char* c_seco[3]={"Second Hand Item",SNONE,SNONE};
const char* c_rod[3]={"Staves And Rods",SNONE,SNONE};
const char* c_misl[3]={"Missile",SNONE,SNONE};
const char* c_blun[3]={"Blunt",SNONE,SNONE};
const char* c_jewl[3]={"Jewel",SNONE,SNONE};
const char* c_clas[3]={"Class Specific",SNONE,SNONE};
const char* c_amaz[3]={"Amazon Item",SNONE,SNONE};
const char* c_barb[3]={"Barbarian Item",SNONE,SNONE};
const char* c_necr[3]={"Necromancer Item",SNONE,SNONE};
const char* c_pala[3]={"Paladin Item",SNONE,SNONE};
const char* c_sorc[3]={"Sorceress Item",SNONE,SNONE};
const char* c_assn[3]={"Assassin Item",SNONE,SNONE};
const char* c_drui[3]={"Druid Item",SNONE,SNONE};
const char* c_h2h[3]={"Claw",SNONE,SNONE};
const char* c_orb[3]={"Orb",SNONE,SNONE};
const char* c_head[3]={"Voodoo Heads",SNONE,SNONE};
const char* c_ashd[3]={"Paladin Shield",SNONE,SNONE};
const char* c_phlm[3]={"Barbarian Helm",SNONE,SNONE};
const char* c_pelt[3]={"Druid Helm",SNONE,SNONE};
const char* c_cloa[3]={"Cloak",SNONE,SNONE};
const char* c_rune[3]={"Rune",SNONE,SNONE};
const char* c_circ[3]={"Circlet",SNONE,SNONE};
const char* c_hpot[3]={"Healing Potion",SNONE,SNONE};
const char* c_mpot[3]={"Mana Potion",SNONE,SNONE};
const char* c_rpot[3]={"Rejuvenation potion",SNONE,SNONE};
const char* c_spot[3]={"Stamina Potion",SNONE,SNONE};
const char* c_apot[3]={"Antidote Potion",SNONE,SNONE};
const char* c_wpot[3]={"Thawing Potion",SNONE,SNONE};
const char* c_scha[3]={"Small Charm",SNONE,SNONE};
const char* c_mcha[3]={"Large Charm",SNONE,SNONE};
const char* c_lcha[3]={"Grand Charm",SNONE,SNONE};
const char* c_abow[3]={"Amazon Bow",SNONE,SNONE};
const char* c_aspe[3]={"Amazon Spear",SNONE,SNONE};
const char* c_ajav[3]={"Amazon Javelin",SNONE,SNONE};
const char* c_h2h2[3]={"Assassin Claw",SNONE,SNONE};
const char* c_mboq[3]={"Magic Arrow",SNONE,SNONE};
const char* c_mxbq[3]={"Magic Bolt",SNONE,SNONE};
const char* c_gem0[3]={"Chipped Gem",SNONE,SNONE};
const char* c_gem1[3]={"Flawed Gem",SNONE,SNONE};
const char* c_gem2[3]={"Normal Gem",SNONE,SNONE};
const char* c_gem3[3]={"Flawless Gem",SNONE,SNONE};
const char* c_gem4[3]={"Perfect Gem",SNONE,SNONE};
const char* c_gema[3]={"Amethyst",SNONE,SNONE};
const char* c_gemd[3]={"Diamond",SNONE,SNONE};
const char* c_geme[3]={"Emerald",SNONE,SNONE};
const char* c_gemr[3]={"Ruby",SNONE,SNONE};
const char* c_gems[3]={"Sapphire",SNONE,SNONE};
const char* c_gemt[3]={"Topaz",SNONE,SNONE};
const char* c_gemz[3]={"Skull",SNONE,SNONE};
const char* getTypeString (DWORD code)
{
DWORD lang = 0;//D2GetLang();
if ((lang == LNG_FRA) || (lang == LNG_DEU)) lang--;
else lang = 0;
switch (code)
{
case BIN('s','h','i','e') : return c_shie[0];
case BIN('t','o','r','s') : return c_tors[0];
case BIN('g','o','l','d') : return c_gold[0];
case BIN('b','o','w','q') : return c_bowq[0];
case BIN('x','b','o','q') : return c_xboq[0];
case BIN('p','l','a','y') : return c_play[0];
case BIN('h','e','r','b') : return c_herb[0];
case BIN('p','o','t','i') : return c_poti[0];
case BIN('r','i','n','g') : return c_ring[0];
case BIN('e','l','i','x') : return c_elix[0];
case BIN('a','m','u','l') : return c_amul[0];
case BIN('c','h','a','r') : return c_char[0];
case BIN('b','o','o','t') : return c_boot[0];
case BIN('g','l','o','v') : return c_glov[0];
case BIN('b','o','o','k') : return c_book[0];
case BIN('b','e','l','t') : return c_belt[0];
case BIN('g','e','m',' ') : return c_gem[0];
case BIN('t','o','r','c') : return c_torc[0];
case BIN('s','c','r','o') : return c_scro[0];
case BIN('s','c','e','p') : return c_scep[0];
case BIN('w','a','n','d') : return c_wand[0];
case BIN('s','t','a','f') : return c_staf[0];
case BIN('b','o','w',' ') : return c_bow[0];
case BIN('a','x','e',' ') : return c_axe[0];
case BIN('c','l','u','b') : return c_club[0];
case BIN('s','w','o','r') : return c_swor[0];
case BIN('h','a','m','m') : return c_hamm[0];
case BIN('k','n','i','f') : return c_knif[0];
case BIN('s','p','e','a') : return c_spea[0];
case BIN('p','o','l','e') : return c_pole[0];
case BIN('x','b','o','w') : return c_xbow[0];
case BIN('m','a','c','e') : return c_mace[0];
case BIN('h','e','l','m') : return c_helm[0];
case BIN('t','p','o','t') : return c_tpot[0];
case BIN('q','u','e','s') : return c_ques[0];
case BIN('b','o','d','y') : return c_body[0];
case BIN('k','e','y',' ') : return c_key[0];
case BIN('t','k','n','i') : return c_tkni[0];
case BIN('t','a','x','e') : return c_taxe[0];
case BIN('j','a','v','e') : return c_jave[0];
case BIN('w','e','a','p') : return c_weap[0];
case BIN('m','e','l','e') : return c_mele[0];
case BIN('m','i','s','s') : return c_miss[0];
case BIN('t','h','r','o') : return c_thro[0];
case BIN('c','o','m','b') : return c_comb[0];
case BIN('a','r','m','o') : return c_armo[0];
case BIN('s','h','l','d') : return c_shld[0];
case BIN('m','i','s','c') : return c_misc[0];
case BIN('s','o','c','k') : return c_sock[0];
case BIN('s','e','c','o') : return c_seco[0];
case BIN('r','o','d',' ') : return c_rod[0];
case BIN('m','i','s','l') : return c_misl[0];
case BIN('b','l','u','n') : return c_blun[0];
case BIN('j','e','w','l') : return c_jewl[0];
case BIN('c','l','a','s') : return c_clas[0];
case BIN('a','m','a','z') : return c_amaz[0];
case BIN('b','a','r','b') : return c_barb[0];
case BIN('n','e','c','r') : return c_necr[0];
case BIN('p','a','l','a') : return c_pala[0];
case BIN('s','o','r','c') : return c_sorc[0];
case BIN('a','s','s','n') : return c_assn[0];
case BIN('d','r','u','i') : return c_drui[0];
case BIN('h','2','h',' ') : return c_h2h[0];
case BIN('h','2','h','2') : return c_h2h2[0];
case BIN('o','r','b',' ') : return c_orb[0];
case BIN('h','e','a','d') : return c_head[0];
case BIN('a','s','h','d') : return c_ashd[0];
case BIN('p','h','l','m') : return c_phlm[0];
case BIN('p','e','l','t') : return c_pelt[0];
case BIN('c','l','o','a') : return c_cloa[0];
case BIN('r','u','n','e') : return c_rune[0];
case BIN('c','i','r','c') : return c_circ[0];
case BIN('h','p','o','t') : return c_hpot[0];
case BIN('m','p','o','t') : return c_mpot[0];
case BIN('r','p','o','t') : return c_rpot[0];
case BIN('s','p','o','t') : return c_spot[0];
case BIN('a','p','o','t') : return c_apot[0];
case BIN('w','p','o','t') : return c_wpot[0];
case BIN('s','c','h','a') : return c_scha[0];
case BIN('m','c','h','a') : return c_mcha[0];
case BIN('l','c','h','a') : return c_lcha[0];
case BIN('a','b','o','w') : return c_abow[0];
case BIN('a','s','p','e') : return c_aspe[0];
case BIN('a','j','a','v') : return c_ajav[0];
case BIN('m','b','o','q') : return c_mboq[0];
case BIN('m','x','b','q') : return c_mxbq[0];
case BIN('g','e','m','0') : return c_gem0[0];
case BIN('g','e','m','1') : return c_gem1[0];
case BIN('g','e','m','2') : return c_gem2[0];
case BIN('g','e','m','3') : return c_gem3[0];
case BIN('g','e','m','4') : return c_gem4[0];
case BIN('g','e','m','a') : return c_gema[0];
case BIN('g','e','m','d') : return c_gemd[0];
case BIN('g','e','m','e') : return c_geme[0];
case BIN('g','e','m','r') : return c_gemr[0];
case BIN('g','e','m','s') : return c_gems[0];
case BIN('g','e','m','t') : return c_gemt[0];
case BIN('g','e','m','z') : return c_gemz[0];
default: return NULL;
}
}
char* getTypeAString (WORD id, char* lpText, DWORD size)
{
ItemTypesBIN* itemTypeData = D2GetItemTypesBIN(id);
if (!itemTypeData)
{
strncpy(lpText, "Bad Type", size);
return lpText;
}
const char* string = getTypeString(itemTypeData->code);
if (!string)
{
struct {
DWORD code;
BYTE zero;
} code;
code.code = itemTypeData->code;
code.zero = 0;
strncpy(lpText, (char*)&code, size);
} else
strncpy(lpText, string, size);
return lpText;
}
LPWSTR getTypeUString (WORD id, LPWSTR lpText, DWORD size)
{
ItemTypesBIN* itemTypeData = D2GetItemTypesBIN(id);
if (!itemTypeData)
{
mbstowcs(lpText, "Bad Type", size);
return lpText;
}
const char* string = getTypeString(itemTypeData->code);
if (!string)
{
struct {
DWORD code;
BYTE zero;
} code;
code.code = itemTypeData->code;
code.zero = 0;
mbstowcs(lpText, (char*)&code, size);
} else
mbstowcs(lpText, string, size);
return lpText;
}
/*================================= END OF FILE =================================*/

View File

@@ -5,8 +5,9 @@
=================================================================*/ =================================================================*/
#include "customLibraries.h"
#include "common.h" #include "common.h"
#include "error.h"
#include "customLibraries.h"
TCustomDll* customDlls=NULL; TCustomDll* customDlls=NULL;

View File

@@ -1,6 +1,5 @@
/*================================================ /*================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
This file implements some common and useful This file implements some common and useful
function related to some Diablo II mechanisms. function related to some Diablo II mechanisms.
@@ -8,17 +7,18 @@
================================================*/ ================================================*/
#include "common.h" #include "common.h"
#include "d2functions.h"
#include "error.h"
s_shifting shifting;
#define D2S(F, I, R, N, P) T##N N; #define D2S(F, I, R, N, P) T##N N;
#define D2F(F, I, R, N, P) T##N N; #define D2F(F, I, R, N, P) T##N N;
#define E2S(F, A, R, N, P) T##N N; #define E2S(F, A, R, N, P) T##N N;
#define E2F(F, A, R, N, P) T##N N; #define E2F(F, A, R, N, P) T##N N;
#define E2C(F, A, T, N) T* pt##N; #define E2C(F, A, T, N) T* pt##N;
#define F7(X, Z, A,B,C,D,E,F,G,H, R, N, P) T##N N; #define F7(X, Z, A,B,C,D,E,F,G, R, N, P) T##N N;
#define A7(X, Z, A,B,C,D,E,F,G,H, R, N, P) T##N N; #define A7(X, Z, A,B,C,D,E,F,G, R, N, P) T##N N;
#define C7(Z, A,B,C,D,E,F,G,H, T, N) T* pt##N; #define C7(Z, A,B,C,D,E,F,G, T, N) T* pt##N;
#include "../Commons/D2Funcs.h" #include "../Commons/D2Funcs.h"
DataTables* SgptDataTables; DataTables* SgptDataTables;
@@ -616,12 +616,12 @@ bool initD2functions()
#define E2S(F, A, R, N, P) N = (T##N)(offset_##F + 0x##A); #define E2S(F, A, R, N, P) N = (T##N)(offset_##F + 0x##A);
#define E2F(F, A, R, N, P) N = (T##N)(offset_##F + 0x##A); #define E2F(F, A, R, N, P) N = (T##N)(offset_##F + 0x##A);
#define E2C(F, A, T, N) pt##N = (T*)(offset_##F + 0x##A); #define E2C(F, A, T, N) pt##N = (T*)(offset_##F + 0x##A);
#define F7(X, Z, A,B,C,D,E,F,G,H, R, N, P) setFctAddr((DWORD*)&N, (HMODULE)offset_##Z, (LPCSTR)(version_##Z == V113d? H : (version_##Z == V113c? G : (version_##Z == V112? F : (version_##Z == V111b? E : (version_##Z == V111? D : (version_##Z == V110? C : (version_##Z == V109d? B : A)))))))); #define F7(X, Z, A,B,C,D,E,F,G, R, N, P) setFctAddr((DWORD*)&N, (HMODULE)offset_##Z, (LPCSTR)((version_##Z == V113? G : (version_##Z == V112? F : version_##Z == V111b? E : (version_##Z == V111? D : (version_##Z == V110? C : (version_##Z == V109d? B : A)))))));
#define A7(X, Z, A,B,C,D,E,F,G,H, R, N, P) N = (T##N)R7(Z,A,B,C,D,E,F,G,H); #define A7(X, Z, A,B,C,D,E,F,G, R, N, P) N = (T##N)R7(Z,A,B,C,D,E,F,G);
#define C7(Z, A,B,C,D,E,F,G,H, T, N) pt##N = (T*)R7(Z,A,B,C,D,E,F,G,H); #define C7(Z, A,B,C,D,E,F,G, T, N) pt##N = (T*)R7(Z,A,B,C,D,E,F,G);
#include "../Commons/D2Funcs.h" #include "../Commons/D2Funcs.h"
SgptDataTables = *(DataTables**) R7(D2Common, 0000, 0000, 96A20, 9B74C, 9EE8C, 9B500, 99E1C, A33F0); SgptDataTables = *(DataTables**) R7(D2Common, 0000, 0000, 96A20, 9B74C, 9EE8C, 9B500, 99E1C);
if (version_D2Common < V110) if (version_D2Common < V110)
{ {
D2S(D2Common,10581, CharStatsBIN*, D2Common10581, (DWORD charID));//ONLY in 1.09 D2S(D2Common,10581, CharStatsBIN*, D2Common10581, (DWORD charID));//ONLY in 1.09
@@ -915,10 +915,10 @@ bool initD2functions()
D2GetClientPlayer = D2GetClientPlayer_111; D2GetClientPlayer = D2GetClientPlayer_111;
D2GetRealItem = D2GetRealItem_111; D2GetRealItem = D2GetRealItem_111;
D2CleanStatMouseUp = D2CleanStatMouseUp_111; D2CleanStatMouseUp = D2CleanStatMouseUp_111;
StatMouse1 = (DWORD*)R7(D2Client, 0000, 0000, 0000, 11C004, 11C2F4, 11C040, 11C3DC, 11D224); StatMouse1 = (DWORD*)R7(D2Client, 0000, 0000, 0000, 11C004, 11C2F4, 11C040, 11C3DC);
StatMouse2 = (DWORD*)R7(D2Client, 0000, 0000, 0000, 11C008, 11C2F8, 11C044, 11C3E0, 11D228); StatMouse2 = (DWORD*)R7(D2Client, 0000, 0000, 0000, 11C008, 11C2F8, 11C044, 11C3E0);
StatMouse3 = (DWORD*)R7(D2Client, 0000, 0000, 0000, 11C020, 11C310, 11C05C, 11C3F8, 11D240); StatMouse3 = (DWORD*)R7(D2Client, 0000, 0000, 0000, 11C020, 11C310, 11C05C, 11C3F8);
StatMouse4 = (DWORD*)R7(D2Client, 0000, 0000, 0000, 11C024, 11C314, 11C060, 11C3FC, 11D244); StatMouse4 = (DWORD*)R7(D2Client, 0000, 0000, 0000, 11C024, 11C314, 11C060, 11C3FC);
} else { } else {
D2SendToServer = (TD2SendToServer) D2SendToServer_1XX; D2SendToServer = (TD2SendToServer) D2SendToServer_1XX;
D2GetGameByClientID = (TD2GetGameByClientID) D2GetGameByClientID_1XX; D2GetGameByClientID = (TD2GetGameByClientID) D2GetGameByClientID_1XX;
@@ -948,14 +948,14 @@ bool initD2functions()
//////////////// STRUCTURE MANAGEMENT //////////////// //////////////// STRUCTURE MANAGEMENT ////////////////
// shifting.ptPYPlayerData = V7(D2Common,118,118,F4,F4,F4,F4,F4); // shifting.ptPYPlayerData = V7(D2Common,118,118,F4,F4,F4,F4,F4);
shifting.ptPYPlayerData = *(DWORD*)((DWORD)D2InitPlayerData + V7(D2Common,5D,5D,5D,49,49,49,49,49)); shifting.ptPYPlayerData = *(DWORD*)((DWORD)D2InitPlayerData + V7(D2Common,5D,5D,5D,49,49,49,49));
shifting.ptSpecificData = V7(D2Common,70,70,14,14,14,14,14,14); shifting.ptSpecificData = V7(D2Common,70,70,14,14,14,14,14);
shifting.ptGame = V7(D2Common,A4,A4,80,80,80,80,80,80); shifting.ptGame = V7(D2Common,A4,A4,80,80,80,80,80);
shifting.ptClientGame = V7(D2Common,170,194,1A8,1A8,1A8,1A8,1A8,1A8); shifting.ptClientGame = V7(D2Common,170,194,1A8,1A8,1A8,1A8,1A8);
shifting.ptInventory = V7(D2Common,84,84,60,60,60,60,60,60); shifting.ptInventory = V7(D2Common,84,84,60,60,60,60,60);
shifting.ptSkills = V7(D2Common,CC,CC,A8,A8,A8,A8,A8,A8); shifting.ptSkills = V7(D2Common,CC,CC,A8,A8,A8,A8,A8);
shifting.ptImage = V7(D2Common,04,04,04,08,08,3C,34,34); shifting.ptImage = V7(D2Common,04,04,04,08,08,3C,34);
shifting.ptFrame = V7(D2Common,08,08,08,44,44,40,00,00); shifting.ptFrame = V7(D2Common,08,08,08,44,44,40,00);
return true; return true;
} }

View File

@@ -1,6 +1,5 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
@file D2wrapper.cpp @file D2wrapper.cpp
@brief Main Diablo II extra DLL handler. @brief Main Diablo II extra DLL handler.
@@ -9,6 +8,13 @@
=================================================================*/ =================================================================*/
// Core Class Headers
#include "common.h"
#include "error.h"
#include "d2functions.h"
#include "customLibraries.h"
/* Beginning of Custom Header */
#include "globalVariable.h" // Install_VariableOnRealm() #include "globalVariable.h" // Install_VariableOnRealm()
#include "commands.h" // Install_Commands() #include "commands.h" // Install_Commands()
#include "othersFeatures.h" // Install_ChangeResolution() #include "othersFeatures.h" // Install_ChangeResolution()
@@ -25,28 +31,25 @@
#include "uberQuest.h" // Install_UberQuest() #include "uberQuest.h" // Install_UberQuest()
#include "extraOptions.h" // Install_AlwaysRegenMapInSP() #include "extraOptions.h" // Install_AlwaysRegenMapInSP()
#include "language.h" // Install_LanguageManagement() #include "language.h" // Install_LanguageManagement()
#include "windowed.h" // installed with Install_PrintPlugYVersion()
#include "customLibraries.h"
#include "common.h"
int version_SmackW32 = UNKNOW; int version_SmackW32=V113;
int version_D2Common = UNKNOW; int version_D2Common=V113;
int version_ijl11 = UNKNOW; int version_ijl11=V113;
int version_D2Gdi = UNKNOW; int version_D2Gdi=V113;
int version_D2Win = UNKNOW; int version_D2Win=V113;
int version_D2sound = UNKNOW; int version_D2sound=V113;
int version_D2MCPCLI = UNKNOW; int version_D2MCPCLI=V113;
int version_D2Launch = UNKNOW; int version_D2Launch=V113;
int version_D2gfx = UNKNOW; int version_D2gfx=V113;
int version_D2Client = UNKNOW; int version_D2Client=V113;
int version_D2Net = UNKNOW; int version_D2Net=V113;
int version_D2Lang = UNKNOW; int version_D2Lang=V113;
int version_D2Game = UNKNOW; int version_D2Game=V113;
int version_D2CMP = UNKNOW; int version_D2CMP=V113;
int version_Bnclient = UNKNOW; int version_Bnclient=V113;
int version_Fog = UNKNOW; int version_Fog=V113;
int version_Storm = UNKNOW; int version_Storm=V113;
DWORD offset_SmackW32=NULL; DWORD offset_SmackW32=NULL;
@@ -88,6 +91,9 @@ const char* S_Bnclient = "Bnclient.dll";
const char* S_Fog = "Fog.dll"; const char* S_Fog = "Fog.dll";
const char* S_Storm = "Storm.dll"; const char* S_Storm = "Storm.dll";
const char* S_CloneBattles ="CloneBattles.dll";
const char* S_DarkAlliance ="DarkAlliance.dll";
DWORD loadLibrary( const char* libraryName) DWORD loadLibrary( const char* libraryName)
{ {
DWORD offset; DWORD offset;
@@ -310,7 +316,7 @@ void loadCustomLibraries()
/* /*
void getVersion(DWORD addr, DWORD addr111, int* ver, DWORD v109b, DWORD v109d, DWORD v110, DWORD v111, DWORD v111a, DWORD v111b, DWORD v112, DWORD v113c, DWORD v113d, const char * filename) void getVersion(DWORD addr, DWORD addr111, int* ver, DWORD v109b, DWORD v109d, DWORD v110, DWORD v111, DWORD v111a, DWORD v111b, DWORD v112, DWORD v113, const char * filename)
{ {
log_msg("version of %s\t",filename); log_msg("version of %s\t",filename);
@@ -332,15 +338,12 @@ void getVersion(DWORD addr, DWORD addr111, int* ver, DWORD v109b, DWORD v109d, D
} else if (addr==v112) { } else if (addr==v112) {
*ver = V112; *ver = V112;
log_msg("1.12\n"); log_msg("1.12\n");
} else if (addr==v113c) { } else if (addr==v113) {
*ver = V113c; *ver = V113;
log_msg("1.13c\n"); log_msg("1.13\n");
} else if (addr==v113d) {
*ver = V113d;
log_msg("1.13d\n");
} else { } else {
*ver = V113d; *ver = V113;
log_msg("unknow, try with 1.13d\n"); log_msg("unknow, try with 1.13\n");
} }
} }
#define GET_VERSION(F,X,Y,A,B,C,D,E,G,H,I) getVersion(*(DWORD*)(offset_##F + 0x##X), *(DWORD*)(offset_##F + 0x##Y), &version_##F, 0x##A, 0x##B, 0x##C, 0x##D, 0x##E, 0x##G, 0x##H, 0x##I, S_##F) #define GET_VERSION(F,X,Y,A,B,C,D,E,G,H,I) getVersion(*(DWORD*)(offset_##F + 0x##X), *(DWORD*)(offset_##F + 0x##Y), &version_##F, 0x##A, 0x##B, 0x##C, 0x##D, 0x##E, 0x##G, 0x##H, 0x##I, S_##F)
@@ -372,14 +375,11 @@ bool initD2version()
} }
*/ */
void getVersion(DWORD addr, int* ver, DWORD v109b, DWORD v109d, DWORD v110, DWORD v111, DWORD v111b, DWORD v112, DWORD v113c, int version, const char * filename) void getVersion(DWORD addr, int* ver, DWORD v109b, DWORD v109d, DWORD v110, DWORD v111, DWORD v111b, DWORD v112, DWORD v113, const char * filename)
{ {
log_msg("version of %s\t",filename); log_msg("version of %s\t",filename);
if (version >= V113d) { if (addr==v109b) {
*ver = version;
log_msg("%s\n", GetVersionString(version));
} else if (addr==v109b) {
*ver = V109b; *ver = V109b;
log_msg("1.09b\n"); log_msg("1.09b\n");
} else if (addr==v109d) { } else if (addr==v109d) {
@@ -397,41 +397,37 @@ void getVersion(DWORD addr, int* ver, DWORD v109b, DWORD v109d, DWORD v110, DWOR
} else if (addr==v112) { } else if (addr==v112) {
*ver = V112; *ver = V112;
log_msg("1.12\n"); log_msg("1.12\n");
} else if (addr==v113c) { } else if (addr==v113) {
*ver = V113c; *ver = V113;
log_msg("1.13c\n"); log_msg("1.13\n");
} else { } else {
*ver = V113d; *ver = V113;
log_msg("unknow, try with 1.13d\n"); log_msg("unknow, try with 1.13\n");
} }
} }
#define GET_VERSION(F,X,A,B,C,D,E,G,H,V) getVersion(*(DWORD*)(offset_##F + 0x##X), &version_##F, 0x##A, 0x##B, 0x##C, 0x##D, 0x##E, 0x##G, 0x##H, V, S_##F) #define GET_VERSION(F,X,A,B,C,D,E,G,H) getVersion(*(DWORD*)(offset_##F + 0x##X), &version_##F, 0x##A, 0x##B, 0x##C, 0x##D, 0x##E, 0x##G, 0x##H, S_##F)
bool initD2version() bool initD2version()
{ {
log_msg("***** Get Game.exe version *****\n");
int version = GetD2Version();
log_msg("Game.exe version : %i (%s)\n", version, GetVersionString(version));
log_msg("***** Get dll versions *****\n"); log_msg("***** Get dll versions *****\n");
//GET_VERSION(SmackW32 //GET_VERSION(SmackW32
GET_VERSION(D2Common, 10CA, A1E86FDC, B1E86FDC, 72D03B42, F883057E, 16746AC6, 00FE81C3, 74FE85DB, version); GET_VERSION(D2Common, 10CA, A1E86FDC, B1E86FDC, 72D03B42, F883057E, 16746AC6, 00FE81C3, 74FE85DB);
//GET_VERSION(ijl11 //GET_VERSION(ijl11
GET_VERSION(D2Gdi, 105, B4000000, 0B210E00, E4000000, 48000401, 2F000401, 00000000, B7000401, version); GET_VERSION(D2Gdi, 105, B4000000, 0B210E00, E4000000, 48000401, 2F000401, 00000000, B7000401);
GET_VERSION(D2Win, 1699, 88686F8C, 84686F8C, D094686F, F0030000, 001435E8, 8B088F44, 0013F5E8, version); GET_VERSION(D2Win, 1699, 88686F8C, 84686F8C, D094686F, F0030000, 001435E8, 8B088F44, 0013F5E8);
//GET_VERSION(D2sound //GET_VERSION(D2sound
//GET_VERSION(D2MCPCLI //GET_VERSION(D2MCPCLI
GET_VERSION(D2Launch, 109A, 81E8526F, 01E8526F, 85E8526F, 247C8B00, 00FC6583, 15FF0424, E850E045, version); GET_VERSION(D2Launch, 109A, 81E8526F, 01E8526F, 85E8526F, 247C8B00, 00FC6583, 15FF0424, E850E045);
GET_VERSION(D2gfx, 10D, EB000000, 006FA700, 00000010, 2A000401, 19000401, 0B210E00, 00000000, version); GET_VERSION(D2gfx, 10D, EB000000, 006FA700, 00000010, 2A000401, 19000401, 0B210E00, 00000000);
GET_VERSION(D2Client, 17F, 00000000, 14500000, 12500000, 0D814800, 0D812800, 0DA01000, 0DA03000, version); GET_VERSION(D2Client, 17F, 00000000, 14500000, 12500000, 0D814800, 0D812800, 0DA01000, 0DA03000);
GET_VERSION(D2Net, 16E1, 78B8A73C, 68B8A73C, 10244C8B, 5349E808, 5EA9E808, 105D8B72, 53B9E808, version); GET_VERSION(D2Net, 16E1, 78B8A73C, 68B8A73C, 10244C8B, 5349E808, 5EA9E808, 105D8B72, 53B9E808);
GET_VERSION(D2Lang, 126D, FC45048B, F445048B, 02C18313, C4830000, 00C6E045, 8B48408B, 0C75FF0C, version); GET_VERSION(D2Lang, 126D, FC45048B, F445048B, 02C18313, C4830000, 00C6E045, 8B48408B, 0C75FF0C);
// GET_VERSION(D2Game, 1010, D22A78A1, D22910A1, D43FB0A1, 03E8506F, 53E8506F, 89E8506F, 63E8506F, version); // GET_VERSION(D2Game, 1010, D22A78A1, D22910A1, D43FB0A1, 03E8506F, 53E8506F, 89E8506F, 63E8506F);
GET_VERSION(D2Game, 1092, 18968BF1, 38968BF1, 28968BF1, F6335608, C690C5B9, 895FD713, 56535700, version); GET_VERSION(D2Game, 1092, 18968BF1, 38968BF1, 28968BF1, F6335608, C690C5B9, 895FD713, 56535700);
GET_VERSION(D2CMP, 1359, 3C686FE0, 38686FE0, 8BF78B56, 4C880424, 07C71824, CCCCCCCC, C7000005, version); GET_VERSION(D2CMP, 1359, 3C686FE0, 38686FE0, 8BF78B56, 4C880424, 07C71824, CCCCCCCC, C7000005);
//GET_VERSION(Bnclient //GET_VERSION(Bnclient
GET_VERSION(Fog, 102, D0000006, 10000001, 00000006, 000042E6, 00004302, 0000483C, 00004B95, version); GET_VERSION(Fog, 102, D0000006, 10000001, 00000006, 000042E6, 00004302, 0000483C, 00004B95);
GET_VERSION(Storm, 1190, 19E85082, 59E85082, 13C103F6, 0474F685, 8B000321, 3B1074C9, 0D896404, version); GET_VERSION(Storm, 1190, 19E85082, 59E85082, 13C103F6, 0474F685, 8B000321, 3B1074C9, 0D896404);
log_msg("\n\n"); log_msg("\n\n");
return true; return true;
@@ -545,8 +541,6 @@ extern "C" __declspec(dllexport) void* __stdcall Init(LPSTR IniName)
initCustomLibraries(); initCustomLibraries();
loadLocalizedStrings(D2GetLang());
log_msg("***** ENTERING DIABLO II *****\n\n" ); log_msg("***** ENTERING DIABLO II *****\n\n" );
active_logFile = active_logFile - 1; active_logFile = active_logFile - 1;

View File

@@ -5,14 +5,14 @@
=================================================================*/ =================================================================*/
#include "parameters.h"
#include "error.h"
#include <windows.h>
#include <stdio.h> // fopen() fclose() fprintf() vfprintf() #include <stdio.h> // fopen() fclose() fprintf() vfprintf()
#include <stdarg.h> // ... #include <stdarg.h> // ...
#include <string.h> // strlen() strcat() #include <string.h> // strlen() strcat()
#include <direct.h> // _getcwd() #include <direct.h> // _getcwd()
#include "error.h"
#include "d2functions.h" // Fog_assert()
DWORD active_logFile = 1; DWORD active_logFile = 1;
static char log_file[MAX_PATH] = ""; static char log_file[MAX_PATH] = "";

View File

@@ -5,11 +5,12 @@
=================================================================*/ =================================================================*/
#include "common.h"
#include "extendedSaveFile.h" #include "extendedSaveFile.h"
#include "error.h"
#include "d2functions.h"
#include "infinityStash.h" #include "infinityStash.h"
#include "customLibraries.h" #include "customLibraries.h"
#include "common.h"
#include <stdio.h>
#define BUFFER_SIZE 0x4000 #define BUFFER_SIZE 0x4000
#define FILE_VERSION 0x3130 //"01" #define FILE_VERSION 0x3130 //"01"

View File

@@ -1,14 +1,16 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
More little options. More little options.
=================================================================*/ =================================================================*/
#include "common.h" #include "common.h"
#include "error.h"
#include "d2functions.h"
#include <stdio.h> #include <stdio.h>
int active_Windowed = true;
int active_DisplayItemLevel = false; int active_DisplayItemLevel = false;
DWORD nbPlayersCommandByDefault = 0; DWORD nbPlayersCommandByDefault = 0;
int active_alwaysRegenMapInSP = false; int active_alwaysRegenMapInSP = false;
@@ -21,11 +23,95 @@ int active_EnabledCowPortalWhenCowKingWasKill = false;
/****************************************************************************************************/ /****************************************************************************************************/
int setWindowedOptionsDone = false;
int active_RemoveBorder = true;
int active_WindowOnTop = true;
int active_Maximized = true;
int active_SetWindowPos = true;
int windowedX = 240;
int windowedY = 0;
int windowedWidth = 1440;
int windowedHeight = 1080;
int active_LockMouseOnStartup = true;
void lockMouseCursor(int width, int height)
{
RECT clientRect;
RECT rect;
HWND hwnd = GetActiveWindow();
GetClientRect(hwnd, &clientRect);
GetWindowRect(hwnd, &rect);
int shiftX = (rect.right - rect.left - clientRect.right) / 2;
int shiftY = rect.bottom - rect.top - clientRect.bottom - shiftX;
log_msg("Windows size : %i, %i, %i, %i\n", rect.left, rect.top, rect.right, rect.bottom);
rect.left += shiftX;
rect.right = rect.left + width;
rect.top += shiftY;
rect.bottom = rect.top + height;
//no resize : 560, 231, 1360, 831
//resized : 240, 0, 1040, 600
log_msg("Lock Mouse Cursor : %i, %i, %i, %i\n", rect.left, rect.top, rect.right, rect.bottom);
ClipCursor(&rect);
}
void lockMouseCursor() { lockMouseCursor(ResolutionX, ResolutionY); }
void SetWindowedOptions()
{
if (setWindowedOptionsDone)
return;
HWND hwnd = GetActiveWindow();
RECT clientRect;
GetClientRect(hwnd, &clientRect);
if (active_RemoveBorder)
{
LONG lStyle = GetWindowLong(hwnd, GWL_STYLE);
lStyle &= ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZE | WS_MAXIMIZE | WS_SYSMENU);
SetWindowLong(hwnd, GWL_STYLE, lStyle);
SetWindowPos(hwnd, NULL, 0, 0, clientRect.right, clientRect.bottom, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER | SWP_NOOWNERZORDER);
}
if (active_Maximized && !active_SetWindowPos)
{
RECT screen;
GetWindowRect(GetDesktopWindow(), &screen);
log_msg("Screen size : %i, %i, %i, %i\n", screen.left, screen.top, screen.right, screen.bottom);
int w = screen.bottom * clientRect.right / clientRect.bottom;
int h = w * clientRect.bottom / clientRect.right;
if (screen.right < w)
{
h = screen.right * clientRect.bottom / clientRect.right;
w = h * clientRect.right / clientRect.bottom;
}
windowedX = (screen.right - w) / 2;
windowedY = (screen.bottom - h) / 2;
windowedWidth = w;
windowedHeight = h;
}
if (active_SetWindowPos || active_Maximized)
{
if (active_WindowOnTop)
SetWindowPos(hwnd, HWND_TOPMOST, windowedX, windowedY, windowedWidth, windowedHeight, SWP_FRAMECHANGED);
else
SetWindowPos(hwnd, NULL, windowedX, windowedY, windowedWidth, windowedHeight, SWP_FRAMECHANGED | SWP_NOZORDER | SWP_NOOWNERZORDER);
} else if (active_WindowOnTop)
SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, clientRect.right, clientRect.bottom, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE);
if (active_LockMouseOnStartup)
lockMouseCursor(clientRect.right, clientRect.bottom);
setWindowedOptionsDone = true;
}
/****************************************************************************************************/
void STDCALL displayItemlevel(LPWSTR popup, Unit* ptItem) void STDCALL displayItemlevel(LPWSTR popup, Unit* ptItem)
{ {
if (onRealm && (selectModParam==MOD_NO)) return; if (onRealm && (selectModParam==MOD_NO)) return;
WCHAR text[0x50]; WCHAR text[0x50];
_snwprintf(text, sizeof(text), L"%s: %u\n", getLocalString(STR_ITEM_LEVEL), D2GetItemLevel(ptItem)); swprintf(text, L"Item Level: %u\n", D2GetItemLevel(ptItem));
D2SetColorPopup(text,WHITE); D2SetColorPopup(text,WHITE);
wcscat(popup,text); wcscat(popup,text);
} }
@@ -138,18 +224,17 @@ void Install_DisplayItemLevel()
log_msg("Patch D2Client for display item popup. (DisplayPopup)\n"); log_msg("Patch D2Client for display item popup. (DisplayPopup)\n");
// print the text in the final buffer // print the text in the final buffer
mem_seek R7(D2Client, 3D47C, 3D47C, 438A1, ADD0A, 789DA, AE0AA, 941C0, 98590); mem_seek R7(D2Client, 3D47C, 3D47C, 438A1, ADD0A, 789DA, AE0AA, 941C0);
memt_byte( 0x68 , 0xE8); memt_byte( 0x68 , 0xE8);
MEMT_REF4( 0x100, version_D2Client >= V113c ? caller_displayItemlevel_113 : version_D2Client >= V111 ? caller_displayItemlevel_111 : version_D2Client == V110 ? caller_displayItemlevel : caller_displayItemlevel_9); MEMT_REF4( 0x100, version_D2Client >= V113 ? caller_displayItemlevel_113 : version_D2Client >= V111 ? caller_displayItemlevel_111 : version_D2Client == V110 ? caller_displayItemlevel : caller_displayItemlevel_9);
//6FAE38A1 . 68 00010000 PUSH 100 //6FAE38A1 . 68 00010000 PUSH 100
//6FB5DD0A |. 68 00010000 PUSH 100 //6FB5DD0A |. 68 00010000 PUSH 100
//6FB289DA |. 68 00010000 PUSH 100 //6FB289DA |. 68 00010000 PUSH 100
//6FB5E0AA |. 68 00010000 PUSH 100 //6FB5E0AA |. 68 00010000 PUSH 100
//6FB441C0 |. 68 00010000 PUSH 100 //6FB441C0 |. 68 00010000 PUSH 100
//6FB48590 |. 68 00010000 PUSH 100
// print the text in the final buffer (for set items) // print the text in the final buffer (for set items)
mem_seek R7(D2Client, 3C452, 3C452, 427BE, AC773, 77773, ACEB3, 92FE3, 973B3); mem_seek R7(D2Client, 3C452, 3C452, 427BE, AC773, 77773, ACEB3, 92FE3);
memt_byte( 0x68 , 0xE8); memt_byte( 0x68 , 0xE8);
MEMT_REF4( 0x100, version_D2Client >= V111 ? caller_displayItemlevelSet_111 : version_D2Client == V110 ? caller_displayItemlevelSet : caller_displayItemlevelSet_9); MEMT_REF4( 0x100, version_D2Client >= V111 ? caller_displayItemlevelSet_111 : version_D2Client == V110 ? caller_displayItemlevelSet : caller_displayItemlevelSet_9);
//6FAE27BE . 68 00010000 PUSH 100 //6FAE27BE . 68 00010000 PUSH 100
@@ -157,7 +242,6 @@ void Install_DisplayItemLevel()
//6FB27773 |. 68 00010000 PUSH 100 //6FB27773 |. 68 00010000 PUSH 100
//6FB5CEB3 |. 68 00010000 PUSH 100 //6FB5CEB3 |. 68 00010000 PUSH 100
//6FB42FE3 |. 68 00010000 PUSH 100 //6FB42FE3 |. 68 00010000 PUSH 100
//6FB473B3 |. 68 00010000 PUSH 100
log_msg("\n"); log_msg("\n");
@@ -209,12 +293,12 @@ void Install_SendPlayersCommand()
log_msg("Patch D2Client for init default nb /players. (SendPlayersCommand)\n"); log_msg("Patch D2Client for init default nb /players. (SendPlayersCommand)\n");
infoEnabledSendPlayersCommand = (DWORD*)R7(D2Client, 111D60, 110BC0, 107960, 11BFBC, 11C2AC, 11BFF8, 11C394, 11D1DC); infoEnabledSendPlayersCommand = (DWORD*)R7(D2Client, 111D60, 110BC0, 107960, 11BFBC, 11C2AC, 11BFF8, 11C394);
if ( version_D2Client >= V110 ) if ( version_D2Client >= V110 )
msgNBPlayersString = (char*)R7(D2Client, 0000, 0000, D8448, D06A8, D4748, D4680, D4E00, D470C); msgNBPlayersString = (char*)R7(D2Client, 0000, 0000, D8448, D06A8, D4748, D4680, D4E00);
// Set nb Player to default // Set nb Player to default
mem_seek R7(D2Client, 8723B, 865BB, 81B8B, A3602, 66A02, 90162, C39F2, 1D3F2);//6FB1C7B7-6FAA0000 mem_seek R7(D2Client, 8723B, 865BB, 81B8B, A3602, 66A02, 90162, C39F2);//6FB1C7B7-6FAA0000
MEMJ_REF4( D2GetResolution , caller_SendPlayersCommand); MEMJ_REF4( D2GetResolution , caller_SendPlayersCommand);
//6FB2723A |. E8 7D8E0300 CALL <JMP.&D2gfx.#10005> //6FB2723A |. E8 7D8E0300 CALL <JMP.&D2gfx.#10005>
//6FB265BA |. E8 7D8E0300 CALL <JMP.&D2gfx.#10005> //6FB265BA |. E8 7D8E0300 CALL <JMP.&D2gfx.#10005>
@@ -223,7 +307,6 @@ void Install_SendPlayersCommand()
//6FB16A01 |. E8 AA65FAFF CALL <JMP.&D2gfx.#10063> //6FB16A01 |. E8 AA65FAFF CALL <JMP.&D2gfx.#10063>
//6FB40161 |. E8 1ECFF7FF CALL <JMP.&D2gfx.#10043> //6FB40161 |. E8 1ECFF7FF CALL <JMP.&D2gfx.#10043>
//6FB739F1 |. E8 B896F4FF CALL <JMP.&D2gfx.#10031> //6FB739F1 |. E8 B896F4FF CALL <JMP.&D2gfx.#10031>
//6FACD3F1 |. E8 EAFBFEFF CALL <JMP.&D2gfx.#10012>
log_msg("\n"); log_msg("\n");
@@ -241,14 +324,13 @@ void Install_AlwaysRegenMapInSP()
log_msg("Patch D2Game for always regenerate maps in Single player. (AlwaysRegenMapInSP)\n"); log_msg("Patch D2Game for always regenerate maps in Single player. (AlwaysRegenMapInSP)\n");
// Always regenerate maps in Single player // Always regenerate maps in Single player
mem_seek R7(D2Game, 517ED, 51BFA, 5DE88, 6235D, 2966D, 1E1FE, ED3BE, 26D7E); mem_seek R7(D2Game, 517ED, 51BFA, 5DE88, 6235D, 2966D, 1E1FE, ED3BE);
memt_byte( 0x74 , 0xEB); // JMP SHORT D2Game.01FE2368 memt_byte( 0x74 , 0xEB); // JMP SHORT D2Game.01FE2368
//6FC8DE88 |. 74 09 JE SHORT D2Game.6FC8DE93 //6FC8DE88 |. 74 09 JE SHORT D2Game.6FC8DE93
//01FE235D |. 74 09 JE SHORT D2Game.01FE2368 //01FE235D |. 74 09 JE SHORT D2Game.01FE2368
//01F9966D |. 74 09 JE SHORT D2Game.01F99678 //01F9966D |. 74 09 JE SHORT D2Game.01F99678
//6FC3E1FE |. 74 09 JE SHORT D2Game.6FC3E209 //6FC3E1FE |. 74 09 JE SHORT D2Game.6FC3E209
//6FD0D3BE |. 74 09 JE SHORT D2Game.6FD0D3C9 //6FD0D3BE |. 74 09 JE SHORT D2Game.6FD0D3C9
//6FC46D7E |. 74 09 JE SHORT D2Game.6FC46D89
log_msg("\n"); log_msg("\n");
@@ -265,12 +347,11 @@ void Install_RunLODs()
log_msg("Patch D2gfx for launch any number of Diablo II game in the same computer. (RunLODs)\n"); log_msg("Patch D2gfx for launch any number of Diablo II game in the same computer. (RunLODs)\n");
// execute if it's our packet else continue // execute if it's our packet else continue
mem_seek R7(D2gfx, 447C, 447C, 446A, 84CF, 84AF, 894F, 85BF, B6B0); mem_seek R7(D2gfx, 447C, 447C, 446A, 84CF, 84AF, 894F, 85BF);
memt_byte( 0x74, 0xEB ); // JMP SHORT D2gfx.6FA884F6 memt_byte( 0x74, 0xEB ); // JMP SHORT D2gfx.6FA884F6
//6FA884AF |. 74 45 JE SHORT D2gfx.6FA884F6 //6FA884AF |. 74 45 JE SHORT D2gfx.6FA884F6
//6FA8894F |. 74 45 JE SHORT D2gfx.6FA88996 //6FA8894F |. 74 45 JE SHORT D2gfx.6FA88996
//6FA885BF |. 74 45 JE SHORT D2gfx.6FA88606 //6FA885BF |. 74 45 JE SHORT D2gfx.6FA88606
//6FA8B6B0 |. 74 45 JE SHORT D2gfx.6FA8B6F7
log_msg("\n"); log_msg("\n");
@@ -385,9 +466,9 @@ void Install_AlwaysDisplayLifeMana()
log_msg("Patch D2Client for always display life and mana. (ALwaysPrintLifeMana)\n"); log_msg("Patch D2Client for always display life and mana. (ALwaysPrintLifeMana)\n");
if ( version_D2Client >= V113c ) if ( version_D2Client >= V113 )
{ {
mem_seek R7(D2Client, 0000, 0000, 0000, 0000, 0000, 0000, 2764A, 6D6FA); mem_seek R7(D2Client, 0000, 0000, 0000, 0000, 0000, 0000, 2764A);
memt_byte( 0x0F , 0x90); memt_byte( 0x0F , 0x90);
memt_byte( 0x8C , 0xE8); memt_byte( 0x8C , 0xE8);
MEMT_REF4( 0x000000BC, caller_AlwaysDisplayLife_113); MEMT_REF4( 0x000000BC, caller_AlwaysDisplayLife_113);
@@ -397,10 +478,9 @@ void Install_AlwaysDisplayLifeMana()
//6FAD7659 |. A1 4CBCB86F MOV EAX,DWORD PTR DS:[6FB8BC4C] //6FAD7659 |. A1 4CBCB86F MOV EAX,DWORD PTR DS:[6FB8BC4C]
//6FAD7667 |. 0F8C A4000000 JL D2Client.6FAD7711 //6FAD7667 |. 0F8C A4000000 JL D2Client.6FAD7711
//6FB1D717 |. 0F8C A4000000 JL D2Client.6FB1D7C1
} else { } else {
// Always display life. // Always display life.
mem_seek R7(D2Client, 58B32, 58B32, 5F102, 2D713, B5DF3, 81733, 0000, 0000); mem_seek R7(D2Client, 58B32, 58B32, 5F102, 2D713, B5DF3, 81733, 0000);
memt_byte( 0xA1 , 0xE8); memt_byte( 0xA1 , 0xE8);
MEMT_REF4( ptResolutionY , version_D2Client >= V111 ? caller_AlwaysDisplayLife_111 : caller_AlwaysDisplayLife); MEMT_REF4( ptResolutionY , version_D2Client >= V111 ? caller_AlwaysDisplayLife_111 : caller_AlwaysDisplayLife);
//6FADD713 |. A1 605CBA6F MOV EAX,DWORD PTR DS:[6FBA5C60] //6FADD713 |. A1 605CBA6F MOV EAX,DWORD PTR DS:[6FBA5C60]
@@ -410,13 +490,13 @@ void Install_AlwaysDisplayLifeMana()
// Always display mana. // Always display mana.
if ( version_D2Client >= V113c ) if ( version_D2Client >= V113 )
{ {
//mem_seek R7(D2Client, 0000, 0000, 0000, 0000, 0000, 0000, 27711); //mem_seek R7(D2Client, 0000, 0000, 0000, 0000, 0000, 0000, 27711);
//memt_byte( 0x8B , 0x90); //memt_byte( 0x8B , 0x90);
//memt_byte( 0x0D , 0xE8); //memt_byte( 0x0D , 0xE8);
//MEMT_REF4( offset_D2Client + 0x11C4B4 , caller_AlwaysDisplayMana_113); //MEMT_REF4( offset_D2Client + 0x11C4B4 , caller_AlwaysDisplayMana_113);
mem_seek R7(D2Client, 0000, 0000, 0000, 0000, 0000, 0000, 2770C, 6D7BC); mem_seek R7(D2Client, 0000, 0000, 0000, 0000, 0000, 0000, 2770C);
memt_byte( 0xA1 , 0xE8); memt_byte( 0xA1 , 0xE8);
MEMT_REF4( ptResolutionY , caller_AlwaysDisplayMana_113); MEMT_REF4( ptResolutionY , caller_AlwaysDisplayMana_113);
//6FAD770C |> A1 4CBCB86F MOV EAX,DWORD PTR DS:[6FB8BC4C] //6FAD770C |> A1 4CBCB86F MOV EAX,DWORD PTR DS:[6FB8BC4C]
@@ -430,11 +510,10 @@ void Install_AlwaysDisplayLifeMana()
//6FAD77CA |. 5B POP EBX //6FAD77CA |. 5B POP EBX
//6FAD77CB |. 81C4 28030000 ADD ESP,328 //6FAD77CB |. 81C4 28030000 ADD ESP,328
//6FAD77D1 \. C3 RETN //6FAD77D1 \. C3 RETN
//6FB1D7BC |> A1 3870BA6F MOV EAX,DWORD PTR DS:[6FB8BC4C]
} }
else if ( version_D2Client >= V110 ) else if ( version_D2Client >= V110 )
{ {
mem_seek R7(D2Client, 0000, 0000, 5F1E6, 2D7FB, B5EDB, 8181B, 0000, 0000); mem_seek R7(D2Client, 0000, 0000, 5F1E6, 2D7FB, B5EDB, 8181B, 0000);
memt_byte( 0x5F , 0xE8); memt_byte( 0x5F , 0xE8);
MEMT_REF4( 0x815B5D5E , caller_AlwaysDisplayMana); MEMT_REF4( 0x815B5D5E , caller_AlwaysDisplayMana);
memt_byte( 0xC4 , 0x90); // NOP memt_byte( 0xC4 , 0x90); // NOP
@@ -459,7 +538,7 @@ void Install_AlwaysDisplayLifeMana()
//6FB3181F |. 81C4 5C020000 ADD ESP,25C //6FB3181F |. 81C4 5C020000 ADD ESP,25C
//6FB31825 |. C3 RETN //6FB31825 |. C3 RETN
} else { } else {
mem_seek R7(D2Client, 58C09, 58C09, 0000, 0000, 0000, 0000, 0000, 0000); mem_seek R7(D2Client, 58C09, 58C09, 0000, 0000, 0000, 0000, 0000);
memt_byte( 0xE9 , 0xE8); memt_byte( 0xE9 , 0xE8);
MEMT_REF4( 0x000000C2 , caller_AlwaysDisplayMana_9); MEMT_REF4( 0x000000C2 , caller_AlwaysDisplayMana_9);
//6FAF8C09 . E9 C2000000 JMP D2Client.6FAF8CD0 //6FAF8C09 . E9 C2000000 JMP D2Client.6FAF8CD0
@@ -517,7 +596,7 @@ void STDCALL printDisplayBaseStatsValue(WORD statID, sDrawImageInfo* data, DWORD
if (isOnRect(D2GetMouseX(),D2GetMouseY(),x+5,y+5,32,32)) if (isOnRect(D2GetMouseX(),D2GetMouseY(),x+5,y+5,32,32))
{ {
WCHAR text[100]; WCHAR text[100];
_snwprintf(text, sizeof(text), getLocalString(STR_STATS_BASE_MIN), statValue, minValue); swprintf(text, getTranslatedString(STR_STATS_BASE_MIN), statValue, minValue);
D2SetFont(1); D2SetFont(1);
D2PrintPopup(text, x+18, y-32, WHITE, 1); D2PrintPopup(text, x+18, y-32, WHITE, 1);
} }
@@ -544,25 +623,23 @@ void Install_DisplayBaseStatsValue()
log_msg("Patch D2Client for display base stats value. (DisplayBaseStatsValue)\n"); log_msg("Patch D2Client for display base stats value. (DisplayBaseStatsValue)\n");
// Always print stat button images. // Always print stat button images.
mem_seek R7(D2Client, 29B12, 29B02, 30073, 82BBA, 8963A, 6B59A, BD1B5, BF955); mem_seek R7(D2Client, 29B12, 29B02, 30073, 82BBA, 8963A, 6B59A, BD1B5);
memt_byte( 0x8B, 0xEB ); // JMP SHORT D2Client.6FAD0088 memt_byte( 0x8B, 0xEB ); // JMP SHORT D2Client.6FAD0088
memt_byte( 0x4C, V7(D2Client, 12, 12, 13, 13, 13, 13, 13, 13) ); memt_byte( 0x4C, V7(D2Client, 12, 12, 13, 13, 13, 13, 13) );
memt_byte( 0x24, 0x90 ); // NOP memt_byte( 0x24, 0x90 ); // NOP
memt_byte( V7(D2Client, 20, 20, 14, 1C, 1C, 1C, 1C, 1C), 0x90 ); // NOP (V109d:0x20 , V110:0x14 memt_byte( V7(D2Client, 20, 20, 14, 1C, 1C, 1C, 1C), 0x90 ); // NOP (V109d:0x20 , V110:0x14
//6FAD0073 8B4C24 14 MOV ECX,DWORD PTR SS:[ESP+14] //6FAD0073 8B4C24 14 MOV ECX,DWORD PTR SS:[ESP+14]
//6FB32BBA > 8B4C24 1C MOV ECX,DWORD PTR SS:[ESP+1C] //6FB32BBA > 8B4C24 1C MOV ECX,DWORD PTR SS:[ESP+1C]
//6FB3963A > 8B4C24 1C MOV ECX,DWORD PTR SS:[ESP+1C] //6FB3963A > 8B4C24 1C MOV ECX,DWORD PTR SS:[ESP+1C]
//6FB1B59A > 8B4C24 1C MOV ECX,DWORD PTR SS:[ESP+1C] //6FB1B59A > 8B4C24 1C MOV ECX,DWORD PTR SS:[ESP+1C]
//6FB6D1B5 |> 8B4C24 1C MOV ECX,DWORD PTR SS:[ESP+1C] //6FB6D1B5 |> 8B4C24 1C MOV ECX,DWORD PTR SS:[ESP+1C]
//6FB6F955 |> 8B4C24 1C MOV ECX,DWORD PTR SS:[ESP+1C]
mem_seek R7(D2Client, 29B9D, 29B8D, 300FD, 82C54, 896D4, 6B637, BD23E, BF9DE); mem_seek R7(D2Client, 29B9D, 29B8D, 300FD, 82C54, 896D4, 6B637, BD23E);
MEMJ_REF4( D2PrintImage, caller_displayBaseStatsValue); MEMJ_REF4( D2PrintImage, caller_displayBaseStatsValue);
//6FB32C53 . E8 82A3F8FF CALL <JMP.&D2gfx.#10047> //6FB32C53 . E8 82A3F8FF CALL <JMP.&D2gfx.#10047>
//6FB396D3 . E8 D238F8FF CALL <JMP.&D2gfx.#10044> //6FB396D3 . E8 D238F8FF CALL <JMP.&D2gfx.#10044>
//6FB1B636 . E8 431AFAFF CALL <JMP.&D2gfx.#10024> //6FB1B636 . E8 431AFAFF CALL <JMP.&D2gfx.#10024>
//6FB6D23D |. E8 54FEF4FF |CALL <JMP.&D2gfx.#10041> //6FB6D23D |. E8 54FEF4FF |CALL <JMP.&D2gfx.#10041>
//6FB6F9DD |. E8 54FEF4FF |CALL <JMP.&D2gfx.#10042>
log_msg("\n"); log_msg("\n");
@@ -590,14 +667,13 @@ void Install_LadderRunewords()
log_msg("Patch D2Common for enabled the ladder only runewords. (LadderRunewords)\n"); log_msg("Patch D2Common for enabled the ladder only runewords. (LadderRunewords)\n");
mem_seek R7(D2Common, 0000, 0000, 1E965, 61762, 43A72, 5D492, 724B2, 63782); mem_seek R7(D2Common, 0000, 0000, 1E965, 61762, 43A72, 5D492, 724B2);
MEMC_REF4( D2CompileTxtFile, compileRunesTxt); MEMC_REF4( D2CompileTxtFile, compileRunesTxt);
//01B6E964 |. E8 0714FFFF CALL D2Common.#10578 ; \#10578 //01B6E964 |. E8 0714FFFF CALL D2Common.#10578 ; \#10578
//6FDB1761 |. E8 FAA8FCFF CALL D2Common.#10653 ; \#10653 //6FDB1761 |. E8 FAA8FCFF CALL D2Common.#10653 ; \#10653
//6FD93A71 |. E8 EAADFCFF CALL D2Common.#10496 ; \#10496 //6FD93A71 |. E8 EAADFCFF CALL D2Common.#10496 ; \#10496
//6FDAD491 |. E8 BA49FEFF CALL D2Common.#10244 ; \#10244 //6FDAD491 |. E8 BA49FEFF CALL D2Common.#10244 ; \#10244
//6FDC24B1 |. E8 8ACAFEFF CALL D2Common.#10849 ; \#10849 //6FDC24B1 |. E8 8ACAFEFF CALL D2Common.#10849 ; \#10849
//6FDB3781 |. E8 5A93FAFF CALL D2Common.#10037 ; \#10037
log_msg("\n"); log_msg("\n");
@@ -615,7 +691,7 @@ void Install_EnabledCowPortalWhenCowKingWasKill()
log_msg("Patch D2Game for enabled the opening of Cow Portal when player have already kill the cow king in that difficulty. (EnabledCowPortalWhenCowKingWasKill)\n"); log_msg("Patch D2Game for enabled the opening of Cow Portal when player have already kill the cow king in that difficulty. (EnabledCowPortalWhenCowKingWasKill)\n");
mem_seek R7(D2Game, 5DFF7, 5E457, 6C5E7 , B1278, 5DB68, 75C68, 67508, EBE8); mem_seek R7(D2Game, 5DFF7, 5E457, 6C5E7 , B1278, 5DB68, 75C68, 67508);
memt_byte( 0x85 , 0x33); // XOR EAX,EAX memt_byte( 0x85 , 0x33); // XOR EAX,EAX
//6FC8DFF7 . 85C0 TEST EAX,EAX //6FC8DFF7 . 85C0 TEST EAX,EAX
//6FC8E457 . 85C0 TEST EAX,EAX //6FC8E457 . 85C0 TEST EAX,EAX
@@ -624,7 +700,6 @@ void Install_EnabledCowPortalWhenCowKingWasKill()
//01FEDB68 |. 85C0 TEST EAX,EAX //01FEDB68 |. 85C0 TEST EAX,EAX
//6FC95C68 |. 85C0 TEST EAX,EAX //6FC95C68 |. 85C0 TEST EAX,EAX
//6FC87508 |. 85C0 TEST EAX,EAX //6FC87508 |. 85C0 TEST EAX,EAX
//6FC2EBE8 |. 85C0 TEST EAX,EAX
log_msg("\n"); log_msg("\n");

View File

@@ -1,15 +1,17 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
Updating server. Updating server.
=================================================================*/ =================================================================*/
#include "bigStash.h" // active_bigStash_tested
#include "uberQuest.h" //active_UberQuest + resetQuestState()
#include "common.h" #include "common.h"
#include "error.h"
#include "d2functions.h"
#include "bigStash.h"
#include <stdio.h> #include <stdio.h>
#include "uberQuest.h"
#include "worldEvent.h"
bool onRealm=false; bool onRealm=false;
bool needToInit=false; bool needToInit=false;
@@ -99,7 +101,7 @@ void Install_VariableOnRealm()
log_msg("Patch D2Launch for set not on realm variable. (VariableonRealm)\n"); log_msg("Patch D2Launch for set not on realm variable. (VariableonRealm)\n");
// click on Battle.net button // click on Battle.net button
mem_seek R7(D2Launch, 8195, 81A5, 9915, 129E5, 18AA5, 17D15, 19295, 11C65); mem_seek R7(D2Launch, 8195, 81A5, 9915, 129E5, 18AA5, 17D15, 19295);
memt_byte( 0x81, 0xE8 ); // CALL memt_byte( 0x81, 0xE8 ); // CALL
MEMT_REF4( 0x000400EC, caller_BnetBtnPress); MEMT_REF4( 0x000400EC, caller_BnetBtnPress);
memt_byte( 0x00, 0x90 ); // NOP memt_byte( 0x00, 0x90 ); // NOP
@@ -112,7 +114,7 @@ void Install_VariableOnRealm()
//6FA1EFFC . B8 01000000 MOV EAX,1 //6FA1EFFC . B8 01000000 MOV EAX,1
// click on TCP/IP button // click on TCP/IP button
mem_seek R7(D2Launch, 87B9, 87C9, 9F99, 11329, 17409, 16659, 17B8E, 1053E); mem_seek R7(D2Launch, 87B9, 87C9, 9F99, 11329, 17409, 16659, 17B8E);
if (version_D2Launch == V109b || version_D2Launch == V109d || version_D2Launch == V110) if (version_D2Launch == V109b || version_D2Launch == V109d || version_D2Launch == V110)
{ {
memt_byte( 0xBD, 0xE8 ); // CALL memt_byte( 0xBD, 0xE8 ); // CALL
@@ -124,7 +126,7 @@ void Install_VariableOnRealm()
} }
// click on SinglePlayer button // click on SinglePlayer button
mem_seek R7(D2Launch, D1F6, D1E6, EC16, B726, 117E6, 10A56, 11F36, A906); mem_seek R7(D2Launch, D1F6, D1E6, EC16, B726, 117E6, 10A56, 11F36);
memt_byte( 0xBA, 0xE8 ); // CALL memt_byte( 0xBA, 0xE8 ); // CALL
MEMT_REF4( 0x00000400, caller_SinglePlayerBtnPress); MEMT_REF4( 0x00000400, caller_SinglePlayerBtnPress);
//6FA4B726 . BA 00040000 MOV EDX,400 //6FA4B726 . BA 00040000 MOV EDX,400
@@ -133,7 +135,7 @@ void Install_VariableOnRealm()
{ {
log_msg("\nPatch D2Game for fixing ptClient removing bug. (VariableonRealm)\n"); log_msg("\nPatch D2Game for fixing ptClient removing bug. (VariableonRealm)\n");
//Bug crash ptClient search fix (for Megalixir Mod). //Bug crash ptClient search fix (for Megalixir Mod).
mem_seek R7(D2Game, 0000, 0000, 2B97, 0000, 0000, 0000, 0000, 0000); mem_seek R7(D2Game, 0000, 0000, 2B97, 0000, 0000, 0000, 0000);
memt_byte( 0x39 ,0xE8); memt_byte( 0x39 ,0xE8);
MEMT_REF4( 0x8B0C7429 , caller_fixClientRemovingBug); MEMT_REF4( 0x8B0C7429 , caller_fixClientRemovingBug);
memt_byte( 0xC1 ,0x90); memt_byte( 0xC1 ,0x90);

View File

@@ -12,9 +12,11 @@
******************************************************************************/ ******************************************************************************/
#include "INIfile.h"
#include "common.h"
#include <stdio.h> #include <stdio.h>
#include "INIfile.h"
#include "d2functions.h"
#include "error.h"
/* /*
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/getprivateprofilestring.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/getprivateprofilestring.asp
@@ -22,10 +24,12 @@ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/ge
/*****************************************************************************/ /*****************************************************************************/
// Utils // First a few support routines
LPSTR strstri(LPSTR text, LPSTR string) static char *strstri(char *text, char *string)
{ {
char *found = NULL;
if(text && string) if(text && string)
{ {
int len = strlen(string); int len = strlen(string);
@@ -35,7 +39,7 @@ LPSTR strstri(LPSTR text, LPSTR string)
{ {
if(_strnicmp(string, text, len) == 0) if(_strnicmp(string, text, len) == 0)
{ {
return text; found = text;
break; break;
} }
@@ -43,32 +47,12 @@ LPSTR strstri(LPSTR text, LPSTR string)
} }
} }
} }
return NULL;
return found;
} }
LPCWSTR strstri(LPCWSTR text, LPCWSTR string)
{
if (text && string)
{
int len = wcslen(string);
if (len)
{
while (*text)
{
if (_wcsnicmp(string, text, len) == 0)
{
return text;
break;
}
text++; static BOOL chrcmp(char c, char *string)
}
}
}
return NULL;
}
BOOL chrcmp(char c, char *string)
{ {
for(unsigned int i=0; i<strlen(string); i++) for(unsigned int i=0; i<strlen(string); i++)
{ {
@@ -80,7 +64,7 @@ BOOL chrcmp(char c, char *string)
} }
BOOL FileExists(char *name) static BOOL FileExists(char *name)
{ {
DWORD attr = GetFileAttributes(name); DWORD attr = GetFileAttributes(name);
return ( (attr != (DWORD)-1) && !(attr & FILE_ATTRIBUTE_DIRECTORY) ); return ( (attr != (DWORD)-1) && !(attr & FILE_ATTRIBUTE_DIRECTORY) );
@@ -88,14 +72,14 @@ BOOL FileExists(char *name)
/*****************************************************************************/ /*****************************************************************************/
/*****************************************************************************/
INIFile::INIFile() INIFile::INIFile()
{ {
m_readWrite = 0; m_readWrite = 0;
m_file = NULL; m_file = NULL;
m_cacheWritePos = 0;
m_cache = NULL; m_cache = NULL;
m_cacheWritePos = 0;
m_sectionStart = NULL; m_sectionStart = NULL;
m_sectionEnd = NULL; m_sectionEnd = NULL;
@@ -114,11 +98,14 @@ INIFile::~INIFile()
} }
BOOL INIFile::InitReadWrite(const char *path, int readWrite, DWORD writeCacheSize) /*****************************************************************************/
{
if (!path)
return false;
BOOL INIFile::InitReadWrite(char *path, int readWrite, DWORD writeCacheSize)
{
if(path)
{
m_readWrite = readWrite; m_readWrite = readWrite;
m_cacheWritePos = 0; m_cacheWritePos = 0;
m_sectionStart = NULL; m_sectionStart = NULL;
@@ -214,6 +201,7 @@ BOOL INIFile::InitReadWrite(const char *path, int readWrite, DWORD writeCacheSiz
if(m_cache) if(m_cache)
return TRUE; return TRUE;
} }
}
return FALSE; return FALSE;
} }
@@ -280,6 +268,12 @@ BOOL INIFile::close()
} }
/*****************************************************************************/
static char delimiterEnd[] = "\r\n\0";
int INIFile::GetPrivateProfileString(const char *section, const char *key, const char *def, char *dest, DWORD size) int INIFile::GetPrivateProfileString(const char *section, const char *key, const char *def, char *dest, DWORD size)
{ {
DWORD copied = 0; DWORD copied = 0;
@@ -325,7 +319,7 @@ int INIFile::GetPrivateProfileString(const char *section, const char *key, const
{ {
s += strlen(keyString); s += strlen(keyString);
while(*s && copied < size && *s != '\n' && *s != '\r' && *s != NULL) while(*s && (copied < size) && (chrcmp(*s, delimiterEnd) == FALSE))
{ {
*dest++ = *s++; *dest++ = *s++;
copied++; copied++;
@@ -339,10 +333,7 @@ int INIFile::GetPrivateProfileString(const char *section, const char *key, const
} }
if(!copied && def) if(!copied && def)
{
strncpy(dest, def, size); strncpy(dest, def, size);
return strlen(dest);
}
return copied; // Do not include the terminating null character return copied; // Do not include the terminating null character
} }
@@ -365,262 +356,4 @@ BOOL INIFile::WritePrivateProfileString(char *section, char *key, char *string)
return true; return true;
} }
/*****************************************************************************/
/*****************************************************************************/
/*****************************************************************************/
INIFileW::INIFileW()
{
m_readWrite = 0;
m_file = NULL;
m_cacheWritePos = 0;
m_cache = NULL;
m_sectionStart = NULL;
m_sectionEnd = NULL;
ZeroMemory((void *)m_path, sizeof(m_path));
ZeroMemory((void *)m_currentSection, sizeof(m_currentSection));
}
INIFileW::~INIFileW()
{
if (m_file)
CloseHandle(m_file);
if (m_cache)
delete[] m_cache;
}
BOOL INIFileW::InitReadWrite(const char *path, int readWrite, DWORD writeCacheSize)
{
if (!path)
return false;
m_readWrite = readWrite;
m_cacheWritePos = 0;
m_sectionStart = NULL;
m_sectionEnd = NULL;
ZeroMemory((void *)m_path, sizeof(m_path));
ZeroMemory((void *)m_currentSection, sizeof(m_currentSection));
strncpy(m_path, path, sizeof(m_path));
if (m_file)
{
CloseHandle(m_file);
m_file = NULL;
}
if (m_cache)
{
delete[] m_cache;
m_cache = NULL;
}
// If read, the open file and cache content in memory
if (m_readWrite == INIFILE_MPQREAD)
{
void* refFile;
if (D2MPQOpenFile(m_path, &refFile))
{
DWORD fileSize = D2MPQGetSizeFile(refFile, NULL);
m_cache = new WCHAR[fileSize + 1];
if (m_cache)
{
DWORD read;
if (D2MPQReadFile(refFile, (BYTE*)m_cache, fileSize, &read, NULL, NULL, NULL) == 0)
{
delete[] m_cache;
m_cache = NULL;
}
else
m_cache[fileSize] = 0;
}
D2MPQCloseFile(refFile);
if (m_cache)
return TRUE;
}
}
// if((m_readWrite == INIFILE_MPQREAD) || (m_readWrite == INIFILE_READ))
if (m_readWrite == INIFILE_READ)
{
if (FileExists(m_path))
{
m_file = CreateFile(m_path,
GENERIC_READ,
0,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL);
if (m_file != INVALID_HANDLE_VALUE)
{
DWORD fileSize = GetFileSize(m_file, NULL);
m_cache = new WCHAR[fileSize + 1];
if (m_cache)
{
DWORD read;
if (ReadFile(m_file, m_cache, fileSize, &read, NULL) == 0)
{
delete[] m_cache;
m_cache = NULL;
}
else
m_cache[fileSize] = 0;
}
CloseHandle(m_file);
m_file = NULL;
if (m_cache)
return TRUE;
}
}
// If write, then create write cache memory buffer
if (m_readWrite == INIFILE_WRITE)
{
m_cache = new WCHAR[writeCacheSize];
if (m_cache)
return TRUE;
}
}
return FALSE;
}
BOOL INIFileW::close()
{
BOOL success = FALSE;
// If read, then kill the memory cached settings
if (m_readWrite == INIFILE_READ)
{
// Just to be sure, close the settings file again if it's still open for some reason
if (m_file)
{
CloseHandle(m_file);
m_file = NULL;
}
if (m_cache)
{
delete[] m_cache;
m_cache = NULL;
success = TRUE;
}
// Just to be sure, reset section position markers
m_sectionStart = NULL;
m_sectionEnd = NULL;
}
// If write, then commit (write) cached settings file to disk
if (m_readWrite == INIFILE_WRITE)
{
if (m_path && m_cache)
{
m_file = CreateFile(m_path,
GENERIC_WRITE,
0,
NULL,
CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL,
NULL);
if (m_file != INVALID_HANDLE_VALUE)
{
DWORD written;
WriteFile(m_file, m_cache, m_cacheWritePos, &written, NULL);
CloseHandle(m_file);
m_file = NULL;
if (written == m_cacheWritePos)
success = TRUE;
}
delete[] m_cache;
m_cache = NULL;
}
}
return success;
}
int INIFileW::GetPrivateProfileString(LPCWSTR section, LPCWSTR key, LPCWSTR def, LPWSTR dest, DWORD size)
{
DWORD copied = 0;
if ((m_cache) && (section && key && dest && size))
{
if (_wcsicmp(section, m_currentSection) != 0)
{
wcsncpy(m_currentSection, section, MAX_SECTIONNAME_LENGTH);
WCHAR headerString[MAX_SECTIONNAME_LENGTH];
ZeroMemory((void *)headerString, sizeof(headerString));
// _snprintf(headerString, MAX_SECTIONNAME_LENGTH, "[%s]\r\n", section);
_snwprintf(headerString, MAX_SECTIONNAME_LENGTH, L"[%s]", section);
// Locate section start in buffer
m_sectionStart = strstri(m_cache, headerString);
// We found the start section
if (m_sectionStart)
{
// Keys start after the "[" + section + "]" header
m_sectionStart += wcslen(section) + 2;
// Locate section end in buffer
m_sectionEnd = wcsstr(m_sectionStart, L"\r\n[");
// If no next section is found, then use end of buffer
if (m_sectionEnd == NULL)
m_sectionEnd = m_cache + wcslen(m_cache);
}
}
if (m_sectionStart && m_sectionEnd)
{
WCHAR keyString[MAX_KEYNAME_LENGTH];
ZeroMemory((void *)keyString, sizeof(keyString));
_snwprintf(keyString, MAX_KEYNAME_LENGTH, L"\r\n%s=", key);
if (LPCWSTR s = strstri(m_sectionStart, keyString))
{
if (s < m_sectionEnd)
{
s += wcslen(keyString);
while (*s && copied < size && *s != '\n' && *s != '\r' && *s != NULL)
{
*dest++ = *s++;
copied++;
}
*dest = 0;
copied++;
}
}
}
}
if (!copied && def)
{
wcsncpy(dest, def, size);
return wcslen(dest);
}
return copied; // Do not include the terminating null character
}
/*================================= END OF FILE =================================*/ /*================================= END OF FILE =================================*/

View File

@@ -11,7 +11,9 @@
<09>1999-2004 Ultrafunk (www.ultrafunk.com) - info@ultrafunk.com <09>1999-2004 Ultrafunk (www.ultrafunk.com) - info@ultrafunk.com
******************************************************************************/ ******************************************************************************/
#pragma once
#ifndef _INIFILE_H
#define _INIFILE_H
#include <windows.h> #include <windows.h>
@@ -22,48 +24,31 @@
#define MAX_SECTIONNAME_LENGTH 128 #define MAX_SECTIONNAME_LENGTH 128
#define MAX_KEYNAME_LENGTH 128 #define MAX_KEYNAME_LENGTH 128
/*****************************************************************************/
class INIFile class INIFile
{ {
public: public:
INIFile(); INIFile();
~INIFile(); ~INIFile();
BOOL InitReadWrite(const char *path, int readWrite, DWORD writeCacheSize); BOOL InitReadWrite(char *path, int readWrite, DWORD writeCacheSize);
BOOL close(); BOOL close();
int GetPrivateProfileString(const char *section, const char *key, const char *def, char *dest, DWORD size); int GetPrivateProfileString(const char *section, const char *key, const char *def, char *dest, DWORD size);
BOOL WritePrivateProfileString(char *section, char *key, char *string); BOOL WritePrivateProfileString(char *section, char *key, char *string);
private: private:
char m_currentSection[MAX_SECTIONNAME_LENGTH]; int m_readWrite;
char m_path[_MAX_PATH];
HANDLE m_file;
char *m_cache; char *m_cache;
DWORD m_cacheWritePos;
char *m_sectionStart; char *m_sectionStart;
char *m_sectionEnd; char *m_sectionEnd;
int m_readWrite; char m_currentSection[MAX_SECTIONNAME_LENGTH];
char m_path[_MAX_PATH];
HANDLE m_file;
DWORD m_cacheWritePos;
}; };
class INIFileW
{
public:
INIFileW();
~INIFileW();
BOOL InitReadWrite(const char *path, int readWrite, DWORD writeCacheSize); #endif // _INIFILE_H
BOOL close();
int GetPrivateProfileString(LPCWSTR section, LPCWSTR key, LPCWSTR def, LPWSTR dest, DWORD size);
int GetPrivateProfileStringList(LPCWSTR section, LPCWSTR key, DWORD** codes, LPWSTR** values);
//BOOL WritePrivateProfileString(char *section, char *key, char *string);
LPWSTR m_cache;
private:
WCHAR m_currentSection[MAX_SECTIONNAME_LENGTH];
LPCWSTR m_sectionStart;
LPCWSTR m_sectionEnd;
int m_readWrite;
char m_path[_MAX_PATH];
HANDLE m_file;
DWORD m_cacheWritePos;
};
/*================================= END OF FILE =================================*/ /*================================= END OF FILE =================================*/

View File

@@ -1,15 +1,17 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
Gestion of the infinity and shared Stash. Gestion of the infinity and shared Stash.
=================================================================*/ =================================================================*/
#include "common.h"
#include "infinityStash.h" #include "infinityStash.h"
#include "error.h"
#include "d2functions.h"
#include "updateClient.h" #include "updateClient.h"
#include "interface_Stash.h" #include "interface_Stash.h"
#include "common.h"
#define STASH_TAG 0x5453 //"ST" #define STASH_TAG 0x5453 //"ST"
#define JM_TAG 0x4D4A //"JM" #define JM_TAG 0x4D4A //"JM"
@@ -45,7 +47,6 @@ DWORD endStashList(Unit* ptChar, Stash* ptStash)//WORKS
while (stash) while (stash)
{ {
if (stash->ptListItem || ((stash == PCPY->currentStash) && firstClassicStashItem(ptChar))) return 0; if (stash->ptListItem || ((stash == PCPY->currentStash) && firstClassicStashItem(ptChar))) return 0;
if (stash->isIndex || (stash->name != NULL && stash->name[0])) return 0;
stash = stash->nextStash; stash = stash->nextStash;
} }
return 1; return 1;
@@ -76,10 +77,10 @@ Stash* getLastStash(Stash* ptStash)//WORKS
Stash* newStash(DWORD id) Stash* newStash(DWORD id)
{ {
d2_assert( id == 0xFFFFFFFF , "Too much stash", __FILE__, __LINE__); d2_assert( id == 0xFFFFFFFF , "trop de stash", __FILE__, __LINE__);
Stash* stash = (Stash*)malloc(sizeof(Stash));//D2AllocMem(memPool, sizeof(Stash),__FILE__,__LINE__,0); Stash* stash = (Stash*)malloc(sizeof(Stash));//D2AllocMem(memPool, sizeof(Stash),__FILE__,__LINE__,0);
d2_assert(!stash , "Error on stash allocation.", __FILE__, __LINE__); d2_assert(!stash , "pb de g<>n<EFBFBD>ration de stash", __FILE__, __LINE__);
ZeroMemory(stash, sizeof(Stash)); ZeroMemory(stash, sizeof(Stash));
stash->id = id; stash->id = id;
@@ -255,15 +256,6 @@ DWORD loadStash(Unit* ptChar, Stash* ptStash, BYTE data[], DWORD startSize, DWOR
} }
curSize += 2; curSize += 2;
// Read flags.
int len = strlen((char*)&data[curSize]);
if (*(WORD*)&data[curSize + len + 1] != JM_TAG)
{
ptStash->flags = *(DWORD *)&data[curSize];
curSize += 4;
}
// Read Name
// if (strlen((char *)&data[curSize]) > 0xF) // if (strlen((char *)&data[curSize]) > 0xF)
// *(char *)&data[curSize+0xF] = NULL; // *(char *)&data[curSize+0xF] = NULL;
if (strlen((char *)&data[curSize])) if (strlen((char *)&data[curSize]))
@@ -272,7 +264,6 @@ DWORD loadStash(Unit* ptChar, Stash* ptStash, BYTE data[], DWORD startSize, DWOR
strcpy(ptStash->name, (char *)&data[curSize]); strcpy(ptStash->name, (char *)&data[curSize]);
curSize += strlen((char *)&data[curSize]) + 1; curSize += strlen((char *)&data[curSize]) + 1;
// Read inventory.
DWORD ret = D2LoadInventory(PCGame, ptChar, (saveBitField*)&data[curSize], 0x60, maxSize-curSize, 0, &nbBytesRead); DWORD ret = D2LoadInventory(PCGame, ptChar, (saveBitField*)&data[curSize], 0x60, maxSize-curSize, 0, &nbBytesRead);
if (ret) log_msg("loadStash -> D2LoadInventory failed\n"); if (ret) log_msg("loadStash -> D2LoadInventory failed\n");
log_msg("Stash loaded (%d : %s)\n", ptStash->id ,ptStash->name); log_msg("Stash loaded (%d : %s)\n", ptStash->id ,ptStash->name);
@@ -281,7 +272,7 @@ DWORD loadStash(Unit* ptChar, Stash* ptStash, BYTE data[], DWORD startSize, DWOR
return ret; return ret;
} }
DWORD loadStashList(Unit* ptChar, BYTE* data, DWORD maxSize, DWORD* curSize, bool isShared)//WORKS DWORD loadStashList(Unit* ptChar, BYTE data[], DWORD maxSize, DWORD* curSize, bool isShared)//WORKS
{ {
DWORD curStash = 0; DWORD curStash = 0;
Stash* newStash; Stash* newStash;
@@ -325,9 +316,6 @@ void saveStash(Unit* ptChar, Stash* ptStash, BYTE** data, DWORD* maxSize, DWORD*
//write "ST" //write "ST"
SETDATA(WORD, STASH_TAG); SETDATA(WORD, STASH_TAG);
//Write flags.
SETDATA(DWORD, ptStash->flags);
//save name //save name
if (ptStash->name) if (ptStash->name)
{ {
@@ -397,11 +385,9 @@ void updateSelectedStashClient(Unit* ptChar)//WORKS
{ {
Stash* newStash = PCPY->currentStash; Stash* newStash = PCPY->currentStash;
updateClient(ptChar, UC_SELECT_STASH, newStash->id, newStash->flags, PCPY->flags); updateClient(ptChar, UC_SELECT_STASH, newStash->id, newStash->flags, PCPY->flags);
updateClient(ptChar, UC_PAGE_NAME, newStash->name);
} }
void setSelectedStashClient(DWORD stashId, DWORD stashFlags, DWORD flags, bool bOnlyItems)//WORKS void setSelectedStashClient(DWORD stashId, DWORD stashFlags, DWORD flags)//WORKS
{ {
log_msg("setSelectedStashClient ID:%d, stashFlags:%d, flags:%08X\n", stashId, stashFlags, flags); log_msg("setSelectedStashClient ID:%d, stashFlags:%d, flags:%08X\n", stashId, stashFlags, flags);
Unit* ptChar = D2GetClientPlayer(); Unit* ptChar = D2GetClientPlayer();
@@ -409,8 +395,7 @@ void setSelectedStashClient(DWORD stashId, DWORD stashFlags, DWORD flags, bool b
if (!newStash) do if (!newStash) do
newStash = addStash(ptChar, (stashFlags & 1) == 1); newStash = addStash(ptChar, (stashFlags & 1) == 1);
while (newStash->id < stashId); while (newStash->id < stashId);
newStash->flags = stashFlags; changeToSelectedStash(ptChar, newStash, (stashFlags & 2) == 2, 1);
changeToSelectedStash(ptChar, newStash, bOnlyItems, 1);
PCPY->flags = flags; PCPY->flags = flags;
} }
@@ -449,7 +434,7 @@ void swapStash(Unit* ptChar, Stash* curStash, Stash* swpStash)
if (!ptChar || !curStash || !swpStash || curStash == swpStash) if (!ptChar || !curStash || !swpStash || curStash == swpStash)
return; return;
changeToSelectedStash(ptChar, swpStash, 1, 0); changeToSelectedStash(ptChar, swpStash, 1, 0);
updateClient(ptChar, UC_SELECT_STASH, swpStash->id, swpStash->flags | 4, PCPY->flags); updateClient(ptChar, UC_SELECT_STASH, swpStash->id, swpStash->flags | 2, PCPY->flags);
} }
void toggleStash(Unit* ptChar, DWORD page) void toggleStash(Unit* ptChar, DWORD page)
@@ -474,83 +459,6 @@ void swapStash(Unit* ptChar, DWORD page, bool toggle)
swapStash(ptChar, curStash, swpStash); swapStash(ptChar, curStash, swpStash);
} }
void insertStash(Unit* ptChar)
{
Stash* curStash = PCPY->currentStash;
Stash* stash = addStash(ptChar, curStash->isShared);
do
{
stash->flags = stash->previousStash->flags;
stash->name = stash->previousStash->name;
stash->ptListItem = stash->previousStash->ptListItem;
stash = stash->previousStash;
} while (stash != curStash);
stash->isIndex = 0;
stash->name = NULL;
stash->ptListItem = NULL;
selectNextStash(ptChar);
}
bool deleteStash(Unit* ptChar)
{
if (firstClassicStashItem(ptChar) != NULL)
return false;
//if (D2InventoryGetFirstItem())
Stash* stash = PCPY->currentStash;
if (stash->nextStash == NULL)
{
stash->isIndex = 0;
stash->name = NULL;
return true;
}
stash->flags = stash->nextStash->flags;
stash->name = stash->nextStash->name;
if (stash->nextStash->ptListItem != NULL)
swapStash(ptChar, stash, stash->nextStash);
stash = stash->nextStash;
do {
stash->flags = stash->nextStash->flags;
stash->name = stash->nextStash->name;
stash->ptListItem = stash->nextStash->ptListItem;
stash = stash->nextStash;
} while (stash->nextStash);
stash->isIndex = 0;
stash->name = NULL;
stash->ptListItem = NULL;
return true;
}
void renameCurrentStash(Unit* ptChar, char* name)
{
log_msg("renameCurrentStash : %08X, %s\n", ptChar, name);
Stash* stash = PCPY->currentStash;
int len = 0;
if (name != NULL)
len = strlen(name);
log_msg("renameCurrentStash : %d\n", len);
if (stash->name)
D2FogMemDeAlloc(stash->name, __FILE__, __LINE__, 0);
log_msg("renameCurrentStash 3\n");
if (len > 0)
{
stash->name = (char *)malloc(len);//D2FogMemAlloc(len,__FILE__,__LINE__,0);
strcpy(stash->name, name);
}
else
stash->name = NULL;
log_msg("renameCurrentStash 4\n");
}
void setCurrentStashIndex(Unit* ptChar, bool isIndex)
{
if (PCPY->currentStash)
PCPY->currentStash->isIndex = isIndex;
updateSelectedStashClient(ptChar);
}
void selectPreviousStash(Unit* ptChar) void selectPreviousStash(Unit* ptChar)
{ {
Stash* selStash = PCPY->currentStash->previousStash; Stash* selStash = PCPY->currentStash->previousStash;
@@ -599,15 +507,8 @@ void selectPreviousIndexStash(Unit* ptChar)
{ {
selectPreviousStash(ptChar); selectPreviousStash(ptChar);
Stash* selStash = PCPY->currentStash; Stash* selStash = PCPY->currentStash;
while (selStash && !selStash->isIndex)
selStash = selStash->previousStash;
if (selStash == NULL)
{
selStash = PCPY->currentStash;
while (selStash->previousStash && ((selStash->id+1) % nbPagesPerIndex != 0)) while (selStash->previousStash && ((selStash->id+1) % nbPagesPerIndex != 0))
selStash = selStash->previousStash; selStash = selStash->previousStash;
}
if (selStash && (selStash != PCPY->currentStash)) if (selStash && (selStash != PCPY->currentStash))
selectStash(ptChar, selStash); selectStash(ptChar, selStash);
@@ -628,19 +529,12 @@ void selectNextIndexStash(Unit* ptChar)
{ {
selectNextStash(ptChar); selectNextStash(ptChar);
Stash* selStash = PCPY->currentStash; Stash* selStash = PCPY->currentStash;
while (selStash && !selStash->isIndex)
selStash = selStash->nextStash;
if (selStash == NULL)
{
selStash = PCPY->currentStash;
while ((selStash->id+1) % nbPagesPerIndex != 0) while ((selStash->id+1) % nbPagesPerIndex != 0)
{ {
if (!selStash->isShared && (selStash->id >= maxSelfPages)) break; if (!selStash->isShared && (selStash->id >= maxSelfPages)) break;
if (selStash->isShared && (selStash->id >= maxSharedPages)) break; if (selStash->isShared && (selStash->id >= maxSharedPages)) break;
selStash = selStash->nextStash ? selStash->nextStash : addStash(ptChar, PCPY->showSharedStash);; selStash = selStash->nextStash ? selStash->nextStash : addStash(ptChar, PCPY->showSharedStash);;
} }
}
if (selStash && (selStash != PCPY->currentStash)) if (selStash && (selStash != PCPY->currentStash))
selectStash(ptChar, selStash); selectStash(ptChar, selStash);
} }
@@ -945,45 +839,42 @@ void Install_MultiPageStash()
log_msg("Patch D2Game for carry1 unique item. (MultiPageStash)\n"); log_msg("Patch D2Game for carry1 unique item. (MultiPageStash)\n");
// Cannot put 2 items carry1 in inventory // Cannot put 2 items carry1 in inventory
mem_seek R7(D2Game, 0000, 0000, 55050, 57CA3, 2FE63, 99B03, CF1E3, 6B013); mem_seek R7(D2Game, 0000, 0000, 55050, 57CA3, 2FE63, 99B03, CF1E3);
MEMJ_REF4( D2ItemSetPage , version_D2Game >= V111 ? caller_carry1Limit_111 : caller_carry1Limit); MEMJ_REF4( D2ItemSetPage , version_D2Game >= V111 ? caller_carry1Limit_111 : caller_carry1Limit);
//6FC8504F . E8 94670900 CALL <JMP.&D2Common.#10720> //6FC8504F . E8 94670900 CALL <JMP.&D2Common.#10720>
//01FD7CA2 . E8 6329FBFF CALL <JMP.&D2Common.#10485> //01FD7CA2 . E8 6329FBFF CALL <JMP.&D2Common.#10485>
//01F9FE62 . E8 47A8FDFF CALL <JMP.&D2Common.#10608> //01F9FE62 . E8 47A8FDFF CALL <JMP.&D2Common.#10608>
//6FCB9B02 . E8 9709F7FF CALL <JMP.&D2Common.#10223> //6FCB9B02 . E8 9709F7FF CALL <JMP.&D2Common.#10223>
//6FCEF1E2 . E8 47B7F3FF CALL <JMP.&D2Common.#10012> //6FCEF1E2 . E8 47B7F3FF CALL <JMP.&D2Common.#10012>
//6FC8B012 . E8 13F7F9FF CALL <JMP.&D2Common.#11026>
// Cannot put 2 items carry1 in inventory by swapping // Cannot put 2 items carry1 in inventory by swapping
mem_seek R7(D2Game, 0000, 0000, 558D9, 58968, 310E8, 9B6E8, D10C8, 6BC78); mem_seek R7(D2Game, 0000, 0000, 558D9, 58968, 310E8, 9B6E8, D10C8);
MEMJ_REF4( D2ItemGetPage , version_D2Game >= V112 ? caller_carry1LimitSwap_112 : version_D2Game >= V111 ? caller_carry1LimitSwap_111 : caller_carry1LimitSwap); MEMJ_REF4( D2ItemGetPage , version_D2Game >= V112 ? caller_carry1LimitSwap_112 : version_D2Game >= V111 ? caller_carry1LimitSwap_111 : caller_carry1LimitSwap);
//6FC858D8 . E8 175F0900 CALL <JMP.&D2Common.#10719> //6FC858D8 . E8 175F0900 CALL <JMP.&D2Common.#10719>
//01FD8967 . E8 8E1DFBFF CALL <JMP.&D2Common.#10820> //01FD8967 . E8 8E1DFBFF CALL <JMP.&D2Common.#10820>
//01FA10E7 . E8 9A96FDFF CALL <JMP.&D2Common.#10505> //01FA10E7 . E8 9A96FDFF CALL <JMP.&D2Common.#10505>
//6FCBB6E7 . E8 CAEDF6FF CALL <JMP.&D2Common.#10370> //6FCBB6E7 . E8 CAEDF6FF CALL <JMP.&D2Common.#10370>
//6FCF10C7 . E8 F895F3FF CALL <JMP.&D2Common.#10020> //6FCF10C7 . E8 F895F3FF CALL <JMP.&D2Common.#10020>
//6FC8BC77 . E8 22E9F9FF CALL <JMP.&D2Common.#10810>
if ( version_D2Game >= V111 ) if ( version_D2Game >= V111 )
{ {
// Cannot put 2 items carry1 in inventory when drop cube // Cannot put 2 items carry1 in inventory when drop cube
mem_seek R7(D2Game, 0000, 0000, 0000, 3D935, 49FD5, 17AD5, D7B75, B7B15); mem_seek R7(D2Game, 0000, 0000, 0000, 3D935, 49FD5, 17AD5, D7B75);
MEMJ_REF4( D2CanPutItemInInv , caller_carry1LimitWhenDrop_111); MEMJ_REF4( D2CanPutItemInInv , caller_carry1LimitWhenDrop_111);
//01FBD934 |. E8 5BD3FCFF |CALL <JMP.&D2Common.#10855> //01FBD934 |. E8 5BD3FCFF |CALL <JMP.&D2Common.#10855>
//01FB9FD4 |. E8 3912FCFF |CALL <JMP.&D2Common.#10813> //01FB9FD4 |. E8 3912FCFF |CALL <JMP.&D2Common.#10813>
//6FC37AD4 |. E8 0535FFFF |CALL <JMP.&D2Common.#10289> //6FC37AD4 |. E8 0535FFFF |CALL <JMP.&D2Common.#10289>
//6FCF7B74 |. E8 232FF3FF |CALL <JMP.&D2Common.#10133> //6FCF7B74 |. E8 232FF3FF |CALL <JMP.&D2Common.#10133>
//6FCD7B14 |. E8 7D32F5FF |CALL <JMP.&D2Common.#10402>
} else { } else {
// Cannot put 2 items carry1 in inventory when drop cube // Cannot put 2 items carry1 in inventory when drop cube
mem_seek R7(D2Game, 0000, 0000, 14341, 0000, 0000, 0000, 0000, 0000); mem_seek R7(D2Game, 0000, 0000, 14341, 0000, 0000, 0000, 0000);
memt_byte( 0xBA ,0xE8); memt_byte( 0xBA ,0xE8);
MEMT_REF4( 0x00000806 , caller_carry1LimitWhenDrop); MEMT_REF4( 0x00000806 , caller_carry1LimitWhenDrop);
//6FC44341 |. BA 06080000 |MOV EDX,806 //6FC44341 |. BA 06080000 |MOV EDX,806
} }
// Verif only carry1 out of stash page when pick up an item // Verif only carry1 out of stash page when pick up an item
mem_seek R7(D2Game, 0000, 0000, 1299E, 38E3B, 43F0B, 1209B, D211B, B301B); mem_seek R7(D2Game, 0000, 0000, 1299E, 38E3B, 43F0B, 1209B, D211B);
memt_byte( 0x8B ,0xE8); memt_byte( 0x8B ,0xE8);
MEMT_REF4( version_D2Game >= V111 ? 0x850C2474 : 0x85102444 , version_D2Game >= V111 ? caller_carry1OutOfStash_111 : caller_carry1OutOfStash); MEMT_REF4( version_D2Game >= V111 ? 0x850C2474 : 0x85102444 , version_D2Game >= V111 ? caller_carry1OutOfStash_111 : caller_carry1OutOfStash);
memt_byte( version_D2Game >= V111 ? 0xF6 : 0xC0 ,0x90); memt_byte( version_D2Game >= V111 ? 0xF6 : 0xC0 ,0x90);
@@ -997,8 +888,6 @@ void Install_MultiPageStash()
//6FC3209F |. 85F6 |TEST ESI,ESI //6FC3209F |. 85F6 |TEST ESI,ESI
//6FCF211B |. 8B7424 0C |MOV ESI,DWORD PTR SS:[ESP+C] //6FCF211B |. 8B7424 0C |MOV ESI,DWORD PTR SS:[ESP+C]
//6FCF211F |. 85F6 |TEST ESI,ESI //6FCF211F |. 85F6 |TEST ESI,ESI
//6FCD301B |. 8B7424 0C |MOV ESI,DWORD PTR SS:[ESP+C]
//6FCD301F |. 85F6 |TEST ESI,ESI
log_msg("\n"); log_msg("\n");
} }

View File

@@ -1,15 +1,16 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
Interface functions Interface functions
=================================================================*/ =================================================================*/
#include "common.h"
#include "error.h"
#include "d2functions.h"
#include "updateServer.h" // Install_UpdateServer() #include "updateServer.h" // Install_UpdateServer()
#include "plugYFiles.h" // Install_PlugYImagesFiles() #include "plugYFiles.h" // Install_PlugYImagesFiles()
#include "skillsPoints.h" #include "skillsPoints.h"
#include "common.h"
#include <stdio.h> #include <stdio.h>
int posXUnassignSkillBtn=-1; int posXUnassignSkillBtn=-1;
@@ -35,7 +36,7 @@ void STDCALL printSkillsPageBtns()
if ( isOnButtonUnassignSkill(D2GetMouseX(),D2GetMouseY())) if ( isOnButtonUnassignSkill(D2GetMouseX(),D2GetMouseY()))
{ {
LPWSTR popupText = getLocalString(STR_SKILLS_UNASSIGN); LPWSTR popupText = getTranslatedString(STR_SKILLS_UNASSIGN);
D2PrintPopup(popupText, getXSkillBtn()+getLSkillBtn()/2, getYSkillBtn()-getHSkillBtn(), 0, 1); D2PrintPopup(popupText, getXSkillBtn()+getLSkillBtn()/2, getYSkillBtn()-getHSkillBtn(), 0, 1);
} }
} }
@@ -139,7 +140,7 @@ void Install_InterfaceSkills()
log_msg("Patch D2Client for skills interface. (InterfaceSkills)\n"); log_msg("Patch D2Client for skills interface. (InterfaceSkills)\n");
// Print new buttons images // Print new buttons images
mem_seek R7(D2Client, 7AC20, 7AC20, 77073, 16190, 8A9C0, 7F320, 77F20, 2F380); mem_seek R7(D2Client, 7AC20, 7AC20, 77073, 16190, 8A9C0, 7F320, 77F20);
memt_byte( 0x5F, 0xE9 ); // JMP caller_printBtns memt_byte( 0x5F, 0xE9 ); // JMP caller_printBtns
if ( version_D2Client >= V111 ) { if ( version_D2Client >= V111 ) {
MEMT_REF4( 0xCCC35B5E, caller_printSkillsPageBtns_111); MEMT_REF4( 0xCCC35B5E, caller_printSkillsPageBtns_111);
@@ -163,11 +164,6 @@ void Install_InterfaceSkills()
//6FB27F22 |. 5B POP EBX //6FB27F22 |. 5B POP EBX
//6FB27F23 \. C3 RETN //6FB27F23 \. C3 RETN
//6FB27F24 CC INT3 //6FB27F24 CC INT3
//6FADF380 |> 5F POP EDI
//6FADF381 |. 5E POP ESI
//6FADF382 |. 5B POP EBX
//6FADF383 \. C3 RETN
//6FADF384 CC INT3
} else { } else {
MEMT_REF4( 0x835B5D5E, caller_printSkillsPageBtns); MEMT_REF4( 0x835B5D5E, caller_printSkillsPageBtns);
memt_byte( 0xC4, 0x90 ); // NOP memt_byte( 0xC4, 0x90 ); // NOP
@@ -184,7 +180,7 @@ void Install_InterfaceSkills()
if (posXUnassignSkillBtn==-1 && posYUnassignSkillBtn==-1) if (posXUnassignSkillBtn==-1 && posYUnassignSkillBtn==-1)
{ {
// Don't print "Skill Points Remaining" // Don't print "Skill Points Remaining"
mem_seek R7(D2Client, 7AC30, 7AC30, 77080, 16294, 8AC74, 7ECF4, 78334, 2F7E4); mem_seek R7(D2Client, 7AC30, 7AC30, 77080, 16294, 8AC74, 7ECF4, 78334);
memt_byte( 0xB9, 0xE8 ); memt_byte( 0xB9, 0xE8 );
MEMT_REF4( 0x00001083, version_D2Client >= V111 ? caller_DontPrintSkillPointsRemaining_111 : caller_DontPrintSkillPointsRemaining); MEMT_REF4( 0x00001083, version_D2Client >= V111 ? caller_DontPrintSkillPointsRemaining_111 : caller_DontPrintSkillPointsRemaining);
//6FB17080 /$ B9 83100000 MOV ECX,1083 //6FB17080 /$ B9 83100000 MOV ECX,1083
@@ -192,11 +188,10 @@ void Install_InterfaceSkills()
//6FB3AC74 |. B9 83100000 MOV ECX,1083 //6FB3AC74 |. B9 83100000 MOV ECX,1083
//6FB2ECF4 |. B9 83100000 MOV ECX,1083 //6FB2ECF4 |. B9 83100000 MOV ECX,1083
//6FB28334 |. B9 83100000 MOV ECX,1083 //6FB28334 |. B9 83100000 MOV ECX,1083
//6FADF7E4 |. B9 83100000 MOV ECX,1083
} }
// Manage mouse down (Play sound) // Manage mouse down (Play sound)
mem_seek R7(D2Client, 7BBD1, 7BBD1, 780E4, 17BC2, 8C6E2, 808B2, 79C62, 31112); mem_seek R7(D2Client, 7BBD1, 7BBD1, 780E4, 17BC2, 8C6E2, 808B2, 79C62);
memt_byte( 0xC7, 0xE8 ); // CALL caller_skillsPageMouseDown memt_byte( 0xC7, 0xE8 ); // CALL caller_skillsPageMouseDown
MEMT_REF4( version_D2Client >= V111 ? 0x00001845 : 0x00001843, version_D2Client >= V111 ? caller_skillsPageMouseDown_111 : caller_skillsPageMouseDown); MEMT_REF4( version_D2Client >= V111 ? 0x00001845 : 0x00001843, version_D2Client >= V111 ? caller_skillsPageMouseDown_111 : caller_skillsPageMouseDown);
memt_byte( 0x00, 0x90 ); // NOP memt_byte( 0x00, 0x90 ); // NOP
@@ -204,19 +199,17 @@ void Install_InterfaceSkills()
//6FB180E4 > C743 18 00000000 MOV DWORD PTR DS:[EBX+18],0 //6FB180E4 > C743 18 00000000 MOV DWORD PTR DS:[EBX+18],0
//6FAC7BC2 > C745 18 00000000 MOV DWORD PTR SS:[EBP+18],0 //6FAC7BC2 > C745 18 00000000 MOV DWORD PTR SS:[EBP+18],0
//6FB3C6E2 > C745 18 00000000 MOV DWORD PTR SS:[EBP+18],0 //6FB3C6E2 > C745 18 00000000 MOV DWORD PTR SS:[EBP+18],0
//6FB308B2 > C745 18 00000000 MOV DWORD PTR SS:[EBP+18],0 //6FB308B2 > C745 18 000000>MOV DWORD PTR SS:[EBP+18],0
//6FB29C62 > C745 18 00000000 MOV DWORD PTR SS:[EBP+18],0 //6FB29C62 > C745 18 000000>MOV DWORD PTR SS:[EBP+18],0
//6FAE1112 > C745 18 00000000 MOV DWORD PTR SS:[EBP+18],0
// Manage mouse up // Manage mouse up
mem_seek R7(D2Client, 7BC40, 7BC40, 78466, 17558, 8C078, 80248, 795F8, 30AA8); mem_seek R7(D2Client, 7BC40, 7BC40, 78466, 17558, 8C078, 80248, 795F8);
MEMJ_REF4( D2FreeWinMessage, caller_skillsPageMouseUp);//0xFFF93B0A MEMJ_REF4( D2FreeWinMessage, caller_skillsPageMouseUp);//0xFFF93B0A
//6FB18465 . E8 C07D0400 CALL <JMP.&Storm.#511> //6FB18465 . E8 C07D0400 CALL <JMP.&Storm.#511>
//6FAC7557 .^E9 4248FFFF JMP <JMP.&Storm.#511> //6FAC7557 .^E9 4248FFFF JMP <JMP.&Storm.#511>
//6FB3C077 .^E9 16FDF7FF JMP <JMP.&Storm.#511> //6FB3C077 .^E9 16FDF7FF JMP <JMP.&Storm.#511>
//6FB30247 .^E9 2CBCF8FF JMP <JMP.&Storm.#511> //6FB30247 .^E9 2CBCF8FF JMP <JMP.&Storm.#511>
//6FB295F7 .^E9 8828F9FF JMP <JMP.&Storm.#511> //6FB295F7 .^E9 8828F9FF JMP <JMP.&Storm.#511>
//6FAE0AA7 .^E9 E0B2FDFF JMP <JMP.&Storm.#511>
log_msg("\n"); log_msg("\n");

View File

@@ -1,16 +1,17 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
Interface stats page functions Interface stats page functions
=================================================================*/ =================================================================*/
#include "common.h"
#include "error.h"
#include "interface_Stash.h" #include "interface_Stash.h"
#include "d2functions.h"
#include "updateServer.h" #include "updateServer.h"
#include "infinityStash.h" #include "infinityStash.h"
#include "plugYFiles.h" // Install_PlugYImagesFiles() #include "plugYFiles.h" // Install_PlugYImagesFiles()
#include "common.h"
#include <stdio.h> #include <stdio.h>
static struct static struct
@@ -140,31 +141,31 @@ void* STDCALL printBtns()
D2SetFont(1); D2SetFont(1);
if (isOnButtonPreviousStash(mx,my)) { if (isOnButtonPreviousStash(mx,my)) {
lpText = getLocalString(STR_STASH_PREVIOUS_PAGE); lpText = getTranslatedString(STR_STASH_PREVIOUS_PAGE);
D2PrintPopup(lpText, getXPreviousBtn()+getLPreviousBtn()/2, getYPreviousBtn()-getHPreviousBtn(), WHITE, 1); D2PrintPopup(lpText, getXPreviousBtn()+getLPreviousBtn()/2, getYPreviousBtn()-getHPreviousBtn(), WHITE, 1);
} else if (isOnButtonNextStash(mx,my)) { } else if (isOnButtonNextStash(mx,my)) {
lpText = getLocalString(STR_STASH_NEXT_PAGE); lpText = getTranslatedString(STR_STASH_NEXT_PAGE);
D2PrintPopup(lpText, getXNextBtn()+getLNextBtn()/2, getYNextBtn()-getHNextBtn(), WHITE, 1); D2PrintPopup(lpText, getXNextBtn()+getLNextBtn()/2, getYNextBtn()-getHNextBtn(), WHITE, 1);
} else if (active_sharedStash && isOnButtonToggleSharedStash(mx,my)) { } else if (active_sharedStash && isOnButtonToggleSharedStash(mx,my)) {
lpText = getLocalString(PCPY->showSharedStash ? STR_TOGGLE_TO_PERSONAL : STR_TOGGLE_TO_SHARED); lpText = getTranslatedString(PCPY->showSharedStash ? STR_TOGGLE_TO_PERSONAL : STR_TOGGLE_TO_SHARED);
D2PrintPopup(lpText, getXSharedBtn()+getLSharedBtn()/2, getYSharedBtn()-getHSharedBtn(), WHITE, 1); D2PrintPopup(lpText, getXSharedBtn()+getLSharedBtn()/2, getYSharedBtn()-getHSharedBtn(), WHITE, 1);
} else if (isOnButtonPreviousIndexStash(mx,my)) { } else if (isOnButtonPreviousIndexStash(mx,my)) {
_snwprintf(text, sizeof(text), getLocalString(STR_STASH_PREVIOUS_INDEX) ,nbPagesPerIndex,nbPagesPerIndex2); swprintf(text, getTranslatedString(STR_STASH_PREVIOUS_INDEX) ,nbPagesPerIndex,nbPagesPerIndex2);
D2PrintPopup(text, getXPreviousIndexBtn()+getLPreviousIndexBtn()/2, getYPreviousIndexBtn()-getHPreviousIndexBtn(), 0, 0); D2PrintPopup(text, getXPreviousIndexBtn()+getLPreviousIndexBtn()/2, getYPreviousIndexBtn()-getHPreviousIndexBtn(), 0, 0);
} else if (isOnButtonNextIndexStash(mx,my)) { } else if (isOnButtonNextIndexStash(mx,my)) {
_snwprintf(text, sizeof(text), getLocalString(STR_STASH_NEXT_INDEX) ,nbPagesPerIndex,nbPagesPerIndex2); swprintf(text, getTranslatedString(STR_STASH_NEXT_INDEX) ,nbPagesPerIndex,nbPagesPerIndex2);
D2PrintPopup(text, getXNextIndexBtn()+getLNextIndexBtn()/2, getYNextIndexBtn()-getHNextIndexBtn(), WHITE, 1); D2PrintPopup(text, getXNextIndexBtn()+getLNextIndexBtn()/2, getYNextIndexBtn()-getHNextIndexBtn(), WHITE, 1);
} else if (active_sharedGold && isOnButtonPutGold(mx,my)) { } else if (active_sharedGold && isOnButtonPutGold(mx,my)) {
lpText = getLocalString(STR_PUT_GOLD); lpText = getTranslatedString(STR_PUT_GOLD);
D2PrintPopup(lpText, getXPutGoldBtn()+getLPutGoldBtn()/2, getYPutGoldBtn()-getHPutGoldBtn(), WHITE, 1); D2PrintPopup(lpText, getXPutGoldBtn()+getLPutGoldBtn()/2, getYPutGoldBtn()-getHPutGoldBtn(), WHITE, 1);
} else if (active_sharedGold && isOnButtonTakeGold(mx,my)) { } else if (active_sharedGold && isOnButtonTakeGold(mx,my)) {
lpText = getLocalString(STR_TAKE_GOLD); lpText = getTranslatedString(STR_TAKE_GOLD);
D2PrintPopup(lpText, getXTakeGoldBtn()+getLTakeGoldBtn()/2, getYTakeGoldBtn()-getHTakeGoldBtn(), WHITE, 1); D2PrintPopup(lpText, getXTakeGoldBtn()+getLTakeGoldBtn()/2, getYTakeGoldBtn()-getHTakeGoldBtn(), WHITE, 1);
} }
@@ -273,15 +274,14 @@ void FASTCALL printPageNumber(LPWSTR maxGoldText, DWORD x, DWORD y, DWORD color,
if (PCPY->currentStash) if (PCPY->currentStash)
{ {
bool isShared = PCPY->currentStash->isShared; bool isShared = PCPY->currentStash->isShared;
bool isIndex = PCPY->currentStash->isIndex;
DWORD currentId = PCPY->currentStash->id; DWORD currentId = PCPY->currentStash->id;
if (PCPY->currentStash->name && PCPY->currentStash->name[0]) if (PCPY->currentStash->name && PCPY->currentStash->name[0])
mbstowcs(popupText,PCPY->currentStash->name,50);//strlen(PCPY->currentStash->name)+1 mbstowcs(popupText,PCPY->currentStash->name,50);//strlen(PCPY->currentStash->name)+1
else _snwprintf(popupText, sizeof(popupText), getLocalString( isShared ? STR_SHARED_PAGE_NUMBER : STR_PERSONAL_PAGE_NUMBER), currentId+1); else swprintf(popupText, getTranslatedString( isShared ? STR_SHARED_PAGE_NUMBER : STR_PERSONAL_PAGE_NUMBER), currentId+1);
D2PrintString(popupText, x, y, isShared ? (isIndex ? CRYSTAL_RED : RED) : (isIndex ? BRIGHT_WHITE : WHITE), bfalse); D2PrintString(popupText,x,y, isShared?RED:WHITE ,bfalse);
} else { } else {
_snwprintf(popupText, sizeof(popupText), getLocalString(STR_NO_SELECTED_PAGE)); swprintf(popupText, getTranslatedString(STR_NO_SELECTED_PAGE));
D2PrintString(popupText,x,y, WHITE ,bfalse); D2PrintString(popupText,x,y, WHITE ,bfalse);
} }
@@ -292,7 +292,8 @@ void FASTCALL printPageNumber(LPWSTR maxGoldText, DWORD x, DWORD y, DWORD color,
{ {
if (active_sharedGold) if (active_sharedGold)
{ {
_snwprintf(popupText, sizeof(popupText), L"%s\n%s: %u", maxGoldText, getLocalString(STR_SHARED_GOLD_QUANTITY), PCPY->sharedGold); swprintf(popupText, L"%s\n", maxGoldText);
swprintf(popupText+wcslen(popupText), getTranslatedString(STR_SHARED_GOLD_QUANTITY), PCPY->sharedGold);
DWORD x = D2GetPixelLen(maxGoldText); DWORD x = D2GetPixelLen(maxGoldText);
DWORD x2 = D2GetPixelLen(popupText) - x; DWORD x2 = D2GetPixelLen(popupText) - x;
D2PrintPopup(popupText, RX(0xA8-max(x,x2)/2), RY(0x1CA), WHITE, 0); D2PrintPopup(popupText, RX(0xA8-max(x,x2)/2), RY(0x1CA), WHITE, 0);
@@ -449,47 +450,43 @@ void Install_InterfaceStash()
log_msg("Patch D2Client for stash interface. (InterfaceStash)\n"); log_msg("Patch D2Client for stash interface. (InterfaceStash)\n");
// Print button images // Print button images
mem_seek R7(D2Client, 39060, 39060, 3F399, B1006, 7DF86, B3656, 99A56, 9DE26); mem_seek R7(D2Client, 39060, 39060, 3F399, B1006, 7DF86, B3656, 99A56);
MEMC_REF4( D2LoadBuySelBtn, printBtns); MEMC_REF4( D2LoadBuySelBtn, printBtns);
//6FADF398 |. E8 734D0400 CALL D2Client.6FB24110 //6FADF398 |. E8 734D0400 CALL D2Client.6FB24110
//6FB61005 |. E8 A6D3FEFF CALL D2Client.6FB4E3B0 //6FB61005 |. E8 A6D3FEFF CALL D2Client.6FB4E3B0
//6FB2DF85 |. E8 3642FEFF CALL D2Client.6FB121C0 //6FB2DF85 |. E8 3642FEFF CALL D2Client.6FB121C0
//6FB63655 |. E8 9682FDFF CALL D2Client.6FB3B8F0 //6FB63655 |. E8 9682FDFF CALL D2Client.6FB3B8F0
//6FB49A55 |. E8 96500200 CALL D2Client.6FB6EAF0 //6FB49A55 |. E8 96500200 CALL D2Client.6FB6EAF0
//6FB4DE25 |. E8 76ACF7FF CALL D2Client.6FAC8AA0
// print page number // print page number
mem_seek R7(D2Client, 3903C, 3903C, 3F375, B0FE3, 7DF63, B3633, 99A33, 9DE03); mem_seek R7(D2Client, 3903C, 3903C, 3F375, B0FE3, 7DF63, B3633, 99A33);
MEMJ_REF4( D2PrintString, printPageNumber); MEMJ_REF4( D2PrintString, printPageNumber);
//6FADF374 |. E8 3FCC0800 CALL <JMP.&D2Win.#10117> //6FADF374 |. E8 3FCC0800 CALL <JMP.&D2Win.#10117>
//6FB60FE2 |. E8 99C2F5FF CALL <JMP.&D2Win.#10020> //6FB60FE2 |. E8 99C2F5FF CALL <JMP.&D2Win.#10020>
//6FB2DF62 |. E8 19F3F8FF CALL <JMP.&D2Win.#10064> //6FB2DF62 |. E8 19F3F8FF CALL <JMP.&D2Win.#10064>
//6FB63632 |. E8 299DF5FF CALL <JMP.&D2Win.#10001> //6FB63632 |. E8 299DF5FF CALL <JMP.&D2Win.#10001>
//6FB49A32 |. E8 4739F7FF CALL <JMP.&D2Win.#10150> //6FB49A32 |. E8 4739F7FF CALL <JMP.&D2Win.#10150>
//6FB4DE02 |. E8 4739F7FF CALL <JMP.&D2Win.#10076>
// Manage mouse down (Play sound) // Manage mouse down (Play sound)
mem_seek R7(D2Client, 45091, 45091, 4BBA1, B4666, 7FDD6, B54A6, 9B8A6, 9FC76); mem_seek R7(D2Client, 45091, 45091, 4BBA1, B4666, 7FDD6, B54A6, 9B8A6);
MEMC_REF4( version_D2Client >= V111 ? (DWORD)D2ClickOnStashButton : (DWORD)D2isLODGame, version_D2Client >= V111 ? caller_manageBtnDown_111 : caller_manageBtnDown); MEMC_REF4( version_D2Client >= V111 ? (DWORD)D2ClickOnStashButton : (DWORD)D2isLODGame, version_D2Client >= V111 ? caller_manageBtnDown_111 : caller_manageBtnDown);
//6FAEBBA0 > E8 DB04FCFF CALL D2Client.6FAAC080 //6FAEBBA0 > E8 DB04FCFF CALL D2Client.6FAAC080
//6FB64665 . E8 B61EFFFF CALL D2Client.6FB56520 //6FB64665 . E8 B61EFFFF CALL D2Client.6FB56520
//6FB2FDD5 . E8 E612FFFF CALL D2Client.6FB210C0 //6FB2FDD5 . E8 E612FFFF CALL D2Client.6FB210C0
//6FB654A5 . E8 9611FFFF CALL D2Client.6FB56640 //6FB654A5 . E8 9611FFFF CALL D2Client.6FB56640
//6FB4B8A5 . E8 5614FFFF CALL D2Client.6FB3CD00 //6FB4B8A5 . E8 5614FFFF CALL D2Client.6FB3CD00
//6FB4FC75 . E8 960FFFFF CALL D2Client.6FB40C10
// Manage mouse up // Manage mouse up
mem_seek R7(D2Client, 455F9, 455F9, 4C0F9, B57B9, 7FC09, B52D9, 9B6D9, 9FAA9); mem_seek R7(D2Client, 455F9, 455F9, 4C0F9, B57B9, 7FC09, B52D9, 9B6D9);
MEMC_REF4( version_D2Client >= V111 ? (DWORD)D2ClickOnStashButton : (DWORD)D2isLODGame, version_D2Client >= V111 ? caller_manageBtnUp_111 : caller_manageBtnUp); MEMC_REF4( version_D2Client >= V111 ? (DWORD)D2ClickOnStashButton : (DWORD)D2isLODGame, version_D2Client >= V111 ? caller_manageBtnUp_111 : caller_manageBtnUp);
//6FAEC0F8 > E8 83FFFBFF CALL D2Client.6FAAC080 //6FAEC0F8 > E8 83FFFBFF CALL D2Client.6FAAC080
//6FB657B8 > E8 630DFFFF CALL D2Client.6FB56520 //6FB657B8 > E8 630DFFFF CALL D2Client.6FB56520
//6FB2FC08 > E8 B314FFFF CALL D2Client.6FB210C0 //6FB2FC08 > E8 B314FFFF CALL D2Client.6FB210C0
//6FB652D8 > E8 6313FFFF CALL D2Client.6FB56640 //6FB652D8 > E8 6313FFFF CALL D2Client.6FB56640
//6FB4B6D8 > E8 2316FFFF CALL D2Client.6FB3CD00 //6FB4B6D8 > E8 2316FFFF CALL D2Client.6FB3CD00
//6FB4FAA8 > E8 6311FFFF CALL D2Client.6FB40C10
// init state of button on open stash page // init state of button on open stash page
mem_seek R7(D2Client, 45B3A, 45B3A, 4C63A, A645A, 749DA, A9D9A, 8CC3A, 9441A); mem_seek R7(D2Client, 45B3A, 45B3A, 4C63A, A645A, 749DA, A9D9A, 8CC3A);
memt_byte( 0x81, 0xE9 ); // CALL initBtnsStates memt_byte( 0x81, 0xE9 ); // CALL initBtnsStates
MEMT_REF4( 0x000104C4, initBtnsStates); MEMT_REF4( 0x000104C4, initBtnsStates);
memt_byte( 0x00, 0x90 ); memt_byte( 0x00, 0x90 );
@@ -500,27 +497,24 @@ void Install_InterfaceStash()
//6FB249DA |> 81C4 04010000 ADD ESP,104 //6FB249DA |> 81C4 04010000 ADD ESP,104
//6FB59D9A |> 81C4 04010000 ADD ESP,104 //6FB59D9A |> 81C4 04010000 ADD ESP,104
//6FB3CC3A |> 81C4 04010000 ADD ESP,104 //6FB3CC3A |> 81C4 04010000 ADD ESP,104
//6FB4441A |> 81C4 04010000 ADD ESP,104
// init the search of print in green the item set name we have in stash // init the search of print in green the item set name we have in stash
mem_seek R7(D2Client, 3F098, 3F098, 45997, A71F4, 71F64, A7314, 8D434, 91A24); mem_seek R7(D2Client, 3F098, 3F098, 45997, A71F4, 71F64, A7314, 8D434);
MEMJ_REF4( D2InventoryGetFirstItem, initGetNextItemForSet); MEMJ_REF4( D2InventoryGetFirstItem, initGetNextItemForSet);
//6FAE5996 |. E8 D5500800 CALL <JMP.&D2Common.#10277> //6FAE5996 |. E8 D5500800 CALL <JMP.&D2Common.#10277>
//6FB571F3 |. E8 D64EF6FF CALL <JMP.&D2Common.#10402> //6FB571F3 |. E8 D64EF6FF CALL <JMP.&D2Common.#10402>
//6FB21F63 |. E8 96A1F9FF CALL <JMP.&D2Common.#10535> //6FB21F63 |. E8 96A1F9FF CALL <JMP.&D2Common.#10535>
//6FB57313 |. E8 8250F6FF CALL <JMP.&D2Common.#11151> //6FB57313 |. E8 8250F6FF CALL <JMP.&D2Common.#11151>
//6FB3D433 |. E8 B8F0F7FF CALL <JMP.&D2Common.#10460> //6FB3D433 |. E8 B8F0F7FF CALL <JMP.&D2Common.#10460>
//6FB41A23 |. E8 96A7F7FF CALL <JMP.&D2Common.#11040>
// Get next item for print in green the item set name we have in stash // Get next item for print in green the item set name we have in stash
mem_seek R7(D2Client, 3F0FA, 3F0FA, 45A1C, A728B, 71FFB, A73AB, 8D4CB, 91ABB); mem_seek R7(D2Client, 3F0FA, 3F0FA, 45A1C, A728B, 71FFB, A73AB, 8D4CB);
MEMJ_REF4( D2UnitGetNextItem, getNextItemForSet); MEMJ_REF4( D2UnitGetNextItem, getNextItemForSet);
//6FAE5A1B E8 4A500800 CALL <JMP.&D2Common.#10304> //6FAE5A1B E8 4A500800 CALL <JMP.&D2Common.#10304>
//6FB5728A |. E8 0B4FF6FF |CALL <JMP.&D2Common.#10934> //6FB5728A |. E8 0B4FF6FF |CALL <JMP.&D2Common.#10934>
//6FB21FFA |. E8 A1A1F9FF |CALL <JMP.&D2Common.#11140> //6FB21FFA |. E8 A1A1F9FF |CALL <JMP.&D2Common.#11140>
//6FB573AA |. E8 7550F6FF |CALL <JMP.&D2Common.#10770> //6FB573AA |. E8 7550F6FF |CALL <JMP.&D2Common.#10770>
//6FB3D4CA |. E8 99F0F7FF |CALL <JMP.&D2Common.#10464> //6FB3D4CA |. E8 99F0F7FF |CALL <JMP.&D2Common.#10464>
//6FB41ABA |. E8 A3A8F7FF |CALL <JMP.&D2Common.#10879>
log_msg("\n"); log_msg("\n");

View File

@@ -1,15 +1,16 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
Interface functions Interface functions
=================================================================*/ =================================================================*/
#include "statsPoints.h"
#include "plugYFiles.h" // Install_PlugYImagesFiles()
#include "newInterfaces.h"
#include "common.h" #include "common.h"
#include "error.h"
#include "d2functions.h"
#include "plugYFiles.h" // Install_PlugYImagesFiles()
#include "statsPoints.h"
#include "newInterfaces.h"
#include <stdio.h> #include <stdio.h>
static struct static struct
@@ -67,12 +68,12 @@ void STDCALL printStatsPageBtns()
D2SetFont(1); D2SetFont(1);
if (D2GetResolution() && isOnPreviousPageBtn(mx,my)) //print popup "previous page" if (D2GetResolution() && isOnPreviousPageBtn(mx,my)) //print popup "previous page"
{ {
lpText = getLocalString(STR_PREVIOUS_PAGE); lpText = getTranslatedString(STR_PREVIOUS_PAGE);
D2PrintPopup(lpText, getXPreviousPageBtn()+getLPreviousPageBtn()/2, getYPreviousPageBtn()-getHPreviousPageBtn(), WHITE, 1); D2PrintPopup(lpText, getXPreviousPageBtn()+getLPreviousPageBtn()/2, getYPreviousPageBtn()-getHPreviousPageBtn(), WHITE, 1);
} }
else if ( isOnNextPageBtn(mx,my)) else if ( isOnNextPageBtn(mx,my))
{ {
lpText = getLocalString(STR_NEXT_PAGE); lpText = getTranslatedString(STR_NEXT_PAGE);
D2PrintPopup(lpText, getXNextPageBtn()+getLNextPageBtn()/2, getYNextPageBtn()-getHNextPageBtn(), WHITE, 1); D2PrintPopup(lpText, getXNextPageBtn()+getLNextPageBtn()/2, getYNextPageBtn()-getHNextPageBtn(), WHITE, 1);
} }
} }
@@ -244,7 +245,7 @@ void Install_InterfaceStats()
log_msg("Patch D2Client for stats interface. (InterfaceStats)\n"); log_msg("Patch D2Client for stats interface. (InterfaceStats)\n");
// Print new buttons images // Print new buttons images
mem_seek R7(D2Client, 2A7BE, 2A7AE, 30F86, 83636, 8A0B6, 6C016, BDC16, C03B6); mem_seek R7(D2Client, 2A7BE, 2A7AE, 30F86, 83636, 8A0B6, 6C016, BDC16);
memt_byte( 0x5F, 0xE9 ); // JMP memt_byte( 0x5F, 0xE9 ); // JMP
MEMT_REF4( 0x815B5D5E, version_D2Client >= V111 ? caller_printStatsPageBtns_111: version_D2Client == V110 ? caller_printStatsPageBtns : caller_printStatsPageBtns_9); MEMT_REF4( 0x815B5D5E, version_D2Client >= V111 ? caller_printStatsPageBtns_111: version_D2Client == V110 ? caller_printStatsPageBtns : caller_printStatsPageBtns_9);
//6FAD0F86 . 5F POP EDI //6FAD0F86 . 5F POP EDI
@@ -277,42 +278,34 @@ void Install_InterfaceStats()
//6FB6DC19 |. 5B POP EBX //6FB6DC19 |. 5B POP EBX
//6FB6DC1A |. 81C4 70030000 ADD ESP,370 //6FB6DC1A |. 81C4 70030000 ADD ESP,370
//6FB6DC20 \. C3 RETN //6FB6DC20 \. C3 RETN
//6FB703B6 |. 5F POP EDI
//6FB703B7 |. 5E POP ESI
//6FB703B8 |. 5D POP EBP
//6FB703B9 |. 5B POP EBX
//6FB703BA |. 81C4 70030000 ADD ESP,370
//6FB703<30>0 \. C3 RETN
if ( version_D2Client >= V111 ) if ( version_D2Client >= V111 )
{ {
// Manage mouse down (Play sound) // Manage mouse down (Play sound)
mem_seek R7(D2Client, 2AA6D, 2AA5D, 3133D, 827C8, 89248, 6B1A8, BCDC8, BF568); mem_seek R7(D2Client, 2AA6D, 2AA5D, 3133D, 827C8, 89248, 6B1A8, BCDC8);
memt_byte( 0xA1, 0xE8 ); memt_byte( 0xA1, 0xE8 );
MEMT_REF4( ptptClientChar, caller_statsPageMouseDown); MEMT_REF4( ptptClientChar, caller_statsPageMouseDown);
//6FB327C8 . A1 F0C4BC6F MOV EAX,DWORD PTR DS:[6FBCC4F0] //6FB327C8 . A1 F0C4BC6F MOV EAX,DWORD PTR DS:[6FBCC4F0]
//6FB39248 . A1 E0C1BC6F MOV EAX,DWORD PTR DS:[6FBCC1E0] //6FB39248 . A1 E0C1BC6F MOV EAX,DWORD PTR DS:[6FBCC1E0]
//6FB1B1A8 . A1 D0C3BC6F MOV EAX,DWORD PTR DS:[6FBCC3D0] //6FB1B1A8 . A1 D0C3BC6F MOV EAX,DWORD PTR DS:[6FBCC3D0]
//6FB6CDC8 . A1 FCBBBC6F MOV EAX,DWORD PTR DS:[6FBCBBFC] //6FB6CDC8 . A1 FCBBBC6F MOV EAX,DWORD PTR DS:[6FBCBBFC]
//6FB6F568 . A1 50D0BC6F MOV EAX,DWORD PTR DS:[6FBCD050]
// Manage mouse up // Manage mouse up
mem_seek R7(D2Client, 2AC43, 2AC33, 3151A, 83853, 8A2D3, 6C233, BDE33, C05D3); mem_seek R7(D2Client, 2AC43, 2AC33, 3151A, 83853, 8A2D3, 6C233, BDE33);
memt_byte( 0xA1, 0xE8 ); memt_byte( 0xA1, 0xE8 );
MEMT_REF4( ptptClientChar, caller_statsPageMouseUp); MEMT_REF4( ptptClientChar, caller_statsPageMouseUp);
//6FB33853 . A1 F0C4BC6F MOV EAX,DWORD PTR DS:[6FBCC4F0] //6FB33853 . A1 F0C4BC6F MOV EAX,DWORD PTR DS:[6FBCC4F0]
//6FB3A2D3 . A1 E0C1BC6F MOV EAX,DWORD PTR DS:[6FBCC1E0] //6FB3A2D3 . A1 E0C1BC6F MOV EAX,DWORD PTR DS:[6FBCC1E0]
//6FB1C233 . A1 D0C3BC6F MOV EAX,DWORD PTR DS:[6FBCC3D0] //6FB1C233 . A1 D0C3BC6F MOV EAX,DWORD PTR DS:[6FBCC3D0]
//6FB6DE33 . A1 FCBBBC6F MOV EAX,DWORD PTR DS:[6FBCBBFC] //6FB6DE33 . A1 FCBBBC6F MOV EAX,DWORD PTR DS:[6FBCBBFC]
//6FB705D3 . A1 50D0BC6F MOV EAX,DWORD PTR DS:[6FBCD050]
} else { } else {
// Manage mouse down (Play sound) // Manage mouse down (Play sound)
mem_seek R7(D2Client, 2AA6D, 2AA5D, 3133D, 827C8, 89248, 6B1A8, 0000, 0000); mem_seek R7(D2Client, 2AA6D, 2AA5D, 3133D, 827C8, 89248, 6B1A8, 0000);
MEMC_REF4( D2GetClientPlayer, caller_statsPageMouseDown); MEMC_REF4( D2GetClientPlayer, caller_statsPageMouseDown);
//6FAD133C . E8 8F700500 CALL D2Client.6FB283D0 //6FAD133C . E8 8F700500 CALL D2Client.6FB283D0
// Manage mouse up // Manage mouse up
mem_seek R7(D2Client, 2AC43, 2AC33, 3151A, 83853, 8A2D3, 6C233, 0000, 0000); mem_seek R7(D2Client, 2AC43, 2AC33, 3151A, 83853, 8A2D3, 6C233, 0000);
MEMC_REF4( D2GetClientPlayer, version_D2Client == V110 ? caller_statsPageMouseUp : caller_statsPageMouseUp_9);//0x00056EB2 MEMC_REF4( D2GetClientPlayer, version_D2Client == V110 ? caller_statsPageMouseUp : caller_statsPageMouseUp_9);//0x00056EB2
//6FAD1519 . E8 B26E0500 CALL D2Client.6FB283D0 //6FAD1519 . E8 B26E0500 CALL D2Client.6FB283D0
} }

View File

@@ -5,8 +5,10 @@
=================================================================*/ =================================================================*/
#include "language.h"
#include "common.h" #include "common.h"
#include "error.h"
#include "d2functions.h"
#include "language.h"
#include <stdio.h> #include <stdio.h>

View File

@@ -1,15 +1,16 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
Load Player Custom Data. Load Player Custom Data.
=================================================================*/ =================================================================*/
#include "common.h"
#include "error.h"
#include "d2functions.h"
#include "infinityStash.h" #include "infinityStash.h"
#include "extendedSaveFile.h" #include "extendedSaveFile.h"
#include "sharedSaveFile.h" #include "sharedSaveFile.h"
#include "common.h"
/************************************ LOADING ***********************************/ /************************************ LOADING ***********************************/
@@ -475,7 +476,7 @@ void Install_LoadPlayerData()
log_msg("Patch D2Game & D2Client for load Player's custom data. (LoadPlayerData)\n"); log_msg("Patch D2Game & D2Client for load Player's custom data. (LoadPlayerData)\n");
// Load SP player custom data. // Load SP player custom data.
mem_seek R7(D2Game, 5046F, 5086F, 5CB0F, BB8ED, 278CD, 465BD, 5638D, 3BCCD); mem_seek R7(D2Game, 5046F, 5086F, 5CB0F, BB8ED, 278CD, 465BD, 5638D);
memt_byte( 0x8B, 0xE8); // CALL caller_LoadSPPlayerCustomData memt_byte( 0x8B, 0xE8); // CALL caller_LoadSPPlayerCustomData
MEMT_REF4( 0x75F685F0 , caller_LoadSPPlayerCustomData); MEMT_REF4( 0x75F685F0 , caller_LoadSPPlayerCustomData);
memt_byte( 0x16, 0x90); // NOP memt_byte( 0x16, 0x90); // NOP
@@ -494,12 +495,9 @@ void Install_LoadPlayerData()
//6FC7638D |> 8BF0 MOV ESI,EAX //6FC7638D |> 8BF0 MOV ESI,EAX
//6FC7638F |. 85F6 TEST ESI,ESI //6FC7638F |. 85F6 TEST ESI,ESI
//6FC76391 |. 75 16 JNZ SHORT D2Game.6FC763A9 //6FC76391 |. 75 16 JNZ SHORT D2Game.6FC763A9
//6FC5BCCD |> 8BF0 MOV ESI,EAX
//6FC5BCCF |. 85F6 TEST ESI,ESI
//6FC5BCD1 |. 75 16 JNZ SHORT D2Game.6FC5BCE9
// Load MP player custom data. // Load MP player custom data.
mem_seek R7(D2Game, 50790, 50B90, 5CC66, BB777, 27757, 46447, 56217, 3BB57); mem_seek R7(D2Game, 50790, 50B90, 5CC66, BB777, 27757, 46447, 56217);
memt_byte( 0x83, 0xE8); memt_byte( 0x83, 0xE8);
MEMT_REF4( version_D2Game >= V111 ? 0x2174003B : version_D2Game == V110 ? 0x4674003F : 0x1D74003F, version_D2Game >= V111 ? caller_LoadMPPlayerCustomData_111 : version_D2Game == V110 ? caller_LoadMPPlayerCustomData: caller_LoadMPPlayerCustomData_9); MEMT_REF4( version_D2Game >= V111 ? 0x2174003B : version_D2Game == V110 ? 0x4674003F : 0x1D74003F, version_D2Game >= V111 ? caller_LoadMPPlayerCustomData_111 : version_D2Game == V110 ? caller_LoadMPPlayerCustomData: caller_LoadMPPlayerCustomData_9);
//6FC8CC66 . 833F 00 CMP DWORD PTR DS:[EDI],0 //6FC8CC66 . 833F 00 CMP DWORD PTR DS:[EDI],0
@@ -512,21 +510,18 @@ void Install_LoadPlayerData()
//6FC6644A |. 74 21 JE SHORT D2Game.6FC6646D //6FC6644A |. 74 21 JE SHORT D2Game.6FC6646D
//6FC76217 |> 833B 00 CMP DWORD PTR DS:[EBX],0 //6FC76217 |> 833B 00 CMP DWORD PTR DS:[EBX],0
//6FC7621A |. 74 21 JE SHORT D2Game.6FC7623D //6FC7621A |. 74 21 JE SHORT D2Game.6FC7623D
//6FC5BB57 |> 833B 00 CMP DWORD PTR DS:[EBX],0
//6FC5BB5A |. 74 21 JE SHORT D2Game.6FC5BB7D
// Send save files to Server. // Send save files to Server.
mem_seek R7(D2Client, CF42, CF32, D5A2, 733FC, 5DFDC, 7933C, 1457C, B638C); mem_seek R7(D2Client, CF42, CF32, D5A2, 733FC, 5DFDC, 7933C, 1457C);
MEMJ_REF4( D2FogGetSavePath, version_D2Game >= V111 ? caller_SendSaveFiles_111 : caller_SendSaveFiles); MEMJ_REF4( D2FogGetSavePath, version_D2Game >= V111 ? caller_SendSaveFiles_111 : caller_SendSaveFiles);
//6FAAD5A1 |. E8 88D10B00 CALL <JMP.&Fog.#10115> //6FAAD5A1 |. E8 88D10B00 CALL <JMP.&Fog.#10115>
//6FB233FB |. E8 CA8AF9FF CALL <JMP.&Fog.#10115> //6FB233FB |. E8 CA8AF9FF CALL <JMP.&Fog.#10115>
//6FB0DFDB |. E8 C6DEFAFF CALL <JMP.&Fog.#10115> //6FB0DFDB |. E8 C6DEFAFF CALL <JMP.&Fog.#10115>
//6FB2933B |. E8 6A2CF9FF CALL <JMP.&Fog.#10115> //6FB2933B |. E8 6A2CF9FF CALL <JMP.&Fog.#10115>
//6FAC457B |. E8 187AFFFF CALL <JMP.&Fog.#10115> //6FAC457B |. E8 187AFFFF CALL <JMP.&Fog.#10115>
//6FB6638B |. E8 2E5BF5FF CALL <JMP.&Fog.#10115>
// Receive save files from client. // Receive save files from client.
mem_seek R7(D2Game, 183A, 183A, 191A, 376E9, 703D9, 624D9, CAF39, D53E9); mem_seek R7(D2Game, 183A, 183A, 191A, 376E9, 703D9, 624D9, CAF39);
memt_byte( 0x8B ,0xE8); memt_byte( 0x8B ,0xE8);
if ( version_D2Game >= V111 ) { if ( version_D2Game >= V111 ) {
MEMT_REF4( 0xB60F005D, caller_ReceiveSaveFiles_111); MEMT_REF4( 0xB60F005D, caller_ReceiveSaveFiles_111);
@@ -540,8 +535,6 @@ void Install_LoadPlayerData()
//6FC824DC |. 0FB645 04 MOVZX EAX,BYTE PTR SS:[EBP+4] //6FC824DC |. 0FB645 04 MOVZX EAX,BYTE PTR SS:[EBP+4]
//6FCEAF39 |. 8B5D 00 MOV EBX,DWORD PTR SS:[EBP] //6FCEAF39 |. 8B5D 00 MOV EBX,DWORD PTR SS:[EBP]
//6FCEAF3C |. 0FB645 04 MOVZX EAX,BYTE PTR SS:[EBP+4] //6FCEAF3C |. 0FB645 04 MOVZX EAX,BYTE PTR SS:[EBP+4]
//6FCF53E9 |. 8B5D 00 MOV EBX,DWORD PTR SS:[EBP]
//6FCF53EC |. 0FB645 04 MOVZX EAX,BYTE PTR SS:[EBP+4]
} else { } else {
MEMT_REF4( 0x04468A3E, caller_ReceiveSaveFiles); MEMT_REF4( 0x04468A3E, caller_ReceiveSaveFiles);
//6FC3191A |. 8B3E MOV EDI,DWORD PTR DS:[ESI] //6FC3191A |. 8B3E MOV EDI,DWORD PTR DS:[ESI]
@@ -550,7 +543,7 @@ void Install_LoadPlayerData()
if ( version_Fog <= V109d ) if ( version_Fog <= V109d )
{ {
mem_seek R7(Fog, 47DE, 45AE, 0000, 0000, 0000, 0000, 0000, 0000); mem_seek R7(Fog, 47DE, 45AE, 0000, 0000, 0000, 0000, 0000);
memt_byte( 0x8B ,0xE8); memt_byte( 0x8B ,0xE8);
MEMT_REF4( 0x891C2444, version_Fog == V109b? caller_BugFix109b : caller_BugFix109d); MEMT_REF4( 0x891C2444, version_Fog == V109b? caller_BugFix109b : caller_BugFix109d);
memt_byte( 0x44 ,0x90); memt_byte( 0x44 ,0x90);

View File

@@ -1,323 +0,0 @@
/*=================================================================
File created by Yohann NICOLAS.
Localized strings functions.
=================================================================*/
#include "INIfile.h"
#include "LocalizedStrings.h"
#include "common.h"
#include <stdio.h>
LPWSTR StripGender(LPWSTR text)
{
if (text[0] == L' ')
text++;
if (text[0] != L'[')
return text;
text++;
while (text[0] != L']' && text[0] != NULL)
text++;
text++;
return text;
}
LPCWSTR StripGender(LPCWSTR text) { return StripGender((LPWSTR)text); }
///////////////////////////////////////// Get Local Strings /////////////////////////////////////////
struct LocalizedTypeString
{
DWORD code;
LPSTR itemStr;
LPWSTR typeLocalizedString;
} *sLocalizedTypeStrings;
LPWSTR sLocalizedStrings[60];
int nbLocalizedTypeString = 0;
LPWSTR getLocalString(int stringId)
{
return sLocalizedStrings[stringId];
}
LPCWSTR getLocalTypeString(DWORD code)
{
for (int i = 0; i < nbLocalizedTypeString; i++)
{
if (sLocalizedTypeStrings[i].code == code)
{
log_msg("Code=%08X\n", code);
if (sLocalizedTypeStrings[i].itemStr)
return StripGender(D2GetStringFromString(sLocalizedTypeStrings[i].itemStr));
LPWSTR text = StripGender(sLocalizedTypeStrings[i].typeLocalizedString);
if (!text || !text[0])
break;
return text;
}
}
char itemIdx[5];
itemIdx[0] = (code) & 0xFF;
itemIdx[1] = (code >> 8) & 0xFF;
itemIdx[2] = (code >> 16) & 0xFF;
itemIdx[3] = (code >> 24) & 0xFF;
itemIdx[4] = 0;
LPWSTR typeName = StripGender(D2GetStringFromString(itemIdx));
if (wcsstr(typeName, L"-not xlated call ken") == NULL)
return typeName;
static WCHAR itemIdxW[5];
itemIdxW[0] = (code) & 0xFF;
itemIdxW[1] = (code >> 8) & 0xFF;
itemIdxW[2] = (code >> 16) & 0xFF;
itemIdxW[3] = (code >> 24) & 0xFF;
itemIdxW[4] = 0;
return itemIdxW;
}
///////////////////////////////////////// Load Strings /////////////////////////////////////////
#define LOAD(I) loadLocalString(iniFile, I, L#I, key)
#define BUFSIZE 0x400
void loadLocalString(INIFileW *iniFile, int id, LPCWSTR section, LPCWSTR key)
{
WCHAR buffer[BUFSIZE];
iniFile->GetPrivateProfileString(section, key, NULL, buffer, BUFSIZE);
int len = wcslen(buffer);
if (len == 0)
iniFile->GetPrivateProfileString(section, L"ENG", section, buffer, BUFSIZE);
len = wcslen(buffer);
if (len == 0)
{
len = wcslen(section);
sLocalizedStrings[id] = new WCHAR[len + 1];
wcsncpy(sLocalizedStrings[id], section, len);
sLocalizedStrings[id][len] = NULL;
}
if (buffer[0] == L'"' && buffer[len-1] == L'"')
{
sLocalizedStrings[id] = new WCHAR[len - 1];
wcsncpy(sLocalizedStrings[id], buffer + 1, len - 2);
sLocalizedStrings[id][len - 2] = NULL;
}
else
{
sLocalizedStrings[id] = new WCHAR[len + 1];
wcsncpy(sLocalizedStrings[id], buffer, len);
sLocalizedStrings[id][len] = NULL;
}
}
int GetPrivateProfileStringList(LPCWCHAR m_cache, LPCWSTR section, LPCWSTR key)
{
WCHAR sectionString[MAX_SECTIONNAME_LENGTH];
_snwprintf(sectionString, MAX_SECTIONNAME_LENGTH, L"\n[%s", section);
WCHAR keyString[MAX_KEYNAME_LENGTH];
_snwprintf(keyString, MAX_KEYNAME_LENGTH, L"\n%s=", key);
int keyLen = wcslen(keyString);
WCHAR defKeyString[MAX_KEYNAME_LENGTH];
_snwprintf(defKeyString, MAX_KEYNAME_LENGTH, L"\n%s=", L"ENG");
int defKeyLen = wcslen(defKeyString);
WCHAR itemKeyString[MAX_KEYNAME_LENGTH];
_snwprintf(itemKeyString, MAX_KEYNAME_LENGTH, L"\n%s=", L"ITEM");
int itemKeyLen = wcslen(itemKeyString);
// Get nb TYPE sections.
LPCWSTR end;
int nb = 0;
LPCWSTR cur = m_cache;
while ((cur = wcsstr(cur, sectionString)))
{
cur = wcsstr(cur, L"]") + 1;
if (cur == NULL)
continue;
nb++;
}
// Allocation
sLocalizedTypeStrings = new LocalizedTypeString[nb];
// Search next section.
cur = m_cache;
LPCWSTR nextHeader = wcsstr(cur, sectionString);
// Treat next section
int i = 0;
while (nextHeader)
{
cur = nextHeader + wcslen(sectionString);
end = wcsstr(cur, L"]");
if (end == NULL)
break;
nextHeader = wcsstr(end, sectionString);
if (cur == end) { cur++; continue; }
// Fill code
sLocalizedTypeStrings[i].code = (*cur & 0xFF); cur++;
if (cur != end) { sLocalizedTypeStrings[i].code |= (*cur & 0xFF) << 8; cur++; } else sLocalizedTypeStrings[i].code |= ' ' << 8;
if (cur != end) { sLocalizedTypeStrings[i].code |= (*cur & 0xFF) << 16; cur++; } else sLocalizedTypeStrings[i].code |= ' ' << 16;
if (cur != end) { sLocalizedTypeStrings[i].code |= (*cur & 0xFF) << 24; cur++; } else sLocalizedTypeStrings[i].code |= ' ' << 24;
sLocalizedTypeStrings[i].itemStr = NULL;
// Search item key
cur = wcsstr(end + 1, itemKeyString);
if (!(cur == NULL || (nextHeader && cur > nextHeader) || cur[itemKeyLen] == '\r' || cur[itemKeyLen] == '\n' || cur[itemKeyLen] == NULL))// Found
{
cur += itemKeyLen;
end = cur;
while (end[0] != '\r' && end[0] != '\n' && end[0] != NULL)
end++;
sLocalizedTypeStrings[i].itemStr = new char[end - cur + 1];
for (int j = 0; j < end - cur; j++)
sLocalizedTypeStrings[i].itemStr[j] = (char)cur[j];
sLocalizedTypeStrings[i].itemStr[end - cur] = NULL;
i++;
continue;
}
// Search lng key
cur = wcsstr(end + 1, keyString);
if (cur == NULL || (nextHeader && cur > nextHeader) || cur[keyLen] == '\r' || cur[keyLen] == '\n' || cur[keyLen] == NULL)// Not found
{
// Search def key
cur = wcsstr(end + 1, defKeyString);
if (cur == NULL || (nextHeader && cur > nextHeader) || cur[defKeyLen] == '\r' || cur[defKeyLen] == '\n' || cur[defKeyLen] == NULL)// Not found
{
sLocalizedTypeStrings[i].typeLocalizedString = new WCHAR[1];
sLocalizedTypeStrings[i].typeLocalizedString[0] = NULL;
i++;
continue;
}
cur += defKeyLen;
}
else
cur += keyLen;
// Search end value.
end = cur;
while (end[0] && end[0] != '\r' && end[0] != '\n')
end++;
// Strip ""
if (cur[0] == '"' && (end - 1)[0] == '"') { cur++; end--; }
// Strip Gender
if (cur[0] == '[')
{
LPCWSTR tmp = cur;
while (tmp[0] && tmp[0] != ']' && tmp[0] != '\r' && tmp[0] != '\n')
tmp++;
if (tmp[0] == ']')
{
cur = tmp + 1;
end = cur;
while (end[0] && end[0] != '[' && end[0] != '\r' && end[0] != '\n' && end[0] != '"')
end++;
}
}
// Fill value
sLocalizedTypeStrings[i].typeLocalizedString = new WCHAR[end - cur + 1];
_snwprintf(sLocalizedTypeStrings[i].typeLocalizedString, end - cur, cur);
sLocalizedTypeStrings[i].typeLocalizedString[end - cur] = NULL;
i++;
}
return nb;
}
void loadLocalizedStrings(int language)
{
INIFileW *iniFile = new INIFileW;
log_msg("***** Load localized Strings *****\n");
if (!iniFile->InitReadWrite("PlugY\\LocalizedStrings.ini", INIFILE_MPQREAD, 0))//C:\\Jeux\\Blizzard\\D2\\-
{
log_msg("Failed to load LocalizedStrings, default values used.\n\n");
}
LPCWSTR key;
switch (language)
{
case LNG_ENG: key = L"ENG"; break;
case LNG_ESP: key = L"ESP"; break;
case LNG_DEU: key = L"DEU"; break;
case LNG_FRA: key = L"FRA"; break;
case LNG_POR: key = L"POR"; break;
case LNG_ITA: key = L"ITA"; break;
case LNG_JPN: key = L"JPN"; break;
case LNG_KOR: key = L"KOR"; break;
case LNG_SIN: key = L"SIN"; break;
case LNG_CHI: key = L"CHI"; break;
case LNG_POL: key = L"POL"; break;
case LNG_RUS: key = L"RUS"; break;
case LNG_DEF: key = L"ENG"; break;
default: key = L"ENG";
}
// Load localized type string
nbLocalizedTypeString = GetPrivateProfileStringList(iniFile->m_cache, L"TYPE_", key);
// PlugY localized string
LOAD(STR_STATS_UNASSIGN_WITH_LIMIT);
LOAD(STR_STATS_UNASSIGN_WITHOUT_LIMIT);
LOAD(STR_STATS_BASE_MIN);
LOAD(STR_SKILLS_UNASSIGN);
LOAD(STR_STASH_PREVIOUS_PAGE);
LOAD(STR_STASH_NEXT_PAGE);
LOAD(STR_TOGGLE_TO_PERSONAL);
LOAD(STR_TOGGLE_TO_SHARED);
LOAD(STR_STASH_PREVIOUS_INDEX);
LOAD(STR_STASH_NEXT_INDEX);
LOAD(STR_PUT_GOLD);
LOAD(STR_TAKE_GOLD);
LOAD(STR_PERSONAL_PAGE_NUMBER);
LOAD(STR_SHARED_PAGE_NUMBER);
LOAD(STR_NO_SELECTED_PAGE);
LOAD(STR_SHARED_GOLD_QUANTITY);
LOAD(STR_PREVIOUS_PAGE);
LOAD(STR_NEXT_PAGE);
LOAD(STR_ITEM_LEVEL);
// Cube receipt :
LOAD(STR_COW_PORTAL);
LOAD(STR_PANDEMONIUM_PORTAL);
LOAD(STR_PANDEMONIUM_FINAL_PORTAL);
LOAD(STR_FULL);
LOAD(STR_REPAIR);
LOAD(STR_AND);
LOAD(STR_RECHARGE);
LOAD(STR_DESTROY_FILLERS);
LOAD(STR_REMOVE_FILLERS);
LOAD(STR_REGENERATE);
LOAD(STR_UPGRADE_TO_EXCEPTIONAL);
LOAD(STR_UPGRADE_TO_ELITE);
LOAD(STR_ETHERAL);
LOAD(STR_NOT_ETHERAL);
LOAD(STR_NOT_RUNEWORD);
LOAD(STR_BASIC);
LOAD(STR_EXCEPTIONAL);
LOAD(STR_ELITE);
LOAD(STR_CRACKED);
LOAD(STR_NORMAL);
LOAD(STR_SUPERIOR);
LOAD(STR_MAGIC);
LOAD(STR_SET);
LOAD(STR_RARE);
LOAD(STR_UNIQUE);
LOAD(STR_CRAFTED);
LOAD(STR_TEMPERED);
LOAD(STR_ITEM);
LOAD(STR_ITEM_SAME_TYPE);
LOAD(STR_INCLUDE_UPGRADED);
LOAD(STR_WITHOUT_SOCKET);
LOAD(STR_WITH_SOCKETS);
LOAD(STR_WITH_N_SOCKETS);
LOAD(STR_ONLY_N_H);
LOAD(STR_ONLY_HELL);
LOAD(STR_ONLY_CLASS);
iniFile->close();
delete iniFile;
}
/*================================= END OF FILE =================================*/

View File

@@ -1,79 +0,0 @@
/*==============================================
File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
this file implements some common and useful
function related to some Diablo II mechanisms.
/*============================================*/
#pragma once
#include <windows.h>
void loadLocalizedStrings(int language);
LPWSTR getLocalString(int stringId);
LPCWSTR getLocalTypeString(DWORD code);
LPWSTR StripGender(LPWSTR text);
LPCWSTR StripGender(LPCWSTR text);
enum eStringList
{
STR_STATS_UNASSIGN_WITH_LIMIT = 0,
STR_STATS_UNASSIGN_WITHOUT_LIMIT,
STR_STATS_BASE_MIN,
STR_SKILLS_UNASSIGN,
STR_STASH_PREVIOUS_PAGE,
STR_STASH_NEXT_PAGE,
STR_TOGGLE_TO_PERSONAL,
STR_TOGGLE_TO_SHARED,
STR_STASH_PREVIOUS_INDEX,
STR_STASH_NEXT_INDEX,
STR_PUT_GOLD,
STR_TAKE_GOLD,
STR_PERSONAL_PAGE_NUMBER,
STR_SHARED_PAGE_NUMBER,
STR_NO_SELECTED_PAGE,
STR_SHARED_GOLD_QUANTITY,
STR_PREVIOUS_PAGE,
STR_NEXT_PAGE,
STR_ITEM_LEVEL,
//
STR_COW_PORTAL,
STR_PANDEMONIUM_PORTAL,
STR_PANDEMONIUM_FINAL_PORTAL,
STR_FULL,
STR_REPAIR,
STR_AND,
STR_RECHARGE,
STR_DESTROY_FILLERS,
STR_REMOVE_FILLERS,
STR_REGENERATE,
STR_UPGRADE_TO_EXCEPTIONAL,
STR_UPGRADE_TO_ELITE,
STR_ETHERAL,
STR_NOT_ETHERAL,
STR_NOT_RUNEWORD,
STR_BASIC,
STR_EXCEPTIONAL,
STR_ELITE,
STR_CRACKED,
STR_NORMAL,
STR_SUPERIOR,
STR_MAGIC,
STR_SET,
STR_RARE,
STR_UNIQUE,
STR_CRAFTED,
STR_TEMPERED,
STR_ITEM,
STR_ITEM_SAME_TYPE,
STR_INCLUDE_UPGRADED,
STR_WITHOUT_SOCKET,
STR_WITH_SOCKETS,
STR_WITH_N_SOCKETS,
STR_ONLY_N_H,
STR_ONLY_HELL,
STR_ONLY_CLASS,
};
/*================================= END OF FILE =================================*/

View File

@@ -1,14 +1,14 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
Print PlugY version on screen. Add "plugY v1.00" on screen.
=================================================================*/ =================================================================*/
#include "extraOptions.h"
#include "windowed.h"
#include "common.h" #include "common.h"
#include "error.h"
#include "d2functions.h"
#include "extraOptions.h"
#include <stdio.h> #include <stdio.h>
char* versionText = ""; char* versionText = "";
@@ -52,7 +52,7 @@ void Install_PrintPlugYVersion()
log_msg("Patch D2Launch to print PlugY version. (PrintPlugYVersion)\n"); log_msg("Patch D2Launch to print PlugY version. (PrintPlugYVersion)\n");
// Print PlugY version. // Print PlugY version.
mem_seek R7(D2Launch, 7F5D, 7F7D, 9639, 117C7, 178A7, 16AF7, 18061, 10A11); mem_seek R7(D2Launch, 7F5D, 7F7D, 9639, 117C7, 178A7, 16AF7, 18061);
MEMJ_REF4( D2CreateTextBox, caller_printPlugYVersion); MEMJ_REF4( D2CreateTextBox, caller_printPlugYVersion);
//6FA19638 |. E8 1BED0000 CALL <JMP.&D2Win.#10017> //6FA19638 |. E8 1BED0000 CALL <JMP.&D2Win.#10017>
//6FA517C6 |. E8 6F81FFFF CALL <JMP.&D2Win.#10147> //6FA517C6 |. E8 6F81FFFF CALL <JMP.&D2Win.#10147>
@@ -60,7 +60,6 @@ void Install_PrintPlugYVersion()
//6FA56B1F |. E8 1A2EFFFF CALL <JMP.&D2Win.#10098> //6FA56B1F |. E8 1A2EFFFF CALL <JMP.&D2Win.#10098>
//6FA56AF6 |. E8 432EFFFF CALL <JMP.&D2Win.#10098> //6FA56AF6 |. E8 432EFFFF CALL <JMP.&D2Win.#10098>
//6FA58060 |. E8 ED18FFFF CALL <JMP.&D2Win.#10098> //6FA58060 |. E8 ED18FFFF CALL <JMP.&D2Win.#10098>
//6FA50A10 |. E8 218FFFFF CALL <JMP.&D2Win.#10164>
log_msg("\n"); log_msg("\n");
@@ -98,7 +97,7 @@ void Install_VersionChange()// BUG WITH 2MOD if D2Mod started before PlugY ????
// Print LoD/Mod version. // Print LoD/Mod version.
if (version_D2Launch >= V110) if (version_D2Launch >= V110)
{ {
mem_seek R7(D2Launch, 00000, 00000, 9723, 1189B, 1797B, 16BCB, 18134, 10AE4);//6FA19721-6FA10000 mem_seek R7(D2Launch, 00000, 00000, 9723, 1189B, 1797B, 16BCB, 18134);//6FA19721-6FA10000
memt_byte( 0x8D, 0xE8 ); // CALL memt_byte( 0x8D, 0xE8 ); // CALL
MEMT_REF4( 0x8B102454 , caller_VersionChange_10); MEMT_REF4( 0x8B102454 , caller_VersionChange_10);
memt_byte( 0xCF, 0x90 ); // NOP memt_byte( 0xCF, 0x90 ); // NOP
@@ -112,17 +111,14 @@ void Install_VersionChange()// BUG WITH 2MOD if D2Mod started before PlugY ????
//6FA56BCF |. 8BCF MOV ECX,EDI //6FA56BCF |. 8BCF MOV ECX,EDI
//6FA58134 |. 8D5424 10 LEA EDX,DWORD PTR SS:[ESP+10] //6FA58134 |. 8D5424 10 LEA EDX,DWORD PTR SS:[ESP+10]
//6FA58138 |. 8BCF MOV ECX,EDI //6FA58138 |. 8BCF MOV ECX,EDI
//6FA50AE4 |. 8D5424 10 LEA EDX,DWORD PTR SS:[ESP+10]
//6FA50AE8 |. 8BCF MOV ECX,EDI
} else { } else {
mem_seek R7(D2Launch, 801B, 803B, 972A, 118A2, 17982, 16BD2, 1813B, 10AEB); mem_seek R7(D2Launch, 801B, 803B, 972A, 118A2, 17982, 16BD2, 1813B);
MEMJ_REF4( D2PrintLineOnTextBox, versionChange); MEMJ_REF4( D2PrintLineOnTextBox, versionChange);
//6FA19729 |. E8 88EB0000 CALL <JMP.&D2Win.#10046> //6FA19729 |. E8 88EB0000 CALL <JMP.&D2Win.#10046>
//6FA518A1 |. E8 267FFFFF CALL <JMP.&D2Win.#10061> //6FA518A1 |. E8 267FFFFF CALL <JMP.&D2Win.#10061>
//6FA57981 |. E8 781EFFFF CALL <JMP.&D2Win.#10075> //6FA57981 |. E8 781EFFFF CALL <JMP.&D2Win.#10075>
//6FA56BD1 |. E8 EA2CFFFF CALL <JMP.&D2Win.#10015> //6FA56BD1 |. E8 EA2CFFFF CALL <JMP.&D2Win.#10015>
//6FA5813A |. E8 8F17FFFF CALL <JMP.&D2Win.#10022> //6FA5813A |. E8 8F17FFFF CALL <JMP.&D2Win.#10022>
//6FA50AEA |. E8 DF8CFFFF CALL <JMP.&D2Win.#10051>
} }
log_msg("\n"); log_msg("\n");

View File

@@ -5,9 +5,10 @@
=================================================================*/ =================================================================*/
#include "common.h"
#include "error.h" #include "error.h"
#include "parameters.h"
#include "modifMemory.h" #include "modifMemory.h"
#include "d2functions.h"
const char* MSG_ERROR_READ_MEMORY = "Error : Read access missing to patch memory at %08X.\nPlease install a clean version of Lord of Destruction\n\n" const char* MSG_ERROR_READ_MEMORY = "Error : Read access missing to patch memory at %08X.\nPlease install a clean version of Lord of Destruction\n\n"
"You can avoid this error message by setting ActiveCkeckMemory=0 in PlugY.ini\n(WARNING: Be careful when you use it, it shouldn't be used by common user)"; "You can avoid this error message by setting ActiveCkeckMemory=0 in PlugY.ini\n(WARNING: Be careful when you use it, it shouldn't be used by common user)";

View File

@@ -5,266 +5,242 @@
=================================================================*/ =================================================================*/
#include "updateClient.h"
#include "common.h" #include "common.h"
#include "error.h"
#include "d2functions.h"
#include "updateClient.h"
#include <stdio.h> #include <stdio.h>
#include <direct.h> // _getcwd() #include <direct.h> // _getcwd()
const char* CUBEFORMULA_FILE = "cube.txt"; const char* CUBEFORMULA_FILE = "cube.txt";
const LPCWSTR STRING_ERROR = L"***Error***"; const char * STRING_ERROR="***Error***";
bool InNoSocket;
#define BUF (&buf[strlen(buf)])
#define BUF (&buf[*len])
#define PRINT *len += swprintf
/* /*
6FC9275F |. E8 ECCCFFFF |CALL D2Game.6FC8F450 ; \D2Game.6FC8F450 6FC9275F |. E8 ECCCFFFF |CALL D2Game.6FC8F450 ; \D2Game.6FC8F450
*/ */
void printOutputItem(CubeOutput* output, LPWSTR buf, LPINT len, LPINT nbOutputs) void printOutput(CubeOutput* output, char* buf, BYTE* nbOutputs)
{ {
if (output->outputType == 0) if (!output->outputType)
return; return;
if (*nbOutputs > 0) if (*nbOutputs)
PRINT(BUF, L" + "); sprintf(BUF," + ");
*nbOutputs += 1; *nbOutputs += 1;
if (output->outputType == 1) { if (output->outputType == 1) {
PRINT(BUF, getLocalString(STR_COW_PORTAL)); sprintf(BUF,"Cow Portal");
return; return;
} else if (output->outputType == 2) { } else if (output->outputType == 2) {
PRINT(BUF, getLocalString(STR_PANDEMONIUM_PORTAL)); sprintf(BUF,"Pandemonium Portal");
return; return;
} else if (output->outputType == 3) { } else if (output->outputType == 3) {
PRINT(BUF, getLocalString(STR_PANDEMONIUM_FINAL_PORTAL)); sprintf(BUF,"Pandemonium Final Portal");
return; return;
} }
if ((output->quantityOrNbSockets>1) && !output->haveSockets) if ((output->quantityOrNbSockets>1) && !output->haveSockets)
{ sprintf(BUF,"%u ", output->quantityOrNbSockets);
if (output->quantityOrNbSockets = 255)
PRINT(BUF, L"%s ", getLocalString(STR_FULL));
else
PRINT(BUF, L"%u ", output->quantityOrNbSockets);
}
if (output->repair) if (output->repair)
PRINT(BUF, L"%s ", getLocalString(STR_REPAIR)); sprintf(BUF,"repair ");
if (output->repair && output->recharge)
PRINT(BUF, L"%s ", getLocalString(STR_AND));
if (output->recharge) if (output->recharge)
PRINT(BUF, L"%s ", getLocalString(STR_RECHARGE)); sprintf(BUF,"recharge ");
if (output->destroysFillers)
PRINT(BUF, L"%s ", getLocalString(STR_DESTROY_FILLERS));
if (output->removeFillers)
PRINT(BUF, L"%s ", getLocalString(STR_REMOVE_FILLERS));
if (output->regeneratesUnique)
PRINT(BUF, L"%s ", getLocalString(STR_REGENERATE));
if (output->upgradeToExceptional)
PRINT(BUF, L"%s ", getLocalString(STR_UPGRADE_TO_EXCEPTIONAL));
if (output->upgradeToElite)
PRINT(BUF, L"%s ", getLocalString(STR_UPGRADE_TO_ELITE));
if (output->isEthereal) if (output->isEthereal)
PRINT(BUF, L"%s ", getLocalString(STR_ETHERAL)); sprintf(BUF,"ethereal ");
if (output->destroysFillers)
sprintf(BUF,"destroys Fillers ");
if (output->removeFillers)
sprintf(BUF,"remove Fillers ");
if (output->regeneratesUnique)
sprintf(BUF,"regenerate ");
if (output->upgradeToExceptional)
sprintf(BUF,"exceptional ");
if (output->upgradeToElite)
sprintf(BUF,"elite ");
if (output->isSpecificItem) { if (output->isSpecificItem) {
if (output->quality == ITEMQUALITY_UNIQUE) if (output->quality == ITEMQUALITY_UNIQUE)
{ {
UniqueItemsBIN* uniqueItems = SgptDataTables->uniqueItems + output->specificID-1; UniqueItemsBIN* uniqueItems = SgptDataTables->uniqueItems + output->specificID-1;
PRINT(BUF, D2GetStringFromIndex(uniqueItems->uniqueNameId)); LPWSTR string = D2GetStringFromIndex(uniqueItems->uniqueNameId);
wcstombs(BUF, string, wcslen(string)+1);
} else if (output->quality == ITEMQUALITY_SET) { } else if (output->quality == ITEMQUALITY_SET) {
SetItemsBIN* setItems = SgptDataTables->setItems + output->specificID-1; SetItemsBIN* setItems = SgptDataTables->setItems + output->specificID-1;
PRINT(BUF, D2GetStringFromIndex(setItems->setNameId)); LPWSTR string = D2GetStringFromIndex(setItems->setNameId);
wcstombs(BUF, string, wcslen(string)+1);
} else { } else {
PRINT(BUF,STRING_ERROR);return; sprintf(BUF,STRING_ERROR);return;
} }
} else { } else {
switch (output->quality) switch (output->quality)
{ {
case 1:PRINT(BUF, L"%s ", getLocalString(STR_CRACKED));break; case 1:sprintf(BUF,"Cracked ");break;
case 2:PRINT(BUF, L"%s ", getLocalString(STR_NORMAL));break; case 2:sprintf(BUF,"Normal ");break;
case 3:PRINT(BUF, L"%s ", getLocalString(STR_SUPERIOR));break; case 3:sprintf(BUF,"Superior ");break;
case 4:PRINT(BUF, L"%s ", getLocalString(STR_MAGIC));break; case 4:sprintf(BUF,"Magic ");break;
case 5:PRINT(BUF, L"%s ", getLocalString(STR_SET));break; case 5:sprintf(BUF,"Set ");break;
case 6:PRINT(BUF, L"%s ", getLocalString(STR_RARE));break; case 6:sprintf(BUF,"Rare ");break;
case 7:PRINT(BUF, L"%s ", getLocalString(STR_UNIQUE));break; case 7:sprintf(BUF,"Unique ");break;
case 8:PRINT(BUF, L"%s ", getLocalString(STR_CRAFTED));break; case 8:sprintf(BUF,"Crafted ");break;
case 9:PRINT(BUF, L"%s ", getLocalString(STR_TEMPERED));break; case 9:sprintf(BUF,"Tempered ");break;
} }
ItemsBIN* items;LPWSTR string;
switch (output->outputType) switch (output->outputType)
{ {
case 0xFC: case 0xFC:
{ items = D2GetItemsBIN(output->ID);
ItemsBIN* items = D2GetItemsBIN(output->ID); string = D2GetStringFromIndex(items->NameStr);
PRINT(BUF, StripGender(D2GetStringFromIndex(items->NameStr))); wcstombs(BUF, string, wcslen(string)+1);
break; break;
}
case 0xFD: case 0xFD:
{ getTypeAString(output->ID,BUF,50);
ItemTypesBIN* itemTypeData = D2GetItemTypesBIN(output->ID); // WCHAR string[50];
if (!itemTypeData) // getTypeString(input->ID,string,50);
PRINT(BUF, L"Unknow Item Type"); // wcstombs(BUF, string, wcslen(string)+1);
else
PRINT(BUF, getLocalTypeString(itemTypeData->code));
break; break;
} case 0xFE: sprintf(BUF,"Item");break;
case 0xFE: PRINT(BUF, L"%s", getLocalString(STR_ITEM)); break; case 0xFF: sprintf(BUF,"Item of the same type");break;
case 0xFF: PRINT(BUF, L"%s", getLocalString(STR_ITEM_SAME_TYPE)); break; default: sprintf(BUF,STRING_ERROR);return;
default: PRINT(BUF, L"%s ", STRING_ERROR); return;
} }
} }
if (output->haveSockets == 1 || InNoSocket) if ((output->quantityOrNbSockets>1) && (output->haveSockets==1))
{ sprintf(BUF," with %u sockets", output->quantityOrNbSockets);
PRINT(BUF, L" ");
if (output->quantityOrNbSockets >= 1)
PRINT(BUF, getLocalString(STR_WITH_N_SOCKETS), output->quantityOrNbSockets);
// else if (output->quantityOrNbSockets == 1)
// PRINT(BUF, getLocalString(STR_WITH_ONE_SOCKET));
else
PRINT(BUF, getLocalString(STR_WITH_SOCKETS));
}
} }
void printInputItem(CubeInput* input, LPWSTR buf, LPINT len, LPINT nbInputs)//maxsize) void printInput(CubeInput* input, char* buf, BYTE* nbInputs)//maxsize)
{ {
if (!input->byItemID && !input->byItemTypeID) if (!input->byItemID && !input->byItemTypeID)
return; return;
if (*nbInputs) if (*nbInputs)
PRINT(BUF, L" + "); sprintf(BUF," + ");
BYTE nb = input->quantity > 0 ? input->quantity : 1; BYTE nb = input->quantity > 0 ? input->quantity : 1;
*nbInputs += nb; *nbInputs += nb;
if (nb>1) if (nb>1)
PRINT(BUF, L"%u ", nb); sprintf(BUF,"%u ", nb);
if (input->isEthereal) if (input->isEthereal)
PRINT(BUF, L"%s ", getLocalString(STR_ETHERAL)); sprintf(BUF,"ethereal ");
if (input->isNotEthereal) if (input->isNotEthereal)
PRINT(BUF, L"%s ", getLocalString(STR_NOT_ETHERAL)); sprintf(BUF,"not ethereal ");
if (input->isNotRuneword) if (input->isNotRuneword)
PRINT(BUF, L"%s ", getLocalString(STR_NOT_RUNEWORD)); sprintf(BUF,"not runeword ");
if (input->isBasic) if (input->isBasic)
PRINT(BUF, L"%s ", getLocalString(STR_BASIC)); sprintf(BUF,"basic ");
if (input->isExceptional) if (input->isExceptional)
PRINT(BUF, L"%s ", getLocalString(STR_EXCEPTIONAL)); sprintf(BUF,"exceptional ");
if (input->isElite) if (input->isElite)
PRINT(BUF, L"%s ", getLocalString(STR_ELITE)); sprintf(BUF,"elite ");
if (input->isSpecificItem) { if (input->isSpecificItem) {
if (input->quality == ITEMQUALITY_UNIQUE) if (input->quality == ITEMQUALITY_UNIQUE)
{ {
UniqueItemsBIN* uniqueItems = SgptDataTables->uniqueItems + input->specificID-1; UniqueItemsBIN* uniqueItems = SgptDataTables->uniqueItems + input->specificID-1;
PRINT(BUF, StripGender(D2GetStringFromIndex(uniqueItems->uniqueNameId))); LPWSTR string = D2GetStringFromIndex(uniqueItems->uniqueNameId);
} wcstombs(BUF, string, wcslen(string)+1);
else if (input->quality == ITEMQUALITY_SET) { } else if (input->quality == ITEMQUALITY_SET) {
SetItemsBIN* setItems = SgptDataTables->setItems + input->specificID-1; SetItemsBIN* setItems = SgptDataTables->setItems + input->specificID-1;
PRINT(BUF, StripGender(D2GetStringFromIndex(setItems->setNameId))); LPWSTR string = D2GetStringFromIndex(setItems->setNameId);
wcstombs(BUF, string, wcslen(string)+1);
} else {
sprintf(BUF,STRING_ERROR);return;
} }
else { } else {
PRINT(BUF, L"%s ", STRING_ERROR); return;
}
}
else {
switch (input->quality) switch (input->quality)
{ {
case 1:PRINT(BUF, L"%s ", getLocalString(STR_CRACKED)); break; case 1:sprintf(BUF,"Cracked ");break;
case 2:PRINT(BUF, L"%s ", getLocalString(STR_NORMAL)); break; case 2:sprintf(BUF,"Normal ");break;
case 3:PRINT(BUF, L"%s ", getLocalString(STR_SUPERIOR)); break; case 3:sprintf(BUF,"Superior ");break;
case 4:PRINT(BUF, L"%s ", getLocalString(STR_MAGIC)); break; case 4:sprintf(BUF,"Magic ");break;
case 5:PRINT(BUF, L"%s ", getLocalString(STR_SET)); break; case 5:sprintf(BUF,"Set ");break;
case 6:PRINT(BUF, L"%s ", getLocalString(STR_RARE)); break; case 6:sprintf(BUF,"Rare ");break;
case 7:PRINT(BUF, L"%s ", getLocalString(STR_UNIQUE)); break; case 7:sprintf(BUF,"Unique ");break;
case 8:PRINT(BUF, L"%s ", getLocalString(STR_CRAFTED)); break; case 8:sprintf(BUF,"Crafted ");break;
case 9:PRINT(BUF, L"%s ", getLocalString(STR_TEMPERED)); break; case 9:sprintf(BUF,"Tempered ");break;
} }
if (input->byItemTypeID) { if (input->byItemTypeID) {
ItemTypesBIN* itemTypeData = D2GetItemTypesBIN(input->ID); getTypeAString(input->ID,BUF,50);
if (!itemTypeData) } else if (input->ID == 0xFFFF) {
PRINT(BUF, L"Unknow Item Type"); sprintf(BUF,"Item");
else } else {
PRINT(BUF, getLocalTypeString(itemTypeData->code));
}
else if (input->ID == 0xFFFF) {
PRINT(BUF, getLocalString(STR_ITEM));
}
else {
ItemsBIN* items = D2GetItemsBIN(input->ID); ItemsBIN* items = D2GetItemsBIN(input->ID);
PRINT(BUF, StripGender(D2GetStringFromIndex(items->NameStr))); LPWSTR string = D2GetStringFromIndex(items->NameStr);
wcstombs(BUF, string, wcslen(string)+1);
} }
} }
if (input->includeUpgradedVersions && !input->isElite) if (input->includeUpgradedVersions && !input->isElite)
PRINT(BUF, L" %s", getLocalString(STR_INCLUDE_UPGRADED)); sprintf(BUF,"(or upgraded) ");
if (input->haveNoSocket) if (input->haveNoSocket)
{ sprintf(BUF," with no socket");
PRINT(BUF, L" %s", getLocalString(STR_WITHOUT_SOCKET));
InNoSocket = true;
}
if (input->haveSockets) if (input->haveSockets)
PRINT(BUF, L" %s", getLocalString(STR_WITH_SOCKETS)); sprintf(BUF," with sockets");
} }
DWORD print(CubeMainBIN* curForm, LPWSTR buf, LPINT len, DWORD)//maxsize) DWORD print(CubeMainBIN* curForm, char* buf, DWORD)//maxsize)
{ {
if (!buf || !curForm || !curForm->enabled) return 0; if (!buf || !curForm || !curForm->enabled) return 0;
InNoSocket = false; BYTE realNbInputs=0;
int realNbInputs=0; printInput(&curForm->input1, buf, &realNbInputs);
printInput(&curForm->input2, buf, &realNbInputs);
printInput(&curForm->input3, buf, &realNbInputs);
printInput(&curForm->input4, buf, &realNbInputs);
printInput(&curForm->input5, buf, &realNbInputs);
printInput(&curForm->input6, buf, &realNbInputs);
printInput(&curForm->input7, buf, &realNbInputs);
printInputItem(&curForm->input1, buf, len, &realNbInputs);
printInputItem(&curForm->input2, buf, len, &realNbInputs);
printInputItem(&curForm->input3, buf, len, &realNbInputs);
printInputItem(&curForm->input4, buf, len, &realNbInputs);
printInputItem(&curForm->input5, buf, len, &realNbInputs);
printInputItem(&curForm->input6, buf, len, &realNbInputs);
printInputItem(&curForm->input7, buf, len, &realNbInputs);
if (realNbInputs != curForm->numinputs) if (realNbInputs != curForm->numinputs)
{ {
PRINT(BUF, L" *** ERROR : numInputs(%d) != realNbInputs(%d) ***", curForm->numinputs, realNbInputs); sprintf(BUF," *** ERROR : numInputs(%d) != realNbInputs(%d) ***", curForm->numinputs, realNbInputs);
return 1; return 1;
} }
PRINT(BUF,L" => "); sprintf(BUF," => ");
int realNbOutputs=0; BYTE realNbOutputs=0;
printOutput(&curForm->output1, buf, &realNbOutputs);
printOutputItem(&curForm->output1, buf, len, &realNbOutputs); printOutput(&curForm->output2, buf, &realNbOutputs);
printOutputItem(&curForm->output2, buf, len, &realNbOutputs); printOutput(&curForm->output3, buf, &realNbOutputs);
printOutputItem(&curForm->output3, buf, len, &realNbOutputs);
// if (curForm->ladder) // if (curForm->ladder)
// sprintf(BUF," [ladder only]"); // sprintf(BUF," [ladder only]");
if (curForm->minDiff == 1) if (curForm->minDiff == 1)
PRINT(BUF, L" %s", getLocalString(STR_ONLY_N_H)); sprintf(BUF," [Nightmare and Hell only]");
else if (curForm->minDiff == 2) else if (curForm->minDiff == 2)
PRINT(BUF, L" %s", getLocalString(STR_ONLY_HELL)); sprintf(BUF," [Hell only]");
if (curForm->playerClass != 0xFF) if (curForm->playerClass != 0xFF)
{ {
CharStatsBIN* charStats = D2GetCharStatsBIN(curForm->playerClass); CharStatsBIN* charStats = D2GetCharStatsBIN(curForm->playerClass);
PRINT(BUF, L" ("); sprintf(BUF, " [%s only]", charStats->name);
PRINT(BUF, getLocalString(STR_ONLY_CLASS), charStats->name);
PRINT(BUF, L")");
} }
if ((curForm->op>0) && (curForm->op!=28)) if ((curForm->op>0) && (curForm->op!=28))
PRINT(BUF, L" [op%d(%d,%d)]", curForm->op, curForm->param, curForm->value); sprintf(BUF, " [op%d(%d,%d)]", curForm->op, curForm->param, curForm->value);
// if (curForm->version == 100) // if (curForm->version == 100)
// sprintf(BUF, " [expansion only]"); // sprintf(BUF, " [expansion only]");
@@ -277,50 +253,54 @@ DWORD print(CubeMainBIN* curForm, LPWSTR buf, LPINT len, DWORD)//maxsize)
void listAllCubeFormula() void listAllCubeFormula()
{ {
log_msg("\n\n********** Print all cube formula **********\n");
char filename[MAX_PATH]; char filename[MAX_PATH];
D2FogGetSavePath(filename, MAX_PATH); _getcwd( filename, MAX_PATH );
if( filename[strlen(filename)] != '\\')
strcat(filename, "\\");
strcat(filename, CUBEFORMULA_FILE); strcat(filename, CUBEFORMULA_FILE);
FILE* file = fopen(filename, "w"); FILE* file = fopen(filename, "w");
if (!file)
{
log_msg("Failed to open save file.\n");
return;
}
int nbLines = D2GetNbCubeMainBIN(); if (!file) return;
log_msg("\n\n********** Print all cube formula **********\n");//SgptDataTables->nbCubemain\n"
int nbLines = D2GetNbCubeMainBIN();//SgptDataTables->nbCubemain
log_msg("nbLines : %d\n",nbLines); log_msg("nbLines : %d\n",nbLines);
WCHAR buf[512]; char buf[300];
// Print BOM UTF-16
//buf[0] = 0xFEFF;
//buf[1] = NULL;
//write(buf, 2, 2, file);
// Print BOM UTF-8
//printf(file, "");
int len = 0;
int nbCubeReceipt = 0;
for (int i=0; i<nbLines; i++) for (int i=0; i<nbLines; i++)
{ {
DWORD res = 1; buf[0]=NULL;
len = 0; DWORD res = print(D2GetCubeMainBIN(i), buf, 300);//SgptDataTables->cubemain + i;
buf[len] = NULL; if (res) fprintf(file,"%4u: %s\n",i,buf);
res = print(D2GetCubeMainBIN(i), buf, &len, 512); if (res) fflush(file);
//wcstombs(bufa, buf, 1024);
if (res)
{
nbCubeReceipt++;
fwprintf(file, L"%3u: %s\n", i, buf);
}
} }
fclose(file); fclose(file);
log_msg("\n********** Printing over **********\n\n"); log_msg("\n********** Printing over **********\n\n");
/* _getcwd( filename, MAX_PATH );
if( filename[strlen(filename)] != '\\')
strcat(filename, "\\");
strcat(filename, "tmp.txt");
file = fopen(filename, "w");
ItemStatCostBIN* itemStatCost;
LPWSTR lpText;
for (i=0;i<=STATS_ITEM_CHARGED_SKILL_MOD;i++)
{
buf[0]='\0';
itemStatCost = D2GetItemStatCostBIN(i);
lpText = D2GetStringFromIndex(itemStatCost->descstrpos);
wcstombs(&buf[0],lpText,100);
strcat(buf,"\t - \t");
lpText = D2GetStringFromIndex(itemStatCost->descstrneg);
wcstombs(&buf[strlen(buf)],lpText,100);
fprintf(file,"%03d %03X \t- %s\n",i,i,buf);
}
fclose(file);*/
} }
/*================================= END OF FILE =================================*/ /*================================= END OF FILE =================================*/

View File

@@ -5,11 +5,13 @@
=================================================================*/ =================================================================*/
#include "common.h"
#include "error.h"
#include "d2functions.h"
#include "updateServer.h" // Install_UpdateServer() #include "updateServer.h" // Install_UpdateServer()
#include "plugYFiles.h" // Install_PlugYImagesFiles() #include "plugYFiles.h" // Install_PlugYImagesFiles()
#include "statsPoints.h" #include "statsPoints.h"
#include "newInterfaces.h" #include "newInterfaces.h"
#include "common.h"
#include <stdio.h> #include <stdio.h>
#define NB_RUNES_PER_PAGE 25 #define NB_RUNES_PER_PAGE 25
@@ -72,10 +74,9 @@ void printRuneword(RunesBIN* runesData, DWORD pos)
{ {
WORD type = runesData->Itypes[numItype]; WORD type = runesData->Itypes[numItype];
if (!type) break; if (!type) break;
ItemTypesBIN* itemTypeData = D2GetItemTypesBIN(type); getTypeUString(type,temp,50);
LPCWSTR typeName = getLocalTypeString(itemTypeData->code);
if (numItype) wcscat(typesList,L"/"); if (numItype) wcscat(typesList,L"/");
wcscat(typesList, typeName); wcscat(typesList,temp);
numItype++; numItype++;
} }
nbPixel = D2GetPixelLen(typesList); nbPixel = D2GetPixelLen(typesList);
@@ -199,7 +200,7 @@ void STDCALL printRunewordsPage()
} }
else if (isOnNextPageBtn(x,y)) // print popup "next page" else if (isOnNextPageBtn(x,y)) // print popup "next page"
{ {
lpText = getLocalString(STR_NEXT_PAGE); lpText = getTranslatedString(STR_NEXT_PAGE);
D2PrintPopup(lpText, getXNextPageBtn()+getLNextPageBtn()/2, getYNextPageBtn()-getHNextPageBtn(), WHITE, 1); D2PrintPopup(lpText, getXNextPageBtn()+getLNextPageBtn()/2, getYNextPageBtn()-getHNextPageBtn(), WHITE, 1);
} }
} }

View File

@@ -5,11 +5,13 @@
=================================================================*/ =================================================================*/
#include "common.h"
#include "error.h"
#include "d2functions.h"
#include "updateServer.h" // Install_UpdateServer() #include "updateServer.h" // Install_UpdateServer()
#include "plugYFiles.h" // Install_PlugYImagesFiles() #include "plugYFiles.h" // Install_PlugYImagesFiles()
#include "statsPoints.h" #include "statsPoints.h"
#include "newInterfaces.h" #include "newInterfaces.h"
#include "common.h"
#include <stdio.h> #include <stdio.h>
@@ -571,12 +573,12 @@ if (version_D2Client <= V110)
} }
else if (isOnPreviousPageBtn(x,y)) //print popup "previous page" else if (isOnPreviousPageBtn(x,y)) //print popup "previous page"
{ {
lpText = getLocalString(STR_PREVIOUS_PAGE); lpText = getTranslatedString(STR_PREVIOUS_PAGE);
D2PrintPopup(lpText, getXPreviousPageBtn()+getLPreviousPageBtn()/2, getYPreviousPageBtn()-getHPreviousPageBtn(), WHITE, 1); D2PrintPopup(lpText, getXPreviousPageBtn()+getLPreviousPageBtn()/2, getYPreviousPageBtn()-getHPreviousPageBtn(), WHITE, 1);
} }
else if (isOnNextPageBtn(x,y)) //print popup "next page" else if (isOnNextPageBtn(x,y)) //print popup "next page"
{ {
lpText = getLocalString(STR_NEXT_PAGE); lpText = getTranslatedString(STR_NEXT_PAGE);
D2PrintPopup(lpText, getXNextPageBtn()+getLNextPageBtn()/2, getYNextPageBtn()-getHNextPageBtn(), WHITE, 1); D2PrintPopup(lpText, getXNextPageBtn()+getLNextPageBtn()/2, getYNextPageBtn()-getHNextPageBtn(), WHITE, 1);
} }
else if (isOnRect(x, y, 0xAD, 0x137, 0x15, 0x13)) else if (isOnRect(x, y, 0xAD, 0x137, 0x15, 0x13))

View File

@@ -5,11 +5,13 @@
=================================================================*/ =================================================================*/
#include "common.h"
#include "error.h"
#include "d2functions.h"
#include "updateServer.h" #include "updateServer.h"
#include "plugYFiles.h" #include "plugYFiles.h"
#include "statsPoints.h" #include "statsPoints.h"
#include "newInterfaces.h" #include "newInterfaces.h"
#include "common.h"
#include <stdio.h> #include <stdio.h>
#define getXCloseBtn() RX(0x110) #define getXCloseBtn() RX(0x110)
@@ -225,12 +227,12 @@ void STDCALL printNewStatsPageTwo(int currentPage)
} }
else if (isOnPreviousPageBtn(mx,my)) //print popup "previous page" else if (isOnPreviousPageBtn(mx,my)) //print popup "previous page"
{ {
lpText = getLocalString(STR_PREVIOUS_PAGE); lpText = getTranslatedString(STR_PREVIOUS_PAGE);
D2PrintPopup(lpText, getXPreviousPageBtn()+getLPreviousPageBtn()/2, getYPreviousPageBtn()-getHPreviousPageBtn(), WHITE, 1); D2PrintPopup(lpText, getXPreviousPageBtn()+getLPreviousPageBtn()/2, getYPreviousPageBtn()-getHPreviousPageBtn(), WHITE, 1);
} }
else if (isOnNextPageBtn(mx,my)) //print popup "next page" else if (isOnNextPageBtn(mx,my)) //print popup "next page"
{ {
lpText = getLocalString(STR_NEXT_PAGE); lpText = getTranslatedString(STR_NEXT_PAGE);
D2PrintPopup(lpText, getXNextPageBtn()+getLNextPageBtn()/2, getYNextPageBtn()-getHNextPageBtn(), WHITE, 1); D2PrintPopup(lpText, getXNextPageBtn()+getLNextPageBtn()/2, getYNextPageBtn()-getHNextPageBtn(), WHITE, 1);
} }
} }

View File

@@ -1,20 +1,21 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
Interface functions Interface functions
=================================================================*/ =================================================================*/
#include "plugYFiles.h" // Install_PlugYImagesFiles() #include "common.h"
#include "error.h"
#include "d2functions.h"
#include "globalVariable.h" #include "globalVariable.h"
#include "updateServer.h" // Install_UpdateServer() #include "updateServer.h" // Install_UpdateServer()
#include "plugYFiles.h" // Install_PlugYImagesFiles()
#include "interface_Stats.h"// Install_InterfaceStats() #include "interface_Stats.h"// Install_InterfaceStats()
#include "newInterfaces.h" #include "newInterfaces.h"
#include "newInterface_Stats.h" #include "newInterface_Stats.h"
#include "newInterface_StatsPageTwo.h" #include "newInterface_StatsPageTwo.h"
#include "newInterface_Runewords.h" #include "newInterface_Runewords.h"
#include "common.h"
#include <stdio.h> #include <stdio.h>
bool active_newInterfaces=false; bool active_newInterfaces=false;
@@ -309,7 +310,7 @@ void Install_NewInterfaces()
if ( version_D2Client >= V111 ) if ( version_D2Client >= V111 )
{ {
//Reset selectedPage variable on opening stats page //Reset selectedPage variable on opening stats page
mem_seek R7(D2Client, 0000, 0000, 0000, 4B79E, 8F73E, 55E0E, 65F5E, C41FE); mem_seek R7(D2Client, 0000, 0000, 0000, 4B79E, 8F73E, 55E0E, 65F5E);
memt_byte( 0x83, 0xE8 ); // CALL caller_resetSelectedPage memt_byte( 0x83, 0xE8 ); // CALL caller_resetSelectedPage
MEMT_REF4( 0x1F7426F8, caller_resetSelectedPageByToolBar); MEMT_REF4( 0x1F7426F8, caller_resetSelectedPageByToolBar);
//6FAFB79E > 83F8 26 CMP EAX,26 //6FAFB79E > 83F8 26 CMP EAX,26
@@ -320,10 +321,8 @@ void Install_NewInterfaces()
//6FB05E11 . 74 1F JE SHORT D2Client.6FB05E32 //6FB05E11 . 74 1F JE SHORT D2Client.6FB05E32
//6FB15F5E > 83F8 26 CMP EAX,26 //6FB15F5E > 83F8 26 CMP EAX,26
//6FB15F61 . 74 1F JE SHORT D2Client.6FB15F82 //6FB15F61 . 74 1F JE SHORT D2Client.6FB15F82
//6FB741FE > 83F8 26 CMP EAX,26
//6FB74201 . 74 1F JE SHORT D2Client.6FB05E32
mem_seek R7(D2Client, 0000, 0000, 0000, 1E55A, 6A8FA, A31DA, 3C5EA, 3E39A); mem_seek R7(D2Client, 0000, 0000, 0000, 1E55A, 6A8FA, A31DA, 3C5EA);
memt_byte( 0x55, 0xE8 ); // CALL caller_resetSelectedPage memt_byte( 0x55, 0xE8 ); // CALL caller_resetSelectedPage
MEMT_REF4( 0xD53BED33, caller_resetSelectedPageByKey); MEMT_REF4( 0xD53BED33, caller_resetSelectedPageByKey);
//6FACE55A . 55 PUSH EBP //6FACE55A . 55 PUSH EBP
@@ -338,9 +337,7 @@ void Install_NewInterfaces()
//6FAEC5EA . 55 PUSH EBP //6FAEC5EA . 55 PUSH EBP
//6FAEC5EB . 33ED XOR EBP,EBP //6FAEC5EB . 33ED XOR EBP,EBP
//6FAEC5ED . 3BD5 CMP EDX,EBP //6FAEC5ED . 3BD5 CMP EDX,EBP
//6FAEE39A . 55 PUSH EBP
//6FAEE39B . 33ED XOR EBP,EBP
//6FAEE39D . 3BD5 CMP EDX,EBP
//For Toggle fct : (not used for open the stat page) //For Toggle fct : (not used for open the stat page)
// mem_seek R7(D2Client, 88B58, 87ED8, 83478, A1FBE, 6571E, 8EF8E, 0000);//((DWORD)D2TogglePage+0x218); // mem_seek R7(D2Client, 88B58, 87ED8, 83478, A1FBE, 6571E, 8EF8E, 0000);//((DWORD)D2TogglePage+0x218);
@@ -358,7 +355,7 @@ void Install_NewInterfaces()
//6FB3EF92 |. 3928 CMP DWORD PTR DS:[EAX],EBP //6FB3EF92 |. 3928 CMP DWORD PTR DS:[EAX],EBP
} else { } else {
//Reset selectedPage variable on opening stats page //Reset selectedPage variable on opening stats page
mem_seek R7(D2Client, 88B58, 87ED8, 83478, A1FBE, 6571E, 8EF8E, 0000, 0000);//((DWORD)D2TogglePage+0x218); mem_seek R7(D2Client, 88B58, 87ED8, 83478, A1FBE, 6571E, 8EF8E, 0000);//((DWORD)D2TogglePage+0x218);
memt_byte( 0x85, 0xE8 ); // CALL caller_resetSelectedPage memt_byte( 0x85, 0xE8 ); // CALL caller_resetSelectedPage
MEMT_REF4( 0xC2940FC0, caller_resetSelectedPage); MEMT_REF4( 0xC2940FC0, caller_resetSelectedPage);
//6FB23478 |. 85C0 TEST EAX,EAX //6FB23478 |. 85C0 TEST EAX,EAX
@@ -368,17 +365,16 @@ void Install_NewInterfaces()
} }
// Print custom page // Print custom page
mem_seek R7(D2Client, 87697, 86A17, 81FAB, A3759, 66B59, 902B9, C3B49, 1D549); mem_seek R7(D2Client, 87697, 86A17, 81FAB, A3759, 66B59, 902B9, C3B49);
MEMC_REF4( D2PrintStatsPage, printCustomPage); MEMC_REF4( D2PrintStatsPage, printCustomPage);
//6FB21FAA . E8 B1DDFAFF CALL D2Client.6FACFD60 //6FB21FAA . E8 B1DDFAFF CALL D2Client.6FACFD60
//6FB53758 . E8 43F1FDFF CALL D2Client.6FB328A0 //6FB53758 . E8 43F1FDFF CALL D2Client.6FB328A0
//6FB16B58 |. E8 C3270200 CALL D2Client.6FB39320 //6FB16B58 |. E8 C3270200 CALL D2Client.6FB39320
//6FB402B8 |. E8 C3AFFDFF CALL D2Client.6FB1B280 //6FB402B8 |. E8 C3AFFDFF CALL D2Client.6FB1B280
//6FB73B48 |. E8 5393FFFF CALL D2Client.6FB6CEA0 //6FB73B48 |. E8 5393FFFF CALL D2Client.6FB6CEA0
//6FACD548 |. E8 F3200A00 CALL D2Client.6FB1B280
// Don't print Border // Don't print Border
mem_seek R7(D2Client, 58EF6, 58EF6, 5F4C6, 2D366, B5A46, 82166, 271C6, 6D2B6); mem_seek R7(D2Client, 58EF6, 58EF6, 5F4C6, 2D366, B5A46, 82166, 271C6);
memt_byte( 0xB9, 0xE8 ); // CALL caller_DontPrintBorder memt_byte( 0xB9, 0xE8 ); // CALL caller_DontPrintBorder
MEMT_REF4( 0x00000012, version_D2Client >= V111 ? caller_DontPrintBorder_111 : caller_DontPrintBorder); MEMT_REF4( 0x00000012, version_D2Client >= V111 ? caller_DontPrintBorder_111 : caller_DontPrintBorder);
//6FAFF4C6 > B9 12000000 MOV ECX,12 //6FAFF4C6 > B9 12000000 MOV ECX,12
@@ -386,10 +382,9 @@ void Install_NewInterfaces()
//6FB65A46 |. B9 12000000 MOV ECX,12 //6FB65A46 |. B9 12000000 MOV ECX,12
//6FB32166 |. B9 12000000 MOV ECX,12 //6FB32166 |. B9 12000000 MOV ECX,12
//6FAD71C6 |. B9 12000000 MOV ECX,12 //6FAD71C6 |. B9 12000000 MOV ECX,12
//6FB1D2B6 |. B9 12000000 MOV ECX,12
// Manage mouse down (Play sound) // Manage mouse down (Play sound)
mem_seek R7(D2Client, 2A9DC, 2A9CC, 312A5, 82736, 891B6, 6B116, BCD36, BF4D6); mem_seek R7(D2Client, 2A9DC, 2A9CC, 312A5, 82736, 891B6, 6B116, BCD36);
memt_byte( 0x8D, 0xE8 ); // CALL memt_byte( 0x8D, 0xE8 ); // CALL
MEMT_REF4( 0x00008088, version_D2Client >= V111 ? caller_mouseCustomPageLeftDown_111 : version_D2Client == V110 ? caller_mouseCustomPageLeftDown : caller_mouseCustomPageLeftDown_9); MEMT_REF4( 0x00008088, version_D2Client >= V111 ? caller_mouseCustomPageLeftDown_111 : version_D2Client == V110 ? caller_mouseCustomPageLeftDown : caller_mouseCustomPageLeftDown_9);
memt_byte( 0x00, 0x90 ); // NOP memt_byte( 0x00, 0x90 ); // NOP
@@ -398,10 +393,9 @@ void Install_NewInterfaces()
//6FB391B6 . 8D88 80000000 LEA ECX,DWORD PTR DS:[EAX+80] //6FB391B6 . 8D88 80000000 LEA ECX,DWORD PTR DS:[EAX+80]
//6FB1B116 . 8D88 80000000 LEA ECX,DWORD PTR DS:[EAX+80] //6FB1B116 . 8D88 80000000 LEA ECX,DWORD PTR DS:[EAX+80]
//6FB6CD36 . 8D88 80000000 LEA ECX,DWORD PTR DS:[EAX+80] //6FB6CD36 . 8D88 80000000 LEA ECX,DWORD PTR DS:[EAX+80]
//6FB6F4D6 . 8D88 80000000 LEA ECX,DWORD PTR DS:[EAX+80]
// Manage mouse up // Manage mouse up
mem_seek R7(D2Client, 2ABBB, 2ABAB, 3148D, 836D9, 8A159, 6C0B9, BDCB9, C0459); mem_seek R7(D2Client, 2ABBB, 2ABAB, 3148D, 836D9, 8A159, 6C0B9, BDCB9);
memt_byte( 0xA1, 0xE8 ); // CALL caller_mouseCustomPageLeftUp memt_byte( 0xA1, 0xE8 ); // CALL caller_mouseCustomPageLeftUp
MEMT_REF4( ptWindowStartX, version_D2Client >= V111 ? caller_mouseCustomPageLeftUp_111 : version_D2Client == V110 ? caller_mouseCustomPageLeftUp : caller_mouseCustomPageLeftUp_9); MEMT_REF4( ptWindowStartX, version_D2Client >= V111 ? caller_mouseCustomPageLeftUp_111 : version_D2Client == V110 ? caller_mouseCustomPageLeftUp : caller_mouseCustomPageLeftUp_9);
//6FAD148D . A1 48A7BB6F MOV EAX,DWORD PTR DS:[6FBBA748] //6FAD148D . A1 48A7BB6F MOV EAX,DWORD PTR DS:[6FBBA748]
@@ -409,7 +403,6 @@ void Install_NewInterfaces()
//6FB3A159 . A1 F8BEBC6F MOV EAX,DWORD PTR DS:[6FBCBEF8] //6FB3A159 . A1 F8BEBC6F MOV EAX,DWORD PTR DS:[6FBCBEF8]
//6FB1C0B9 . A1 28BDBC6F MOV EAX,DWORD PTR DS:[6FBCBD28] //6FB1C0B9 . A1 28BDBC6F MOV EAX,DWORD PTR DS:[6FBCBD28]
//6FB6DCB9 . A1 A0B9BC6F MOV EAX,DWORD PTR DS:[6FBCB9A0] //6FB6DCB9 . A1 A0B9BC6F MOV EAX,DWORD PTR DS:[6FBCB9A0]
//6FB70459 . A1 54D3BC6F MOV EAX,DWORD PTR DS:[6FBCD354]
// open page : 6FB23515 |> 892CB5 A8A6BB6>MOV DWORD PTR DS:[ESI*4+6FBBA6A8],EBP // open page : 6FB23515 |> 892CB5 A8A6BB6>MOV DWORD PTR DS:[ESI*4+6FBBA6A8],EBP

View File

@@ -6,6 +6,8 @@
=================================================================*/ =================================================================*/
#include "common.h" #include "common.h"
#include "error.h"
#include "d2functions.h"
bool active_othersFeatures = false; bool active_othersFeatures = false;

View File

@@ -5,12 +5,15 @@
=================================================================*/ =================================================================*/
#include "error.h" // Core Class Headers
#include "INIfile.h"
#include "parameters.h" // loadParameters()
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include "common.h"
#include "error.h"
#include "parameters.h" // loadParameters()
#include "D2functions.h"
#include "INIfile.h"
#define PARAMETERS_FILENAME "PlugY.ini" #define PARAMETERS_FILENAME "PlugY.ini"
@@ -34,7 +37,7 @@
#include "extraOptions.h" #include "extraOptions.h"
#include "commands.h" #include "commands.h"
#include "language.h" #include "language.h"
#include "windowed.h" extern bool displayGreenSetItemIncludeSharedStash;
char* modDataDirectory = "PlugY"; char* modDataDirectory = "PlugY";
@@ -94,7 +97,6 @@ const char* S_maxSelfPages = "MaxPersonnalPages";
const char* S_nbPagesPerIndex = "NbPagesPerIndex"; const char* S_nbPagesPerIndex = "NbPagesPerIndex";
const char* S_nbPagesPerIndex2 = "NbPagesPerIndex2"; const char* S_nbPagesPerIndex2 = "NbPagesPerIndex2";
const char* S_active_sharedStash = "ActiveSharedStash"; const char* S_active_sharedStash = "ActiveSharedStash";
const char* S_openSharedStashOnLoading = "OpenSharedStashOnLoading";
const char* S_maxSharedPages = "MaxSharedPages"; const char* S_maxSharedPages = "MaxSharedPages";
const char* S_sharedStashFilename = "SharedStashFilename"; const char* S_sharedStashFilename = "SharedStashFilename";
const char* S_separateHardSoftStash = "SeparateHardcoreStash"; const char* S_separateHardSoftStash = "SeparateHardcoreStash";
@@ -177,10 +179,6 @@ const char* S_USER = "USER:\t";
const char* S_FIXED = "FIXED:\t"; const char* S_FIXED = "FIXED:\t";
// Convert 4 char code in a DWORD code
#define BIN(A,B,C,D) ((DWORD)A) + (((DWORD)B) << 8) + (((DWORD)C) << 16) + (((DWORD)D) << 24)
#define GET_PRIVATE_PROFILE_STRING(S,F,D)\ #define GET_PRIVATE_PROFILE_STRING(S,F,D)\
if (!iniFixedFile->GetPrivateProfileString(S, F, NULL, buffer, maxSize)) \ if (!iniFixedFile->GetPrivateProfileString(S, F, NULL, buffer, maxSize)) \
if (!iniFile->GetPrivateProfileString(S, F, NULL, buffer, maxSize)) \ if (!iniFile->GetPrivateProfileString(S, F, NULL, buffer, maxSize)) \
@@ -197,6 +195,7 @@ if (!iniDefaultFile->GetPrivateProfileString(S, F, D, buffer, maxSize)) \
else log_msg(S_DEFAULT); \ else log_msg(S_DEFAULT); \
else log_msg(S_USER) else log_msg(S_USER)
#define GET_PRIVATE_PROFILE_STRING3(S,F,D)\ #define GET_PRIVATE_PROFILE_STRING3(S,F,D)\
if (!iniFile->GetPrivateProfileString(S, F, NULL, buffer, maxSize)) \ if (!iniFile->GetPrivateProfileString(S, F, NULL, buffer, maxSize)) \
if (!iniFixedFile->GetPrivateProfileString(S, F, NULL, buffer, maxSize)) \ if (!iniFixedFile->GetPrivateProfileString(S, F, NULL, buffer, maxSize)) \
@@ -450,24 +449,11 @@ void init_VersionText(INIFile* iniFile, INIFile* iniFixedFile, INIFile* iniDefau
{ {
switch(version_D2Game) switch(version_D2Game)
{ {
//case V107: //"v 1.07" case V109b: strcpy(buffer, "v 1.09b");break;
//case V108: //"v 1.08" case V109d: strcpy(buffer, "v 1.09d");break;
//case V109: //"v 1.09" //case V110: strcpy(buffer, "v 1.10");break;
case V109b: //"v 1.09" //case V111: strcpy(buffer, "v 1.11");break;
case V109d: //"v 1.09" case V111b: strcpy(buffer, "v 1.11b");break;
//case V110: //"v 1.10"
//case V111: //"v 1.11"
case V111b: //"v 1.11"
//case V112: //"v 1.12"
case V113c: //"v 1.13"
case V113d: //"v 1.13"
case V114a: //"v 1.14"
//case V114b: //"v 1.14b"
//case V114c: //"v 1.14c"
//case V114d: //"v 1.14d"
strcpy(buffer, "v ");
strcat(buffer, GetVersionString(version_D2Game));
break;
default: default:
active_VersionTextChange=0; active_VersionTextChange=0;
} }
@@ -486,6 +472,7 @@ void init_VersionText(INIFile* iniFile, INIFile* iniFixedFile, INIFile* iniDefau
active_PrintPlugYVersion = atoi(buffer) != 0; active_PrintPlugYVersion = atoi(buffer) != 0;
log_msg("active_PrintPlugYVersion\t= %u\n", active_PrintPlugYVersion); log_msg("active_PrintPlugYVersion\t= %u\n", active_PrintPlugYVersion);
if (active_PrintPlugYVersion) if (active_PrintPlugYVersion)
{ {
GET_PRIVATE_PROFILE_STRING(S_MAIN_SCREEN, S_colorOfPlugYVersion, "4"); GET_PRIVATE_PROFILE_STRING(S_MAIN_SCREEN, S_colorOfPlugYVersion, "4");
@@ -564,10 +551,6 @@ void init_Stash(INIFile* iniFile, INIFile* iniFixedFile, INIFile* iniDefaultFile
if (active_sharedStash) if (active_sharedStash)
{ {
GET_PRIVATE_PROFILE_STRING(S_STASH, S_openSharedStashOnLoading, "0");
openSharedStashOnLoading = atoi(buffer) != 0;
log_msg("openSharedStashOnLoading\t\t= %u\n", openSharedStashOnLoading);
GET_PRIVATE_PROFILE_STRING(S_STASH, S_maxSharedPages, "0"); GET_PRIVATE_PROFILE_STRING(S_STASH, S_maxSharedPages, "0");
maxSharedPages = atoi(buffer) - 1; maxSharedPages = atoi(buffer) - 1;
log_msg("maxSharedPages\t\t\t\t= %u\n", maxSharedPages); log_msg("maxSharedPages\t\t\t\t= %u\n", maxSharedPages);
@@ -831,7 +814,7 @@ void loadParameters()
INIFile *iniFixedFile = new INIFile; INIFile *iniFixedFile = new INIFile;
INIFile *iniDefaultFile = new INIFile; INIFile *iniDefaultFile = new INIFile;
srand((UINT)time(NULL)); srand(time(NULL));
log_msg("***** PARAMETERS *****\n"); log_msg("***** PARAMETERS *****\n");
if (iniFile->InitReadWrite(PARAMETERS_FILENAME, INIFILE_READ, 0)) if (iniFile->InitReadWrite(PARAMETERS_FILENAME, INIFILE_READ, 0))

View File

@@ -1,21 +1,20 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
Adding custom data. Adding custom data.
Save and load infinity & shared Stash Save and load infinity & shared Stash
=================================================================*/ =================================================================*/
#include "common.h"
#include "error.h"
#include "updateClient.h" #include "updateClient.h"
#include "d2functions.h"
#include "infinityStash.h" #include "infinityStash.h"
#include "savePlayerData.h" //Install_SavePlayerData() #include "savePlayerData.h" //Install_SavePlayerData()
#include "loadPlayerData.h" //Install_LoadPlayerData() #include "loadPlayerData.h" //Install_LoadPlayerData()
#include "common.h"
bool active_PlayerCustomData = true; bool active_PlayerCustomData = true;
bool openSharedStashOnLoading = false;
/*********************************** UPDATING ***********************************/ /*********************************** UPDATING ***********************************/
@@ -72,11 +71,7 @@ void STDCALL updateClientPlayerOnLoading(Unit* ptChar)
log_msg("--- Start updateClientPlayerOnLoading ---\n"); log_msg("--- Start updateClientPlayerOnLoading ---\n");
if (PCGame->isLODGame) if (PCGame->isLODGame)
{ {
//selectStash(ptChar, openSharedStashOnLoading ? PCPY->sharedStash : PCPY->selfStash); selectStash(ptChar, PCPY->selfStash);
if (openSharedStashOnLoading)
toggleToSharedStash(ptChar);
else
toggleToSelfStash(ptChar);
log_msg("End update client on loading.\n\n"); log_msg("End update client on loading.\n\n");
} }
updateClient(ptChar, UC_SHARED_GOLD, PCPY->sharedGold, 0, 0); updateClient(ptChar, UC_SHARED_GOLD, PCPY->sharedGold, 0, 0);
@@ -275,19 +270,18 @@ void Install_PlayerCustomData()
log_msg("Patch D2Game & D2Client & D2Common for Player's custom data. (PlayerCustomData)\n"); log_msg("Patch D2Game & D2Client & D2Common for Player's custom data. (PlayerCustomData)\n");
// Initialize custom data. // Initialize custom data.
mem_seek(version_D2Client == V113d ? offset_D2Common + 0x170DE : version_D2Client == V113c ? offset_D2Common + 0x309BE : version_D2Client == V112 ? offset_D2Common + 0x585EE : version_D2Client == V111b ? offset_D2Common + 0x5BFCE : version_D2Common == V111 ? offset_D2Common + 0x4ED5E :(DWORD)D2InitPlayerData + 0x62 ); mem_seek( version_D2Client == V113 ? offset_D2Common + 0x309BE : version_D2Client == V112 ? offset_D2Common + 0x585EE : version_D2Client == V111b ? offset_D2Common + 0x5BFCE : version_D2Common == V111 ? offset_D2Common + 0x4ED5E :(DWORD)D2InitPlayerData + 0x62 );
MEMJ_REF4( D2AllocMem, init_PlayerCustomData); MEMJ_REF4( D2AllocMem, init_PlayerCustomData);
//01BD0381 |. E8 C03F0000 CALL <JMP.&Fog.#10045> //01BD0381 |. E8 C03F0000 CALL <JMP.&Fog.#10045>
//6FD9ED5D |. E8 94A4FBFF CALL <JMP.&Fog.#10045> //6FD9ED5D |. E8 94A4FBFF CALL <JMP.&Fog.#10045>
//6FDABFCD |. E8 34D2FAFF CALL <JMP.&Fog.#10045> //6FDABFCD |. E8 34D2FAFF CALL <JMP.&Fog.#10045>
//6FDA85ED |. E8 240CFBFF CALL <JMP.&Fog.#10045> //6FDA85ED |. E8 240CFBFF CALL <JMP.&Fog.#10045>
//6FD809BD |. E8 6088FDFF CALL <JMP.&Fog.#10045> //6FD809BD |. E8 6088FDFF CALL <JMP.&Fog.#10045>
//6FD670DD |. E8 0C3EFFFF CALL <JMP.&Fog.#10045>
if ( version_D2Game >= V111 ) if ( version_D2Game >= V111 )
{ {
// update item // update item
mem_seek R7(D2Game, 10933, 10C03, 1100D, 8BC71, C3C51, 5F2A1, 9BB91, 75C81); mem_seek R7(D2Game, 10933, 10C03, 1100D, 8BC71, C3C51, 5F2A1, 9BB91);
memt_byte( 0x8B ,0xE8); // CALL memt_byte( 0x8B ,0xE8); // CALL
MEMT_REF4( 0x52182454, caller_updateItem_111); MEMT_REF4( 0x52182454, caller_updateItem_111);
//0200BC71 |> 8B5424 18 |MOV EDX,DWORD PTR SS:[ESP+18] //0200BC71 |> 8B5424 18 |MOV EDX,DWORD PTR SS:[ESP+18]
@@ -298,10 +292,8 @@ void Install_PlayerCustomData()
//6FC7F2A5 |. 52 |PUSH EDX ; /Arg1 //6FC7F2A5 |. 52 |PUSH EDX ; /Arg1
//6FCBBB91 |> 8B5424 18 |MOV EDX,DWORD PTR SS:[ESP+18] //6FCBBB91 |> 8B5424 18 |MOV EDX,DWORD PTR SS:[ESP+18]
//6FCBBB95 |. 52 |PUSH EDX //6FCBBB95 |. 52 |PUSH EDX
//6FC95C81 |> 8B5424 18 |MOV EDX,DWORD PTR SS:[ESP+18]
//6FC95C85 |. 52 |PUSH EDX
mem_seek R7(D2Game, 1097B, 10C4B, 11058, 8BCD1, C3CB1, 5F301, 9BBF1, 75CE1); mem_seek R7(D2Game, 1097B, 10C4B, 11058, 8BCD1, C3CB1, 5F301, 9BBF1);
memt_byte( 0x8B ,0xE8); // CALL memt_byte( 0x8B ,0xE8); // CALL
MEMT_REF4( 0x52182454, caller_updateItemB_111); MEMT_REF4( 0x52182454, caller_updateItemB_111);
//0200BCD1 |> 8B5424 18 ||MOV EDX,DWORD PTR SS:[ESP+18] //0200BCD1 |> 8B5424 18 ||MOV EDX,DWORD PTR SS:[ESP+18]
@@ -312,21 +304,19 @@ void Install_PlayerCustomData()
//6FC7F305 |. 52 ||PUSH EDX ; /Arg1 //6FC7F305 |. 52 ||PUSH EDX ; /Arg1
//6FCBBBF1 |> 8B5424 18 ||MOV EDX,DWORD PTR SS:[ESP+18] //6FCBBBF1 |> 8B5424 18 ||MOV EDX,DWORD PTR SS:[ESP+18]
//6FCBBBF5 |. 52 ||PUSH EDX //6FCBBBF5 |. 52 ||PUSH EDX
//6FC95CE1 |> 8B5424 18 ||MOV EDX,DWORD PTR SS:[ESP+18]
//6FC95CE5 |. 52 ||PUSH EDX
} else { } else {
// update item // update item
mem_seek R7(D2Game, 10933, 10C03, 1100D, 8BC71, C3C51, 5F2A1, 0000, 0000); mem_seek R7(D2Game, 10933, 10C03, 1100D, 8BC71, C3C51, 5F2A1, 0000);
MEMC_REF4( D2GameGetObject, version_D2Game == V110?caller_updateItem: caller_updateItem_9); MEMC_REF4( D2GameGetObject, version_D2Game == V110?caller_updateItem: caller_updateItem_9);
//6FC4100C |. E8 EFAA0700 |CALL D2Game.6FCBBB00 //6FC4100C |. E8 EFAA0700 |CALL D2Game.6FCBBB00
mem_seek R7(D2Game, 1097B, 10C4B, 11058, 8BCD1, C3CB1, 5F301, 0000, 0000); mem_seek R7(D2Game, 1097B, 10C4B, 11058, 8BCD1, C3CB1, 5F301, 0000);
MEMC_REF4( D2GameGetObject, version_D2Game == V110?caller_updateItem: caller_updateItem_9); MEMC_REF4( D2GameGetObject, version_D2Game == V110?caller_updateItem: caller_updateItem_9);
//6FC41057 |. E8 A4AA0700 ||CALL D2Game.6FCBBB00 //6FC41057 |. E8 A4AA0700 ||CALL D2Game.6FCBBB00
} }
// Update client on loading // Update client on loading
mem_seek R7(D2Game, 23EB, 2426, 25D4, 53482, C6A32, ED502, 4BF12, E7548);//6FC325D4-6FC30000 mem_seek R7(D2Game, 23EB, 2426, 25D4, 53482, C6A32, ED502, 4BF12);//6FC325D4-6FC30000
memt_byte( 0x5F ,0xE8); // CALL memt_byte( 0x5F ,0xE8); // CALL
MEMT_REF4( 0xC0335D5E , caller_updateClientPlayerOnLoading); MEMT_REF4( 0xC0335D5E , caller_updateClientPlayerOnLoading);
//6FC325D4 |> 5F POP EDI //6FC325D4 |> 5F POP EDI
@@ -349,65 +339,57 @@ void Install_PlayerCustomData()
//6FC6BF13 |. 5E POP ESI //6FC6BF13 |. 5E POP ESI
//6FC6BF14 |. 5D POP EBP //6FC6BF14 |. 5D POP EBP
//6FC6BF15 |. 33C0 XOR EAX,EAX //6FC6BF15 |. 33C0 XOR EAX,EAX
//6FD07548 |> 5F POP EDI
//6FD07549 |. 5E POP ESI
//6FD0754A |. 5D POP EBP
//6FD0754B |. 33C0 XOR EAX,EAX
// Free custom data. // Free custom data.
mem_seek R7(D2Common, 7055C, 7065C, 80483, 4F82D, 5C9CD, 5856D, 3093D, 1705D); mem_seek R7(D2Common, 7055C, 7065C, 80483, 4F82D, 5C9CD, 5856D, 3093D);
MEMJ_REF4( D2FreeMem, free_PlayerCustomData); MEMJ_REF4( D2FreeMem, free_PlayerCustomData);
//01BD0482 |. E8 C53E0000 CALL <JMP.&Fog.#10046> //01BD0482 |. E8 C53E0000 CALL <JMP.&Fog.#10046>
//6FD9F82C |. E8 E399FBFF CALL <JMP.&Fog.#10046> //6FD9F82C |. E8 E399FBFF CALL <JMP.&Fog.#10046>
//6FDAC9CC |. E8 3BC8FAFF CALL <JMP.&Fog.#10046> //6FDAC9CC |. E8 3BC8FAFF CALL <JMP.&Fog.#10046>
//6FDA856C |. E8 E70CFBFF CALL <JMP.&Fog.#10046> //6FDA856C |. E8 E70CFBFF CALL <JMP.&Fog.#10046>
//6FD8093C |. E8 E788FDFF CALL <JMP.&Fog.#10046> //6FD8093C |. E8 E788FDFF CALL <JMP.&Fog.#10046>
//6FD6705C |. E8 CF3EFFFF CALL <JMP.&Fog.#10046>
// Free item in Stash (Server-side) // Free item in Stash (Server-side)
mem_seek R7(D2Game, 7D12B, 7D62B, 8D5A4, 99112, BFDB2, 94242, E1162, 6F7C2); mem_seek R7(D2Game, 7D12B, 7D62B, 8D5A4, 99112, BFDB2, 94242, E1162);
MEMJ_REF4( D2UnitGetNextItem, version_D2Game >= V111 ? callerServer_getNextItemToFree_111 : version_D2Game == V110 ? callerServer_getNextItemToFree : callerServer_getNextItemToFree_9);//0x0005E204 MEMJ_REF4( D2UnitGetNextItem, version_D2Game >= V111 ? callerServer_getNextItemToFree_111 : version_D2Game == V110 ? callerServer_getNextItemToFree : callerServer_getNextItemToFree_9);//0x0005E204
//6FCBD5A3 . E8 04E20500 CALL <JMP.&D2Common.#10304> //6FCBD5A3 . E8 04E20500 CALL <JMP.&D2Common.#10304>
//02019111 |. E8 5016F7FF |CALL <JMP.&D2Common.#10934> //02019111 |. E8 5016F7FF |CALL <JMP.&D2Common.#10934>
//0202FDB1 |. E8 30AAF4FF |CALL <JMP.&D2Common.#11140> //0202FDB1 |. E8 30AAF4FF |CALL <JMP.&D2Common.#11140>
//6FCB4241 |. E8 8862F7FF |CALL <JMP.&D2Common.#10770> //6FCB4241 |. E8 8862F7FF |CALL <JMP.&D2Common.#10770>
//6FD01161 |. E8 6693F2FF |CALL <JMP.&D2Common.#10464> //6FD01161 |. E8 6693F2FF |CALL <JMP.&D2Common.#10464>
//6FC8F7C1 |. E8 44AEF9FF |CALL <JMP.&D2Common.#10879>
// Free item in Stash (Client-side) // Free item in Stash (Client-side)
mem_seek R7(D2Client, 8EF8F, 8E30F, 89B32, 26404, 4C264, 1F2D4, A5C94, 621E4);//6FB29B31-6FAA0000 mem_seek R7(D2Client, 8EF8F, 8E30F, 89B32, 26404, 4C264, 1F2D4, A5C94);//6FB29B31-6FAA0000
MEMJ_REF4( D2UnitGetNextItem, version_D2Game >= V111 ? callerClient_getNextItemToFree_111 : version_D2Game == V110 ? callerClient_getNextItemToFree : callerClient_getNextItemToFree_9);//0x00040F34 MEMJ_REF4( D2UnitGetNextItem, version_D2Game >= V111 ? callerClient_getNextItemToFree_111 : version_D2Game == V110 ? callerClient_getNextItemToFree : callerClient_getNextItemToFree_9);//0x00040F34
//6FB29B31 E8 340F0400 CALL <JMP.&D2Common.#10304> //6FB29B31 E8 340F0400 CALL <JMP.&D2Common.#10304>
//6FAD6403 |. E8 925DFEFF |CALL <JMP.&D2Common.#10934> //6FAD6403 |. E8 925DFEFF |CALL <JMP.&D2Common.#10934>
//6FAFC263 |. E8 38FFFBFF |CALL <JMP.&D2Common.#11140> //6FAFC263 |. E8 38FFFBFF |CALL <JMP.&D2Common.#11140>
//6FACF2D3 |. E8 4CD1FEFF |CALL <JMP.&D2Common.#10770> //6FACF2D3 |. E8 4CD1FEFF |CALL <JMP.&D2Common.#10770>
//6FB55C93 |. E8 D068F6FF |CALL <JMP.&D2Common.#10464> //6FB55C93 |. E8 D068F6FF |CALL <JMP.&D2Common.#10464>
//6FB121E3 |. E8 7AA1FAFF |CALL <JMP.&D2Common.#10879>
if ( version_D2Common >= V110 ) if ( version_D2Common >= V110 )
{ {
// Test if it's already removed from inventory // Test if it's already removed from inventory
mem_seek R7(D2Common, 0000, 0000, 4E689, 26E33, 42133, 6AE93, 21B23, 3B393); mem_seek R7(D2Common, 0000, 0000, 4E689, 26E33, 42133, 6AE93, 21B23);
memt_byte( 0x0D , 0x07); memt_byte( 0x0D , 0x07);
//01D2E688 75 0D JNZ SHORT D2Common.01D2E697 //01D2E688 75 0D JNZ SHORT D2Common.01D2E697
//6FD76E32 |. 74 0D JE SHORT D2Common.6FD76E41 //6FD76E32 |. 74 0D JE SHORT D2Common.6FD76E41
//6FD92132 |. 74 0D JE SHORT D2Common.6FD92141 //6FD92132 |. 74 0D JE SHORT D2Common.6FD92141
//6FDBAE92 |. 74 0D JE SHORT D2Common.6FDBAEA1 //6FDBAE92 |. 74 0D JE SHORT D2Common.6FDBAEA1
//6FD71B22 |. 74 0D JE SHORT D2Common.6FD71B31 //6FD71B22 |. 74 0D JE SHORT D2Common.6FD71B31
//6FD8B392 |. 74 0D JE SHORT D2Common.6FD8B3A1
} else { } else {
mem_seek R7(D2Game, 7D176, 7D676, 0000, 0000, 0000, 0000, 0000, 0000); mem_seek R7(D2Game, 7D176, 7D676, 0000, 0000, 0000, 0000, 0000);
memt_byte( 0x74 , 0x90);//MOV EAX,EDI memt_byte( 0x74 , 0x90);//MOV EAX,EDI
memt_byte( 0x35 , 0x90);//NOP memt_byte( 0x35 , 0x90);//NOP
//6FCAD176 |. 74 35 |JE SHORT D2Game.6FCAD1AD //6FCAD176 |. 74 35 |JE SHORT D2Game.6FCAD1AD
mem_seek R7(D2Client, 8F0CA, 8E44A, 0000, 0000, 0000, 0000, 0000, 0000); mem_seek R7(D2Client, 8F0CA, 8E44A, 0000, 0000, 0000, 0000, 0000);
memt_byte( 0x0F , 0x90);//MOV EAX,EDI memt_byte( 0x0F , 0x90);//MOV EAX,EDI
memt_byte( 0x84 , 0x90);//NOP memt_byte( 0x84 , 0x90);//NOP
memt_dword( 0x000000BF , 0x90909090);//NOP memt_dword( 0x000000BF , 0x90909090);//NOP
//6FB2F0CA |. 0F84 BF000000 |JE D2Client.6FB2F18F //6FB2F0CA |. 0F84 BF000000 |JE D2Client.6FB2F18F
mem_seek R7(D2Client, 8F13C, 8E4BC, 0000, 0000, 0000, 0000, 0000, 0000); mem_seek R7(D2Client, 8F13C, 8E4BC, 0000, 0000, 0000, 0000, 0000);
memt_byte( 0x74 , 0x90);//MOV EAX,EDI memt_byte( 0x74 , 0x90);//MOV EAX,EDI
memt_byte( 0x6F , 0x90);//NOP memt_byte( 0x6F , 0x90);//NOP
//6FB2F13C |. 74 6F |JE SHORT D2Client.6FB2F1AD //6FB2F13C |. 74 6F |JE SHORT D2Client.6FB2F1AD

BIN
PlugY/PlugY.aps Normal file

Binary file not shown.

View File

@@ -1,27 +1,6 @@
/*================================================================= // PlugY.cpp : Defines the exported functions for the DLL application.
File created by Yohann NICOLAS. //
Main file of this DLL #include "stdafx.h"
=================================================================*/
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
/*================================= END OF FILE =================================*/

Binary file not shown.

View File

@@ -1,18 +1,26 @@
 
Microsoft Visual Studio Solution File, Format Version 10.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual C++ Express 2008 # Visual Studio 14
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PlugY", "PlugY.vcproj", "{EB63DF4E-A019-4522-A140-9E8C7350B331}" VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PlugY", "PlugY.vcxproj", "{5059AE94-61B0-4D07-A970-B670BBCB142C}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64
Release|Win32 = Release|Win32 Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{EB63DF4E-A019-4522-A140-9E8C7350B331}.Debug|Win32.ActiveCfg = Debug|Win32 {5059AE94-61B0-4D07-A970-B670BBCB142C}.Debug|x64.ActiveCfg = Debug|x64
{EB63DF4E-A019-4522-A140-9E8C7350B331}.Debug|Win32.Build.0 = Debug|Win32 {5059AE94-61B0-4D07-A970-B670BBCB142C}.Debug|x64.Build.0 = Debug|x64
{EB63DF4E-A019-4522-A140-9E8C7350B331}.Release|Win32.ActiveCfg = Release|Win32 {5059AE94-61B0-4D07-A970-B670BBCB142C}.Debug|x86.ActiveCfg = Debug|Win32
{EB63DF4E-A019-4522-A140-9E8C7350B331}.Release|Win32.Build.0 = Release|Win32 {5059AE94-61B0-4D07-A970-B670BBCB142C}.Debug|x86.Build.0 = Debug|Win32
{5059AE94-61B0-4D07-A970-B670BBCB142C}.Release|x64.ActiveCfg = Release|x64
{5059AE94-61B0-4D07-A970-B670BBCB142C}.Release|x64.Build.0 = Release|x64
{5059AE94-61B0-4D07-A970-B670BBCB142C}.Release|x86.ActiveCfg = Release|Win32
{5059AE94-61B0-4D07-A970-B670BBCB142C}.Release|x86.Build.0 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

Binary file not shown.

View File

@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="9,00" Version="8,00"
Name="PlugY" Name="PlugY"
ProjectGUID="{EB63DF4E-A019-4522-A140-9E8C7350B331}" ProjectGUID="{F5E47DA0-4D85-41E4-954D-29237DF8AFCB}"
RootNamespace="PlugY" RootNamespace="PlugY"
Keyword="Win32Proj" Keyword="ExtStoredProcProj"
TargetFrameworkVersion="196613"
> >
<Platforms> <Platforms>
<Platform <Platform
@@ -18,9 +17,10 @@
<Configurations> <Configurations>
<Configuration <Configuration
Name="Debug|Win32" Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)" OutputDirectory="Debug"
IntermediateDirectory="$(ConfigurationName)" IntermediateDirectory="Debug"
ConfigurationType="2" ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
CharacterSet="2" CharacterSet="2"
> >
<Tool <Tool
@@ -37,16 +37,19 @@
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="false"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_NON_CONFORMING_SWPRINTFS;_CRT_SECURE_NO_WARNINGS;_USRDLL;PLUGY_EXPORTS" PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="3" RuntimeLibrary="3"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4" DebugInformationFormat="4"
/> />
<Tool <Tool
@@ -54,12 +57,15 @@
/> />
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="opends60.lib"
LinkIncremental="2" LinkIncremental="2"
GenerateDebugInformation="true" GenerateDebugInformation="true"
SubSystem="2" SubSystem="2"
@@ -83,17 +89,21 @@
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool
Name="VCWebDeploymentTool"
/>
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release|Win32" Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)" OutputDirectory="Release"
IntermediateDirectory="$(ConfigurationName)" IntermediateDirectory="Release"
ConfigurationType="2" ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops"
UseOfMFC="0"
CharacterSet="2" CharacterSet="2"
WholeProgramOptimization="1"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
@@ -109,31 +119,41 @@
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="false"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="2" Optimization="2"
EnableIntrinsicFunctions="true" InlineFunctionExpansion="1"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_NON_CONFORMING_SWPRINTFS;_CRT_SECURE_NO_WARNINGS;_USRDLL;PLUGY_EXPORTS" OmitFramePointers="true"
RuntimeLibrary="2" PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL;_CRT_NON_CONFORMING_SWPRINTFS;_CRT_SECURE_NO_DEPRECATE;_CRT_ NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T"
StringPooling="false"
ExceptionHandling="0"
RuntimeLibrary="0"
BufferSecurityCheck="false"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
DebugInformationFormat="3" Detect64BitPortabilityProblems="false"
DebugInformationFormat="0"
/> />
<Tool <Tool
Name="VCManagedResourceCompilerTool" Name="VCManagedResourceCompilerTool"
/> />
<Tool <Tool
Name="VCResourceCompilerTool" Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/> />
<Tool <Tool
Name="VCPreLinkEventTool" Name="VCPreLinkEventTool"
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="opends60.lib"
LinkIncremental="1" LinkIncremental="1"
GenerateDebugInformation="true" GenerateDebugInformation="false"
SubSystem="2" SubSystem="2"
OptimizeReferences="2" OptimizeReferences="2"
EnableCOMDATFolding="2" EnableCOMDATFolding="2"
@@ -157,9 +177,12 @@
<Tool <Tool
Name="VCAppVerifierTool" Name="VCAppVerifierTool"
/> />
<Tool
Name="VCWebDeploymentTool"
/>
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
CommandLine="copy &quot;$(TargetPath)&quot; &quot;..\PlugYInstaller\PlugY.dll&quot;" CommandLine="copy $(TargetPath) &quot;..\PlugYInstaller\PlugY.dll&quot;&#x0D;&#x0A;copy $(TargetPath) &quot;D:\Jeux\Blizzard\Diablo II\PlugY.dll&quot;&#x0D;&#x0A;copy $(TargetPath) &quot;D:\www\PlugY.dll&quot;&#x0D;&#x0A;"
/> />
</Configuration> </Configuration>
</Configurations> </Configurations>
@@ -167,374 +190,344 @@
</References> </References>
<Files> <Files>
<Filter <Filter
Name="Fichiers sources" Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" Filter="cpp;c;cxx;rc;def;odl;idl;hpj;bat;asm"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
> >
<File <File
RelativePath=".\BigStash.cpp" RelativePath="BigStash.cpp"
> >
</File> </File>
<File <File
RelativePath=".\ClientSaveFile.cpp" RelativePath="ClientSaveFile.cpp"
> >
</File> </File>
<File <File
RelativePath=".\Commands.cpp" RelativePath="Commands.cpp"
> >
</File> </File>
<File <File
RelativePath=".\Common.cpp" RelativePath="Common.cpp"
> >
</File> </File>
<File <File
RelativePath=".\CustomLibraries.cpp" RelativePath="CustomLibraries.cpp"
> >
</File> </File>
<File <File
RelativePath=".\D2functions.cpp" RelativePath="D2functions.cpp"
> >
</File> </File>
<File <File
RelativePath=".\D2wrapper.cpp" RelativePath="D2wrapper.cpp"
> >
</File> </File>
<File <File
RelativePath=".\Error.cpp" RelativePath="Error.cpp"
> >
</File> </File>
<File <File
RelativePath=".\ExtendedSaveFile.cpp" RelativePath="ExtendedSaveFile.cpp"
> >
</File> </File>
<File <File
RelativePath=".\ExtraOptions.cpp" RelativePath="ExtraOptions.cpp"
> >
</File> </File>
<File <File
RelativePath=".\GlobalVariable.cpp" RelativePath="GlobalVariable.cpp"
> >
</File> </File>
<File <File
RelativePath=".\InfinityStash.cpp" RelativePath="InfinityStash.cpp"
> >
</File> </File>
<File <File
RelativePath=".\INIfile.cpp" RelativePath="INIfile.cpp"
> >
</File> </File>
<File <File
RelativePath=".\Interface_Skills.cpp" RelativePath="Interface_Skills.cpp"
> >
</File> </File>
<File <File
RelativePath=".\Interface_Stash.cpp" RelativePath="Interface_Stash.cpp"
> >
</File> </File>
<File <File
RelativePath=".\Interface_Stats.cpp" RelativePath="Interface_Stats.cpp"
> >
</File> </File>
<File <File
RelativePath=".\Language.cpp" RelativePath="Language.cpp"
> >
</File> </File>
<File <File
RelativePath=".\LoadPlayerData.cpp" RelativePath="LoadPlayerData.cpp"
> >
</File> </File>
<File <File
RelativePath=".\LocalizedStrings.cpp" RelativePath="MainScreen.cpp"
> >
</File> </File>
<File <File
RelativePath=".\MainScreen.cpp" RelativePath="ModifMemory.cpp"
> >
</File> </File>
<File <File
RelativePath=".\ModifMemory.cpp" RelativePath="NewInterface_CubeListing.cpp"
> >
</File> </File>
<File <File
RelativePath=".\NewInterface_CubeListing.cpp" RelativePath="NewInterface_Runewords.cpp"
> >
</File> </File>
<File <File
RelativePath=".\NewInterface_Runewords.cpp" RelativePath="NewInterface_Stats.cpp"
> >
</File> </File>
<File <File
RelativePath=".\NewInterface_Stats.cpp" RelativePath="NewInterface_StatsPageTwo.cpp"
> >
</File> </File>
<File <File
RelativePath=".\NewInterface_StatsPageTwo.cpp" RelativePath="NewInterfaces.cpp"
> >
</File> </File>
<File <File
RelativePath=".\NewInterfaces.cpp" RelativePath="OthersFeatures.cpp"
> >
</File> </File>
<File <File
RelativePath=".\OthersFeatures.cpp" RelativePath="Parameters.cpp"
> >
</File> </File>
<File <File
RelativePath=".\Parameters.cpp" RelativePath="PlayerCustomData.cpp"
> >
</File> </File>
<File <File
RelativePath=".\PlayerCustomData.cpp" RelativePath="PlugY.cpp"
> >
</File> </File>
<File <File
RelativePath=".\PlugY.cpp" RelativePath="PlugY.rc"
> >
</File> </File>
<File <File
RelativePath=".\PlugYFiles.cpp" RelativePath="PlugYFiles.cpp"
> >
</File> </File>
<File <File
RelativePath=".\SavePath.cpp" RelativePath="SavePath.cpp"
> >
</File> </File>
<File <File
RelativePath=".\SavePlayerData.cpp" RelativePath="SavePlayerData.cpp"
> >
</File> </File>
<File <File
RelativePath=".\SharedSaveFile.cpp" RelativePath="SharedSaveFile.cpp"
> >
</File> </File>
<File <File
RelativePath=".\SkillPerLevelUp.cpp" RelativePath="SkillPerLevelUp.cpp"
> >
</File> </File>
<File <File
RelativePath=".\SkillsPoints.cpp" RelativePath="SkillsPoints.cpp"
> >
</File> </File>
<File <File
RelativePath=".\StatPerLevelUp.cpp" RelativePath="StatPerLevelUp.cpp"
> >
</File> </File>
<File <File
RelativePath=".\StatsPoints.cpp" RelativePath="StatsPoints.cpp"
> >
</File> </File>
<File <File
RelativePath=".\UberQuest.cpp" RelativePath="UberQuest.cpp"
> >
</File> </File>
<File <File
RelativePath=".\UpdateClient.cpp" RelativePath="UpdateClient.cpp"
> >
</File> </File>
<File <File
RelativePath=".\UpdateServer.cpp" RelativePath="UpdateServer.cpp"
> >
</File> </File>
<File <File
RelativePath=".\Windowed.cpp" RelativePath="WorldEvent.cpp"
>
</File>
<File
RelativePath=".\WorldEvent.cpp"
>
</File>
<Filter
Name="Commons"
>
<File
RelativePath="..\Commons\VersionInfo.cpp"
> >
</File> </File>
</Filter> </Filter>
</Filter>
<Filter <Filter
Name="Fichiers d&apos;en-t<>te" Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd" Filter="h;hpp;hxx;hm;inl;inc"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
> >
<File <File
RelativePath=".\bigStash.h" RelativePath="bigStash.h"
> >
</File> </File>
<File <File
RelativePath=".\clientSaveFile.h" RelativePath="clientSaveFile.h"
> >
</File> </File>
<File <File
RelativePath=".\commands.h" RelativePath="commands.h"
> >
</File> </File>
<File <File
RelativePath=".\common.h" RelativePath="common.h"
> >
</File> </File>
<File <File
RelativePath=".\customData.h" RelativePath="customData.h"
> >
</File> </File>
<File <File
RelativePath=".\customLibraries.h" RelativePath="customLibraries.h"
> >
</File> </File>
<File <File
RelativePath=".\d2functions.h" RelativePath="d2functions.h"
> >
</File> </File>
<File <File
RelativePath=".\d2wrapper.h" RelativePath="error.h"
> >
</File> </File>
<File <File
RelativePath=".\error.h" RelativePath="extendedSaveFile.h"
> >
</File> </File>
<File <File
RelativePath=".\extendedSaveFile.h" RelativePath="extraOptions.h"
> >
</File> </File>
<File <File
RelativePath=".\extraOptions.h" RelativePath="globalVariable.h"
> >
</File> </File>
<File <File
RelativePath=".\globalVariable.h" RelativePath="infinityStash.h"
> >
</File> </File>
<File <File
RelativePath=".\infinityStash.h" RelativePath="INIfile.h"
> >
</File> </File>
<File <File
RelativePath=".\INIfile.h" RelativePath="interface_Skills.h"
> >
</File> </File>
<File <File
RelativePath=".\interface_Skills.h" RelativePath="interface_Stash.h"
> >
</File> </File>
<File <File
RelativePath=".\interface_Stash.h" RelativePath="interface_Stats.h"
> >
</File> </File>
<File <File
RelativePath=".\interface_Stats.h" RelativePath="language.h"
> >
</File> </File>
<File <File
RelativePath=".\language.h" RelativePath="loadPlayerData.h"
> >
</File> </File>
<File <File
RelativePath=".\loadPlayerData.h" RelativePath="mainScreen.h"
> >
</File> </File>
<File <File
RelativePath=".\LocalizedStrings.h" RelativePath="modifMemory.h"
> >
</File> </File>
<File <File
RelativePath=".\mainScreen.h" RelativePath="newInterface_CubeListing.h"
> >
</File> </File>
<File <File
RelativePath=".\modifMemory.h" RelativePath="newInterface_Runewords.h"
> >
</File> </File>
<File <File
RelativePath=".\newInterface_CubeListing.h" RelativePath="newInterface_Stats.h"
> >
</File> </File>
<File <File
RelativePath=".\newInterface_Runewords.h" RelativePath="newInterface_StatsPageTwo.h"
> >
</File> </File>
<File <File
RelativePath=".\newInterface_Stats.h" RelativePath="newInterfaces.h"
> >
</File> </File>
<File <File
RelativePath=".\newInterface_StatsPageTwo.h" RelativePath="othersFeatures.h"
> >
</File> </File>
<File <File
RelativePath=".\newInterfaces.h" RelativePath="parameters.h"
> >
</File> </File>
<File <File
RelativePath=".\othersFeatures.h" RelativePath="playerCustomData.h"
> >
</File> </File>
<File <File
RelativePath=".\parameters.h" RelativePath="plugYFiles.h"
> >
</File> </File>
<File <File
RelativePath=".\playerCustomData.h" RelativePath="resource.h"
> >
</File> </File>
<File <File
RelativePath=".\plugYFiles.h" RelativePath="savePath.h"
> >
</File> </File>
<File <File
RelativePath=".\resource.h" RelativePath="savePlayerData.h"
> >
</File> </File>
<File <File
RelativePath=".\savePath.h" RelativePath="sharedSaveFile.h"
> >
</File> </File>
<File <File
RelativePath=".\savePlayerData.h" RelativePath="skillPerLevelUp.h"
> >
</File> </File>
<File <File
RelativePath=".\sharedSaveFile.h" RelativePath="skillsPoints.h"
> >
</File> </File>
<File <File
RelativePath=".\skillPerLevelUp.h" RelativePath="statPerLevelUp.h"
> >
</File> </File>
<File <File
RelativePath=".\skillsPoints.h" RelativePath="statsPoints.h"
> >
</File> </File>
<File <File
RelativePath=".\statPerLevelUp.h" RelativePath="uberQuest.h"
> >
</File> </File>
<File <File
RelativePath=".\statsPoints.h" RelativePath="updateClient.h"
> >
</File> </File>
<File <File
RelativePath=".\targetver.h" RelativePath="updateServer.h"
> >
</File> </File>
<File <File
RelativePath=".\uberQuest.h" RelativePath="worldEvent.h"
>
</File>
<File
RelativePath=".\updateClient.h"
>
</File>
<File
RelativePath=".\updateServer.h"
>
</File>
<File
RelativePath=".\windowed.h"
>
</File>
<File
RelativePath=".\worldEvent.h"
> >
</File> </File>
<Filter <Filter
@@ -568,21 +561,12 @@
RelativePath="..\Commons\updatingConst.h" RelativePath="..\Commons\updatingConst.h"
> >
</File> </File>
<File
RelativePath="..\Commons\VersionInfo.h"
>
</File>
</Filter> </Filter>
</Filter> </Filter>
<Filter <Filter
Name="Fichiers de ressources" Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
> >
<File
RelativePath=".\PlugY.rc"
>
</File>
</Filter> </Filter>
</Files> </Files>
<Globals> <Globals>

View File

@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioUserFile
ProjectType="Visual C++"
Version="8,00"
ShowAllFiles="false"
>
<Configurations>
<Configuration
Name="Debug|Win32"
>
<DebugSettings
Command=""
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="ATHLON64"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
<Configuration
Name="Release|Win32"
>
<DebugSettings
Command=""
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="ATHLON64"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
</Configurations>
</VisualStudioUserFile>

267
PlugY/PlugY.vcxproj Normal file
View File

@@ -0,0 +1,267 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{5059AE94-61B0-4D07-A970-B670BBCB142C}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>PlugY</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PLUGY_EXPORTS;_CRT_NON_CONFORMING_SWPRINTFS;_CRT_SECURE_NO_WARNINGS;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PostBuildEvent>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;PLUGY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGY_EXPORTS;_CRT_NON_CONFORMING_SWPRINTFS;_CRT_SECURE_NO_WARNINGS;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PostBuildEvent>
<Command>copy "$(TargetPath)" "..\PlugYInstaller\PlugY.dll"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;PLUGY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\Commons\d2BinFile.h" />
<ClInclude Include="..\Commons\d2constants.h" />
<ClInclude Include="..\Commons\D2Funcs.h" />
<ClInclude Include="..\Commons\d2StringTblStruct.h" />
<ClInclude Include="..\Commons\d2Struct.h" />
<ClInclude Include="..\Commons\D2UnitStruct.h" />
<ClInclude Include="..\Commons\updatingConst.h" />
<ClInclude Include="bigStash.h" />
<ClInclude Include="clientSaveFile.h" />
<ClInclude Include="commands.h" />
<ClInclude Include="common.h" />
<ClInclude Include="customData.h" />
<ClInclude Include="customLibraries.h" />
<ClInclude Include="d2functions.h" />
<ClInclude Include="error.h" />
<ClInclude Include="extendedSaveFile.h" />
<ClInclude Include="extraOptions.h" />
<ClInclude Include="globalVariable.h" />
<ClInclude Include="infinityStash.h" />
<ClInclude Include="INIfile.h" />
<ClInclude Include="interface_Skills.h" />
<ClInclude Include="interface_Stash.h" />
<ClInclude Include="interface_Stats.h" />
<ClInclude Include="language.h" />
<ClInclude Include="loadPlayerData.h" />
<ClInclude Include="mainScreen.h" />
<ClInclude Include="modifMemory.h" />
<ClInclude Include="newInterfaces.h" />
<ClInclude Include="newInterface_CubeListing.h" />
<ClInclude Include="newInterface_Runewords.h" />
<ClInclude Include="newInterface_Stats.h" />
<ClInclude Include="newInterface_StatsPageTwo.h" />
<ClInclude Include="othersFeatures.h" />
<ClInclude Include="parameters.h" />
<ClInclude Include="playerCustomData.h" />
<ClInclude Include="plugYFiles.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="savePath.h" />
<ClInclude Include="savePlayerData.h" />
<ClInclude Include="sharedSaveFile.h" />
<ClInclude Include="skillPerLevelUp.h" />
<ClInclude Include="skillsPoints.h" />
<ClInclude Include="statPerLevelUp.h" />
<ClInclude Include="statsPoints.h" />
<ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" />
<ClInclude Include="uberQuest.h" />
<ClInclude Include="updateClient.h" />
<ClInclude Include="updateServer.h" />
<ClInclude Include="worldEvent.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="BigStash.cpp" />
<ClCompile Include="ClientSaveFile.cpp" />
<ClCompile Include="Commands.cpp" />
<ClCompile Include="Common.cpp" />
<ClCompile Include="CustomLibraries.cpp" />
<ClCompile Include="D2functions.cpp" />
<ClCompile Include="D2wrapper.cpp" />
<ClCompile Include="dllmain.cpp">
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsManaged>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="Error.cpp" />
<ClCompile Include="ExtendedSaveFile.cpp" />
<ClCompile Include="ExtraOptions.cpp" />
<ClCompile Include="GlobalVariable.cpp" />
<ClCompile Include="InfinityStash.cpp" />
<ClCompile Include="INIfile.cpp" />
<ClCompile Include="Interface_Skills.cpp" />
<ClCompile Include="Interface_Stash.cpp" />
<ClCompile Include="Interface_Stats.cpp" />
<ClCompile Include="Language.cpp" />
<ClCompile Include="LoadPlayerData.cpp" />
<ClCompile Include="MainScreen.cpp" />
<ClCompile Include="ModifMemory.cpp" />
<ClCompile Include="NewInterfaces.cpp" />
<ClCompile Include="NewInterface_CubeListing.cpp" />
<ClCompile Include="NewInterface_Runewords.cpp" />
<ClCompile Include="NewInterface_Stats.cpp" />
<ClCompile Include="NewInterface_StatsPageTwo.cpp" />
<ClCompile Include="OthersFeatures.cpp" />
<ClCompile Include="Parameters.cpp" />
<ClCompile Include="PlayerCustomData.cpp" />
<ClCompile Include="PlugY.cpp" />
<ClCompile Include="PlugYFiles.cpp" />
<ClCompile Include="SavePath.cpp" />
<ClCompile Include="SavePlayerData.cpp" />
<ClCompile Include="SharedSaveFile.cpp" />
<ClCompile Include="SkillPerLevelUp.cpp" />
<ClCompile Include="SkillsPoints.cpp" />
<ClCompile Include="StatPerLevelUp.cpp" />
<ClCompile Include="StatsPoints.cpp" />
<ClCompile Include="stdafx.cpp" />
<ClCompile Include="UberQuest.cpp" />
<ClCompile Include="UpdateClient.cpp" />
<ClCompile Include="UpdateServer.cpp" />
<ClCompile Include="WorldEvent.cpp" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="PlugY.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

308
PlugY/PlugY.vcxproj.filters Normal file
View File

@@ -0,0 +1,308 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Header Files\Commons">
<UniqueIdentifier>{f21d23d6-3719-4624-84e8-f488328334b7}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="targetver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="savePath.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="savePlayerData.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="sharedSaveFile.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="skillPerLevelUp.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="skillsPoints.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="statPerLevelUp.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="statsPoints.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="uberQuest.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="updateClient.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="updateServer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="worldEvent.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="bigStash.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="clientSaveFile.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="commands.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="common.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="customData.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="customLibraries.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="d2functions.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="error.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="extendedSaveFile.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="extraOptions.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="globalVariable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="infinityStash.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="INIfile.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="interface_Skills.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="interface_Stash.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="interface_Stats.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="language.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="loadPlayerData.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="mainScreen.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="modifMemory.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="newInterface_CubeListing.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="newInterface_Runewords.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="newInterface_Stats.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="newInterface_StatsPageTwo.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="newInterfaces.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="othersFeatures.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="parameters.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="playerCustomData.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="plugYFiles.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\Commons\d2BinFile.h">
<Filter>Header Files\Commons</Filter>
</ClInclude>
<ClInclude Include="..\Commons\d2constants.h">
<Filter>Header Files\Commons</Filter>
</ClInclude>
<ClInclude Include="..\Commons\D2Funcs.h">
<Filter>Header Files\Commons</Filter>
</ClInclude>
<ClInclude Include="..\Commons\d2StringTblStruct.h">
<Filter>Header Files\Commons</Filter>
</ClInclude>
<ClInclude Include="..\Commons\d2Struct.h">
<Filter>Header Files\Commons</Filter>
</ClInclude>
<ClInclude Include="..\Commons\D2UnitStruct.h">
<Filter>Header Files\Commons</Filter>
</ClInclude>
<ClInclude Include="..\Commons\updatingConst.h">
<Filter>Header Files\Commons</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="PlugY.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="dllmain.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="SavePlayerData.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="SharedSaveFile.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="SkillPerLevelUp.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="SkillsPoints.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="StatPerLevelUp.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="StatsPoints.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="UberQuest.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="UpdateClient.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="UpdateServer.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="WorldEvent.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="BigStash.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ClientSaveFile.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Commands.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Common.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="CustomLibraries.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="D2functions.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="D2wrapper.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Error.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ExtendedSaveFile.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ExtraOptions.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GlobalVariable.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="InfinityStash.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="INIfile.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Interface_Skills.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Interface_Stash.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Interface_Stats.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Language.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="LoadPlayerData.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="MainScreen.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ModifMemory.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="NewInterface_CubeListing.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="NewInterface_Runewords.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="NewInterface_Stats.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="NewInterface_StatsPageTwo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="NewInterfaces.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="OthersFeatures.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Parameters.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="PlayerCustomData.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="PlugYFiles.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="SavePath.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="PlugY.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>

View File

@@ -1,14 +1,15 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
Adding custom data. Adding custom data.
Save and load infinity & shared Stash Save and load infinity & shared Stash
=================================================================*/ =================================================================*/
#include "plugYFiles.h"
#include "common.h" #include "common.h"
#include "error.h"
#include "d2functions.h"
#include "plugYFiles.h"
#include <stdio.h> #include <stdio.h>
//#include "newInterfaces.h" //#include "newInterfaces.h"
@@ -87,7 +88,7 @@ void Install_PlugYFiles()
log_msg("Patch Storm to found custom file. (PlugYFiles)\n"); log_msg("Patch Storm to found custom file. (PlugYFiles)\n");
// Try in Diablo II\PlugY\ if file not found // Try in Diablo II\PlugY\ if file not found
mem_seek R7(Storm, 192C6, 19296, 18677, 2CC69, 14259, 121E9, 28D89, 2DA79);//( (DWORD)D2Storm268 + V7(Storm, 01A8, 01A8, 01AB, 0429, 0429, 0429, 0000) ); mem_seek R7(Storm, 192C6, 19296, 18677, 2CC69, 14259, 121E9, 28D89);//( (DWORD)D2Storm268 + V7(Storm, 01A8, 01A8, 01AB, 0429, 0429, 0429, 0000) );
memt_byte( 0xFF ,0x90); // NOP memt_byte( 0xFF ,0x90); // NOP
memt_byte( 0x15 ,0xE8); // CALL memt_byte( 0x15 ,0xE8); // CALL
MEMD_REF4( LeaveCriticalSection, version_Storm >= V111 ? caller_isModFile_111 : caller_isModFile); MEMD_REF4( LeaveCriticalSection, version_Storm >= V111 ? caller_isModFile_111 : caller_isModFile);
@@ -96,7 +97,6 @@ void Install_PlugYFiles()
//6FC04259 |. FF15 3832C36F CALL DWORD PTR DS:[<&KERNEL32.LeaveCriti>; \LeaveCriticalSection //6FC04259 |. FF15 3832C36F CALL DWORD PTR DS:[<&KERNEL32.LeaveCriti>; \LeaveCriticalSection
//6FC021E9 |. FF15 4432C36F CALL DWORD PTR DS:[<&KERNEL32.LeaveCriti>; \LeaveCriticalSection //6FC021E9 |. FF15 4432C36F CALL DWORD PTR DS:[<&KERNEL32.LeaveCriti>; \LeaveCriticalSection
//6FC18D89 |. FF15 5832C36F CALL DWORD PTR DS:[<&KERNEL32.LeaveCriti>; \LeaveCriticalSection //6FC18D89 |. FF15 5832C36F CALL DWORD PTR DS:[<&KERNEL32.LeaveCriti>; \LeaveCriticalSection
//6FC1DA79 |. FF15 3C32C36F CALL DWORD PTR DS:[<&KERNEL32.LeaveCriti>; \LeaveCriticalSection
log_msg("\n" ); log_msg("\n" );
@@ -170,7 +170,7 @@ void Install_PlugYImagesFiles()
log_msg("Patch D2Client to load/free custom images. (PlugYImagesFiles)\n"); log_msg("Patch D2Client to load/free custom images. (PlugYImagesFiles)\n");
// Load custom images // Load custom images
mem_seek R7(D2Client, 57E21, 57E21, 5E4B1, 2E101, B67E1, 82761, 27EAE, 6E0BE); mem_seek R7(D2Client, 57E21, 57E21, 5E4B1, 2E101, B67E1, 82761, 27EAE);
memt_byte( 0xB9 ,0xE8); memt_byte( 0xB9 ,0xE8);
MEMT_REF4( 0x0000000C , caller_loadCustomImages); MEMT_REF4( 0x0000000C , caller_loadCustomImages);
//6FAFE4B1 |. B9 0C000000 MOV ECX,0C //6FAFE4B1 |. B9 0C000000 MOV ECX,0C
@@ -178,10 +178,9 @@ void Install_PlugYImagesFiles()
//6FB667E1 |. B9 0C000000 MOV ECX,0C //6FB667E1 |. B9 0C000000 MOV ECX,0C
//6FB32761 |. B9 0C000000 MOV ECX,0C //6FB32761 |. B9 0C000000 MOV ECX,0C
//6FAD7EAE |. B9 0C000000 MOV ECX,0C //6FAD7EAE |. B9 0C000000 MOV ECX,0C
//6FB1E0BE |. B9 0C000000 MOV ECX,0C
// Free custom images // Free custom images
mem_seek R7(D2Client, 57FA9, 57FA9, 5E639, 2D12D, B580D, 8158D, 26F8D, 6D07D); mem_seek R7(D2Client, 57FA9, 57FA9, 5E639, 2D12D, B580D, 8158D, 26F8D);
memt_byte( 0xB9 ,0xE8); memt_byte( 0xB9 ,0xE8);
MEMT_REF4( 0x0000000C , caller_freeCustomImages); MEMT_REF4( 0x0000000C , caller_freeCustomImages);
//6FAFE639 |> B9 0C000000 MOV ECX,0C //6FAFE639 |> B9 0C000000 MOV ECX,0C
@@ -189,7 +188,6 @@ void Install_PlugYImagesFiles()
//6FB6580D |> B9 0C000000 MOV ECX,0C //6FB6580D |> B9 0C000000 MOV ECX,0C
//6FB3158D |> B9 0C000000 MOV ECX,0C //6FB3158D |> B9 0C000000 MOV ECX,0C
//6FAD6F8D |> B9 0C000000 MOV ECX,0C //6FAD6F8D |> B9 0C000000 MOV ECX,0C
//6FB1D07D |> B9 0C000000 MOV ECX,0C
log_msg("\n" ); log_msg("\n" );
@@ -245,7 +243,7 @@ void Install_PlugYTxtFiles()
// lookupItemStatCost = (void*)R7(D2Common, A1D70, A1D70, AA1D8, 0000, 0000, 0000, 0000); // lookupItemStatCost = (void*)R7(D2Common, A1D70, A1D70, AA1D8, 0000, 0000, 0000, 0000);
// Load custom txt files // Load custom txt files
mem_seek R7(D2Common, 7F4B, 7F4B, 2F7D7, 76854, 37444, 81C44, 5D6E4, 855E4); mem_seek R7(D2Common, 7F4B, 7F4B, 2F7D7, 76854, 37444, 81C44, 5D6E4);
MEMC_REF4( D2LoadSuperuniques, version_D2Common >= V111 ? caller_loadTxtFiles_111 : caller_loadTxtFiles ); MEMC_REF4( D2LoadSuperuniques, version_D2Common >= V111 ? caller_loadTxtFiles_111 : caller_loadTxtFiles );
//6FD47F4A |. E8 B1750100 CALL D2Common.6FD5F500 //6FD47F4A |. E8 B1750100 CALL D2Common.6FD5F500
//6FD47F4A |. E8 C1750100 CALL D2Common.6FD5F510 //6FD47F4A |. E8 C1750100 CALL D2Common.6FD5F510
@@ -254,10 +252,9 @@ void Install_PlugYTxtFiles()
//6FD87443 |. E8 58B6FFFF CALL D2Common.6FD82AA0 ; \D2Common.6FD82AA0 //6FD87443 |. E8 58B6FFFF CALL D2Common.6FD82AA0 ; \D2Common.6FD82AA0
//6FDD1C43 |. E8 58B6FFFF CALL D2Common.6FDCD2A0 ; \D2Common.6FDCD2A0 //6FDD1C43 |. E8 58B6FFFF CALL D2Common.6FDCD2A0 ; \D2Common.6FDCD2A0
//6FDAD6E3 |. E8 88C1FFFF CALL D2Common.6FDA9870 ; \D2Common.6FDA9870 //6FDAD6E3 |. E8 88C1FFFF CALL D2Common.6FDA9870 ; \D2Common.6FDA9870
//6FDD55E3 |. E8 58B6FFFF CALL D2Common.6FDD0C40 ; \D2Common.6FDD0C40
// Free custom txt files // Free custom txt files
mem_seek R7(D2Common, 79EC, 79EC, 10186, 332B3, 15AB3, 44E13, 5E8B3, FAA3); mem_seek R7(D2Common, 79EC, 79EC, 10186, 332B3, 15AB3, 44E13, 5E8B3);
MEMJ_REF4( D2Fog10212, caller_freeTxtFiles ); MEMJ_REF4( D2Fog10212, caller_freeTxtFiles );
//6FD479EB . E8 C8C00600 CALL <JMP.&Fog.#10212> //6FD479EB . E8 C8C00600 CALL <JMP.&Fog.#10212>
//6FD479EB . E8 C8C00600 CALL <JMP.&Fog.#10212> //6FD479EB . E8 C8C00600 CALL <JMP.&Fog.#10212>
@@ -266,7 +263,6 @@ void Install_PlugYTxtFiles()
//6FD65AB2 |. E8 B537FFFF CALL <JMP.&Fog.#10212> //6FD65AB2 |. E8 B537FFFF CALL <JMP.&Fog.#10212>
//6FD94E12 |. E8 1744FCFF CALL <JMP.&Fog.#10212> //6FD94E12 |. E8 1744FCFF CALL <JMP.&Fog.#10212>
//6FDAE8B2 |. E8 8FA9FAFF CALL <JMP.&Fog.#10212> //6FDAE8B2 |. E8 8FA9FAFF CALL <JMP.&Fog.#10212>
//6FD5FAA2 |. E8 5FB4FFFF CALL <JMP.&Fog.#10212>
log_msg("\n" ); log_msg("\n" );

52
PlugY/Progress.txt Normal file
View File

@@ -0,0 +1,52 @@
Parameters.h et PlugY.rc => version changing
A faire :
A tester :
UPDATED :
DONE D2funcs.h
DONE BigStash.cpp
DONE ClientSaveFile.cpp
DONE Commands.cpp
DONE Common.cpp
DONE CustomLibraries.cpp
DONE D2functions.cpp
DONE D2wrapper.cpp
DONE Error.cpp
DONE ExtendedSaveFile.cpp
DONE ExtraOptions.cpp
DONE GlobalVariable.cpp
DONE InfinityStash.cpp
DONE INIfile.cpp
DONE Interface_Skills.cpp
DONE Interface_Stash.cpp
DONE Interface_Stats.cpp
DONE Language.cpp
DONE LoadPlayerData.cpp
DONE MainScreen.cpp
DONE ModifMemory.cpp
DONE NewInterface_CubeListing.cpp
DONE NewInterface_Runewords.cpp
DONE NewInterface_Stats.cpp
DONE NewInterface_StatsPageTwo.cpp
DONE NewInterfaces.cpp
DONE OthersFeatures.cpp
DONE Parameters.cpp
DONE PlayerCustomData.cpp
DONE PlugY.cpp
DONE PlugY.rc
DONE PlugYFiles.cpp
DONE SavePath.cpp
DONE SavePlayerData.cpp
DONE SharedSaveFile.cpp
DONE SkillPerLevelUp.cpp
DONE SkillsPoints.cpp
DONE StatPerLevelUp.cpp
DONE StatsPoints.cpp
DONE UberQuest.cpp
DONE UpdateClient.cpp
DONE UpdateServer.cpp
DONE WorldEvent.cpp

View File

@@ -1,6 +1,5 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
Changing the current save path. Changing the current save path.
@@ -8,6 +7,8 @@
#include "savePath.h" #include "savePath.h"
#include "common.h" #include "common.h"
#include "error.h"
#include "d2functions.h"
char* savePath = NULL; char* savePath = NULL;
bool active_changingSavePath = false; bool active_changingSavePath = false;
@@ -122,7 +123,7 @@ void Install_ChangingSavePath()
if (version_Fog >= V111) if (version_Fog >= V111)
{ {
// Appel de notre fct d'ajout d'un sous-r<>pertoire // Appel de notre fct d'ajout d'un sous-r<>pertoire
mem_seek R7(Fog, 000, 000, 000, 185F6, 1C106, 1F086, 17F86, 1E146); mem_seek R7(Fog, 000, 000, 000, 185F6, 1C106, 1F086, 17F86);
memt_byte( 0x83 ,0xE8); // CALL changeSavePath memt_byte( 0x83 ,0xE8); // CALL changeSavePath
MEMT_REF4( 0x0575FFF8, changeSavePath_111); MEMT_REF4( 0x0575FFF8, changeSavePath_111);
//6FF685F6 . 83F8 FF CMP EAX,-1 //6FF685F6 . 83F8 FF CMP EAX,-1
@@ -133,21 +134,18 @@ void Install_ChangingSavePath()
//6FF6F089 . 75 05 JNZ SHORT Fog.6FF6F090 //6FF6F089 . 75 05 JNZ SHORT Fog.6FF6F090
//6FF67F86 . 83F8 FF CMP EAX,-1 //6FF67F86 . 83F8 FF CMP EAX,-1
//6FF67F89 . 75 05 JNZ SHORT Fog.6FF67F90 //6FF67F89 . 75 05 JNZ SHORT Fog.6FF67F90
//6FF6E146 . 83F8 FF CMP EAX,-1
//6FF6E149 . 75 05 JNZ SHORT Fog.6FF50F64
// Pour cr<63>er le bon chemin de sauvegarde // Pour cr<63>er le bon chemin de sauvegarde
mem_seek R7(Fog, 000, 000, 000, 18616, 1C126, 1F0A6, 17FA6, 1E166); mem_seek R7(Fog, 000, 000, 000, 18616, 1C126, 1F0A6, 17FA6);
MEMJ_REF4( D2Storm503, forCreateSavePath); MEMJ_REF4( D2Storm503, forCreateSavePath);
//6FF68615 . E8 A246FFFF CALL <JMP.&Storm.#503> //6FF68615 . E8 A246FFFF CALL <JMP.&Storm.#503>
//6FF6C125 . E8 C20BFFFF CALL <JMP.&Storm.#503> //6FF6C125 . E8 C20BFFFF CALL <JMP.&Storm.#503>
//6FF6F0A5 . E8 34DDFEFF CALL <JMP.&Storm.#503> //6FF6F0A5 . E8 34DDFEFF CALL <JMP.&Storm.#503>
//6FF67FA5 . E8 504EFFFF CALL <JMP.&Storm.#503> //6FF67FA5 . E8 504EFFFF CALL <JMP.&Storm.#503>
//6FF6E165 . E8 6AEBFEFF CALL <JMP.&Storm.#503>
// Remove registry update // Remove registry update
mem_seek R7(Fog, 000, 000, 000, 1861A, 1C12A, 1F0AA, 17FAA, 1E16A); mem_seek R7(Fog, 000, 000, 000, 1861A, 1C12A, 1F0AA, 17FAA);
memt_byte( 0x56 ,0xEB); // JMP SHORT fog.6FF6862C memt_byte( 0x56 ,0xEB); // JMP SHORT fog.6FF6862C
memt_byte( 0x6A ,0x10); // memt_byte( 0x6A ,0x10); //
memt_byte( 0x00 ,0x90); // NOP memt_byte( 0x00 ,0x90); // NOP
@@ -168,8 +166,6 @@ void Install_ChangingSavePath()
//6FF6F0B7 . E8 58DDFEFF CALL <JMP.&Storm.#425> //6FF6F0B7 . E8 58DDFEFF CALL <JMP.&Storm.#425>
//6FF67FAA . 56 PUSH ESI //6FF67FAA . 56 PUSH ESI
//6FF67FAB . 6A 00 PUSH 0 //6FF67FAB . 6A 00 PUSH 0
//6FF6E16A . 56 PUSH ESI
//6FF6E16B . 6A 00 PUSH 0
} else { } else {

View File

@@ -1,15 +1,16 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
Save Player Custom Data. Save Player Custom Data.
=================================================================*/ =================================================================*/
#include "common.h"
#include "error.h"
#include "d2functions.h"
#include "infinityStash.h" #include "infinityStash.h"
#include "extendedSaveFile.h" #include "extendedSaveFile.h"
#include "sharedSaveFile.h" #include "sharedSaveFile.h"
#include "common.h"
void STDCALL SaveSPPlayerCustomData(Unit* ptChar) void STDCALL SaveSPPlayerCustomData(Unit* ptChar)
@@ -520,17 +521,16 @@ void Install_SavePlayerData()
log_msg("Patch D2Game & D2Client for save Player's custom data. (SavePlayerData)\n"); log_msg("Patch D2Game & D2Client for save Player's custom data. (SavePlayerData)\n");
//Save single player custom data. //Save single player custom data.
mem_seek R7(D2Game, 4DF04, 4E304, 5A624, B9365, 25475, 44165, 53F35, 39835); mem_seek R7(D2Game, 4DF04, 4E304, 5A624, B9365, 25475, 44165, 53F35);
MEMJ_REF4( D2FogGetSavePath, version_D2Game >= V111 ? caller_SaveSPPlayerCustomData_111 : version_D2Game != V109b ? caller_SaveSPPlayerCustomData : caller_SaveSPPlayerCustomData_9); MEMJ_REF4( D2FogGetSavePath, version_D2Game >= V111 ? caller_SaveSPPlayerCustomData_111 : version_D2Game != V109b ? caller_SaveSPPlayerCustomData : caller_SaveSPPlayerCustomData_9);
//6FC8A623 E8 3E210900 CALL <JMP.&Fog.#10115> //6FC8A623 E8 3E210900 CALL <JMP.&Fog.#10115>
//02039364 |. E8 3B0FF5FF CALL <JMP.&Fog.#10115> //02039364 |. E8 3B0FF5FF CALL <JMP.&Fog.#10115>
//01F95474 |. E8 C34EFEFF CALL <JMP.&Fog.#10115> //01F95474 |. E8 C34EFEFF CALL <JMP.&Fog.#10115>
//6FC64164 |. E8 EB61FCFF CALL <JMP.&Fog.#10115> //6FC64164 |. E8 EB61FCFF CALL <JMP.&Fog.#10115>
//6FC73F34 |. E8 DD63FBFF CALL <JMP.&Fog.#10115> //6FC73F34 |. E8 DD63FBFF CALL <JMP.&Fog.#10115>
//6FC59834 |. E8 FB0AFDFF CALL <JMP.&Fog.#10115>
//Send SaveFiles //Send SaveFiles
mem_seek R7(D2Game, 4DFFA, 4E3FA, 5A720, B92DB, 253EB, 440DB, 53EAB, 397AB); mem_seek R7(D2Game, 4DFFA, 4E3FA, 5A720, B92DB, 253EB, 440DB, 53EAB);
memt_byte( 0x8B ,0x90); // NOP memt_byte( 0x8B ,0x90); // NOP
memt_byte( version_D2Game >= V111 ? 0x44 : version_D2Game != V109b ? 0x7C : 0x74 ,0xE8); // CALL memt_byte( version_D2Game >= V111 ? 0x44 : version_D2Game != V109b ? 0x7C : 0x74 ,0xE8); // CALL
MEMT_REF4( version_D2Game >= V111 ? 0xC0850424 : version_D2Game != V109b ? 0xFF851024 : 0xF6851024, version_D2Game >= V111 ? caller_SendSaveFilesToSave_111 : version_D2Game != V109b ? caller_SendSaveFilesToSave : caller_SendSaveFilesToSave_9); MEMT_REF4( version_D2Game >= V111 ? 0xC0850424 : version_D2Game != V109b ? 0xFF851024 : 0xF6851024, version_D2Game >= V111 ? caller_SendSaveFilesToSave_111 : version_D2Game != V109b ? caller_SendSaveFilesToSave : caller_SendSaveFilesToSave_9);
@@ -544,10 +544,8 @@ void Install_SavePlayerData()
//6FC640DF |. 85C0 TEST EAX,EAX //6FC640DF |. 85C0 TEST EAX,EAX
//6FC73EAB |. 8B4424 04 MOV EAX,DWORD PTR SS:[ESP+4] //6FC73EAB |. 8B4424 04 MOV EAX,DWORD PTR SS:[ESP+4]
//6FC73EAF |. 85C0 TEST EAX,EAX //6FC73EAF |. 85C0 TEST EAX,EAX
//6FC597AB |. 8B4424 04 MOV EAX,DWORD PTR SS:[ESP+4]
//6FC597AF |. 85C0 TEST EAX,EAX
mem_seek R7(D2Game, 7993, 7A13, 7BBB, E2943, E6D83, A89D3, 2D173, BEDD3); mem_seek R7(D2Game, 7993, 7A13, 7BBB, E2943, E6D83, A89D3, 2D173);
memt_byte( 0x8B ,0x90); // NOP memt_byte( 0x8B ,0x90); // NOP
memt_byte( version_D2Game >= V110 ? 0x8E : 0x86 ,0xE8); // CALL memt_byte( version_D2Game >= V110 ? 0x8E : 0x86 ,0xE8); // CALL
MEMT_REF4( version_D2Game >= V110 ? 0x0000017C : version_D2Game == V109d ? 0x0000174 : 0x00000150, version_D2Game >= V110 ? caller_ManageNextPacketToSend : version_D2Game == V109d ? caller_ManageNextPacketToSend_9d : caller_ManageNextPacketToSend_9); MEMT_REF4( version_D2Game >= V110 ? 0x0000017C : version_D2Game == V109d ? 0x0000174 : 0x00000150, version_D2Game >= V110 ? caller_ManageNextPacketToSend : version_D2Game == V109d ? caller_ManageNextPacketToSend_9d : caller_ManageNextPacketToSend_9);
@@ -556,7 +554,6 @@ void Install_SavePlayerData()
//02056D83 |. 8B8E 7C010000 MOV ECX,DWORD PTR DS:[ESI+17C] //02056D83 |. 8B8E 7C010000 MOV ECX,DWORD PTR DS:[ESI+17C]
//6FCC89D3 |. 8B8E 7C010000 MOV ECX,DWORD PTR DS:[ESI+17C] //6FCC89D3 |. 8B8E 7C010000 MOV ECX,DWORD PTR DS:[ESI+17C]
//6FC4D173 |. 8B8E 7C010000 MOV ECX,DWORD PTR DS:[ESI+17C] //6FC4D173 |. 8B8E 7C010000 MOV ECX,DWORD PTR DS:[ESI+17C]
//6FCDEDD3 |. 8B8E 7C010000 MOV ECX,DWORD PTR DS:[ESI+17C]
// mem_seek R7(D2Game, 7B82, 7C05, 7DCF, 0000, 0000, 0000, 0000);//117FC, 117EC, 11DBC // mem_seek R7(D2Game, 7B82, 7C05, 7DCF, 0000, 0000, 0000, 0000);//117FC, 117EC, 11DBC
// memt_byte( 0x8B ,0xE8); // CALL // memt_byte( 0x8B ,0xE8); // CALL
@@ -568,17 +565,16 @@ void Install_SavePlayerData()
if ( version_D2Game >= V111 ) if ( version_D2Game >= V111 )
{ {
//Received SaveFiles //Received SaveFiles
mem_seek R7(D2Client, 116F0, 116E0, 11CB0, 89246, 32076, 7BCD6, 43946, 448E6); mem_seek R7(D2Client, 116F0, 116E0, 11CB0, 89246, 32076, 7BCD6, 43946);
memt_byte( 0x0F ,0xE8); memt_byte( 0x0F ,0xE8);
MEMT_REF4( 0x0C2444B6, caller_ReceivedSaveFilesToSave_111); MEMT_REF4( 0x0C2444B6, caller_ReceivedSaveFilesToSave_111);
//6FB39246 |. 0FB64424 0C |MOVZX EAX,BYTE PTR SS:[ESP+C] //6FB39246 |. 0FB64424 0C |MOVZX EAX,BYTE PTR SS:[ESP+C]
//6FAE2076 |. 0FB64424 0C |MOVZX EAX,BYTE PTR SS:[ESP+C] //6FAE2076 |. 0FB64424 0C |MOVZX EAX,BYTE PTR SS:[ESP+C]
//6FB2BCD6 |. 0FB64424 0C |MOVZX EAX,BYTE PTR SS:[ESP+C] //6FB2BCD6 |. 0FB64424 0C |MOVZX EAX,BYTE PTR SS:[ESP+C]
//6FAF3946 |. 0FB64424 0C |MOVZX EAX,BYTE PTR SS:[ESP+C] //6FAF3946 |. 0FB64424 0C |MOVZX EAX,BYTE PTR SS:[ESP+C]
//6FAF48E6 |. 0FB64424 0C |MOVZX EAX,BYTE PTR SS:[ESP+C]
// Save multiplayer player custom data. // Save multiplayer player custom data.
mem_seek R7(D2Client, 117FC, 117EC, 11DBC, 99AE2, BD7F2, 64A22, AC572, 829C2); mem_seek R7(D2Client, 117FC, 117EC, 11DBC, 99AE2, BD7F2, 64A22, AC572);
memt_byte( 0x81 ,0xE8); // CALL memt_byte( 0x81 ,0xE8); // CALL
MEMT_REF4( 0x55AA55F9, caller_SaveMPPlayerCustomData_111); MEMT_REF4( 0x55AA55F9, caller_SaveMPPlayerCustomData_111);
memt_byte( 0xAA ,0x90); // CALL memt_byte( 0xAA ,0x90); // CALL
@@ -586,17 +582,16 @@ void Install_SavePlayerData()
//6FB6D7F2 |. 81F9 55AA55AA CMP ECX,AA55AA55 //6FB6D7F2 |. 81F9 55AA55AA CMP ECX,AA55AA55
//6FB14A22 |. 81F9 55AA55AA CMP ECX,AA55AA55 //6FB14A22 |. 81F9 55AA55AA CMP ECX,AA55AA55
//6FB5C572 |. 81F9 55AA55AA CMP ECX,AA55AA55 //6FB5C572 |. 81F9 55AA55AA CMP ECX,AA55AA55
//6FB329C2 |. 81F9 55AA55AA CMP ECX,AA55AA55
} else { } else {
//Received SaveFiles //Received SaveFiles
mem_seek R7(D2Client, 116F0, 116E0, 11CB0, 89246, 32076, 7BCD6, 0000, 0000); mem_seek R7(D2Client, 116F0, 116E0, 11CB0, 89246, 32076, 7BCD6, 0000);
memt_byte( 0x81 ,0x90); // NOP memt_byte( 0x81 ,0x90); // NOP
memt_byte( 0xEC ,0xE8); // CALL memt_byte( 0xEC ,0xE8); // CALL
MEMT_REF4( 0x000005F4, caller_ReceivedSaveFilesToSave); MEMT_REF4( 0x000005F4, caller_ReceivedSaveFilesToSave);
//6FAB1CB0 |$ 81EC F4050000 SUB ESP,5F4 //6FAB1CB0 |$ 81EC F4050000 SUB ESP,5F4
// Save multiplayer player custom data. // Save multiplayer player custom data.
mem_seek R7(D2Client, 117FC, 117EC, 11DBC, 99AE2, BD7F2, 64A22, 0000, 0000); mem_seek R7(D2Client, 117FC, 117EC, 11DBC, 99AE2, BD7F2, 64A22, 0000);
memt_byte( 0x8B ,0xE8); // CALL memt_byte( 0x8B ,0xE8); // CALL
MEMT_REF4( 0x04518B01, caller_SaveMPPlayerCustomData); MEMT_REF4( 0x04518B01, caller_SaveMPPlayerCustomData);
//6FAB1DBC |. 8B01 MOV EAX,DWORD PTR DS:[ECX] //6FAB1DBC |. 8B01 MOV EAX,DWORD PTR DS:[ECX]

View File

@@ -5,11 +5,12 @@
=================================================================*/ =================================================================*/
#include "common.h"
#include "sharedSaveFile.h" #include "sharedSaveFile.h"
#include "error.h"
#include "d2functions.h"
#include "infinityStash.h" #include "infinityStash.h"
#include "customLibraries.h" #include "customLibraries.h"
#include "common.h"
#include <stdio.h>
#define FILE_SHAREDSTASH 0x00535353 //"SSS " #define FILE_SHAREDSTASH 0x00535353 //"SSS "
#define BUFFER_SIZE 0x4000 #define BUFFER_SIZE 0x4000

View File

@@ -1,6 +1,5 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
Change Skill win per level up. Change Skill win per level up.
@@ -8,6 +7,8 @@
#include "skillPerLevelUp.h" #include "skillPerLevelUp.h"
#include "common.h" #include "common.h"
#include "error.h"
#include "d2functions.h"
bool active_SkillPerLevelUpChange=0; bool active_SkillPerLevelUpChange=0;
DWORD skillPerLevelUp=1; DWORD skillPerLevelUp=1;
@@ -35,14 +36,14 @@ void Install_SkillPerLevelUp()
log_msg("Patch D2Game for change Skill points win per level up. (SkillPerLevelUp)\n"); log_msg("Patch D2Game for change Skill points win per level up. (SkillPerLevelUp)\n");
mem_seek R7(D2Game, 42261, 42651, 4ED60, D7AE5, 79695, AA455, EB1E5, EDCA5); mem_seek R7(D2Game, 42261, 42651, 4ED60, D7AE5, 79695, AA455, EB1E5);
MEMJ_REF4( V2AddPlayerStat, version_D2Game >= V111 ? caller_changeSkillPerLevelUp_111 : caller_changeSkillPerLevelUp); MEMJ_REF4( V2AddPlayerStat, version_D2Game >= V111 ? caller_changeSkillPerLevelUp_111 : caller_changeSkillPerLevelUp);
//6FC7ED5F |. E8 56CB0900 CALL <JMP.&D2Common.#10518> //6FC7ED5F |. E8 56CB0900 CALL <JMP.&D2Common.#10518>
//02057AE4 |. E8 9F28F3FF CALL <JMP.&D2Common.#10109> //02057AE4 |. E8 9F28F3FF CALL <JMP.&D2Common.#10109>
//01FE9694 |. E8 1B0DF9FF CALL <JMP.&D2Common.#10627> //01FE9694 |. E8 1B0DF9FF CALL <JMP.&D2Common.#10627>
//6FCCA454 |. E8 5F01F6FF CALL <JMP.&D2Common.#10762> //6FCCA454 |. E8 5F01F6FF CALL <JMP.&D2Common.#10762>
//6FD0B1E4 |. E8 E9F2F1FF CALL <JMP.&D2Common.#10551> //6FD0B1E4 |. E8 E9F2F1FF CALL <JMP.&D2Common.#10551>
//6FD0DCA4 |. E8 FDC6F1FF CALL <JMP.&D2Common.#10645>
log_msg("\n"); log_msg("\n");

View File

@@ -5,9 +5,11 @@
=================================================================*/ =================================================================*/
#include "common.h"
#include "error.h"
#include "d2functions.h"
#include "updateServer.h" #include "updateServer.h"
#include "interface_Skills.h" // Install_InterfaceSkills() #include "interface_Skills.h" // Install_InterfaceSkills()
#include "common.h"
bool active_SkillsPoints=0; bool active_SkillsPoints=0;
bool unassignSkillsPointsOneByOne=0; bool unassignSkillsPointsOneByOne=0;

View File

@@ -1,6 +1,5 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
Change Stat win per level up. Change Stat win per level up.
@@ -8,6 +7,8 @@
#include "statPerLevelUp.h" #include "statPerLevelUp.h"
#include "common.h" #include "common.h"
#include "error.h"
#include "d2functions.h"
bool active_StatPerLevelUpChange=0; bool active_StatPerLevelUpChange=0;
DWORD statPerLevelUp=5; DWORD statPerLevelUp=5;
@@ -33,14 +34,13 @@ void Install_StatPerLevelUp()
log_msg("Patch D2Game for change Stat points win per level up. (StatPerLevelUp)\n"); log_msg("Patch D2Game for change Stat points win per level up. (StatPerLevelUp)\n");
mem_seek R7(D2Game, 42258, 42648, 4ED55, D7ADA, 7968A, AA44A, EB1DA, EDC9A); mem_seek R7(D2Game, 42258, 42648, 4ED55, D7ADA, 7968A, AA44A, EB1DA);
MEMJ_REF4( V2AddPlayerStat, version_D2Game >= V111 ? caller_changeStatPerLevelUp_111 : caller_changeStatPerLevelUp); MEMJ_REF4( V2AddPlayerStat, version_D2Game >= V111 ? caller_changeStatPerLevelUp_111 : caller_changeStatPerLevelUp);
//6FC7ED54 |. E8 61CB0900 CALL <JMP.&D2Common.#10518> //6FC7ED54 |. E8 61CB0900 CALL <JMP.&D2Common.#10518>
//02057AD9 |. E8 AA28F3FF CALL <JMP.&D2Common.#10109> //02057AD9 |. E8 AA28F3FF CALL <JMP.&D2Common.#10109>
//01FE9689 |. E8 260DF9FF CALL <JMP.&D2Common.#10627> //01FE9689 |. E8 260DF9FF CALL <JMP.&D2Common.#10627>
//6FCCA449 |. E8 6A01F6FF CALL <JMP.&D2Common.#10762> //6FCCA449 |. E8 6A01F6FF CALL <JMP.&D2Common.#10762>
//6FD0B1D9 |. E8 F4F2F1FF CALL <JMP.&D2Common.#10551> //6FD0B1D9 |. E8 F4F2F1FF CALL <JMP.&D2Common.#10551>
//6FD0DC99 |. E8 08C7F1FF CALL <JMP.&D2Common.#10645>
log_msg("\n"); log_msg("\n");

View File

@@ -1,15 +1,17 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
Unassign Stats Point for futher re-assignment. Unassign Stats Point for futher re-assignment.
=================================================================*/ =================================================================*/
#include "common.h"
#include "error.h"
#include "d2functions.h"
#include "plugYFiles.h" // Install_PlugYImagesFiles() #include "plugYFiles.h" // Install_PlugYImagesFiles()
#include "interface_Stats.h" // Install_InterfaceStats() #include "interface_Stats.h" // Install_InterfaceStats()
#include "updateServer.h" #include "updateServer.h"
#include "common.h"
#include <stdio.h> #include <stdio.h>
bool active_StatsPoints=0; bool active_StatsPoints=0;
@@ -159,12 +161,11 @@ void STDCALL printDisabledStatsBtn(WORD statID, sDrawImageInfo* data, DWORD x, D
{ {
WCHAR text[100]; WCHAR text[100];
if (active_StatsShiftClickLimit) if (active_StatsShiftClickLimit)
_snwprintf(text, sizeof(text) - 1, getLocalString(STR_STATS_UNASSIGN_WITH_LIMIT), limitValueToShiftClick); swprintf(text, getTranslatedString(STR_STATS_UNASSIGN_WITH_LIMIT),limitValueToShiftClick);
else else
_snwprintf(text, sizeof(text) - 1, getLocalString(STR_STATS_UNASSIGN_WITHOUT_LIMIT)); swprintf(text, getTranslatedString(STR_STATS_UNASSIGN_WITHOUT_LIMIT));
wcscat(text,L"\n"); wcscat(text,L"\n");
int len = wcslen(text); swprintf(text+wcslen(text), getTranslatedString(STR_STATS_BASE_MIN), statValue, minValue);
_snwprintf(text + len, sizeof(text) - len, getLocalString(STR_STATS_BASE_MIN), statValue, minValue);
D2SetFont(1); D2SetFont(1);
D2PrintPopup(text, x+18, y-32, WHITE, 1); D2PrintPopup(text, x+18, y-32, WHITE, 1);
} }
@@ -327,31 +328,30 @@ void Install_StatsPoints()
Install_UpdateServer(); Install_UpdateServer();
log_msg("Patch D2Client for unassign stat points when specified key is press. (StatsPoints)\n"); log_msg("Patch D2Client for unassign stat points when specified key is press. (StatsPoints)\n");
//if ( version_D2Client < V113 )
{
// Always print stat button images. // Always print stat button images.
mem_seek R7(D2Client, 29B12, 29B02, 30073, 82BBA, 8963A, 6B59A, BD1B5, BF955); mem_seek R7(D2Client, 29B12, 29B02, 30073, 82BBA, 8963A, 6B59A, BD1B5);
memt_byte( 0x8B, 0xEB ); // JMP SHORT D2Client.6FAD0088 memt_byte( 0x8B, 0xEB ); // JMP SHORT D2Client.6FAD0088
memt_byte( 0x4C, V7(D2Client, 12, 12, 13, 13, 13, 13, 13, 13) ); memt_byte( 0x4C, V7(D2Client, 12, 12, 13, 13, 13, 13, 13) );
memt_byte( 0x24, 0x90 ); // NOP memt_byte( 0x24, 0x90 ); // NOP
memt_byte( V7(D2Client, 20, 20, 14, 1C, 1C, 1C, 1C, 1C), 0x90 ); // NOP (V109d:0x20 , V110:0x14 memt_byte( V7(D2Client, 20, 20, 14, 1C, 1C, 1C, 1C), 0x90 ); // NOP (V109d:0x20 , V110:0x14
//6FAD0073 8B4C24 14 MOV ECX,DWORD PTR SS:[ESP+14] //6FAD0073 8B4C24 14 MOV ECX,DWORD PTR SS:[ESP+14]
//6FB32BBA > 8B4C24 1C MOV ECX,DWORD PTR SS:[ESP+1C] //6FB32BBA > 8B4C24 1C MOV ECX,DWORD PTR SS:[ESP+1C]
//6FB3963A > 8B4C24 1C MOV ECX,DWORD PTR SS:[ESP+1C] //6FB3963A > 8B4C24 1C MOV ECX,DWORD PTR SS:[ESP+1C]
//6FB1B59A > 8B4C24 1C MOV ECX,DWORD PTR SS:[ESP+1C] //6FB1B59A > 8B4C24 1C MOV ECX,DWORD PTR SS:[ESP+1C]
//6FB6D1B5 |> 8B4C24 1C MOV ECX,DWORD PTR SS:[ESP+1C] //6FB6D1B5 |> 8B4C24 1C MOV ECX,DWORD PTR SS:[ESP+1C]
//6FB6F955 > 8B4C24 1C MOV ECX,DWORD PTR SS:[ESP+1C]
//print our buttons //print our buttons
mem_seek R7(D2Client, 29B9D, 29B8D, 300FD, 82C54, 896D4, 6B637, BD23E, BF9DE); mem_seek R7(D2Client, 29B9D, 29B8D, 300FD, 82C54, 896D4, 6B637, BD23E);
MEMJ_REF4( D2PrintImage, caller_printUnassignStatsBtn); MEMJ_REF4( D2PrintImage, caller_printUnassignStatsBtn);
//6FB32C53 . E8 82A3F8FF CALL <JMP.&D2gfx.#10047> //6FB32C53 . E8 82A3F8FF CALL <JMP.&D2gfx.#10047>
//6FB396D3 . E8 D238F8FF CALL <JMP.&D2gfx.#10044> //6FB396D3 . E8 D238F8FF CALL <JMP.&D2gfx.#10044>
//6FB1B636 . E8 431AFAFF CALL <JMP.&D2gfx.#10024> //6FB1B636 . E8 431AFAFF CALL <JMP.&D2gfx.#10024>
//6FB6D23D . E8 54FEF4FF CALL <JMP.&D2gfx.#10041> //6FB6D23D . E8 54FEF4FF CALL <JMP.&D2gfx.#10041>
//6FB6F9DD . E8 ECD5F4FF CALL <JMP.&D2gfx.#10042>
// Always manage push down. // Always manage push down.
mem_seek R7(D2Client, 2AA7B, 2AA6B, 3134D, 827D9, 89259, 6B1B9, BCDD9, BF579); mem_seek R7(D2Client, 2AA7B, 2AA6B, 3134D, 827D9, 89259, 6B1B9, BCDD9);
memt_byte( 0x74, 0x90 ); // NOP memt_byte( 0x74, 0x90 ); // NOP
memt_byte( 0x4E, 0x90 ); // NOP memt_byte( 0x4E, 0x90 ); // NOP
//6FAD134D 74 4E JE SHORT D2Client.6FAD139D //6FAD134D 74 4E JE SHORT D2Client.6FAD139D
@@ -359,12 +359,11 @@ void Install_StatsPoints()
//6FB39259 . 74 4E JE SHORT D2Client.6FB392A9 //6FB39259 . 74 4E JE SHORT D2Client.6FB392A9
//6FB1B1B9 74 4E JE SHORT D2Client.6FB1B209 //6FB1B1B9 74 4E JE SHORT D2Client.6FB1B209
//6FB6CDD9 . 74 4E JE SHORT D2Client.6FB6CE29 //6FB6CDD9 . 74 4E JE SHORT D2Client.6FB6CE29
//6FB6F579 . 74 4E JE SHORT D2Client.6FB6F5C9
if ( version_D2Client >= V111 ) if ( version_D2Client >= V111 )
{ {
// On Push down. // On Push down.
mem_seek R7(D2Client, 2AAE6, 2AAD6, 313B8, 82844, 892C4, 6B224, BCE44, BF5E4); mem_seek R7(D2Client, 2AAE6, 2AAD6, 313B8, 82844, 892C4, 6B224, BCE44);
memt_byte( 0x6B, 0xE8 ); memt_byte( 0x6B, 0xE8 );
MEMT_REF4( 0x01BF0ED2, caller_pushDown_111); MEMT_REF4( 0x01BF0ED2, caller_pushDown_111);
memt_byte( 0x00, 0x6B ); // IMUL EDX,EDX,0E memt_byte( 0x00, 0x6B ); // IMUL EDX,EDX,0E
@@ -378,12 +377,10 @@ void Install_StatsPoints()
//6FB1B227 BF 01000000 MOV EDI,1 //6FB1B227 BF 01000000 MOV EDI,1
//6FB6CE44 > 6BD2 0E IMUL EDX,EDX,0E //6FB6CE44 > 6BD2 0E IMUL EDX,EDX,0E
//6FB6CE47 . BF 01000000 MOV EDI,1 //6FB6CE47 . BF 01000000 MOV EDI,1
//6FB6F5E4 > 6BD2 0E IMUL EDX,EDX,0E
//6FB6F5E7 . BF 01000000 MOV EDI,1
} else { } else {
// On Push down. // On Push down.
mem_seek R7(D2Client, 2AAE6, 2AAD6, 313B8, 82844, 892C4, 0000, 0000, 0000); mem_seek R7(D2Client, 2AAE6, 2AAD6, 313B8, 82844, 892C4, 0000, 0000);
memt_byte( 0x8D, 0xE8 ); // CALL memt_byte( 0x8D, 0xE8 ); // CALL
MEMT_REF4( 0x0000D504, caller_pushDown); MEMT_REF4( 0x0000D504, caller_pushDown);
memt_byte( 0x00, 0x90 ); // NOP memt_byte( 0x00, 0x90 ); // NOP
@@ -395,7 +392,7 @@ void Install_StatsPoints()
if ( version_D2Client >= V110 ) if ( version_D2Client >= V110 )
{ {
// Always manage push up. // Always manage push up.
mem_seek R7(D2Client, 0000, 0000, 3152E, 83869, 8A2E9, 6C249, BDE49, C05E9); mem_seek R7(D2Client, 0000, 0000, 3152E, 83869, 8A2E9, 6C249, BDE49);
memt_byte( 0x74, 0x90 ); // NOP memt_byte( 0x74, 0x90 ); // NOP
memt_byte( version_D2Client >= V111 ? 0x65 : 0x68, 0x90 ); // NOP memt_byte( version_D2Client >= V111 ? 0x65 : 0x68, 0x90 ); // NOP
//6FAD152E 74 68 JE SHORT D2Client.6FAD1598 //6FAD152E 74 68 JE SHORT D2Client.6FAD1598
@@ -403,10 +400,9 @@ void Install_StatsPoints()
//6FB3A2E9 . 74 65 JE SHORT D2Client.6FB3A350 //6FB3A2E9 . 74 65 JE SHORT D2Client.6FB3A350
//6FB1C249 74 65 JE SHORT D2Client.6FB1C2B0 //6FB1C249 74 65 JE SHORT D2Client.6FB1C2B0
//6FB6DE49 . 74 65 JE SHORT D2Client.6FB6DEB0 //6FB6DE49 . 74 65 JE SHORT D2Client.6FB6DEB0
//6FB705E9 . 74 65 JE SHORT D2Client.6FB70650
// Unassign stats point when ctrl is push. // Unassign stats point when ctrl is push.
mem_seek R7(D2Client, 0000, 0000, 315D3, 8391B, 8A39B, 6C2FB, BDEFB, C069B); mem_seek R7(D2Client, 0000, 0000, 315D3, 8391B, 8A39B, 6C2FB, BDEFB);
memt_byte( 0x66, 0xE8 ); // CALL memt_byte( 0x66, 0xE8 ); // CALL
MEMT_REF4( 0x077CC085, caller_UnassignStats); MEMT_REF4( 0x077CC085, caller_UnassignStats);
//6FAD15D3 . 66:85C0 TEST AX,AX //6FAD15D3 . 66:85C0 TEST AX,AX
@@ -419,25 +415,23 @@ void Install_StatsPoints()
//6FB1C2FE . 7C 07 JL SHORT D2Client.6FB1C307 //6FB1C2FE . 7C 07 JL SHORT D2Client.6FB1C307
//6FB6DEFB . 66:85C0 TEST AX,AX //6FB6DEFB . 66:85C0 TEST AX,AX
//6FB6DEFE . 7C 07 JL SHORT D2Client.6FB6DF07 //6FB6DEFE . 7C 07 JL SHORT D2Client.6FB6DF07
//6FB7069B . 66:85C0 TEST AX,AX
//6FB7069E . 7C 07 JL SHORT D2Client.6FB706A7
} else { } else {
// Always manage push up. // Always manage push up.
mem_seek R7(D2Client, 2AC55, 2AC45, 0000, 0000, 0000, 0000, 0000, 0000); mem_seek R7(D2Client, 2AC55, 2AC45, 0000, 0000, 0000, 0000, 0000);
memt_byte( 0x0F, 0x90 ); // NOP memt_byte( 0x0F, 0x90 ); // NOP
memt_byte( 0x84, 0x90 ); // NOP memt_byte( 0x84, 0x90 ); // NOP
memt_dword( 0x000000AE, 0x90909090 ); // NOP NOP NOP NOP memt_dword( 0x000000AE, 0x90909090 ); // NOP NOP NOP NOP
//6FACAC45 . 0F84 AE000000 JE D2Client.6FACACF9 //6FACAC45 . 0F84 AE000000 JE D2Client.6FACACF9
// Unassign stats point when ctrl is push. // Unassign stats point when ctrl is push.
mem_seek R7(D2Client, 2ACD9, 2ACC9, 0000, 0000, 0000, 0000, 0000, 0000); mem_seek R7(D2Client, 2ACD9, 2ACC9, 0000, 0000, 0000, 0000, 0000);
memt_byte( 0xB8, 0xE8 ); // CALL memt_byte( 0xB8, 0xE8 ); // CALL
MEMT_REF4( 0x00000001, caller_UnassignStats_9); MEMT_REF4( 0x00000001, caller_UnassignStats_9);
//6FACACC9 . B8 01000000 MOV EAX,1 //6FACACC9 . B8 01000000 MOV EAX,1
} }
// Set the id for the calling function. // Set the id for the calling function.
mem_seek R7(D2Client, 2AD02, 2ACF2, 31611, 8395E, 8A3DE, 6C33E, BDF3E, C06DE); mem_seek R7(D2Client, 2AD02, 2ACF2, 31611, 8395E, 8A3DE, 6C33E, BDF3E);
if ( version_D2Client >= V111 ) { if ( version_D2Client >= V111 ) {
memt_byte( 0x66, 0xE8 ); // CALL memt_byte( 0x66, 0xE8 ); // CALL
MEMT_REF4( 0x15244C89, caller_setValue_111); MEMT_REF4( 0x15244C89, caller_setValue_111);
@@ -445,12 +439,11 @@ void Install_StatsPoints()
//6FB3A3DE . 66:894C24 15 MOV WORD PTR SS:[ESP+15],CX //6FB3A3DE . 66:894C24 15 MOV WORD PTR SS:[ESP+15],CX
//6FB1C33E . 66:894C24 15 MOV WORD PTR SS:[ESP+15],CX ; | //6FB1C33E . 66:894C24 15 MOV WORD PTR SS:[ESP+15],CX ; |
//6FB6DF3E . 66:894C24 15 MOV WORD PTR SS:[ESP+15],CX ; | //6FB6DF3E . 66:894C24 15 MOV WORD PTR SS:[ESP+15],CX ; |
//6FB706DE . 66:894C24 15 MOV WORD PTR SS:[ESP+15],CX ; |
} else { } else {
MEMC_REF4( D2SendToServer3, caller_setValue); MEMC_REF4( D2SendToServer3, caller_setValue);
//6FAD1610 . E8 7BC3FDFF CALL D2Client.6FAAD990 //6FAD1610 . E8 7BC3FDFF CALL D2Client.6FAAD990
} }
log_msg("\n"); } log_msg("\n");
isInstalled = true; isInstalled = true;
} }
@@ -482,7 +475,7 @@ void Install_StatsLimitShiftClick()
log_msg("Patch D2Client for limit the assigment of stat points when shift is used. (LimitShift)\n"); log_msg("Patch D2Client for limit the assigment of stat points when shift is used. (LimitShift)\n");
// Limit the assigment of stat points. // Limit the assigment of stat points.
mem_seek R7(D2Client, 2ACD0, 2ACC0, 315CD, 83915, 8A395, 6C2F5, BDEF5, C0695); mem_seek R7(D2Client, 2ACD0, 2ACC0, 315CD, 83915, 8A395, 6C2F5, BDEF5);
memt_byte( 0xFF, 0x90 ); // NOP memt_byte( 0xFF, 0x90 ); // NOP
memt_byte( 0x15, 0xE8 ); // CALL memt_byte( 0x15, 0xE8 ); // CALL
MEMD_REF4( GetKeyState, version_D2Client >= V111 ? caller_LimitShift_111 : caller_LimitShift); MEMD_REF4( GetKeyState, version_D2Client >= V111 ? caller_LimitShift_111 : caller_LimitShift);
@@ -491,7 +484,6 @@ void Install_StatsLimitShiftClick()
//6FB3A395 . FF15 08F1B76F CALL DWORD PTR DS:[<&USER32.GetKeyState>] //6FB3A395 . FF15 08F1B76F CALL DWORD PTR DS:[<&USER32.GetKeyState>]
//6FB1C2F5 . FF15 10F1B76F CALL DWORD PTR DS:[<&USER32.GetKeyState>>; \GetKeyState //6FB1C2F5 . FF15 10F1B76F CALL DWORD PTR DS:[<&USER32.GetKeyState>>; \GetKeyState
//6FB6DEF5 . FF15 04F1B76F CALL DWORD PTR DS:[<&USER32.GetKeyState>>; \GetKeyState //6FB6DEF5 . FF15 04F1B76F CALL DWORD PTR DS:[<&USER32.GetKeyState>>; \GetKeyState
//6FB70695 . FF15 2001B86F CALL DWORD PTR DS:[<&USER32.GetKeyState>>; \GetKeyState
log_msg("\n"); log_msg("\n");

View File

@@ -1,13 +1,13 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
Uber Quest Management. Uber Quest Management.
=================================================================*/ =================================================================*/
#include "uberQuest.h"
#include "common.h" #include "common.h"
#include "error.h"
#include "d2functions.h"
bool active_UberQuest=0; bool active_UberQuest=0;
@@ -327,45 +327,42 @@ void Install_UberQuest()
DWORD oldProtection; DWORD oldProtection;
// open Red Portal // open Red Portal
VirtualProtect((LPVOID)R7(D2Game,0,0,0,FA480,FA7B8, FA228, FA5F0, FA2C4), 8, PAGE_EXECUTE_READWRITE, &oldProtection); VirtualProtect((LPVOID)R7(D2Game,0,0,0,FA480,FA7B8, FA228, FA5F0), 8, PAGE_EXECUTE_READWRITE, &oldProtection);
mem_seek R7(D2Game, 0000, 0000, 0000, FA480, FA7B8, FA228, FA5F0, FA2C4); mem_seek R7(D2Game, 0000, 0000, 0000, FA480, FA7B8, FA228, FA5F0);
MEMT_DWORD( D2OpenPandPortal , openPandPortal); MEMT_DWORD( D2OpenPandPortal , openPandPortal);
MEMT_DWORD( D2OpenPandFinalPortal , openPandFinalPortal); MEMT_DWORD( D2OpenPandFinalPortal , openPandFinalPortal);
//0201E357 |. FFD0 |CALL EAX //0201E357 |. FFD0 |CALL EAX
//01FA77E7 |. FFD0 |CALL EAX //01FA77E7 |. FFD0 |CALL EAX
//6FCF3CC7 |. FFD0 |CALL EAX //6FCF3CC7 |. FFD0 |CALL EAX
//6FC92437 |. FFD0 |CALL EAX //6FC92437 |. FFD0 |CALL EAX
//6FCB7127 |. FFD0 |CALL EAX VirtualProtect((LPVOID)R7(D2Game,0,0,0,FA480,FA7B8, FA228, FA5F0), 8, oldProtection, &oldProtection);
VirtualProtect((LPVOID)R7(D2Game,0,0,0,FA480,FA7B8, FA228, FA5F0, FA2C4), 8, oldProtection, &oldProtection);
// manage uberIA (fct table at 0209E7E8) // manage uberIA (fct table at 0209E7E8)
VirtualProtect((LPVOID)(R7(D2Game,0,0,0,10E7E8,10ECD0,10EF58,10E788, 10ED00) + 145*0x10), 0x30, PAGE_EXECUTE_READWRITE, &oldProtection); VirtualProtect((LPVOID)(R7(D2Game,0,0,0,10E7E8,10ECD0,10EF58,10E788) + 145*0x10), 0x30, PAGE_EXECUTE_READWRITE, &oldProtection);
mem_seek R7(D2Game, 0000, 0000, 0000, 10F100, 10F5E8, 10F870, 10F0A0, 10F618); mem_seek R7(D2Game, 0000, 0000, 0000, 10F100, 10F5E8, 10F870, 10F0A0);
MEMT_DWORD( D2UberBaalIA , uberBaalIA); MEMT_DWORD( D2UberBaalIA , uberBaalIA);
mem_seek R7(D2Game, 0000, 0000, 0000, 10F110, 10F5F8, 10F880, 10F0B0, 10F628); mem_seek R7(D2Game, 0000, 0000, 0000, 10F110, 10F5F8, 10F880, 10F0B0);
MEMT_DWORD( D2UberMephIA , uberMephIA); MEMT_DWORD( D2UberMephIA , uberMephIA);
mem_seek R7(D2Game, 0000, 0000, 0000, 10F120, 10F608, 10F890, 10F0C0, 10F638); mem_seek R7(D2Game, 0000, 0000, 0000, 10F120, 10F608, 10F890, 10F0C0);
MEMT_DWORD( D2UberDiabloIA , uberDiabloIA); MEMT_DWORD( D2UberDiabloIA , uberDiabloIA);
VirtualProtect((LPVOID)(R7(D2Game,0,0,0,10E7E8,10ECD0,10EF58,10E788, 10ED00) + 145*0x10), 0x30, oldProtection, &oldProtection); VirtualProtect((LPVOID)(R7(D2Game,0,0,0,10E7E8,10ECD0,10EF58,10E788) + 145*0x10), 0x30, oldProtection, &oldProtection);
//0202ADA7 |> B8 E8E70902 MOV EAX,D2Game.0209E7E8 //0202ADA7 |> B8 E8E70902 MOV EAX,D2Game.0209E7E8
//01FD2BE7 |> B8 D0EC0702 MOV EAX,D2Game.0207ECD0 //01FD2BE7 |> B8 D0EC0702 MOV EAX,D2Game.0207ECD0
//6FC3B597 |> B8 58EFD26F MOV EAX,D2Game.6FD2EF58 //6FC3B597 |> B8 58EFD26F MOV EAX,D2Game.6FD2EF58
//6FCBD157 |> B8 88E7D26F MOV EAX,D2Game.6FD2E788 //6FCBD157 |> B8 88E7D26F MOV EAX,D2Game.6FD2E788
//6FC5C617 |> B8 00EDD26F MOV EAX,D2Game.6FD2ED00
// spawn Uber // spawn Uber
// mem_seek R7(D2Game, 0000, 0000, 0000, 98DAD, 0000, 0000, 0000); // mem_seek R7(D2Game, 0000, 0000, 0000, 98DAD, 0000, 0000, 0000);
// MEMJ_REF4( D2WarpPlayer , spawnUber); // MEMJ_REF4( D2WarpPlayer , spawnUber);
//02028DAC |. E8 491CF7FF CALL <JMP.&D2Common.#10872> //02028DAC |. E8 491CF7FF CALL <JMP.&D2Common.#10872>
mem_seek R7(D2Game, 0000, 0000, 0000, E26E2, E6B52, A850B, 2CCAB, BE9AB); mem_seek R7(D2Game, 0000, 0000, 0000, E26E2, E6B52, A850B, 2CCAB);
MEMC_REF4( D2Game235C0 , spawnUber); MEMC_REF4( D2Game235C0 , spawnUber);
//020726E1 |. E8 2A46FFFF ||CALL D2Game.02066D10 //020726E1 |. E8 2A46FFFF ||CALL D2Game.02066D10
//02056B51 |. E8 6ACAF3FF ||CALL D2Game.01F935C0 //02056B51 |. E8 6ACAF3FF ||CALL D2Game.01F935C0
//6FCC850A |. E8 014FF6FF ||CALL D2Game.6FC2D410 //6FCC850A |. E8 014FF6FF ||CALL D2Game.6FC2D410
//6FC4CCAA |. E8 3134FFFF ||CALL D2Game.6FC400E0 //6FC4CCAA |. E8 3134FFFF ||CALL D2Game.6FC400E0
//6FCDE9AA |. E8 D1AFF9FF ||CALL D2Game.6FC79980
log_msg("\n"); log_msg("\n");

View File

@@ -1,15 +1,18 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
Updating client. Updating client.
=================================================================*/ =================================================================*/
#include "common.h"
#include "updateClient.h" #include "updateClient.h"
#include "error.h"
#include "d2functions.h"
#include "infinityStash.h" #include "infinityStash.h"
#include "commands.h" #include "commands.h"
#include "common.h"
void updateClient(Unit* ptChar, DWORD mFunc, DWORD p1, DWORD p2, DWORD p3) void updateClient(Unit* ptChar, DWORD mFunc, DWORD p1, DWORD p2, DWORD p3)
{ {
@@ -32,36 +35,13 @@ void updateClient(Unit* ptChar, DWORD mFunc, DWORD p1, DWORD p2, DWORD p3)
D2SendPacket(ptNetClient, &packet, sizeof(DataPacket)); D2SendPacket(ptNetClient, &packet, sizeof(DataPacket));
} }
void updateClient(Unit* ptChar, DWORD mFunc, char* msg)
{
void* ptNetClient;
DataPacket packet;
// Intialize the packet to send to client
ZeroMemory(&packet, sizeof(DataPacket));
packet.mType = 0x9D;
packet.mFunc = (BYTE)mFunc;
packet.mSize = sizeof(DataPacket);
packet.mPlayerID = ptChar->nUnitId;
if (msg != NULL && strlen(msg) >= 20)
return;
if (msg != NULL)
strcpy((char*)&packet.mItemID, msg);
ptNetClient = D2GetClient(ptChar, __FILE__, __LINE__);
// Send packet to client for remove placed skills
D2SendPacket(ptNetClient, &packet, sizeof(DataPacket));
}
DWORD FASTCALL handleClientUpdate(DataPacket* packet) DWORD FASTCALL handleClientUpdate(DataPacket* packet)
{ {
log_msg("[CLIENT] Received custom message: %d with param: %08X , %08X , %08X\n",packet->mFunc,packet->mParam1,packet->mParam2,packet->mParam3); log_msg("[CLIENT] Received custom message: %d with param: %08X , %08X , %08X\n",packet->mFunc,packet->mParam1,packet->mParam2,packet->mParam3);
switch (packet->mFunc) switch (packet->mFunc)
{ {
case UC_SELECT_STASH: setSelectedStashClient(packet->mParam1, packet->mParam2, packet->mParam3, (packet->mParam2 & 4) == 4); return 1; case UC_SELECT_STASH : setSelectedStashClient(packet->mParam1,packet->mParam2,packet->mParam3); return 1;
case UC_SHARED_GOLD : updateSharedGold(packet->mParam1); return 1; case UC_SHARED_GOLD : updateSharedGold(packet->mParam1); return 1;
case UC_PAGE_NAME: renameCurrentStash(D2GetClientPlayer(), (char*)&packet->mItemID); return 1;
default : return 0; default : return 0;
} }
} }
@@ -93,14 +73,13 @@ void Install_UpdateClient()
log_msg("Patch D2Client for received Item packet. (UpdateClient)\n"); log_msg("Patch D2Client for received Item packet. (UpdateClient)\n");
// execute if it's our packet else continue // execute if it's our packet else continue
mem_seek R7(D2Client, 14236, 14226, 145B6, 9C6B6, BFE86, 66E06, AE896, 84D96); mem_seek R7(D2Client, 14236, 14226, 145B6, 9C6B6, BFE86, 66E06, AE896);
MEMT_REF4( version_D2Client >= V111 ? 0x000000CF : 0x000000D6, version_D2Client >= V111 ? caller_handleClientUpdate_111 : caller_handleClientUpdate); MEMT_REF4( version_D2Client >= V111 ? 0x000000CF : 0x000000D6, version_D2Client >= V111 ? caller_handleClientUpdate_111 : caller_handleClientUpdate);
//6FAB45B4 |. 0F87 D6000000 JA D2Client.6FAB4690 //6FAB45B4 |. 0F87 D6000000 JA D2Client.6FAB4690
//6FB4C6B4 |. 0F87 CF000000 JA D2Client.6FB4C789 //6FB4C6B4 |. 0F87 CF000000 JA D2Client.6FB4C789
//6FB6FE84 |. 0F87 CF000000 JA D2Client.6FB6FF59 //6FB6FE84 |. 0F87 CF000000 JA D2Client.6FB6FF59
//6FB16E04 |. 0F87 CF000000 JA D2Client.6FB16ED9 //6FB16E04 |. 0F87 CF000000 JA D2Client.6FB16ED9
//6FB5E894 |. 0F87 CF000000 JA D2Client.6FB5E969 //6FB5E894 |. 0F87 CF000000 JA D2Client.6FB5E969
//6FB34D94 |. 0F87 CF000000 JA D2Client.6FB34E69
log_msg("\n"); log_msg("\n");

View File

@@ -1,17 +1,19 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
Updating server. Updating server.
=================================================================*/ =================================================================*/
#include "common.h"
#include "updateServer.h" #include "updateServer.h"
#include "error.h"
#include "d2functions.h"
#include "statsPoints.h" #include "statsPoints.h"
#include "skillsPoints.h" #include "skillsPoints.h"
#include "infinityStash.h" #include "infinityStash.h"
#include "commands.h" #include "commands.h"
#include "common.h"
int renameIndex = 0; int renameIndex = 0;
char renameString[16]; char renameString[16];
@@ -33,21 +35,17 @@ int STDCALL handleServerUpdate(Unit* ptChar, WORD param)
case US_UNASSIGN_DEX_POINTS : UnassignDexPoints( ptChar ); return 1; case US_UNASSIGN_DEX_POINTS : UnassignDexPoints( ptChar ); return 1;
case US_UNASSIGN_VIT_POINTS : UnassignVitPoints( ptChar ); return 1; case US_UNASSIGN_VIT_POINTS : UnassignVitPoints( ptChar ); return 1;
case US_UNASSIGN_SKILLS : UnassignAllSkillsPoints( ptChar ); return 1; case US_UNASSIGN_SKILLS : UnassignAllSkillsPoints( ptChar ); return 1;
case US_SET_INDEX: setCurrentStashIndex(ptChar, true); return 1;
case US_RESET_INDEX: setCurrentStashIndex(ptChar, false); return 1;
case US_SELECT_PREVIOUS : selectPreviousStash( ptChar ); return 1; case US_SELECT_PREVIOUS : selectPreviousStash( ptChar ); return 1;
case US_SELECT_NEXT : selectNextStash( ptChar ); return 1; case US_SELECT_NEXT : selectNextStash( ptChar ); return 1;
case US_SELECT_SELF : if (active_sharedStash) toggleToSelfStash( ptChar ); return 1; case US_SELECT_SELF : if (active_sharedStash) toggleToSelfStash( ptChar ); return 1;
case US_SELECT_SHARED : if (active_sharedStash) toggleToSharedStash( ptChar ); return 1; case US_SELECT_SHARED : if (active_sharedStash) toggleToSharedStash( ptChar ); return 1;
case US_SELECT_PREVIOUS_INDEX : selectPreviousIndexStash( ptChar ); return 1; case US_SELECT_PREVIOUS_INDEX : selectPreviousIndexStash( ptChar ); return 1;
case US_SELECT_NEXT_INDEX : selectNextIndexStash( ptChar ); return 1; case US_SELECT_NEXT_INDEX : selectNextIndexStash( ptChar ); return 1;
case US_SELECT_PREVIOUS2 : selectPrevious2Stash( ptChar ); return 1; case US_SELECT_PREVIOUS2 : selectPrevious2Stash( ptChar ); return 1;
case US_SELECT_NEXT2 : selectNext2Stash( ptChar ); return 1; case US_SELECT_NEXT2 : selectNext2Stash( ptChar ); return 1;
case US_SELECT_PREVIOUS_INDEX2: selectPreviousIndex2Stash( ptChar ); return 1; case US_SELECT_PREVIOUS_INDEX2: selectPreviousIndex2Stash( ptChar ); return 1;
case US_SELECT_NEXT_INDEX2 : selectNextIndex2Stash( ptChar ); return 1; case US_SELECT_NEXT_INDEX2 : selectNextIndex2Stash( ptChar ); return 1;
case US_INSERT_PAGE: insertStash(ptChar); return 1;
case US_DELETE_PAGE: deleteStash(ptChar); return 1;
case US_SAVE : savePlayers( ptChar ); return 1; case US_SAVE : savePlayers( ptChar ); return 1;
@@ -72,18 +70,6 @@ int STDCALL handleServerUpdate(Unit* ptChar, WORD param)
strcpy(ptChar->ptPlayerData->ptNetClient->name, renameString); strcpy(ptChar->ptPlayerData->ptNetClient->name, renameString);
} }
return 1; return 1;
case US_PAGENAME:
if (renameIndex == 0)
for (int i = 0; i < 16; i++)
renameString[i] = 0;
renameString[renameIndex++] = (char)arg;
if (arg == 0)
{
renameIndex = 0;
log_msg("Rename current page on Server : %s -> %s\n", PCPY->currentStash->name, renameString);
renameCurrentStash(ptChar, renameString);
}
return 1;
default : default :
return 0; return 0;
} }
@@ -138,7 +124,7 @@ void Install_UpdateServer()
log_msg("Patch D2Game for received button click message. (UpdateServer)\n"); log_msg("Patch D2Game for received button click message. (UpdateServer)\n");
// manage button click message from Client. // manage button click message from Client.
mem_seek R7(D2Game, 4A702, 4AAC2, 56EA2, 54AE3, 2C773, 975C3, CC983, 676C3); mem_seek R7(D2Game, 4A702, 4AAC2, 56EA2, 54AE3, 2C773, 975C3, CC983);
if (version_D2Game >= V111) { if (version_D2Game >= V111) {
memt_byte( 0xC1, 0x57 ); // PUSH EDI memt_byte( 0xC1, 0x57 ); // PUSH EDI
memt_byte( 0xEE, 0xE8 ); // CALL caller_handleServerUpdate memt_byte( 0xEE, 0xE8 ); // CALL caller_handleServerUpdate
@@ -155,9 +141,6 @@ void Install_UpdateServer()
//6FCEC983 . C1EE 08 SHR ESI,8 //6FCEC983 . C1EE 08 SHR ESI,8
//6FCEC986 . 57 PUSH EDI //6FCEC986 . 57 PUSH EDI
//6FCEC987 . 8BF8 MOV EDI,EAX //6FCEC987 . 8BF8 MOV EDI,EAX
//066A76C3 |. C1EE 08 SHR ESI,8
//066A76C6 |. 57 PUSH EDI
//066A76C7 |. 8BF8 MOV EDI,EAX
} else if (version_D2Game == V110) { } else if (version_D2Game == V110) {
memt_byte( 0xC1, 0xE8 ); // CALL caller_handleServerUpdate memt_byte( 0xC1, 0xE8 ); // CALL caller_handleServerUpdate
MEMT_REF4( 0xF88B08EE, caller_handleServerUpdate); MEMT_REF4( 0xF88B08EE, caller_handleServerUpdate);

View File

@@ -1,98 +0,0 @@
/*=================================================================
File created by Yohann NICOLAS.
Windowed mode options.
=================================================================*/
#include "windowed.h"
#include "common.h"
int active_Windowed = true;
int setWindowedOptionsDone = false;
int active_RemoveBorder = true;
int active_WindowOnTop = true;
int active_Maximized = true;
int active_SetWindowPos = true;
int windowedX = 240;
int windowedY = 0;
int windowedWidth = 1440;
int windowedHeight = 1080;
int active_LockMouseOnStartup = true;
void unlockMouseCursor()
{
ClipCursor(NULL);
}
void lockMouseCursor(int width, int height)
{
RECT clientRect;
RECT rect;
HWND hwnd = GetActiveWindow();
GetClientRect(hwnd, &clientRect);
GetWindowRect(hwnd, &rect);
int shiftX = (rect.right - rect.left - clientRect.right) / 2;
int shiftY = rect.bottom - rect.top - clientRect.bottom - shiftX;
log_msg("Windows size : %i, %i, %i, %i\n", rect.left, rect.top, rect.right, rect.bottom);
rect.left += shiftX;
rect.right = rect.left + width;
rect.top += shiftY;
rect.bottom = rect.top + height;
//no resize : 560, 231, 1360, 831
//resized : 240, 0, 1040, 600
log_msg("Lock Mouse Cursor : %i, %i, %i, %i\n", rect.left, rect.top, rect.right, rect.bottom);
ClipCursor(&rect);
}
void lockMouseCursor() { lockMouseCursor(ResolutionX, ResolutionY); }
void SetWindowedOptions()
{
if (setWindowedOptionsDone)
return;
HWND hwnd = GetActiveWindow();
RECT clientRect;
GetClientRect(hwnd, &clientRect);
if (active_RemoveBorder)
{
LONG lStyle = GetWindowLong(hwnd, GWL_STYLE);
lStyle &= ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZE | WS_MAXIMIZE | WS_SYSMENU);
SetWindowLong(hwnd, GWL_STYLE, lStyle);
SetWindowPos(hwnd, NULL, 0, 0, clientRect.right, clientRect.bottom, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER | SWP_NOOWNERZORDER);
}
if (active_Maximized && !active_SetWindowPos)
{
RECT screen;
GetWindowRect(GetDesktopWindow(), &screen);
log_msg("Screen size : %i, %i, %i, %i\n", screen.left, screen.top, screen.right, screen.bottom);
int w = screen.bottom * clientRect.right / clientRect.bottom;
int h = w * clientRect.bottom / clientRect.right;
if (screen.right < w)
{
h = screen.right * clientRect.bottom / clientRect.right;
w = h * clientRect.right / clientRect.bottom;
}
windowedX = (screen.right - w) / 2;
windowedY = (screen.bottom - h) / 2;
windowedWidth = w;
windowedHeight = h;
}
if (active_SetWindowPos || active_Maximized)
{
if (active_WindowOnTop)
SetWindowPos(hwnd, HWND_TOPMOST, windowedX, windowedY, windowedWidth, windowedHeight, SWP_FRAMECHANGED);
else
SetWindowPos(hwnd, NULL, windowedX, windowedY, windowedWidth, windowedHeight, SWP_FRAMECHANGED | SWP_NOZORDER | SWP_NOOWNERZORDER);
}
else if (active_WindowOnTop)
SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, clientRect.right, clientRect.bottom, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE);
if (active_LockMouseOnStartup)
lockMouseCursor(clientRect.right, clientRect.bottom);
setWindowedOptionsDone = true;
}

View File

@@ -1,13 +1,13 @@
/*================================================================= /*=================================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
World Event Management. World Event Management.
=================================================================*/ =================================================================*/
#include "worldEvent.h"
#include "common.h" #include "common.h"
#include "error.h"
#include "d2functions.h"
#pragma pack(1) #pragma pack(1)
struct s_WEdata struct s_WEdata
@@ -231,44 +231,40 @@ void Install_WorldEvent()
log_msg("Patch D2Game for active World Event. (WorldEvent)\n"); log_msg("Patch D2Game for active World Event. (WorldEvent)\n");
// spawn DClone // spawn DClone
mem_seek R7(D2Game, 0000, 0000, 3F720, 4BCB1, ECF10, 41570, 25280, CFBD0); mem_seek R7(D2Game, 0000, 0000, 3F720, 4BCB1, ECF10, 41570, 25280);
MEMC_REF4( V2SpawnMonster , version_D2Game >= V111b ? (DWORD)caller_spawnDClone_111b : version_D2Game == V111 ? (DWORD)caller_spawnDClone_111 : (DWORD)spawnDClone); MEMC_REF4( V2SpawnMonster , version_D2Game >= V111b ? (DWORD)caller_spawnDClone_111b : version_D2Game == V111 ? (DWORD)caller_spawnDClone_111 : (DWORD)spawnDClone);
//6FC6F71F |. E8 FCFAFFFF CALL D2Game.6FC6F220 //6FC6F71F |. E8 FCFAFFFF CALL D2Game.6FC6F220
//01FCBCB0 |. E8 2BEFFFFF CALL D2Game.01FCABE0 ; \D2Game.01FCABE0 //01FCBCB0 |. E8 2BEFFFFF CALL D2Game.01FCABE0 ; \D2Game.01FCABE0
//0205CF0F |. E8 CCF8FFFF CALL D2Game.0205C7E0 ; \D2Game.0205C7E0 //0205CF0F |. E8 CCF8FFFF CALL D2Game.0205C7E0 ; \D2Game.0205C7E0
//6FC6156F |. E8 1CF6FFFF CALL D2Game.6FC60B90 ; \D2Game.6FC60B90 //6FC6156F |. E8 1CF6FFFF CALL D2Game.6FC60B90 ; \D2Game.6FC60B90
//6FC4527F |. E8 CCF6FFFF CALL D2Game.6FC44950 ; \D2Game.6FC44950 //6FC4527F |. E8 CCF6FFFF CALL D2Game.6FC44950 ; \D2Game.6FC44950
//6FCEFBCF |. E8 4CE2FFFF CALL D2Game.6FCEDE20 ; \D2Game.6FCEDE20
// verify if the item sold is a trigger of WE // verify if the item sold is a trigger of WE
mem_seek R7(D2Game, 0000, 0000, 977D0, 8E799, 92859, 84499, BFB29, 72BE9); mem_seek R7(D2Game, 0000, 0000, 977D0, 8E799, 92859, 84499, BFB29);
MEMJ_REF4( D2TestFlags , verifIfWEItem); MEMJ_REF4( D2TestFlags , verifIfWEItem);
//6FCC77CF |. E8 32400500 CALL <JMP.&D2Common.#10707> //6FCC77CF |. E8 32400500 CALL <JMP.&D2Common.#10707>
//0200E798 |. E8 E9BDF7FF CALL <JMP.&D2Common.#10911> //0200E798 |. E8 E9BDF7FF CALL <JMP.&D2Common.#10911>
//02002858 |. E8 E57DF7FF CALL <JMP.&D2Common.#10303> //02002858 |. E8 E57DF7FF CALL <JMP.&D2Common.#10303>
//6FCA4498 |. E8 3B62F8FF CALL <JMP.&D2Common.#10989> //6FCA4498 |. E8 3B62F8FF CALL <JMP.&D2Common.#10989>
//6FCDFB28 |. E8 77ADF4FF CALL <JMP.&D2Common.#10202> //6FCDFB28 |. E8 77ADF4FF CALL <JMP.&D2Common.#10202>
//6FC92BE8 |. E8 DD7AF9FF CALL <JMP.&D2Common.#10458>
// management of the WorldEvent // management of the WorldEvent
mem_seek R7(D2Game, 0000, 0000, 3CE0, 51F01, C5681, EBF41, 4A791, E5F51); mem_seek R7(D2Game, 0000, 0000, 3CE0, 51F01, C5681, EBF41, 4A791);
MEMC_REF4( V2GetGameByClientID , version_D2Game >= V111 ? (DWORD)WEManagement : (DWORD)caller_WEManagement_1XX); MEMC_REF4( V2GetGameByClientID , version_D2Game >= V111 ? (DWORD)WEManagement : (DWORD)caller_WEManagement_1XX);
//6FC33CDF . E8 FC570000 CALL D2Game.6FC394E0 //6FC33CDF . E8 FC570000 CALL D2Game.6FC394E0
//01FD1F00 |. E8 1BE60800 CALL D2Game.02060520 //01FD1F00 |. E8 1BE60800 CALL D2Game.02060520
//02035680 |. E8 1BF30100 CALL D2Game.020549A0 //02035680 |. E8 1BF30100 CALL D2Game.020549A0
//6FD0BF40 |. E8 1BA4FBFF CALL D2Game.6FCC6360 //6FD0BF40 |. E8 1BA4FBFF CALL D2Game.6FCC6360
//6FC6A790 |. E8 4B03FEFF CALL D2Game.6FC4AAE0 //6FC6A790 |. E8 4B03FEFF CALL D2Game.6FC4AAE0
//6FD05F50 |. E8 AB67FDFF CALL D2Game.6FCDC700
// add client for the WorldEvent // add client for the WorldEvent
mem_seek R7(D2Game, 0000, 0000, 1AEF, 3786A, 7055A, 6265F, CB0BF, D556F); mem_seek R7(D2Game, 0000, 0000, 1AEF, 3786A, 7055A, 6265F, CB0BF);
MEMC_REF4( D2AddClient , version_D2Game >= V111 ? caller_addClientForWE_111 : caller_addClientForWE); MEMC_REF4( D2AddClient , version_D2Game >= V111 ? caller_addClientForWE_111 : caller_addClientForWE);
//6FC31AEE |. E8 6D510000 CALL D2Game.6FC36C60 //6FC31AEE |. E8 6D510000 CALL D2Game.6FC36C60
//01FB7869 |. E8 32C50A00 CALL D2Game.02063DA0 //01FB7869 |. E8 32C50A00 CALL D2Game.02063DA0
//01FE0559 |. E8 B27C0700 CALL D2Game.02058210 //01FE0559 |. E8 B27C0700 CALL D2Game.02058210
//6FC8265E |. E8 FD890800 CALL D2Game.6FD0B060 //6FC8265E |. E8 FD890800 CALL D2Game.6FD0B060
//6FCEB0BE |. E8 6DE8F7FF CALL D2Game.6FC69930 //6FCEB0BE |. E8 6DE8F7FF CALL D2Game.6FC69930
//6FCF556E |. E8 FDFA0000 CALL D2Game.6FD05070
log_msg("\n"); log_msg("\n");

View File

@@ -4,13 +4,16 @@
Use a more big stash Use a more big stash
=================================================================*/ =================================================================*/
#pragma once
#include "common.h" #ifndef __BIGSTASH_HPP__INCLUDED
#define __BIGSTASH_HPP__INCLUDED
#include <windows.h>
extern bool active_bigStash; extern bool active_bigStash;
extern bool active_bigStash_tested; extern bool active_bigStash_tested;
void Install_BigStash(); void Install_BigStash();
/*================================= END OF FILE =================================*/
#endif

View File

@@ -4,11 +4,13 @@
Add an extra save file for each characters. Add an extra save file for each characters.
=================================================================*/ =================================================================*/
#pragma once
/* /*
#pragma once
#include "common.h" #include "common.h"
DWORD loadClientSaveFile(); DWORD loadClientSaveFile();
DWORD saveClientSaveFile(); DWORD saveClientSaveFile();
*/
/*================================= END OF FILE =================================*/ /*================================= END OF FILE =================================*/

View File

@@ -4,9 +4,9 @@
Commands directly in game. Commands directly in game.
=================================================================*/ =================================================================*/
#pragma once
#include "common.h" #ifndef __COMMANDS_H__INCLUDED
#define __COMMANDS_H__INCLUDED
extern bool active_Commands; extern bool active_Commands;
@@ -18,4 +18,4 @@ void updateSharedGold(DWORD goldAmount);
void Install_Commands(); void Install_Commands();
/*================================= END OF FILE =================================*/ #endif

View File

@@ -1,35 +1,149 @@
/*============================================== /*==============================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
this file implements some common and useful this file implements some common and useful
function related to some Diablo II mechanisms. function related to some Diablo II mechanisms.
/*============================================*/ /*============================================*/
#pragma once #pragma once
//#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h> #include <windows.h>
#include "../Commons/d2Constants.h" #include "../Commons/d2Constants.h"
#include "../Commons/d2BinFile.h" #include "../Commons/d2BinFile.h"
#include "../Commons/d2Struct.h" #include "../Commons/d2Struct.h"
#include "../Commons/d2StringTblStruct.h" #include "../Commons/d2StringTblStruct.h"
#include "../Commons/D2UnitStruct.h" #include "../Commons/D2UnitStruct.h"
#include "../Commons/updatingConst.h" #include "../Commons/updatingConst.h"
#include "../Commons/VersionInfo.h"
#include "error.h" #include "customData.h"
#include "modifMemory.h" #include "modifMemory.h"
#include "parameters.h" #include "parameters.h"
#include "d2wrapper.h" #include "globalVariable.h"
#include "playerCustomData.h" // include common.h
#include "globalVariable.h" // include common.h
#include "d2functions.h" //#ifdef MSVC
#include "LocalizedStrings.h" #define FASTCALL __fastcall
//#else
//#define FASTCALL __msfastcall
//#endif
#define STDCALL __stdcall
#define FCT_ASM(N) __declspec(naked) void N() {__asm{
#define RANDOM(V) ((int)(rand()/(RAND_MAX+1.0)*(V)))
//#define RANDOM(V) (rand()%(V))
// Convertion to 1.09
struct s_shifting {
DWORD ptInventory;
DWORD ptSpecificData;
DWORD ptPYPlayerData;
DWORD ptGame;
DWORD ptClientGame;
DWORD ptSkills;
DWORD ptImage;
DWORD ptFrame;
};
extern s_shifting shifting;
//#define PY(C) (*(PYPlayerData**)((BYTE*)(ptChar)+shifting.ptPYPlayerData))
#define PCPlayerData (*(PlayerData**)((DWORD)(ptChar)+shifting.ptSpecificData)) //->ptPlayerData
#define PCGame (*(Game**)((DWORD)(ptChar)+shifting.ptGame)) //->ptGame
#define PClientGame (*(Game**)((DWORD)(ptClient)+shifting.ptClientGame)) //ptClient->ptGame
#define PCInventory (*(Inventory**)((DWORD)(ptChar)+shifting.ptInventory)) //->ptInventory
//#define PIItemData (*(ItemData**)((DWORD)(ptItem)+shifting.ptSpecificData)) //->ptItemData
//#define PCPY (*(PYPlayerData**)((DWORD)(ptChar)+shifting.ptPYPlayerData)) //->ptPYPlayerData
#define PCPY ((PYPlayerData*)((DWORD)PCPlayerData+shifting.ptPYPlayerData)) //->ptPYPlayerData
#define PCSkills (*(Skills**)((DWORD)(ptChar)+shifting.ptSkills)) //->ptSkills
#define R7(Z,A,B,C,D,E,F,G) (offset_##Z + (version_##Z == V113? 0x##G : (version_##Z == V112? 0x##F : (version_##Z == V111b? 0x##E : (version_##Z == V111? 0x##D : (version_##Z == V110? 0x##C : (version_##Z == V109d? 0x##B : 0x##A)))))))
#define V7(Z,A,B,C,D,E,F,G) (version_##Z == V113? 0x##G : (version_##Z == V112? 0x##F : (version_##Z == V111b? 0x##E : (version_##Z == V111? 0x##D : (version_##Z == V110? 0x##C : (version_##Z == V109d? 0x##B : 0x##A))))))
// Convert 4 char code in a DWORD code
#define BIN(A,B,C,D) ((DWORD)A) + (((DWORD)B) << 8) + (((DWORD)C) << 16) + (((DWORD)D) << 24)
#define RX(v) (WindowStartX+(v))
#define RY(v) (ResolutionY+NegWindowStartY-(v))
enum eFileVersion
{
V109b=0,
V109d,
V110,
V111,
V111b,
V112,
V113
};
extern int version_SmackW32;
extern int version_D2Common;
extern int version_ijl11;
extern int version_D2Gdi;
extern int version_D2Win;
extern int version_D2sound;
extern int version_D2MCPCLI;
extern int version_D2Launch;
extern int version_D2gfx;
extern int version_D2Client;
extern int version_D2Net;
extern int version_D2Lang;
extern int version_D2Game;
extern int version_D2CMP;
extern int version_Bnclient;
extern int version_Fog;
extern int version_Storm;
// Address in memory of external DLL
extern DWORD offset_SmackW32;
extern DWORD offset_D2Common;
extern DWORD offset_ijl11;
extern DWORD offset_D2Gdi;
extern DWORD offset_D2Win;
extern DWORD offset_D2sound;
extern DWORD offset_D2MCPCLI;
extern DWORD offset_D2Launch;
extern DWORD offset_D2gfx;
extern DWORD offset_D2Client;
extern DWORD offset_D2Net;
extern DWORD offset_D2Lang;
extern DWORD offset_D2Game;
extern DWORD offset_D2CMP;
extern DWORD offset_Bnclient;
extern DWORD offset_Fog;
extern DWORD offset_Storm;
extern const char* S_CloneBattles;
extern const char* S_DarkAlliance;
LPWSTR getTranslatedString(int stringID);
enum eStringList
{
STR_STATS_UNASSIGN_WITH_LIMIT=0,
STR_STATS_UNASSIGN_WITHOUT_LIMIT,
STR_STATS_BASE_MIN,
STR_SKILLS_UNASSIGN,
STR_STASH_PREVIOUS_PAGE,
STR_STASH_NEXT_PAGE,
STR_TOGGLE_TO_PERSONAL,
STR_TOGGLE_TO_SHARED,
STR_STASH_PREVIOUS_INDEX,
STR_STASH_NEXT_INDEX,
STR_PERSONAL_PAGE_NUMBER,
STR_SHARED_PAGE_NUMBER,
STR_NO_SELECTED_PAGE,
STR_PUT_GOLD,
STR_TAKE_GOLD,
STR_SHARED_GOLD_QUANTITY,
STR_PREVIOUS_PAGE,
STR_NEXT_PAGE
};
bool isOnRect(DWORD x, DWORD y, DWORD x0, DWORD y0, DWORD l, DWORD h); bool isOnRect(DWORD x, DWORD y, DWORD x0, DWORD y0, DWORD l, DWORD h);
void freeMessage(sWinMessage* msg); void freeMessage(sWinMessage* msg);
LPWSTR getTypeUString (WORD id, LPWSTR lpText, DWORD size);
char* getTypeAString (WORD id, char* lpText, DWORD size);
/*================================= END OF FILE =================================*/ /*================================= END OF FILE =================================*/

View File

@@ -4,6 +4,7 @@
Data added to D2 base-stucture Data added to D2 base-stucture
=================================================================*/ =================================================================*/
#pragma once #pragma once
#include "playerCustomData.h" #include "playerCustomData.h"

View File

@@ -4,9 +4,8 @@
Language management. Language management.
=================================================================*/ =================================================================*/
#pragma once
#include "common.h" #pragma once
typedef int (STDCALL *TsaveSaveFile) (Unit* ptChar, BYTE** data, DWORD* maxSize, DWORD* curSize); typedef int (STDCALL *TsaveSaveFile) (Unit* ptChar, BYTE** data, DWORD* maxSize, DWORD* curSize);
typedef int (STDCALL *TloadSaveFile) (Unit* ptChar, BYTE* data, DWORD maxSize, DWORD* curSize); typedef int (STDCALL *TloadSaveFile) (Unit* ptChar, BYTE* data, DWORD maxSize, DWORD* curSize);
@@ -43,4 +42,5 @@ private:
extern TCustomDll* customDlls; extern TCustomDll* customDlls;
/*================================= END OF FILE =================================*/ /*================================= END OF FILE =================================*/

View File

@@ -1,62 +1,23 @@
/*================================================ /*================================================
File created by Yohann NICOLAS. File created by Yohann NICOLAS.
Add support 1.13d by L'Autour.
This file implements some common and useful This file implements some common and useful
function related to some Diablo II mechanisms. function related to some Diablo II mechanisms.
================================================*/ ================================================*/
#pragma once #pragma once
// Convertion to 1.09 #include "common.h"
struct s_shifting {
DWORD ptInventory;
DWORD ptSpecificData;
DWORD ptPYPlayerData;
DWORD ptGame;
DWORD ptClientGame;
DWORD ptSkills;
DWORD ptImage;
DWORD ptFrame;
};
extern s_shifting shifting;
//#ifdef MSVC
#define FASTCALL __fastcall
//#else
//#define FASTCALL __msfastcall
//#endif
#define STDCALL __stdcall
#define FCT_ASM(N) __declspec(naked) void N() {__asm{
#define RANDOM(V) ((int)(rand()/(RAND_MAX+1.0)*(V)))
//#define RANDOM(V) (rand()%(V))
//#define PY(C) (*(PYPlayerData**)((BYTE*)(ptChar)+shifting.ptPYPlayerData))
#define PCPlayerData (*(PlayerData**)((DWORD)(ptChar)+shifting.ptSpecificData)) //->ptPlayerData
#define PCGame (*(Game**)((DWORD)(ptChar)+shifting.ptGame)) //->ptGame
#define PClientGame (*(Game**)((DWORD)(ptClient)+shifting.ptClientGame)) //ptClient->ptGame
#define PCInventory (*(Inventory**)((DWORD)(ptChar)+shifting.ptInventory)) //->ptInventory
//#define PIItemData (*(ItemData**)((DWORD)(ptItem)+shifting.ptSpecificData)) //->ptItemData
//#define PCPY (*(PYPlayerData**)((DWORD)(ptChar)+shifting.ptPYPlayerData)) //->ptPYPlayerData
#define PCPY ((PYPlayerData*)((DWORD)PCPlayerData+shifting.ptPYPlayerData)) //->ptPYPlayerData
#define PCSkills (*(Skills**)((DWORD)(ptChar)+shifting.ptSkills)) //->ptSkills
#define R7(Z,A,B,C,D,E,F,G,H) (offset_##Z + (version_##Z == V113d? 0x##H : (version_##Z == V113c? 0x##G : (version_##Z == V112? 0x##F : (version_##Z == V111b? 0x##E : (version_##Z == V111? 0x##D : (version_##Z == V110? 0x##C : (version_##Z == V109d? 0x##B : 0x##A))))))))
#define V7(Z,A,B,C,D,E,F,G,H) (version_##Z == V113d? 0x##H : (version_##Z == V113c? 0x##G : (version_##Z == V112? 0x##F : (version_##Z == V111b? 0x##E : (version_##Z == V111? 0x##D : (version_##Z == V110? 0x##C : (version_##Z == V109d? 0x##B : 0x##A)))))))
#define RX(v) (WindowStartX+(v))
#define RY(v) (ResolutionY+NegWindowStartY-(v))
#define D2S(F, I, R, N, P) typedef R (STDCALL *T##N) P; extern T##N N;//static D N = (D)(A); #define D2S(F, I, R, N, P) typedef R (STDCALL *T##N) P; extern T##N N;//static D N = (D)(A);
#define D2F(F, I, R, N, P) typedef R (FASTCALL *T##N) P; extern T##N N;//static D N = (D)(A); #define D2F(F, I, R, N, P) typedef R (FASTCALL *T##N) P; extern T##N N;//static D N = (D)(A);
#define E2S(F, A, R, N, P) typedef R (STDCALL *T##N) P; extern T##N N; #define E2S(F, A, R, N, P) typedef R (STDCALL *T##N) P; extern T##N N;
#define E2F(F, A, R, N, P) typedef R (FASTCALL *T##N) P; extern T##N N; #define E2F(F, A, R, N, P) typedef R (FASTCALL *T##N) P; extern T##N N;
#define E2C(F, A, T, N) extern T* pt##N; #define E2C(F, A, T, N) extern T* pt##N;
#define F7(X, Z, A,B,C,D,E,F,G,H, R, N, P) typedef R (X##CALL *T##N) P; extern T##N N; #define F7(X, Z, A,B,C,D,E,F,G, R, N, P) typedef R (X##CALL *T##N) P; extern T##N N;
#define A7(X, Z, A,B,C,D,E,F,G,H, R, N, P) typedef R (X##CALL *T##N) P; extern T##N N; #define A7(X, Z, A,B,C,D,E,F,G, R, N, P) typedef R (X##CALL *T##N) P; extern T##N N;
#define C7(Z, A,B,C,D,E,F,G,H, T, N) extern T* pt##N; #define C7(Z, A,B,C,D,E,F,G, T, N) extern T* pt##N;
#include "../Commons/D2Funcs.h" #include "../Commons/D2Funcs.h"
extern DataTables* SgptDataTables; extern DataTables* SgptDataTables;

View File

@@ -1,55 +0,0 @@
/******************************************************************************
File modified by Yohann NICOLAS.
NAME
inifile.h
DESCRIPTION
Memory cached INI file read/write class to replace legacy MS code
COPYRIGHT
<EFBFBD>1999-2004 Ultrafunk (www.ultrafunk.com) - info@ultrafunk.com
******************************************************************************/
#pragma once
#include <windows.h>
extern int version_SmackW32;
extern int version_D2Common;
extern int version_ijl11;
extern int version_D2Gdi;
extern int version_D2Win;
extern int version_D2sound;
extern int version_D2MCPCLI;
extern int version_D2Launch;
extern int version_D2gfx;
extern int version_D2Client;
extern int version_D2Net;
extern int version_D2Lang;
extern int version_D2Game;
extern int version_D2CMP;
extern int version_Bnclient;
extern int version_Fog;
extern int version_Storm;
// Address in memory of external DLL
extern DWORD offset_SmackW32;
extern DWORD offset_D2Common;
extern DWORD offset_ijl11;
extern DWORD offset_D2Gdi;
extern DWORD offset_D2Win;
extern DWORD offset_D2sound;
extern DWORD offset_D2MCPCLI;
extern DWORD offset_D2Launch;
extern DWORD offset_D2gfx;
extern DWORD offset_D2Client;
extern DWORD offset_D2Net;
extern DWORD offset_D2Lang;
extern DWORD offset_D2Game;
extern DWORD offset_D2CMP;
extern DWORD offset_Bnclient;
extern DWORD offset_Fog;
extern DWORD offset_Storm;
/*================================= END OF FILE =================================*/

19
PlugY/dllmain.cpp Normal file
View File

@@ -0,0 +1,19 @@
// dllmain.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}

View File

@@ -8,7 +8,9 @@
error handling in D2External functions. error handling in D2External functions.
==============================================*/ ==============================================*/
#pragma once
#ifndef __ERROR_H__INCLUDED__
#define __ERROR_H__INCLUDED__
#include <windows.h> #include <windows.h>
@@ -19,4 +21,4 @@ void log_box( const char* pFormat, ... );
void log_msg( const char* pFormat, ... ); void log_msg( const char* pFormat, ... );
void d2_assert( bool pCondition, char* pLocation, char* pMessage, int pLineNbr ); void d2_assert( bool pCondition, char* pLocation, char* pMessage, int pLineNbr );
/*================================= END OF FILE =================================*/ #endif

View File

@@ -4,9 +4,11 @@
Add an extra save file for each characters. Add an extra save file for each characters.
=================================================================*/ =================================================================*/
#pragma once #pragma once
#include "common.h" #include "common.h"
#include <stdio.h>
BYTE* readExtendedSaveFile(char* name, DWORD* size); BYTE* readExtendedSaveFile(char* name, DWORD* size);
void writeExtendedSaveFile(char* name, BYTE* data, DWORD size); void writeExtendedSaveFile(char* name, BYTE* data, DWORD size);

View File

@@ -4,10 +4,12 @@
More little options. More little options.
=================================================================*/ =================================================================*/
#pragma once
#include "common.h" #ifndef __EXTRAOPTIONS_H__INCLUDED
#define __EXTRAOPTIONS_H__INCLUDED
extern int active_Windowed;
extern int active_LockMouseCursor;
extern int active_DisplayItemLevel; extern int active_DisplayItemLevel;
extern DWORD nbPlayersCommandByDefault; extern DWORD nbPlayersCommandByDefault;
extern int active_alwaysRegenMapInSP; extern int active_alwaysRegenMapInSP;
@@ -18,6 +20,16 @@ extern int active_DisplayBaseStatsValue;
extern int active_LadderRunewords; extern int active_LadderRunewords;
extern int active_EnabledCowPortalWhenCowKingWasKill; extern int active_EnabledCowPortalWhenCowKingWasKill;
extern int active_RemoveBorder;
extern int active_WindowOnTop;
extern int active_Maximized;
extern int active_SetWindowPos;
extern int windowedX;
extern int windowedY;
extern int windowedWidth;
extern int windowedHeight;
extern int active_LockMouseOnStartup;
void Install_DisplayItemLevel(); void Install_DisplayItemLevel();
void Install_SendPlayersCommand(); void Install_SendPlayersCommand();
void Install_AlwaysRegenMapInSP(); void Install_AlwaysRegenMapInSP();
@@ -28,4 +40,6 @@ void Install_DisplayBaseStatsValue();
void Install_LadderRunewords(); void Install_LadderRunewords();
void Install_EnabledCowPortalWhenCowKingWasKill(); void Install_EnabledCowPortalWhenCowKingWasKill();
/*================================= END OF FILE =================================*/ void SetWindowedOptions();
void lockMouseCursor();
#endif

View File

@@ -4,13 +4,13 @@
Set global variable. Set global variable.
=================================================================*/ =================================================================*/
#pragma once
#include "common.h" #ifndef __GLOBAL_VARIABLE_H__INCLUDED
#define __GLOBAL_VARIABLE_H__INCLUDED
extern bool onRealm; extern bool onRealm;
extern bool needToInit; extern bool needToInit;
void Install_VariableOnRealm(); void Install_VariableOnRealm();
/*================================= END OF FILE =================================*/ #endif

View File

@@ -4,6 +4,7 @@
infinity Stash gestion infinity Stash gestion
=================================================================*/ =================================================================*/
#pragma once #pragma once
#include "common.h" #include "common.h"
@@ -21,9 +22,9 @@ extern char* sharedStashFilename;
extern bool displaySharedSetItemNameInGreen; extern bool displaySharedSetItemNameInGreen;
extern int posXPreviousBtn,posYPreviousBtn,posXNextBtn,posYNextBtn,posXSharedBtn,posYSharedBtn,posXPreviousIndexBtn,posYPreviousIndexBtn,posXNextIndexBtn,posYNextIndexBtn,posXPutGoldBtn,posYPutGoldBtn,posXTakeGoldBtn,posYTakeGoldBtn; extern int posXPreviousBtn,posYPreviousBtn,posXNextBtn,posYNextBtn,posXSharedBtn,posYSharedBtn,posXPreviousIndexBtn,posYPreviousIndexBtn,posXNextIndexBtn,posYNextIndexBtn,posXPutGoldBtn,posYPutGoldBtn,posXTakeGoldBtn,posYTakeGoldBtn;
void toggleToSharedStash(Unit* ptChar); void toggleToSharedStash(Unit* ptChar);
void toggleToSelfStash(Unit* ptChar); void toggleToSelfStash(Unit* ptChar);
void setCurrentStashIndex(Unit* ptChar, bool isIndex);
void selectPreviousStash(Unit* ptChar); void selectPreviousStash(Unit* ptChar);
void selectNextStash(Unit* ptChar); void selectNextStash(Unit* ptChar);
void selectPreviousIndexStash(Unit* ptChar); void selectPreviousIndexStash(Unit* ptChar);
@@ -33,12 +34,9 @@ void selectNext2Stash(Unit* ptChar);
void selectPreviousIndex2Stash(Unit* ptChar); void selectPreviousIndex2Stash(Unit* ptChar);
void selectNextIndex2Stash(Unit* ptChar); void selectNextIndex2Stash(Unit* ptChar);
void swapStash(Unit* ptChar, DWORD page, bool toggle); void swapStash(Unit* ptChar, DWORD page, bool toggle);
void renameCurrentStash(Unit* ptChar, char* name);
void insertStash(Unit* ptChar);
bool deleteStash(Unit* ptChar);
void selectStash(Unit* ptChar, Stash* newStash); void selectStash(Unit* ptChar, Stash* newStash);
void setSelectedStashClient(DWORD stashId, DWORD stashFlags, DWORD flags, bool bOnlyItems); void setSelectedStashClient(DWORD stashId, DWORD stashFlags, DWORD flags);
Stash* addStash(Unit* ptChar, bool isShared); Stash* addStash(Unit* ptChar, bool isShared);
DWORD loadStashList(Unit* ptChar, BYTE* data, DWORD maxSize, DWORD* curSize, bool isShared); DWORD loadStashList(Unit* ptChar, BYTE* data, DWORD maxSize, DWORD* curSize, bool isShared);

View File

@@ -4,10 +4,10 @@
Interface Skills functions Interface Skills functions
=================================================================*/ =================================================================*/
#pragma once
#include "common.h" #ifndef __INTERFACE_SKILLS_HPP__INCLUDED
#define __INTERFACE_SKILLS_HPP__INCLUDED
void Install_InterfaceSkills(); void Install_InterfaceSkills();
/*================================= END OF FILE =================================*/ #endif

View File

@@ -4,10 +4,10 @@
Interface functions Interface functions
=================================================================*/ =================================================================*/
#pragma once
#include "common.h" #ifndef __INTERFACE_STASH_HPP__INCLUDED
#define __INTERFACE_STASH_HPP__INCLUDED
void Install_InterfaceStash(); void Install_InterfaceStash();
/*================================= END OF FILE =================================*/ #endif

View File

@@ -4,10 +4,10 @@
Interface Stats functions Interface Stats functions
=================================================================*/ =================================================================*/
#pragma once
#include "common.h" #ifndef __INTERFACE_STATS_HPP__INCLUDED
#define __INTERFACE_STATS_HPP__INCLUDED
void Install_InterfaceStats(); void Install_InterfaceStats();
/*================================= END OF FILE =================================*/ #endif

View File

@@ -4,9 +4,9 @@
Language management. Language management.
=================================================================*/ =================================================================*/
#pragma once
#include "common.h" #ifndef __LANGUAGE_H__INCLUDED
#define __LANGUAGE_H__INCLUDED
extern bool active_ChangeLanguage; extern bool active_ChangeLanguage;
extern DWORD selectedLanguage; extern DWORD selectedLanguage;
@@ -36,4 +36,4 @@ extern t_availableLanguages availableLanguages;
void Install_LanguageManagement(); void Install_LanguageManagement();
/*================================= END OF FILE =================================*/ #endif

View File

@@ -4,10 +4,10 @@
Load Player Custom Data. Load Player Custom Data.
=================================================================*/ =================================================================*/
#pragma once
#include "common.h" #ifndef __LOADPLAYERDATA_H__INCLUDED
#define __LOADPLAYERDATA_H__INCLUDED
void Install_LoadPlayerData(); void Install_LoadPlayerData();
/*================================= END OF FILE =================================*/ #endif

View File

@@ -4,9 +4,11 @@
Add "plugY v1.00" on screen. Add "plugY v1.00" on screen.
=================================================================*/ =================================================================*/
#pragma once
#include "common.h" #ifndef __MAINSCREEN_H__INCLUDED
#define __MAINSCREEN_H__INCLUDED
#include <windows.h>
extern bool active_VersionTextChange; extern bool active_VersionTextChange;
extern char* versionText; extern char* versionText;
@@ -17,4 +19,4 @@ extern BYTE colorOfPlugYVersion;
void Install_PrintPlugYVersion(); void Install_PrintPlugYVersion();
void Install_VersionChange(); void Install_VersionChange();
/*================================= END OF FILE =================================*/ #endif

View File

@@ -4,9 +4,8 @@
Modification of code in memory functions. Modification of code in memory functions.
/*============================================*/ /*============================================*/
#pragma once
#include <Windows.h> #pragma once
extern void* currentMemoryPos; extern void* currentMemoryPos;
DWORD mem_seek(DWORD newPos); DWORD mem_seek(DWORD newPos);

View File

@@ -4,10 +4,10 @@
Cube Listing functions Cube Listing functions
=================================================================*/ =================================================================*/
#pragma once
#include "common.h" #ifndef __NEWINTERFACE_CUBELISTING_H__INCLUDED
#define __NEWINTERFACE_CUBELISTING_H__INCLUDED
void listAllCubeFormula(); void listAllCubeFormula();
/*================================= END OF FILE =================================*/ #endif

View File

@@ -4,12 +4,12 @@
New runeword Interface New runeword Interface
=================================================================*/ =================================================================*/
#pragma once
#include "common.h" #ifndef __NEWINTERFACE_RUNEWORDS_H__INCLUDED
#define __NEWINTERFACE_RUNEWORDS_H__INCLUDED
void STDCALL printRunewordsPage(); void STDCALL printRunewordsPage();
DWORD STDCALL mouseRunewordsPageLeftDown(sWinMessage* msg); DWORD STDCALL mouseRunewordsPageLeftDown(sWinMessage* msg);
DWORD STDCALL mouseRunewordsPageLeftUp(sWinMessage* msg); DWORD STDCALL mouseRunewordsPageLeftUp(sWinMessage* msg);
/*================================= END OF FILE =================================*/ #endif

View File

@@ -4,12 +4,12 @@
New Stat Interface New Stat Interface
=================================================================*/ =================================================================*/
#pragma once
#include "common.h" #ifndef __NEWINTERFACE_STATS_H__INCLUDED
#define __NEWINTERFACE_STATS_H__INCLUDED
void STDCALL printNewStatsPage(); void STDCALL printNewStatsPage();
DWORD STDCALL mouseNewStatsPageLeftDown(sWinMessage* msg); DWORD STDCALL mouseNewStatsPageLeftDown(sWinMessage* msg);
DWORD STDCALL mouseNewStatsPageLeftUp(sWinMessage* msg); DWORD STDCALL mouseNewStatsPageLeftUp(sWinMessage* msg);
/*================================= END OF FILE =================================*/ #endif

View File

@@ -4,12 +4,12 @@
New Stat Interface Page 2 New Stat Interface Page 2
=================================================================*/ =================================================================*/
#pragma once
#include "common.h" #ifndef __NEWINTERFACE_STATSPAGETWO_H__INCLUDED
#define __NEWINTERFACE_STATSPAGETWO_H__INCLUDED
void STDCALL printNewStatsPageTwo(int currentPage); void STDCALL printNewStatsPageTwo(int currentPage);
DWORD STDCALL mouseNewStatsPageTwoLeftDown(sWinMessage* msg); DWORD STDCALL mouseNewStatsPageTwoLeftDown(sWinMessage* msg);
DWORD STDCALL mouseNewStatsPageTwoLeftUp(sWinMessage* msg); DWORD STDCALL mouseNewStatsPageTwoLeftUp(sWinMessage* msg);
/*================================= END OF FILE =================================*/ #endif

View File

@@ -4,9 +4,9 @@
New Interfaces functions New Interfaces functions
=================================================================*/ =================================================================*/
#pragma once
#include "common.h" #ifndef __NEW_INTERFACES_H__INCLUDED
#define __NEW_INTERFACES_H__INCLUDED
#define MILIEU(X,L,N) (X + ((N<L)? (L-N)/2 : 0)) #define MILIEU(X,L,N) (X + ((N<L)? (L-N)/2 : 0))
#define isOnStatsPage(x,y) ((x<400) && (y<553)) #define isOnStatsPage(x,y) ((x<400) && (y<553))
@@ -24,4 +24,4 @@ extern bool printBackgroundOnMainPage;
void Install_NewInterfaces(); void Install_NewInterfaces();
/*================================= END OF FILE =================================*/ #endif

View File

@@ -4,13 +4,13 @@
Others features. Others features.
=================================================================*/ =================================================================*/
#pragma once
#include "common.h" #ifndef __OTHERSFEATURES_H__INCLUDED
#define __OTHERSFEATURES_H__INCLUDED
extern bool active_othersFeatures; extern bool active_othersFeatures;
void Install_OthersFeatures(); void Install_OthersFeatures();
void Install_ChangeResolution(); void Install_ChangeResolution();
/*================================= END OF FILE =================================*/ #endif

View File

@@ -4,9 +4,10 @@
Loading parameters from ini file. Loading parameters from ini file.
=================================================================*/ =================================================================*/
#pragma once #pragma once
#define PLUGY_VERSION "11.01" #define PLUGY_VERSION "10.01"
#define LOG_FILE "PlugY.log" #define LOG_FILE "PlugY.log"

View File

@@ -4,12 +4,12 @@
Data added to Player base-stucture Data added to Player base-stucture
=================================================================*/ =================================================================*/
#pragma once #pragma once
#include "common.h" #include "common.h"
extern bool active_PlayerCustomData; extern bool active_PlayerCustomData;
extern bool openSharedStashOnLoading;
struct Unit; struct Unit;
@@ -20,8 +20,6 @@ struct Stash
DWORD flags; DWORD flags;
struct { struct {
DWORD isShared:1; // DWORD isShared:1; //
DWORD isIndex:1; //
DWORD isReserved:1; // For swap items comand
}; };
}; };
char* name; char* name;

View File

@@ -4,9 +4,8 @@
Data added to D2 base-stucture Data added to D2 base-stucture
=================================================================*/ =================================================================*/
#pragma once
#include "common.h" #pragma once
extern void* unassignSkillsBtnImages; extern void* unassignSkillsBtnImages;
extern void* unassignStatsBtnImages; extern void* unassignStatsBtnImages;

View File

@@ -4,13 +4,13 @@
Changing the current save path. Changing the current save path.
=================================================================*/ =================================================================*/
#pragma once
#include "common.h" #ifndef __SAVEPATH_H__INCLUDED
#define __SAVEPATH_H__INCLUDED
extern char* savePath; extern char* savePath;
extern bool active_changingSavePath; extern bool active_changingSavePath;
void Install_ChangingSavePath(); void Install_ChangingSavePath();
/*================================= END OF FILE =================================*/ #endif

View File

@@ -4,10 +4,10 @@
Save Player Custom Data. Save Player Custom Data.
=================================================================*/ =================================================================*/
#pragma once
#include "common.h" #ifndef __SAVEPLAYERDATA_H__INCLUDED
#define __SAVEPLAYERDATA_H__INCLUDED
void Install_SavePlayerData(); void Install_SavePlayerData();
/*================================= END OF FILE =================================*/ #endif

View File

@@ -4,9 +4,11 @@
Add an extra save file shared by all own characters. Add an extra save file shared by all own characters.
=================================================================*/ =================================================================*/
#pragma once #pragma once
#include "common.h" #include "common.h"
#include <stdio.h>
BYTE* readSharedSaveFile(char* name, DWORD* size); BYTE* readSharedSaveFile(char* name, DWORD* size);
void writeSharedSaveFile(char* name, BYTE* data, DWORD size, bool isHardcore); void writeSharedSaveFile(char* name, BYTE* data, DWORD size, bool isHardcore);

View File

@@ -4,9 +4,10 @@
Change Skill win per level up. Change Skill win per level up.
=================================================================*/ =================================================================*/
#pragma once #pragma once
#include "common.h" #include <windows.h>
extern bool active_SkillPerLevelUpChange; extern bool active_SkillPerLevelUpChange;
extern DWORD skillPerLevelUp; extern DWORD skillPerLevelUp;

View File

@@ -4,9 +4,9 @@
Unassign Skill Point for futher re-assignment. Unassign Skill Point for futher re-assignment.
=================================================================*/ =================================================================*/
#pragma once
#include "common.h" #ifndef __SKILLSPOINTS_H__INCLUDED
#define __SKILLSPOINTS_H__INCLUDED
extern bool active_SkillsPoints; extern bool active_SkillsPoints;
extern bool unassignSkillsPointsOneByOne; extern bool unassignSkillsPointsOneByOne;
@@ -17,4 +17,4 @@ void client_UnassignAllSkillsPoints();
void Install_SkillsPoints(); void Install_SkillsPoints();
/*================================= END OF FILE =================================*/ #endif

View File

@@ -4,9 +4,10 @@
Change Stat win per level up. Change Stat win per level up.
=================================================================*/ =================================================================*/
#pragma once #pragma once
#include "common.h" #include <windows.h>
extern bool active_StatPerLevelUpChange; extern bool active_StatPerLevelUpChange;
extern DWORD statPerLevelUp; extern DWORD statPerLevelUp;

View File

@@ -4,9 +4,10 @@
Unassign Stats Point for futher re-assignment. Unassign Stats Point for futher re-assignment.
=================================================================*/ =================================================================*/
#pragma once #pragma once
#include "common.h" #include <windows.h>
extern bool active_StatsPoints; extern bool active_StatsPoints;
extern DWORD keyUsedForUnassignStatPoint; extern DWORD keyUsedForUnassignStatPoint;

8
PlugY/stdafx.cpp Normal file
View File

@@ -0,0 +1,8 @@
// stdafx.cpp : source file that includes just the standard includes
// PlugY.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file

16
PlugY/stdafx.h Normal file
View File

@@ -0,0 +1,16 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#pragma once
#include "targetver.h"
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>
// TODO: reference additional headers your program requires here

Some files were not shown because too many files have changed in this diff Show More