diff --git a/Commons/D2Funcs.h b/Commons/D2Funcs.h index fcfa805..de87b47 100644 --- a/Commons/D2Funcs.h +++ b/Commons/D2Funcs.h @@ -148,59 +148,59 @@ -//F7(STD, D2Common,00000,00000,00000,00000,10001,00000,00000, DWORD, D2GetActIDFromLevel, (DWORD levelID)); +//F7(STD, D2Common,00000,00000,00000,00000,10001,00000,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,10057,10057,10057,10332,11021,10511,10826,10691, 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,10149,10149,10149,00000,00000,00000,00000, Inventory*, D2GetInventory, (Unit* ptUnit)); +//F7(STD, D2Common,10149,10149,10149,00000,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,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,10243,10243,10243,10461,10827,10936,10646,10490, 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,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,10257,10257,10257,00000,00000,00000,00000, Unit*, D2GetItemFromBodyLoc, (Inventory* ptInventory, DWORD bodyloc)); +//F7(STD, D2Common,10257,10257,10257,00000,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,10277,10277,10277,10402,10535,11151,10460,11040, Unit*, D2InventoryGetFirstItem, (Inventory* ptInventory)); F7(STD, D2Common,10304,10304,10304,10934,11140,10770,10464,10879, Unit*, D2UnitGetNextItem, (Unit* ptItem)); F7(STD, D2Common,10305,10305,10305,11095,10748,10852,11147,10897, Unit*, D2GetRealItem, (Unit* ptUnit)); -//F7(STD, D2Common,10321,10321,10321,00000,00000,00000,00000, SkillData*, D2GetLeftSkill, (Unit* ptChar)); -//F7(STD, D2Common,10322,10322,10322,00000,00000,00000,00000, SkillData*, D2GetRightSkill, (Unit* ptChar)); +//F7(STD, D2Common,10321,10321,10321,00000,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,10326,10326,00000,00000,00000,00000,00000,00000, DWORD, D2GetPosX, (Unit* ptUnit));//NOT IN 1.10 -//F7(STD, D2Common,10328,10328,10328,00000,00000,00000,00000, void, D2SetPosX, (Unit* ptUnit, DWORD pos)); +//F7(STD, D2Common,10328,10328,10328,00000,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,10331,10331,10331,00000,00000,00000,00000, void, D2SetPosY, (Unit* ptUnit, DWORD pos)); +//F7(STD, D2Common,10331,10331,10331,00000,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,10339,10339,10339,10455,10864,10941,11060,11025, DWORD, D2GetMaxGoldBank, (Unit* ptUnit)); F7(STD, D2Common,10342,10342,10342,10172,10933,10366,10331,10846, Room*, D2GetRoom, (Unit* ptUnit)); -//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, ObjectsBIN*,D2GetObjectsBIN, (Unit* ptObject)); +//F7(STD, D2Common,10348,10348,10348,00000,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,10420,10420,10420,10218,10079,11097,10356,10404, PlayerData*,D2InitPlayerData, (Unit* ptChar)); -//F7(STD, D2Common,10421,10421,10421,10914,10329,00000,00000, DWORD, D2FreePlayerData, (DWORD game1C, Unit* ptChar)); +//F7(STD, D2Common,10421,10421,10421,10914,10329,00000,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,10431,10431,10431,00000,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,10439,10439,10439,10343,11131,10729,10049,11159, DWORD, D2GetMaxGold, (Unit* ptUnit)); F7(STD, D2Common,00000,00000,00000,10440,10572,10481,11090,10193, DWORD, D2Common10572, (Unit* ptObject, DWORD value)); -//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, void, D2AddStat, (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, int, D2GetStat, (Stats* ptStats, DWORD statID, DWORD statIndex)); -//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,10463,10463,10463,00000,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,10465,10465,10465,00000,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,10470,10470,10470,00000,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,10572,11048,10150,10111,10033, void, D2SetObjectFlags, (Unit* ptObject, BYTE flags)); -//F7(STD, D2Common,10471,10471,10471,00000,00000,00000,00000, DWORD, D2Common10471, (void*)); -//F7(STD, D2Common,10472,10472,10472,00000,00000,00000,00000, DWORD, D2Common10472, (void*)); -//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, void*, D2Common10481, (Unit* ptUnit, DWORD flags)); -//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, void, D2FreeStats, (Stats* ptStats)); +//F7(STD, D2Common,10471,10471,10471,00000,00000,00000,00000,00000, DWORD, D2Common10471, (void*)); +//F7(STD, D2Common,10472,10472,10472,00000,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,10481,10481,10481,00000,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,10485,10485,10485,00000,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,10517,10517,10517,00000,00000,00000,00000, void, D2SetPlayerStat, (Unit* ptChar, DWORD statID, int amount, DWORD index)); +//F7(STD, D2Common,10517,10517,10517,00000,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,10519,10519,10519,11092,10061,10658,10973,10550, int, D2GetPlayerStat, (Unit* ptChar, DWORD statID, DWORD index));//ONLY 1.11b -//F7(STD, D2Common,10520,10520,10520,00000,00000,00000,00000, int, D2GetPlayerStat20, (Unit* ptChar, DWORD statID, DWORD index)); +//F7(STD, D2Common,10520,10520,10520,00000,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,10527,10527,10527,00000,00000,00000,00000, DWORD, D2Common10527, (Unit* ptUnit)); +//F7(STD, D2Common,10527,10527,10527,00000,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,10540,10540,10540,00000,00000,00000,00000,00000, DWORD, D2haveFireResBonus, (Unit* ptChar)); F7(STD, D2Common,10541,10541,10541,00000,00000,00000,00000,00000, DWORD, D2haveColdResBonus, (Unit* ptChar)); @@ -211,78 +211,78 @@ F7(STD, D2Common,10547,10547,10547,00000,00000,00000,00000,00000, DWORD, D2hav F7(STD, D2Common,10548,10548,10548,00000,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,10550,10550,10550,00000,00000,00000,00000,00000, DWORD, D2havePoisonResMalus, (Unit* ptChar)); -//F7(STD, D2Common,10552,10552,10552,00000,00000,00000,00000, DWORD, D2Common10552, (Unit* ptUnit)); -//F7(STD, D2Common,10567,10567,10567,00000,00000,00000,00000, DWORD, D2CanBeBroken, (Unit* ptItem)); -//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, void*, D2SetEnabledStat, (Unit* ptItem, DWORD statId, DWORD disabled)); -//F7(STD, D2Common,10575,10575,10575,00000,00000,00000,00000, void, D2FreeBinFiles, ()); -//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, DWORD, D2CheckQuestState, (void* ptQuest, DWORD index, DWORD value)); +//F7(STD, D2Common,10552,10552,10552,00000,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,10573,10573,10573,00000,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,10575,10575,10575,00000,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,00000,00000,00000,10651,10651,00000,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,10600,10600,10600,10573,10262,10887,10695,10994, ItemsBIN*, D2GetItemsBIN, (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, AffixBIN*, D2GetAffixBIN, (int affixID)); +//F7(STD, D2Common,10601,10601,10601,00000,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,10616,10616,10616,10500,10523,10774,10806,10619, GemsBIN*, D2GetGemsBIN, (DWORD gemID)); F7(STD, D2Common,11232,11232,11232,10746,10258,10913,10783,10393, CubeMainBIN*,D2GetCubeMainBIN, (DWORD cubemainID)); F7(STD, D2Common,11233,11233,11233,10639,11135,10390,10675,10235, int, D2GetNbCubeMainBIN, ()); -//F7(STD, D2Common,10737,10737,10737,00000,00000,00000,00000, LevelsBIN*, D2GetLevelsBIN, (DWORD levelID)); +//F7(STD, D2Common,10737,10737,10737,00000,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,10629,10629,10629,00000,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,10659,10659,10659,00000,00000,00000,00000, TreasureClassBIN*, D2GetTreasureClassBIN, (WORD id, DWORD uk)); -//F7(STD, D2Common,10668,10668,10668,10450,10953,00000,00000, SuperUniqueBIN*, D2GetSuperUniqueBIN, (WORD id)); +//F7(STD, D2Common,10659,10659,10659,00000,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,10695,10695,10695,10927,10899,10276,10106,10911, 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,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, DWORD, D2GetFlags, (Unit* ptUnit)); -//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,10708,10708,10708,00000,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,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,10717,10717,10717,10898,10100,10410,10086,10008, DWORD, D2GetItemLevel, (Unit* ptItem)); F7(STD, D2Common,10719,10719,10719,10820,10505,10370,10020,10810, BYTE, D2ItemGetPage, (Unit* ptUnit)); F7(STD, D2Common,10720,10720,10720,10485,10608,10223,10012,11026, 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,10732,10732,10732,10692,10685,10280,10620,10075, int, D2GetUniqueID, (Unit* ptItem)); F7(STD, D2Common,10734,10734,10734,00000,00000,00000,00000,00000, void, D2SetAnim, (Unit* ptUnit, int anim)); -//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, DWORD, D2GetItemType, (Unit* ptUnit)); -//F7(STD, D2Common,10757,10757,10757,00000,00000,00000,00000, DWORD, D2GetItemLevelReq, (Unit* ptChar, Unit* ptItem)); +//F7(STD, D2Common,10749,10749,10749,00000,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,10757,10757,10757,00000,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,10620,10620,10620,10775,10296,10622,10006,10405, RunesBIN*, D2GetRunesBIN, (int runesID)); -//F7(STD, D2Common,10792,10792,10792,00000,00000,00000,00000, DWORD, D2CanBeRare, (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, DWORD, D2GetStaffMods, (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, DWORD, D2Common10840, (Unit* ptItem, Unit* ptChar)); -//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, DWORD, D2WarpPlayer, (Path* ptPath, Unit* ptChar, Room* ptRoom, DWORD x, DWORD y)); -//F7(STD, D2Common,10875,10875,10875,00000,00000,00000,00000, WORD, D2GetItemVersion, (Unit* ptItem)); +//F7(STD, D2Common,10792,10792,10792,00000,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,10813,10813,10813,00000,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,10840,10840,10840,00000,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,10872,10872,10872,00000,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,11163,11163,11163,10880,11068,10436,11107,10963, 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,10916,10916,10916,00000,00000,00000,00000, void, DoNothing916, ()); -//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, SkillData*, D2GetSkillPointer, (Unit* ptChar, WORD SkillID)); -//F7(STD, D2Common,10952,10952,10952,10950,10256,10858,00000, SkillData*, D2IncSkillBaseLevel, (Unit* ptChar, DWORD skillID)); +//F7(STD, D2Common,10916,10916,10916,00000,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,10950,10950,10950,00000,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,10953,10953,10953,10099,10255,10210,10302,10335, void, D2SetSkillBaseLevel,(Unit* ptChar, DWORD skillID, DWORD slvl, DWORD bRemove, char*, DWORD)); -//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, SkillsBIN*, D2GetSkillsBIN, (SkillData* ptSkill)); +//F7(STD, D2Common,10963,10963,10963,00000,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(STD, D2Common,10968,10968,10968,10700,10109,10904,10306,10007, DWORD, D2GetSkillLevel, (Unit* ptChar, SkillData* ptSkill, DWORD includingBonus)); -//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, bool, D2TestQuestState, (void* ptQuest, DWORD QuestID, DWORD QuestState)); -//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, int, D2GetNbSkillsPerPlayer, (DWORD playerID)); -//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, DWORD, D2GetAllIndexFromStatID, (Unit* ptItem, DWORD statID, D2Stat* allIndex, DWORD)); +//F7(STD, D2Common,11023,11023,11023,00000,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,11041,11041,11041,00000,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,11269,11269,11269,00000,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,11276,11276,11276,10254,10074,10111,10435,11081, 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,12410,5D7D0,1A100,116C0,1C020,5B0E0, 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,2B1A0, 11F0, 1380, 1140, 1300, 1160, ItemTypesBIN*, D2GetItemTypesBIN, (DWORD itemTypesId)); -//A7(FAST, D2Common,00000,00000,62FD0,00000,00000,00000,00000, void, D2EncodeValueCheckMax, (saveBitField* data, DWORD value, DWORD bitSize)); +//A7(FAST, D2Common,00000,00000,62FD0,00000,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,764A0,00000,00000,00000,00000, void*, D2Common764A0, (Stats* ptStats, DWORD stat, ItemStatCostBIN* itemStatCost ,DWORD)); -//A7(STD, D2Common,00000,00000,76E30,00000,00000,00000,00000, void, D2PreUpdateDisabledStat, (Stats* ptStats)); -//A7(FAST, D2Common,00000,00000,76C10,00000,00000,00000,00000, void, D2ApplyStat,(Stats* ptCharStats, DWORD statId, DWORD value, Unit* ptItem)); +//A7(FAST, D2Common,00000,00000,764A0,00000,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(FAST, D2Common,00000,00000,76C10,00000,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,00000,00000, 94D0,00000,00000,00000,00000, void*, D2GetStringIDForTxtFile,(const char * string)); +//A7(FAST, D2Common,00000,00000, 94D0,00000,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 @@ -311,22 +311,22 @@ A7(STD, D2Common,1F500,1F510,29FA0,71EB0,32AA0,7D2A0,59870,80C40, void, D2Loa A7(FAST, D2Client, 1000, 1000, 1000,75D00,A9070,BEF70,2B420,A9480, 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, D640, D630, DB50,73620,5E4E0,79670,147A0,B6890, void, D2SendMsgToAll,(BYTE* data));//1.11 and 1.11b by ESI !! -//A7(STD, D2Client,00000,00000,15A80,00000,00000,00000,00000, int, D2GetAvgChanceMonsterWillHitYou, ());//6FAB5A80 +//A7(STD, D2Client,00000,00000,15A80,00000,00000,00000,00000,00000, int, D2GetAvgChanceMonsterWillHitYou, ());//6FAB5A80 A7(STD, D2Client,00000,00000,15A80,00000,00000,00000,00000,00000, DWORD, D2GetLastMonsterIDFight, ());//6FAB5A80 A7(STD, D2Client,29800,297F0,2FD60,828A0,89320,6B280,BCEA0,BF640, void, D2PrintStatsPage, ()); -//A7(FAST, D2Client,00000,00000,45990,00000,00000,00000,00000, Unit*, D245990, (Inventory*,DWORD idItem);//6FAE5990 +//A7(FAST, D2Client,00000,00000,45990,00000,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,85A60,84DE0,80430,9EEB0,62070,8B7A0,BF5F0,18820, LPWSTR, D2SetColorPopup, (LPWSTR popupText, DWORD color));//1.11 and 1.11b BY EDI -//A7(FAST, D2Client,00000,00000,869F0,00000,00000,00000,00000, Unit*, D2ClientGetObject, (DWORD itemNum, DWORD type));//6FB269F0 +//A7(FAST, D2Client,00000,00000,869F0,00000,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,B9970,B8CF0,BB0F0,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,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,73260,5DE40,791A0,143E0,B61F0, 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,00000,00000,00000,A6520,710C0,A6640,8CD00,90C10, 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(FAST, D2Client,00000,00000,00000,8E480,5BA90,1CC00,4ABE0,7DC60, void, D2ReloadGambleScreen, ()); -//A7(FAST, D2Client,00000,00000,00000,00000,1FEB0,5CDD0,00000, void, D2OpenNPCMenu, (Unit* ptNPC));//by ESI +//A7(FAST, D2Client,00000,00000,00000,00000,1FEB0,5CDD0,00000,00000, void, D2OpenNPCMenu, (Unit* ptNPC));//by ESI //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -371,31 +371,31 @@ A7(FAST, D2Client,00000,00000,00000,8E480,5BA90,1CC00,4ABE0,7DC60, void, D2Relo F7(FAST, D2Game,10059,10059,10059,10039,10007,10037,10049,10002, void, D2SetNbPlayers, (DWORD nbPlayers)); -//A7(FAST, D2Game,00000,00000,01DE0,00000,00000,00000,00000, void*, D2GetClientByClientID, (Game* ptGame, DWORD clientID));//6FC31DE0 +//A7(FAST, D2Game,00000,00000,01DE0,00000,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(STD, D2Game,00000,00000, 94E0,E0520,E49A0,A6360,2AAE0,BC700, 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, C380, C650, C710,41420,A0D50,7D220,8A3E0,DB780, 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,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, DWORD, D2UpdateInventory, (Game* ptGame, Unit* ptChar, void* ptNetClient, Inventory* pInventory));//6FC40FB0 -//A7(FAST, D2Game,00000,00000,110E0,00000,00000,00000,00000, DWORD, D2UpdateItem, (Unit* ptChar, Unit* ptItem, Unit* ptSocketedItem, void* ptNetClient));//6FC410E0 +//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,10FB0,00000,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(STD, D2Game,00000,00000,00000,27230,109F0,AE930,A22E0,15F40, 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,1ED80,00000,00000,00000,00000, Unit*, D2CreateItem, (Game* ptGame, ItemGenerationData* itemGenerationData, DWORD));//6FC4ED80 +//A7(FAST, D2Game,00000,00000,1ED80,00000,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,22410,00000,00000,00000,00000, void, D2AddStaffModAffixes, (Unit* ptItem, ItemGenerationData* itemParam));//6FC52410 -//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, WORD, D2GetRareAffixName, (Unit* ptItem, DWORD wantPrefix));//6FC53610 -//A7(FAST, D2Game,00000,00000,3AD10,00000,00000,00000,00000, DWORD, D2GetSuperUniqueMonsterID, (Game* ptGame, Unit* ptMonster));//6FC6AD10 +//A7(FAST, D2Game,00000,00000,22410,00000,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,23610,00000,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,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(STD, D2Game,00000,00000,00000,D6D10,235C0, D410,200E0,59980, void, D2Game235C0, (Game* ptGame, Room* ptRoom)); -//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, DWORD, D2SavePlayer, (Game* ptGame, Unit* ptChar, char* playername, DWORD zero));//6FC8A500 +//A7(FAST, D2Game,00000,00000,4C7B0,00000,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,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,7BAE0,7BFD0,8BB00,97620,BEF80,93650,E03A0,6DC40, Unit*, D2GameGetObject, (Game* ptGame, DWORD type, DWORD itemNum));//6FCBBB00 -//A7(FAST, D2Game,00000,00000,9F320,501C0,F1C50,F1A50,F3220, Unit*, D2GetOwnerMonster, (Unit* ptMonster)); -//A7(FAST, D2Game,00000,00000,E08D0,00000,00000,00000,00000, void, D2UpdateSkillDataAfterUnassignment, (Game* ptGame, Unit* ptChar, DWORD skillID));//6FD108D0 +//A7(FAST, D2Game,00000,00000,9F320,501C0,F1C50,F1A50,F3220,00000, 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,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,9B480,34920,D1AA0,70180,941E0, void, D2OpenPandPortal, (Game* ptGame, Unit* ptChar)); A7(FAST, D2Game,00000,00000,00000,9B470,34910,D1A90,70170,941D0, void, D2OpenPandFinalPortal, (Game* ptGame, Unit* ptChar)); @@ -405,7 +405,7 @@ A7(FAST, D2Game,00000,00000,00000,EAB20,2BC80,B3B90,B8610,C8850, void, D2BaalIA A7(FAST, D2Game,00000,00000,00000,70320,D2D70,C2A90,7B4E0,49480, 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,E92B0,2A300,B2210,B6C80,C6EC0, void, D2UberBaalIA, (Game* ptGame, Unit* ptMonster, DWORD*)); -//A7(FAST, D2Game,00000,00000,00000,00000,92420,00000,00000, void, D2ReloadGambleScreenGame, (Unit* ptNPC, Game* ptGame, Unit* ptChar, DWORD, DWORD one)); +//A7(FAST, D2Game,00000,00000,00000,00000,92420,00000,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) ); @@ -452,12 +452,12 @@ F7(FAST, Fog, 10104,10104,10104,10104,10104,10104,10104,10104, DWORD, D2MPQRead F7(FAST, Fog, 10105,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, 10116,10116,10116,10116,10116,10116,10116,10116, void, D2FogGetInstallPath, (char* ptPath, DWORD maxsize)); -//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, DWORD, D2GetBitFieldSize, (saveBitField* data));//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, DWORD, D2DecodeValue, (saveBitField* data,DWORD readingSize));//6FF53840 +//F7(STD, Fog, 10126,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, 10128,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, 10212,10212,10212,10212,10212,10212,10212,10212, void, D2Fog10212, (DWORD unknow)); -//F7(STD, Fog, 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,10217, int, D2GetIDFromLookUpTable, (void* table, char* string, bool));//6FF53840 F7(STD, Fog, 00000,00000,00000,10265,10265,10265,10265,10265, int, D2GetInstructionPointer, ()); //Fog10213 getIndexFromLookupTable (&table,code,bool) @@ -477,18 +477,19 @@ F7(STD, Fog, 00000,00000,00000,10265,10265,10265,10265,10265, int, D2GetInstru ////E2F(D2Lang,2CD0, DWORD, D2unicodenwidth, (char* ptChar, DWORD size));//6FC12CD0_unicodenwidth ////E2S(D2Lang,1670, DWORD, D2swprintf, (DWORD bufSize, LPWSTR buf, LPWSTR string, ...));//6FC11670_sprintf -F7(FAST, D2Lang, 10003,10003,10003,10002,10004,10010,10011,10011, LPWSTR, D2GetStringFromString, (const char* ptString));//6FC13BC0 -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(FAST, D2Lang, 10003,10003,10003,00000,00000,00000,00000,10011, 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,10004, LPWSTR, D2GetStringFromIndex, (WORD dwIndexNum)); +//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,10001, DWORD, D2GetLang, ());//14b 00522A20 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,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,02E60,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,03A90,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(STD, D2Lang, 00000,00000,01670,00000,00000,00000,00000, DWORD, D2swprintf, (DWORD bufSize, LPWSTR buf, LPWSTR string, ...));//6FC11670_sprintf +//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,00000, DWORD, D2UnicodeWidth, (DWORD MemLoc, WORD Size));//6FC129B0 +//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,00000, TblHeader*, D2LoadTblFile, (LPCSTR lpszFileName));//6FC13640 +//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,00000, DWORD, D2unicodenwidth, (char* ptChar, DWORD size));//6FC12CD0_unicodenwidth +//A7(STD, D2Lang, 00000,00000,01670,00000,00000,00000,00000,00000, DWORD, D2swprintf, (DWORD bufSize, LPWSTR buf, LPWSTR string, ...));//6FC11670_sprintf //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Storm : 6FFB0000 @@ -497,10 +498,10 @@ F7(STD, D2Lang, 10013,10013,10013,00000,00000,00000,00000,10005, DWORD, D2GetS //D2S(Storm,503, void, D2Storm503, (DWORD, DWORD, DWORD)); //+1.11 //D2S(Storm,511, void, D2FreeWinMessage, (sWinMessage* msg));//1.11/1.11b -//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, 503, 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, 253, 253, 253, 253, 253, 253, 000, 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, 503, 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)); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -513,9 +514,9 @@ F7(STD, Storm, 511, 511, 511, 511, 511, 511, 511, 511, void, D2FreeWin //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, 10023,10023,10023,00000,00000,00000,00000, DWORD, D2CreateMainWindow,(DWORD,DWORD) ); -//F7(STD, D2gfx, 10026,10026,10026,00000,00000,00000,00000, DWORD, D2ShowWindow,() ); -//F7,STD, D2gfx, 10027,10027,10027,00000,00000,00000,00000, HWND, D2GetWindowHandle,() );//6FA749C0 +//F7,STD, D2gfx, 10023,10023,10023,00000,00000,00000,00000,00000, DWORD, D2CreateMainWindow,(DWORD,DWORD) ); +//F7(STD, D2gfx, 10026,10026,10026,00000,00000,00000,00000,00000, DWORD, D2ShowWindow,() ); +//F7,STD, D2gfx, 10027,10027,10027,00000,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, 10072,10072,10072,10047,10044,10024,10041,10042, void, D2PrintImage,(sDrawImageInfo* data, DWORD x, DWORD y, DWORD p4, DWORD p5, DWORD p6) ); @@ -556,10 +557,10 @@ A7(STD, D2Client, B6680,B5A00,B7BD0,00000,00000,00000,00000,00000, DWORD, D2Ge A7(STD, D2Client, 8DC40,8CFC0,883D0,00000,00000,00000,00000,00000, Unit*, D2GetClientPlayer, ());//6FB283D0 A7(FAST, D2Client, B920, B910, BF60,00000,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, 00000,00000, DA20,00000,00000,00000,00000, void, D2SendToServer5, (BYTE type, DWORD p));//6FAADA20 -//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, void, D2SendToServer9, (BYTE type, DWORD p1, DWORD p2));//6FAADA40 -//A7(FAST, D2Client, 00000,00000, DA70,00000,00000,00000,00000, void, D2SendToServer13,(BYTE type, DWORD p1, DWORD p2, DWORD p3));//6FAADA70 +//A7(FAST, D2Client, 00000,00000, DA20,00000,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, DA40,00000,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, D2Game, 7C2C0,7C7B0,8C2E0,00000,00000,00000,00000,00000, NetClient*, D2GetClient, (Unit* ptUnit, char* lpszErrFile, DWORD ErrLine));//6FCBC2E0 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -582,13 +583,13 @@ A7(FAST, D2Game, 7C2C0,7C7B0,8C2E0,00000,00000,00000,00000,00000, NetClient*, D2 //E2C(D2Client,11C1E0,Unit*, ptClientChar);//1.11b //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, D50EC, D40E4, D40F4, F5C5C, F4FC4, DC6E0, DBC48,F7034, DWORD, ResolutionX);//0x320 = 800 +C7(D2Client, D50E8, D40E0, D40F0, F5C60, F4FC8, DC6E4, DBC4C, F7038, DWORD, ResolutionY);//0x258 = 600 +C7(D2Client, D50EC, D40E4, D40F4, F5C5C, F4FC4, DC6E0, DBC48, F7034, DWORD, ResolutionX);//0x320 = 800 C7(D2Client,125AD8,124958,11A74C,11BD28,11BEFC,11BD2C,11B9A4,11D358, DWORD, NegWindowStartY);//0xFFFFFFC4 = -60 C7(D2Client,125AD4,124954,11A748,11BD24,11BEF8,11BD28,11B9A0,11D354, DWORD, WindowStartX);//0x50 = 80 -//C7(D2Launch, 55818, 56088, 2CD5C,000000, 2CD5C,000000,000000, DWORD, GameTypeMode);//0x50 = 80 //6FA3CD5C-6FA10000 +//C7(D2Launch, 55818, 56088, 2CD5C,000000, 2CD5C,000000,000000,00000, DWORD, GameTypeMode);//0x50 = 80 //6FA3CD5C-6FA10000 C7(D2Game, F2A80, F2918,113FB8,111718,1115E0,1105E0,1107B8,1105E0, NetClient*, ClientTable); -//C7(D2Client,000000,000000,000000,000000,104225,000000,000000, DWORD, CurrentNPCNum); +//C7(D2Client,000000,000000,000000,000000,104225,000000,000000,00000, DWORD, CurrentNPCNum); C7(D2Client,000000,000000,000000, FB3F4,11A2F4,10330C,119854,1087B4, DWORD, IsLodGame); C7(D2Client,000000,000000,10795C,11BFB8,11C2A8,11BFF4,000000,000000, BYTE, DifficultyLevel); //C7(D2Client,000000,000000,10795C,11BFB8,11C2A8,11BFF4,000000,11D1D8, BYTE, DifficultyLevel); diff --git a/Commons/D2UnitStruct.h b/Commons/D2UnitStruct.h index 8ef16a8..bbb127c 100644 --- a/Commons/D2UnitStruct.h +++ b/Commons/D2UnitStruct.h @@ -13,6 +13,9 @@ struct CBPlayerData; struct CBItemData; struct Unit; +struct SkillsBIN; +struct SkillData; +struct ObjectsBIN; /*=================================================================*/ /* Skill Structure. */ @@ -345,12 +348,14 @@ struct NetClient WORD isHardCoreGame:1; }; }; - BYTE uk2[0x170]; //+0C + BYTE uk2; //+0C + char name[0x10]; //+0D + BYTE uk3[0x15F]; //+1D BYTE* savefile; //+17C DWORD finalSize; //+180 DWORD counter; //+184 DWORD currentSize; //+188 - BYTE uk3[0x1C]; //+18C + BYTE uk4[0x1C]; //+18C Game* ptGame; //+1A8 //+1A8 is ptGame //+4A8 ptNextClient diff --git a/Commons/VersionInfo.cpp b/Commons/VersionInfo.cpp index 9e7be5e..256cb70 100644 --- a/Commons/VersionInfo.cpp +++ b/Commons/VersionInfo.cpp @@ -1,118 +1,86 @@ +/*================================================================= + File created by Yohann NICOLAS. + + Get Game version. + +=================================================================*/ + +//#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include "VersionInfo.h" -#pragma comment(lib, "Version.Lib") // Delphi 7 - ! :( +#include +#pragma comment(lib, "Version.Lib") -bool IsFile(char* sPath) +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) { - bool bFile = false; - HANDLE hFile = CreateFile - ( - sPath, - GENERIC_READ, - FILE_SHARE_READ, - NULL, - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, - NULL - ); - if(hFile != INVALID_HANDLE_VALUE) - { - CloseHandle(hFile); - bFile = true; - } - return bFile; + return VersionStrings[version]; } -bool GetAppVersion(char* FileName, TFileVersion* VerInfo){ // - VerInfo->full = -1; - if(!IsFile(FileName)){ // - return false; // - - } - DWORD FSize = GetFileVersionInfoSize(FileName,NULL); // - if(FSize==0){ // 0 - return false; - } - LPVOID pBlock = (char*)malloc(FSize); // - GetFileVersionInfo(FileName,NULL,FSize,pBlock); // - LPVOID MS; - UINT LS; - try{ - VerQueryValue(pBlock,"\\",&MS,&LS); // - } - catch(...){ - return false; // - } - VS_FIXEDFILEINFO FixedFileInfo; // - memmove(&FixedFileInfo, MS, LS); // +eGameVersion GetD2Version(LPCVOID pVersionResource) +{ + UINT uLen; + VS_FIXEDFILEINFO* ptFixedFileInfo; + if (!VerQueryValue(pVersionResource, "\\", (LPVOID*)&ptFixedFileInfo, &uLen)) + return UNKNOW; - DWORD FileVersionMS = FixedFileInfo.dwFileVersionMS; - DWORD FileVersionLS = FixedFileInfo.dwFileVersionLS; + if (uLen == 0) + return UNKNOW; - VerInfo->major = HIWORD(FileVersionMS) ; // - VerInfo->minor = LOWORD(FileVersionMS); // - VerInfo->revision = HIWORD(FileVersionLS); - VerInfo->subrevision = LOWORD(FileVersionLS); + WORD major = HIWORD(ptFixedFileInfo->dwFileVersionMS); + WORD minor = LOWORD(ptFixedFileInfo->dwFileVersionMS); + WORD revision = HIWORD(ptFixedFileInfo->dwFileVersionLS); + WORD subrevision = LOWORD(ptFixedFileInfo->dwFileVersionLS); - return true; // + 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; } - -#define SUBKEY "Software\\Blizzard Entertainment\\Diablo II" -#define GAMEFILE "\\Game.exe" -bool GetD2Path(char* buf, DWORD bufsize) +eGameVersion GetD2Version(char* gameExe) { - HKEY hKey; - DWORD type; - int res; - if (RegOpenKeyEx(HKEY_CURRENT_USER, SUBKEY, 0, KEY_READ, &hKey) == ERROR_SUCCESS) { - res = RegQueryValueEx(hKey,"InstallPath",NULL,&type,(LPBYTE)buf,&bufsize); - RegCloseKey(hKey); - if (res!=ERROR_SUCCESS) return false; - } else if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, SUBKEY, 0, KEY_READ, &hKey) == ERROR_SUCCESS) { - res = RegQueryValueEx(hKey,"InstallPath",NULL,&type,(LPBYTE)buf,&bufsize); - RegCloseKey(hKey); - if (res!=ERROR_SUCCESS) return false; - } else { - return false; - } - strcat(buf, GAMEFILE); - if (GetFileAttributes(buf) == INVALID_FILE_ATTRIBUTES) - return false; - return true; -}; + DWORD len = GetFileVersionInfoSize(gameExe, NULL); + if (len == 0) + return UNKNOW; -int GetVerD2(TFileVersion GameVer) -{ - if ((GameVer.major != 1)||(GameVer.minor != 0)) return -1; - switch (GameVer.revision) - { - case 9: - if (GameVer.subrevision == 20) return v109b; - if (GameVer.subrevision == 22) return v109d; - break; - case 10: - if (GameVer.subrevision == 39) return v110; - break; - case 11: - if (GameVer.subrevision == 45) return v111; - if (GameVer.subrevision == 46) return v111b; - break; - case 12: - if (GameVer.subrevision == 49) return v112; - break; - case 13: - if (GameVer.subrevision == 60) return v113c; - if (GameVer.subrevision == 64) return v113d; - break; - } - return -1; + BYTE* pVersionResource = new BYTE[len]; + GetFileVersionInfo(gameExe, NULL, len, pVersionResource); + eGameVersion version = GetD2Version(pVersionResource); + delete pVersionResource; + + return version; } - -int GetD2Version(char* PathGameExe) +eGameVersion GetD2Version() { - TFileVersion GameVer = {-1}; - if (! GetAppVersion(PathGameExe, &GameVer)) return -1; - int ver = GetVerD2(GameVer); - return ver; -} \ No newline at end of file + 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 /////////////////////// \ No newline at end of file diff --git a/Commons/VersionInfo.h b/Commons/VersionInfo.h index 679fdf2..11f900d 100644 --- a/Commons/VersionInfo.h +++ b/Commons/VersionInfo.h @@ -1,30 +1,34 @@ -#include +/*================================================================= + File created by Yohann NICOLAS. -union TFileVersion -{ - __int64 full; - struct { - WORD subrevision; - WORD revision; - WORD minor; - WORD major; - }; - WORD w[4]; -}; + Get Game version. + +=================================================================*/ +#pragma once enum eGameVersion { - v109b=0, - v109d, - v110, - v111, - v111b, - v112, - v113c, - v113d, - v114a + UNKNOW = -1, + V100 = 0, + V107, + V108, + V109, + V109b, + V109d, + V110, + V111, + V111b, + V112, + V113c, + V113d, + V114a, + V114b, + V114c, + V114d }; -bool GetAppVersion(char* FileName, TFileVersion* VerInfo); // -bool GetD2Path(char* buf, DWORD bufsize); -int GetD2Version(char* PathGameExe); \ No newline at end of file +const char* GetVersionString(int version); +eGameVersion GetD2Version(char* gamePath); +eGameVersion GetD2Version(); + +///////////////////////// END OF FILE /////////////////////// \ No newline at end of file diff --git a/Commons/updatingConst.h b/Commons/updatingConst.h index 99a53d9..c13d83b 100644 --- a/Commons/updatingConst.h +++ b/Commons/updatingConst.h @@ -11,6 +11,7 @@ enum UpdateClientConst { UC_SELECT_STASH=0x18, UC_SHARED_GOLD, + UC_PAGE_NAME, UC_ADD_STAT, UC_ADD_SYNERGY, UC_TEST1, @@ -40,15 +41,27 @@ enum UpdateServerConst US_SELECT_PREVIOUS_INDEX2, US_SELECT_NEXT_INDEX2, US_WORLDEVENT, - US_STARTSAVE, + US_SAVE, US_MAXGOLD, US_PUTGOLD, US_TAKEGOLD, - -//For CB - US_TEST1, - US_TEST2, - US_TEST3 + 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_TEST2, //For CB + US_TEST3 //For CB }; /*================================= END OF FILE =================================*/ \ No newline at end of file diff --git a/LICENSE b/LICENSE index 9cecc1d..94a9ed0 100644 --- a/LICENSE +++ b/LICENSE @@ -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 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.} - Copyright (C) {year} {name of author} + + Copyright (C) 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 @@ -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 notice like this when it starts in an interactive mode: - {project} Copyright (C) {year} {fullname} + Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. diff --git a/PlugY/BigStash.cpp b/PlugY/BigStash.cpp index 152a24b..46914bf 100644 --- a/PlugY/BigStash.cpp +++ b/PlugY/BigStash.cpp @@ -6,10 +6,8 @@ =================================================================*/ -#include "common.h" -#include "error.h" -#include "d2functions.h" #include "plugYFiles.h" // Install_PlugYFiles() +#include "common.h" bool active_bigStash = false; bool active_bigStash_tested = false; diff --git a/PlugY/ClientSaveFile.cpp b/PlugY/ClientSaveFile.cpp index 10dd101..052c182 100644 --- a/PlugY/ClientSaveFile.cpp +++ b/PlugY/ClientSaveFile.cpp @@ -6,8 +6,6 @@ =================================================================*/ /* #include "common.h" -#include "error.h" -#include "d2functions.h" #include #define BUFFER_SIZE 0x4000 diff --git a/PlugY/Commands.cpp b/PlugY/Commands.cpp index c61eabc..826b745 100644 --- a/PlugY/Commands.cpp +++ b/PlugY/Commands.cpp @@ -6,16 +6,14 @@ =================================================================*/ -#include "common.h" -#include "error.h" -#include "d2functions.h" #include "updateServer.h" #include "updateClient.h" #include "infinityStash.h" #include "newInterfaces.h" #include "newInterface_CubeListing.h" #include "extraOptions.h" - +#include "windowed.h" +#include "common.h" bool active_Commands=true; @@ -24,21 +22,34 @@ bool active_savegame=false; #define MAX_CMD_SIZE 200 -const char * CMD_RENAME="/rename"; -const char * CMD_LISTCUBEFORMULA="/listcube"; +const char * CMD_SAVE="/save"; const char * CMD_SELECTPAGE="/page"; -const char * CMD_RELOAD="/reload"; +const char * CMD_LOCK_MOUSE = "/lockmouse"; +const char * CMD_LOCK_MOUSE2 = "/lock"; +const char * CMD_UNLOCK_MOUSE = "/unlockmouse"; +const char * CMD_UNLOCK_MOUSE2 = "/unlock"; -const char * CMD_STARTSAVE="/save"; +const char * CMD_RENAME_CHAR="/renamechar"; -const char * CMD_MAXGOLD="/maxgold"; +const char * CMD_REPAGE_NAME = "/renamepage"; +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_LIFE_MANA = "/dlm"; const char * CMD_DISPLAY_LIFE = "/dl"; 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 $+21CA 0202064A |. 52 PUSH EDX @@ -48,6 +59,116 @@ $+21CD 0202064D |. 8BC3 MOV EAX,EBX $+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) { Unit* ptNPC = D2GetCurrentNPC(); @@ -138,72 +259,201 @@ void updateSharedGold(DWORD goldAmount) PCPY->sharedGold = goldAmount; } +bool renameCharacter(Unit* ptChar, const char* newName) +{ + int len = strlen(newName); + if (len < 2 || len > 15) + return 0; + for (int i = 0; i < len; i++) + { + char c = newName[i]; + if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c == '_'))) + return 1; + } + // Move current save file + { + char szCurrentFile[MAX_PATH]; + char szNewFile[MAX_PATH]; + + //Get temporary savefile name. + D2FogGetSavePath(szCurrentFile, MAX_PATH); + D2FogGetSavePath(szNewFile, MAX_PATH); + strcat(szCurrentFile, ptChar->ptPlayerData->name); + strcat(szNewFile, newName); + strcat(szCurrentFile, "."); + strcat(szNewFile, "."); + int curLen = strlen(szCurrentFile); + int newLen = strlen(szNewFile); + strcpy(&szCurrentFile[curLen], "d2s"); + strcpy(&szNewFile[newLen], "d2s"); + MoveFile(szCurrentFile, szNewFile); + strcpy(&szCurrentFile[curLen], "d2x"); + strcpy(&szNewFile[newLen], "d2x"); + MoveFile(szCurrentFile, szNewFile); + strcpy(&szCurrentFile[curLen], "key"); + strcpy(&szNewFile[newLen], "key"); + MoveFile(szCurrentFile, szNewFile); + strcpy(&szCurrentFile[curLen], "ma0"); + strcpy(&szNewFile[newLen], "ma0"); + MoveFile(szCurrentFile, szNewFile); + strcpy(&szCurrentFile[curLen], "ma1"); + strcpy(&szNewFile[newLen], "ma1"); + MoveFile(szCurrentFile, szNewFile); + strcpy(&szCurrentFile[curLen], "ma2"); + strcpy(&szNewFile[newLen], "ma2"); + MoveFile(szCurrentFile, szNewFile); + strcpy(&szCurrentFile[curLen], "ma3"); + strcpy(&szNewFile[newLen], "ma3"); + MoveFile(szCurrentFile, szNewFile); + strcpy(&szCurrentFile[curLen], "ma4"); + strcpy(&szNewFile[newLen], "ma4"); + MoveFile(szCurrentFile, szNewFile); + strcpy(&szCurrentFile[curLen], "map"); + strcpy(&szNewFile[newLen], "map"); + MoveFile(szCurrentFile, szNewFile); + } + // Update server + for (int i = 0; i <= len; i++) + updateServer(US_RENAME + (newName[i] << 8)); + + // Update client + log_msg("Rename on Client : %s -> %s\n", ptChar->ptPlayerData->name, newName); + strcpy(ptChar->ptPlayerData->name, newName); + updateServer(US_SAVE); + return 0; +} /****************************************************************************************************/ int STDCALL commands (char* ptText) { - //return 0; + log_msg("Command : %s\n", ptText); Unit* ptChar = D2GetClientPlayer(); - //return 0; + char command[MAX_CMD_SIZE]; ZeroMemory(command,MAX_CMD_SIZE); - //return 0; strncpy(command,ptText,MAX_CMD_SIZE-1); - //return 0; - strlwr(command); - if (!strncmp(command,CMD_RENAME,strlen(CMD_RENAME))) + _strlwr(command); + + if (!strcmp(command, CMD_SAVE)) + { + if (onRealm) return 1; + updateServer(US_SAVE); + return 0; + } + + if (!strncmp(command, CMD_SELECTPAGE, strlen(CMD_SELECTPAGE))) + { + if (!active_newInterfaces) return 1; + GoStatPage(atoi(&command[strlen(CMD_SELECTPAGE)]) - 1); + return 0; + } + + if (!strcmp(command, CMD_LOCK_MOUSE) || !strcmp(command, CMD_LOCK_MOUSE2)) + { + if (onRealm) return 1; + lockMouseCursor(); + return 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; + param++; + return renameCharacter(ptChar, param); + } + + if (!strncmp(command, CMD_REPAGE_NAME,strlen(CMD_REPAGE_NAME))) { if (!active_multiPageStash) return 1; - char* param = &command[strlen(CMD_RENAME)]; - DWORD len = strlen(param); - if (len && (param[0] != ' ')) return 1; - + char* param = &command[strlen(CMD_REPAGE_NAME)]; Stash* ptStash = PCPY->currentStash; - if (!ptStash) return 0; - if (len>1) + if (!ptStash) + return 0; + + int len = strlen(param); + while (len > 0 && param[0] == ' ') { - D2FogMemDeAlloc(ptStash->name,__FILE__,__LINE__,0); - ptStash->name = (char *)malloc(len);//D2FogMemAlloc(len,__FILE__,__LINE__,0); - strcpy(ptStash->name,¶m[1]); - } else { - D2FogMemDeAlloc(ptStash->name,__FILE__,__LINE__,0); - ptStash->name = NULL; + 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_LISTCUBEFORMULA)) + if (!strcmp(command, CMD_SET_INDEX)) { - if (!active_listAllCubeFormula) return 1; - listAllCubeFormula(); + if (!active_multiPageStash) return 1; + updateServer(US_SET_INDEX); return 0; } - if (!strncmp(command,CMD_SELECTPAGE,strlen(CMD_SELECTPAGE))) + if (!strcmp(command, CMD_RESET_INDEX)) { - if (!active_newInterfaces) return 1; - GoStatPage(atoi(&command[strlen(CMD_SELECTPAGE)])-1); + if (!active_multiPageStash) return 1; + updateServer(US_RESET_INDEX); return 0; } - if (!strcmp(command,CMD_RELOAD)) + if (!strcmp(command, CMD_INSERT_PAGE)) { - if (onRealm) return 1; - gambleReload(ptChar); + if (!active_multiPageStash) return 1; + insertStash(ptChar); + updateServer(US_INSERT_PAGE); return 0; } - if (!strcmp(command,CMD_STARTSAVE)) + if (!strcmp(command, CMD_DELETE_PAGE)) { - if (onRealm) return 1; - updateServer(US_STARTSAVE); + if (!active_multiPageStash) return 1; + if (deleteStash(ptChar)) + updateServer(US_DELETE_PAGE); return 0; } - if (!strcmp(command,CMD_MAXGOLD)) + if (!strncmp(command, CMD_SWAP, strlen(CMD_SWAP))) { - if (onRealm) return 1; - updateServer(US_MAXGOLD); + if (!active_multiPageStash) return 1; + int page = atoi(&command[strlen(CMD_SWAP)]) - 1; + if (page < 0) + return 1; + updateServer(US_SWAP3 + ((page & 0xFF000000) >> 16)); + updateServer(US_SWAP2 + ((page & 0xFF0000) >> 8)); + updateServer(US_SWAP1 + (page & 0xFF00)); + updateServer(US_SWAP0 + ((page & 0xFF) << 8)); + return 0; + } + + if (!strncmp(command, CMD_TOGGLE, strlen(CMD_TOGGLE))) + { + if (!active_sharedStash) return 1; + int page = atoi(&command[strlen(CMD_TOGGLE)]) - 1; + if (page < 0) + return 1; + updateServer(US_SWAP3 + ((page & 0xFF000000) >> 16)); + updateServer(US_SWAP2 + ((page & 0xFF0000) >> 8)); + updateServer(US_SWAP1 + (page & 0xFF00)); + updateServer(US_SWAP0_TOGGLE + ((page & 0xFF) << 8)); return 0; } @@ -224,6 +474,28 @@ int STDCALL commands (char* ptText) active_AlwaysDisplayLifeMana = !active_AlwaysDisplayLifeMana; 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; } @@ -278,7 +550,7 @@ void Install_Commands() // Run custom commmand mem_seek R7(D2Client, 2C120, 2C110, 32BDD, C1EE6, 91C16, 86926, 70AE6, B1FD6); - 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); //6FB71EE6 . 83C4 08 ADD ESP,8 //6FB71EE7 . 85C0 TEST EAX,EAX @@ -288,9 +560,11 @@ void Install_Commands() //6FB36929 |. 85C0 TEST EAX,EAX //6FB20AE6 |. 83C4 08 ADD ESP,8 //6FB20AE9 |. 85C0 TEST EAX,EAX - + //6FB20AE6 |. 83C4 08 ADD ESP,8 + //6FB20AE9 |. 85C0 TEST EAX,EAX //6FB61FD6 |. 83C4 08 ADD ESP,8 //6FB61FD9 |. 85C0 TEST EAX,EAX + log_msg("\n"); isInstalled = true; diff --git a/PlugY/Common.cpp b/PlugY/Common.cpp index 5bc4137..de11087 100644 --- a/PlugY/Common.cpp +++ b/PlugY/Common.cpp @@ -1,19 +1,11 @@ /*================================================================= File created by Yohann NICOLAS. - *Modified by L'Autour. Common functions. =================================================================*/ #include "common.h" -#include "error.h" -#include "d2functions.h" -#include "INIfile.h" - -#define sPlugyExt ".\\PlugY\\PlugYLocal.dll" -s_shifting shifting; - bool isOnRect(DWORD x, DWORD y, DWORD x0, DWORD y0, DWORD l, DWORD h) {return (x>=x0) && (xy0-h) && (y<=y0);} @@ -26,156 +18,4 @@ void freeMessage(sWinMessage* msg) D2FreeWinMessage(msg); } -//MS C++__fastcall(ecx,edx,) vs Delphi register(eax,edx,ecx) - :( - -typedef int (__stdcall *p_UCS2toUTF8)(char*, int, LPWSTR, int); -p_UCS2toUTF8 _UCS2toUTF8; - -int UCS2toUTF8(char* dst, int maxdst, LPWSTR src, int lensrc) -{ - if (_UCS2toUTF8 == NULL) return 0; - return _UCS2toUTF8(dst, maxdst, src, lensrc); -} - -typedef int (__stdcall *p_UTF8toUCS2)(LPWSTR, int, char*, int); -p_UTF8toUCS2 _UTF8toUCS2; - -int UTF8toUCS2(LPWSTR dst, int maxdst, char* src, int lensrc) -{ - if (_UTF8toUCS2 == NULL) return 0; - return _UTF8toUCS2(dst, maxdst, src, lensrc); -} - -typedef const LPWSTR(__fastcall *p_getTypeString)(DWORD, char**); -p_getTypeString _getTypeString; - -const LPWSTR getTypeString(DWORD code, char** IdxStr) -{ - if (_getTypeString == NULL) return L"#"; - return _getTypeString(code, IdxStr); -} - -typedef LPWSTR(__fastcall *p_getTranslatedString)(int); -p_getTranslatedString _getTranslatedString; - -LPWSTR getTranslatedString(int stringID) -{ - if (_getTranslatedString == NULL) return L"#"; - return _getTranslatedString(stringID); -} - -typedef int(__stdcall *p_wSprintStringLastGender)(LPWSTR, int, int); -p_wSprintStringLastGender _wSprintStringLastGender; - -int wSprintStringLastGender(LPWSTR buf, int lenbuf,int stringID) -{ - if (_wSprintStringLastGender == NULL) return 0; - return _wSprintStringLastGender(buf, lenbuf, stringID); -} - -typedef LPWSTR(__fastcall *p_cutStringGender)(LPWSTR); -p_cutStringGender _cutStringGender; - -LPWSTR cutStringGender(LPWSTR str) -{ - if (_cutStringGender == NULL) return str; - return _cutStringGender(str); -} - -typedef LPWSTR(__fastcall *p_setMonoString)(LPWSTR); -p_setMonoString _setMonoString; - -LPWSTR setMonoString(LPWSTR str) -{ - if (_setMonoString == NULL) return str; - return _setMonoString(str); -} - - -typedef bool(__fastcall *p_initTranslatedString)(int); - -HINSTANCE PlugyLocalLib = NULL; - -bool initLocaleStrings() -{ - p_initTranslatedString initTranslatedString; - - PlugyLocalLib = LoadLibrary(sPlugyExt); - - if (PlugyLocalLib != NULL) - { - log_msg("Loading PlugYLocal.dll\n"); - initTranslatedString = (p_initTranslatedString)GetProcAddress(PlugyLocalLib, "__fastcall initTranslatedString"); - if (NULL != initTranslatedString) - { - log_msg("Loading local strings from PlugYLocal.ini\n"); - - _UCS2toUTF8 = (p_UCS2toUTF8)GetProcAddress(PlugyLocalLib, "__stdcall UCS2toUTF8"); - _UTF8toUCS2 = (p_UTF8toUCS2)GetProcAddress(PlugyLocalLib, "__stdcall UTF8toUCS2"); - - _getTypeString = (p_getTypeString)GetProcAddress(PlugyLocalLib, "__fastcall getTypeString"); - _cutStringGender = (p_cutStringGender)GetProcAddress(PlugyLocalLib, "__fastcall cutStringGender"); - _wSprintStringLastGender = (p_wSprintStringLastGender)GetProcAddress(PlugyLocalLib, "__stdcall wSprintStringLastGender"); - _setMonoString = (p_setMonoString)GetProcAddress(PlugyLocalLib, "__fastcall setMonoString"); - - _getTranslatedString = (p_getTranslatedString)GetProcAddress(PlugyLocalLib, "__fastcall getTranslatedString"); - if ((NULL != _getTranslatedString) && - (NULL != _getTypeString)) - { - initTranslatedString(D2GetLang()); - return true; - } - log_msg("Failed loading local strings\n"); - } - - if (FreeLibrary(PlugyLocalLib)) - { - PlugyLocalLib = NULL; - } - } else log_msg("Failed loading PlugYLocal.dll\n"); - return false; -} - -void freeLocaleStrings() -{ - if (PlugyLocalLib == NULL) return; - FreeLibrary(PlugyLocalLib); -} - -LPWSTR getTypeUString (WORD id, LPWSTR lpText, DWORD size) -{ - ItemTypesBIN* itemTypeData = D2GetItemTypesBIN(id); - if (!itemTypeData) - { - wcsncpy(lpText, L"Bad Type", size); - return lpText; - } - char* idxstr; - LPWSTR string = getTypeString(itemTypeData->code, &idxstr); - - if (idxstr) - { - LPWSTR string2 = D2GetStringFromString(idxstr); - if (string2) - { - wcsncpy(lpText, string2, size); - return lpText; - } - } - if (!string) - { - struct { - DWORD code; - BYTE zero; - } code; - code.code = itemTypeData->code; - code.zero = 0; - UTF8toUCS2(lpText,size, (char*)&code, 0xFFFF); - } else - wcsncpy(lpText, string, size); - return lpText; -} - - - /*================================= END OF FILE =================================*/ \ No newline at end of file diff --git a/PlugY/CommonUTF8.cpp b/PlugY/CommonUTF8.cpp deleted file mode 100644 index a0cebaa..0000000 --- a/PlugY/CommonUTF8.cpp +++ /dev/null @@ -1,489 +0,0 @@ -/*================================================================= - 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) && (xy0-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 =================================*/ \ No newline at end of file diff --git a/PlugY/CustomLibraries.cpp b/PlugY/CustomLibraries.cpp index 2fcb57f..803a586 100644 --- a/PlugY/CustomLibraries.cpp +++ b/PlugY/CustomLibraries.cpp @@ -5,9 +5,8 @@ =================================================================*/ -#include "common.h" -#include "error.h" #include "customLibraries.h" +#include "common.h" TCustomDll* customDlls=NULL; diff --git a/PlugY/D2functions.cpp b/PlugY/D2functions.cpp index 4203e21..afe1bce 100644 --- a/PlugY/D2functions.cpp +++ b/PlugY/D2functions.cpp @@ -1,6 +1,6 @@ /*================================================ File created by Yohann NICOLAS. - *Add support 1.13d by L'Autour. + Add support 1.13d by L'Autour. This file implements some common and useful function related to some Diablo II mechanisms. @@ -8,9 +8,8 @@ ================================================*/ #include "common.h" -#include "d2functions.h" -#include "error.h" +s_shifting shifting; #define D2S(F, I, R, N, P) T##N N; #define D2F(F, I, R, N, P) T##N N; @@ -617,7 +616,7 @@ bool initD2functions() #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 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,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 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 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); @@ -947,7 +946,7 @@ bool initD2functions() //////////////// STRUCTURE MANAGEMENT //////////////// - //L'Autour - ?????? + // 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.ptSpecificData = V7(D2Common,70,70,14,14,14,14,14,14); diff --git a/PlugY/D2wrapper.cpp b/PlugY/D2wrapper.cpp index 649e5e0..2cb08ab 100644 --- a/PlugY/D2wrapper.cpp +++ b/PlugY/D2wrapper.cpp @@ -9,13 +9,6 @@ =================================================================*/ -// 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 "commands.h" // Install_Commands() #include "othersFeatures.h" // Install_ChangeResolution() @@ -32,46 +25,48 @@ #include "uberQuest.h" // Install_UberQuest() #include "extraOptions.h" // Install_AlwaysRegenMapInSP() #include "language.h" // Install_LanguageManagement() -#include "../Commons/VersionInfo.h" +#include "windowed.h" // installed with Install_PrintPlugYVersion() +#include "customLibraries.h" +#include "common.h" -//------------------------- -int version_SmackW32=V113d; -int version_D2Common=V113d; -int version_ijl11=V113d; -int version_D2Gdi=V113d; -int version_D2Win=V113d; -int version_D2sound=V113d; -int version_D2MCPCLI=V113d; -int version_D2Launch=V113d; -int version_D2gfx=V113d; -int version_D2Client=V113d; -int version_D2Net=V113d; -int version_D2Lang=V113d; -int version_D2Game=V113d; -int version_D2CMP=V113d; -int version_Bnclient=V113d; -int version_Fog=V113d; -int version_Storm=V113d; -//------------------------- -DWORD offset_SmackW32=NULL; -DWORD offset_D2Common=NULL; -DWORD offset_ijl11=NULL; -DWORD offset_D2Gdi=NULL; -DWORD offset_D2Win=NULL; -DWORD offset_D2sound=NULL; -DWORD offset_D2Multi=NULL; -DWORD offset_D2MCPCLI=NULL; -DWORD offset_D2Launch=NULL; -DWORD offset_D2gfx=NULL; -DWORD offset_D2Game=NULL; -DWORD offset_D2Client=NULL; -DWORD offset_D2Net=NULL; -DWORD offset_D2Lang=NULL; -DWORD offset_D2CMP=NULL; -DWORD offset_Bnclient=NULL; -DWORD offset_Fog=NULL; -DWORD offset_Storm=NULL; +int version_SmackW32 = UNKNOW; +int version_D2Common = UNKNOW; +int version_ijl11 = UNKNOW; +int version_D2Gdi = UNKNOW; +int version_D2Win = UNKNOW; +int version_D2sound = UNKNOW; +int version_D2MCPCLI = UNKNOW; +int version_D2Launch = UNKNOW; +int version_D2gfx = UNKNOW; +int version_D2Client = UNKNOW; +int version_D2Net = UNKNOW; +int version_D2Lang = UNKNOW; +int version_D2Game = UNKNOW; +int version_D2CMP = UNKNOW; +int version_Bnclient = UNKNOW; +int version_Fog = UNKNOW; +int version_Storm = UNKNOW; + + +DWORD offset_SmackW32 = NULL; +DWORD offset_D2Common = NULL; +DWORD offset_ijl11 = NULL; +DWORD offset_D2Gdi = NULL; +DWORD offset_D2Win = NULL; +DWORD offset_D2sound = NULL; +DWORD offset_D2Multi = NULL; +DWORD offset_D2MCPCLI = NULL; +DWORD offset_D2Launch = NULL; +DWORD offset_D2gfx = NULL; +DWORD offset_D2Game = NULL; +DWORD offset_D2Client = NULL; +DWORD offset_D2Net = NULL; +DWORD offset_D2Lang = NULL; +DWORD offset_D2CMP = NULL; +DWORD offset_Bnclient = NULL; +DWORD offset_Fog = NULL; +DWORD offset_Storm = NULL; // manque : Game.exe D2DDraw.dll D2Direct3D.dll D2Glide.dll const char* S_SmackW32 = "SmackW32.dll"; @@ -93,9 +88,6 @@ const char* S_Bnclient = "Bnclient.dll"; const char* S_Fog = "Fog.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 offset; @@ -318,7 +310,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 v113, 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 v113c, DWORD v113d, const char * filename) { log_msg("version of %s\t",filename); @@ -340,12 +332,15 @@ void getVersion(DWORD addr, DWORD addr111, int* ver, DWORD v109b, DWORD v109d, D } else if (addr==v112) { *ver = V112; log_msg("1.12\n"); - } else if (addr==v113) { - *ver = V113; - log_msg("1.13\n"); + } else if (addr==v113c) { + *ver = V113c; + log_msg("1.13c\n"); + } else if (addr==v113d) { + *ver = V113d; + log_msg("1.13d\n"); } else { - *ver = V113; - log_msg("unknow, try with 1.13\n"); + *ver = V113d; + log_msg("unknow, try with 1.13d\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) @@ -377,12 +372,14 @@ bool initD2version() } */ -/* -void getVersion(DWORD addr, int* ver, DWORD v109b, DWORD v109d, DWORD v110, DWORD v111, DWORD v111b, DWORD v112, DWORD v113, const char * filename) +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) { - log_msg("version of %s\t",filename); + log_msg("version of %s\t", filename); - if (addr==v109b) { + if (version >= V113d) { + *ver = version; + log_msg("%s\n", GetVersionString(version)); + } else if (addr==v109b) { *ver = V109b; log_msg("1.09b\n"); } else if (addr==v109d) { @@ -400,82 +397,45 @@ void getVersion(DWORD addr, int* ver, DWORD v109b, DWORD v109d, DWORD v110, DWOR } else if (addr==v112) { *ver = V112; log_msg("1.12\n"); - } else if (addr==v113) { - *ver = V113; - log_msg("1.13\n"); + } else if (addr==v113c) { + *ver = V113c; + log_msg("1.13c\n"); } else { - *ver = V113; - log_msg("unknow, try with 1.13\n"); + *ver = V113d; + log_msg("unknow, try with 1.13d\n"); } } -#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) +#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) 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"); //GET_VERSION(SmackW32 - GET_VERSION(D2Common, 10CA, A1E86FDC, B1E86FDC, 72D03B42, F883057E, 16746AC6, 00FE81C3, 74FE85DB); + GET_VERSION(D2Common, 10CA, A1E86FDC, B1E86FDC, 72D03B42, F883057E, 16746AC6, 00FE81C3, 74FE85DB, version); //GET_VERSION(ijl11 - GET_VERSION(D2Gdi, 105, B4000000, 0B210E00, E4000000, 48000401, 2F000401, 00000000, B7000401); - GET_VERSION(D2Win, 1699, 88686F8C, 84686F8C, D094686F, F0030000, 001435E8, 8B088F44, 0013F5E8); + GET_VERSION(D2Gdi, 105, B4000000, 0B210E00, E4000000, 48000401, 2F000401, 00000000, B7000401, version); + GET_VERSION(D2Win, 1699, 88686F8C, 84686F8C, D094686F, F0030000, 001435E8, 8B088F44, 0013F5E8, version); //GET_VERSION(D2sound //GET_VERSION(D2MCPCLI - GET_VERSION(D2Launch, 109A, 81E8526F, 01E8526F, 85E8526F, 247C8B00, 00FC6583, 15FF0424, E850E045); - GET_VERSION(D2gfx, 10D, EB000000, 006FA700, 00000010, 2A000401, 19000401, 0B210E00, 00000000); - GET_VERSION(D2Client, 17F, 00000000, 14500000, 12500000, 0D814800, 0D812800, 0DA01000, 0DA03000); - GET_VERSION(D2Net, 16E1, 78B8A73C, 68B8A73C, 10244C8B, 5349E808, 5EA9E808, 105D8B72, 53B9E808); - GET_VERSION(D2Lang, 126D, FC45048B, F445048B, 02C18313, C4830000, 00C6E045, 8B48408B, 0C75FF0C); -// GET_VERSION(D2Game, 1010, D22A78A1, D22910A1, D43FB0A1, 03E8506F, 53E8506F, 89E8506F, 63E8506F); - GET_VERSION(D2Game, 1092, 18968BF1, 38968BF1, 28968BF1, F6335608, C690C5B9, 895FD713, 56535700); - GET_VERSION(D2CMP, 1359, 3C686FE0, 38686FE0, 8BF78B56, 4C880424, 07C71824, CCCCCCCC, C7000005); + GET_VERSION(D2Launch, 109A, 81E8526F, 01E8526F, 85E8526F, 247C8B00, 00FC6583, 15FF0424, E850E045, version); + GET_VERSION(D2gfx, 10D, EB000000, 006FA700, 00000010, 2A000401, 19000401, 0B210E00, 00000000, version); + GET_VERSION(D2Client, 17F, 00000000, 14500000, 12500000, 0D814800, 0D812800, 0DA01000, 0DA03000, version); + GET_VERSION(D2Net, 16E1, 78B8A73C, 68B8A73C, 10244C8B, 5349E808, 5EA9E808, 105D8B72, 53B9E808, version); + GET_VERSION(D2Lang, 126D, FC45048B, F445048B, 02C18313, C4830000, 00C6E045, 8B48408B, 0C75FF0C, version); +// GET_VERSION(D2Game, 1010, D22A78A1, D22910A1, D43FB0A1, 03E8506F, 53E8506F, 89E8506F, 63E8506F, version); + GET_VERSION(D2Game, 1092, 18968BF1, 38968BF1, 28968BF1, F6335608, C690C5B9, 895FD713, 56535700, version); + GET_VERSION(D2CMP, 1359, 3C686FE0, 38686FE0, 8BF78B56, 4C880424, 07C71824, CCCCCCCC, C7000005, version); //GET_VERSION(Bnclient - GET_VERSION(Fog, 102, D0000006, 10000001, 00000006, 000042E6, 00004302, 0000483C, 00004B95); - GET_VERSION(Storm, 1190, 19E85082, 59E85082, 13C103F6, 0474F685, 8B000321, 3B1074C9, 0D896404); + GET_VERSION(Fog, 102, D0000006, 10000001, 00000006, 000042E6, 00004302, 0000483C, 00004B95, version); + GET_VERSION(Storm, 1190, 19E85082, 59E85082, 13C103F6, 0474F685, 8B000321, 3B1074C9, 0D896404, version); log_msg("\n\n"); return true; } -*/ - -const char sD2Ver[8][7] = {{"v1.09b"},{"v1.09d"},{"v1.10 "},{"v1.11 "},{"v1.11b"},{"v1.12 "},{"v1.13c"},{"v1.13d"}}; - -bool initD2version() -{ - char currentpath[MAX_PATH]; - if (! GetD2Path(currentpath, MAX_PATH)) - { - log_msg("Path to Game.exe not found"); - return false; - } - log_msg("***** Get Game.exe version *****\n"); - - int ver = GetD2Version(currentpath); - if (ver == -1) return false; - //-------------------- - version_SmackW32=ver; - version_D2Common=ver; - version_ijl11=ver; - version_D2Gdi=ver; - version_D2Win=ver; - version_D2sound=ver; - version_D2MCPCLI=ver; - version_D2Launch=ver; - version_D2gfx=ver; - version_D2Client=ver; - version_D2Net=ver; - version_D2Lang=ver; - version_D2Game=ver; - version_D2CMP=ver; - version_Bnclient=ver; - version_Fog=ver; - version_Storm=ver; - //------------------- - log_msg("version Game.exe - "); - log_msg(sD2Ver[ver]); - log_msg("\n"); - - return true; -} //////////////////////////////////// EXPORTS FUNCTIONS //////////////////////////////////// extern "C" __declspec(dllexport) void* __stdcall Init(LPSTR IniName) @@ -489,12 +449,7 @@ extern "C" __declspec(dllexport) void* __stdcall Init(LPSTR IniName) loadD2Libraries(); - if (!initD2version()) - { - log_msg("wrong G ame.exe version\n"); - return NULL; - } - + if (!initD2version()) return NULL; if (!initD2functions()) return NULL; @@ -519,7 +474,7 @@ extern "C" __declspec(dllexport) void* __stdcall Init(LPSTR IniName) if (active_VersionTextChange) Install_VersionChange(); - if (active_PrintPlugYVersion) + if (active_PrintPlugYVersion || active_Windowed) Install_PrintPlugYVersion(); if (active_StatsPoints) @@ -588,12 +543,10 @@ extern "C" __declspec(dllexport) void* __stdcall Init(LPSTR IniName) unhookLibraries(); - log_msg("\n*****Loading locale strings.*****\n"); - initLocaleStrings(); - log_msg("\n\n\n"); - initCustomLibraries(); + loadLocalizedStrings(D2GetLang()); + log_msg("***** ENTERING DIABLO II *****\n\n" ); active_logFile = active_logFile - 1; @@ -608,7 +561,6 @@ extern "C" __declspec(dllexport) bool __stdcall Release() log_msg("\n***** ENDING DIABLO II *****\n\n" ); freeCustomLibraries(); - freeLocaleStrings(); freeD2Libraries(); return true; } diff --git a/PlugY/Error.cpp b/PlugY/Error.cpp index 3e0b16e..3f3b18b 100644 --- a/PlugY/Error.cpp +++ b/PlugY/Error.cpp @@ -5,14 +5,14 @@ =================================================================*/ +#include "parameters.h" +#include "error.h" +#include #include // fopen() fclose() fprintf() vfprintf() #include // ... #include // strlen() strcat() #include // _getcwd() -#include "error.h" -#include "d2functions.h" // Fog_assert() - DWORD active_logFile = 1; static char log_file[MAX_PATH] = ""; diff --git a/PlugY/ExtendedSaveFile.cpp b/PlugY/ExtendedSaveFile.cpp index ea686b8..e3fb570 100644 --- a/PlugY/ExtendedSaveFile.cpp +++ b/PlugY/ExtendedSaveFile.cpp @@ -5,12 +5,11 @@ =================================================================*/ -#include "common.h" #include "extendedSaveFile.h" -#include "error.h" -#include "d2functions.h" #include "infinityStash.h" #include "customLibraries.h" +#include "common.h" +#include #define BUFFER_SIZE 0x4000 #define FILE_VERSION 0x3130 //"01" diff --git a/PlugY/ExtraOptions.cpp b/PlugY/ExtraOptions.cpp index 44b0500..9dc0dc7 100644 --- a/PlugY/ExtraOptions.cpp +++ b/PlugY/ExtraOptions.cpp @@ -7,14 +7,12 @@ =================================================================*/ #include "common.h" -#include "error.h" -#include "d2functions.h" #include -int active_RunLODs = false; -int active_alwaysRegenMapInSP = false; -DWORD nbPlayersCommandByDefault = 1; int active_DisplayItemLevel = false; +DWORD nbPlayersCommandByDefault = 0; +int active_alwaysRegenMapInSP = false; +int active_RunLODs = false; int active_AlwaysDisplayLifeMana = false; int active_EnabledTXTFilesWithMSExcel = false; int active_DisplayBaseStatsValue = false; @@ -27,9 +25,7 @@ void STDCALL displayItemlevel(LPWSTR popup, Unit* ptItem) { if (onRealm && (selectModParam==MOD_NO)) return; WCHAR text[0x50]; - //swprintf(text, L"Item Level: %u\n", D2GetItemLevel(ptItem)); - swprintf(text, getTranslatedString(STR_ITEM_LEVEL), D2GetItemLevel(ptItem)); - wcscat(text,L"\n"); + _snwprintf(text, sizeof(text), L"%s: %u\n", getLocalString(STR_ITEM_LEVEL), D2GetItemLevel(ptItem)); D2SetColorPopup(text,WHITE); wcscat(popup,text); } @@ -138,7 +134,7 @@ void Install_DisplayItemLevel() { static int isInstalled = false; if (isInstalled) return; - + log_msg("Patch D2Client for display item popup. (DisplayPopup)\n"); // print the text in the final buffer @@ -401,10 +397,7 @@ void Install_AlwaysDisplayLifeMana() //6FAD7659 |. A1 4CBCB86F MOV EAX,DWORD PTR DS:[6FB8BC4C] //6FAD7667 |. 0F8C A4000000 JL D2Client.6FAD7711 - //-- //6FB1D717 |. 0F8C A4000000 JL D2Client.6FB1D7C1 - - } else { // Always display life. mem_seek R7(D2Client, 58B32, 58B32, 5F102, 2D713, B5DF3, 81733, 0000, 0000); @@ -437,7 +430,6 @@ void Install_AlwaysDisplayLifeMana() //6FAD77CA |. 5B POP EBX //6FAD77CB |. 81C4 28030000 ADD ESP,328 //6FAD77D1 \. C3 RETN - //-- //6FB1D7BC |> A1 3870BA6F MOV EAX,DWORD PTR DS:[6FB8BC4C] } else if ( version_D2Client >= V110 ) @@ -525,7 +517,7 @@ void STDCALL printDisplayBaseStatsValue(WORD statID, sDrawImageInfo* data, DWORD if (isOnRect(D2GetMouseX(),D2GetMouseY(),x+5,y+5,32,32)) { WCHAR text[100]; - swprintf(text, getTranslatedString(STR_STATS_BASE_MIN), statValue, minValue); + _snwprintf(text, sizeof(text), getLocalString(STR_STATS_BASE_MIN), statValue, minValue); D2SetFont(1); D2PrintPopup(text, x+18, y-32, WHITE, 1); } diff --git a/PlugY/GlobalVariable.cpp b/PlugY/GlobalVariable.cpp index 7d7d29d..50f3925 100644 --- a/PlugY/GlobalVariable.cpp +++ b/PlugY/GlobalVariable.cpp @@ -6,13 +6,10 @@ =================================================================*/ +#include "bigStash.h" // active_bigStash_tested +#include "uberQuest.h" //active_UberQuest + resetQuestState() #include "common.h" -#include "error.h" -#include "d2functions.h" -#include "bigStash.h" #include -#include "uberQuest.h" -#include "worldEvent.h" bool onRealm=false; bool needToInit=false; diff --git a/PlugY/INIfile.cpp b/PlugY/INIfile.cpp index 63e82a5..65f3bb3 100644 --- a/PlugY/INIfile.cpp +++ b/PlugY/INIfile.cpp @@ -12,11 +12,9 @@ ******************************************************************************/ -#include #include "INIfile.h" - -#include "d2functions.h" -#include "error.h" +#include "common.h" +#include /* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/getprivateprofilestring.asp @@ -24,12 +22,10 @@ http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/ge /*****************************************************************************/ -// First a few support routines +// Utils -static char *strstri(char *text, char *string) +LPSTR strstri(LPSTR text, LPSTR string) { - char *found = NULL; - if(text && string) { int len = strlen(string); @@ -37,9 +33,9 @@ static char *strstri(char *text, char *string) { while(*text) { - if(strnicmp(string, text, len) == 0) + if(_strnicmp(string, text, len) == 0) { - found = text; + return text; break; } @@ -47,12 +43,32 @@ static char *strstri(char *text, char *string) } } } - - return found; + return NULL; } +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; + } -static BOOL chrcmp(char c, char *string) + text++; + } + } + } + return NULL; +} + +BOOL chrcmp(char c, char *string) { for(unsigned int i=0; iptListItem || ((stash == PCPY->currentStash) && firstClassicStashItem(ptChar))) return 0; - stash = stash->nextStash; + if (stash->isIndex || (stash->name != NULL && stash->name[0])) return 0; + stash = stash->nextStash; } return 1; } @@ -78,10 +76,10 @@ Stash* getLastStash(Stash* ptStash)//WORKS Stash* newStash(DWORD id) { - d2_assert( id == 0xFFFFFFFF , "trop de stash", __FILE__, __LINE__); + d2_assert( id == 0xFFFFFFFF , "Too much stash", __FILE__, __LINE__); Stash* stash = (Stash*)malloc(sizeof(Stash));//D2AllocMem(memPool, sizeof(Stash),__FILE__,__LINE__,0); - d2_assert(!stash , "pb de generation de stash", __FILE__, __LINE__); + d2_assert(!stash , "Error on stash allocation.", __FILE__, __LINE__); ZeroMemory(stash, sizeof(Stash)); stash->id = id; @@ -131,11 +129,11 @@ Stash* getStash(Unit* ptChar, DWORD isShared, DWORD id)//WORKS } -int changeToSelectedStash_9(Unit* ptChar, Stash* newStash, DWORD bIsClient) +int changeToSelectedStash_9(Unit* ptChar, Stash* newStash, DWORD bOnlyItems, DWORD bIsClient) { if (!newStash) return 0; - log_msg("changeToSelectedStash ID:%d\tshared:%d\tclient:%d\n",newStash->id,newStash->id,bIsClient); + log_msg("changeToSelectedStash ID:%d\tshared:%d\tonlyItems:%d\tclient:%d\n", newStash->id, newStash->isShared, bOnlyItems, bIsClient); Stash* currentStash = PCPY->currentStash; if (currentStash == newStash) return 0; @@ -176,7 +174,6 @@ int changeToSelectedStash_9(Unit* ptChar, Stash* newStash, DWORD bIsClient) } // add items of new stash - PCPY->currentStash = newStash; ptItem = newStash->ptListItem; while (ptItem) { @@ -184,16 +181,20 @@ int changeToSelectedStash_9(Unit* ptChar, Stash* newStash, DWORD bIsClient) D2Common10242(PCInventory, D2GetRealItem(ptItem), 1); ptItem = D2UnitGetNextItem(ptItem); } - newStash->ptListItem = NULL; + if (bOnlyItems) + newStash->ptListItem = PCPY->currentStash->ptListItem; + else + PCPY->currentStash = newStash; + PCPY->currentStash->ptListItem = NULL; return 1; } -int changeToSelectedStash_10(Unit* ptChar, Stash* newStash, DWORD bIsClient) +int changeToSelectedStash_10(Unit* ptChar, Stash* newStash, DWORD bOnlyItems, DWORD bIsClient) { if (!newStash) return 0; - log_msg("changeToSelectedStash ID:%d\tshared:%d\tclient:%d\n",newStash->id,newStash->id,bIsClient); + log_msg("changeToSelectedStash ID:%d\tshared:%d\tonlyItems:%d\tclient:%d\n",newStash->id,newStash->isShared, bOnlyItems,bIsClient); Stash* currentStash = PCPY->currentStash; if (currentStash == newStash) return 0; @@ -221,14 +222,17 @@ int changeToSelectedStash_10(Unit* ptChar, Stash* newStash, DWORD bIsClient) } // add items of new stash - PCPY->currentStash = newStash; ptItem = newStash->ptListItem; while (ptItem) { D2InvAddItem(PCInventory, ptItem, ptItem->path->x, ptItem->path->y, 0xC, bIsClient, 4); ptItem = D2UnitGetNextItem(ptItem); } - newStash->ptListItem = NULL; + if (bOnlyItems) + newStash->ptListItem = PCPY->currentStash->ptListItem; + else + PCPY->currentStash = newStash; + PCPY->currentStash->ptListItem = NULL; return 1; } @@ -251,6 +255,15 @@ DWORD loadStash(Unit* ptChar, Stash* ptStash, BYTE data[], DWORD startSize, DWOR } 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) // *(char *)&data[curSize+0xF] = NULL; if (strlen((char *)&data[curSize])) @@ -259,6 +272,7 @@ DWORD loadStash(Unit* ptChar, Stash* ptStash, BYTE data[], DWORD startSize, DWOR strcpy(ptStash->name, (char *)&data[curSize]); curSize += strlen((char *)&data[curSize]) + 1; + // Read inventory. DWORD ret = D2LoadInventory(PCGame, ptChar, (saveBitField*)&data[curSize], 0x60, maxSize-curSize, 0, &nbBytesRead); if (ret) log_msg("loadStash -> D2LoadInventory failed\n"); log_msg("Stash loaded (%d : %s)\n", ptStash->id ,ptStash->name); @@ -267,7 +281,7 @@ DWORD loadStash(Unit* ptChar, Stash* ptStash, BYTE data[], DWORD startSize, DWOR 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; Stash* newStash; @@ -278,12 +292,12 @@ DWORD loadStashList(Unit* ptChar, BYTE data[], DWORD maxSize, DWORD* curSize, bo while (curStash < nbStash) { newStash = addStash(ptChar, isShared); - changeToSelectedStash(ptChar, newStash, false); + changeToSelectedStash(ptChar, newStash, 0, false); DWORD ret = loadStash(ptChar, newStash, data, *curSize, 10000000, curSize); if (ret) return ret; curStash++; } - + if (!isShared && !PCPY->selfStash) { newStash = addStash(ptChar, isShared); @@ -296,7 +310,7 @@ DWORD loadStashList(Unit* ptChar, BYTE data[], DWORD maxSize, DWORD* curSize, bo if (!PCPY->currentStash) PCPY->currentStash = newStash; } - + return 0; } @@ -311,6 +325,9 @@ void saveStash(Unit* ptChar, Stash* ptStash, BYTE** data, DWORD* maxSize, DWORD* //write "ST" SETDATA(WORD, STASH_TAG); + //Write flags. + SETDATA(DWORD, ptStash->flags); + //save name if (ptStash->name) { @@ -380,24 +397,27 @@ void updateSelectedStashClient(Unit* ptChar)//WORKS { Stash* newStash = PCPY->currentStash; 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)//WORKS +void setSelectedStashClient(DWORD stashId, DWORD stashFlags, DWORD flags, bool bOnlyItems)//WORKS { - log_msg("setSelectedStashClient ID:%d, isShared:%d, flags:%08X\n", stashId, stashFlags&1, flags); + log_msg("setSelectedStashClient ID:%d, stashFlags:%d, flags:%08X\n", stashId, stashFlags, flags); Unit* ptChar = D2GetClientPlayer(); - Stash* newStash = getStash(ptChar, stashFlags&1, stashId); + Stash* newStash = getStash(ptChar, (stashFlags & 1) == 1, stashId); if (!newStash) do - newStash = addStash(ptChar, stashFlags&1); + newStash = addStash(ptChar, (stashFlags & 1) == 1); while (newStash->id < stashId); - changeToSelectedStash(ptChar, newStash, 1); + newStash->flags = stashFlags; + changeToSelectedStash(ptChar, newStash, bOnlyItems, 1); PCPY->flags = flags; } void selectStash(Unit* ptChar, Stash* newStash)//WORKS { - changeToSelectedStash(ptChar, newStash, 0); + changeToSelectedStash(ptChar, newStash, 0, 0); updateSelectedStashClient(ptChar); } @@ -424,6 +444,112 @@ void toggleToSharedStash(Unit* ptChar) } } +void swapStash(Unit* ptChar, Stash* curStash, Stash* swpStash) +{ + if (!ptChar || !curStash || !swpStash || curStash == swpStash) + return; + changeToSelectedStash(ptChar, swpStash, 1, 0); + updateClient(ptChar, UC_SELECT_STASH, swpStash->id, swpStash->flags | 4, PCPY->flags); +} + +void toggleStash(Unit* ptChar, DWORD page) +{ + log_msg("toggle stash page = %u\n", page); + Stash* curStash = PCPY->currentStash; + Stash* swpStash = curStash->isShared ? PCPY->selfStash : PCPY->sharedStash; + swapStash(ptChar, curStash, swpStash); +} + +void swapStash(Unit* ptChar, DWORD page, bool toggle) +{ + log_msg("swap stash page = %u\n", page); + Stash* curStash = PCPY->currentStash; + Stash* swpStash = curStash->isShared == toggle ? PCPY->selfStash : PCPY->sharedStash; + for (DWORD i = 0; i < page; i++) + { + if (curStash->nextStash == NULL) + addStash(ptChar, swpStash->isShared); + swpStash = swpStash->nextStash; + } + 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) { @@ -473,9 +599,16 @@ void selectPreviousIndexStash(Unit* ptChar) { selectPreviousStash(ptChar); Stash* selStash = PCPY->currentStash; - while (selStash->previousStash && ((selStash->id+1) % nbPagesPerIndex != 0)) + while (selStash && !selStash->isIndex) selStash = selStash->previousStash; + if (selStash == NULL) + { + selStash = PCPY->currentStash; + while (selStash->previousStash && ((selStash->id + 1) % nbPagesPerIndex != 0)) + selStash = selStash->previousStash; + } + if (selStash && (selStash != PCPY->currentStash)) selectStash(ptChar, selStash); } @@ -495,11 +628,18 @@ void selectNextIndexStash(Unit* ptChar) { selectNextStash(ptChar); Stash* selStash = PCPY->currentStash; - while ((selStash->id+1) % nbPagesPerIndex != 0) + while (selStash && !selStash->isIndex) + selStash = selStash->nextStash; + + if (selStash == NULL) { - if (!selStash->isShared && (selStash->id >= maxSelfPages)) break; - if (selStash->isShared && (selStash->id >= maxSharedPages)) break; - selStash = selStash->nextStash ? selStash->nextStash : addStash(ptChar, PCPY->showSharedStash);; + selStash = PCPY->currentStash; + while ((selStash->id + 1) % nbPagesPerIndex != 0) + { + if (!selStash->isShared && (selStash->id >= maxSelfPages)) break; + if (selStash->isShared && (selStash->id >= maxSharedPages)) break; + selStash = selStash->nextStash ? selStash->nextStash : addStash(ptChar, PCPY->showSharedStash);; + } } if (selStash && (selStash != PCPY->currentStash)) selectStash(ptChar, selStash); diff --git a/PlugY/Interface_Skills.cpp b/PlugY/Interface_Skills.cpp index 20177b6..db71152 100644 --- a/PlugY/Interface_Skills.cpp +++ b/PlugY/Interface_Skills.cpp @@ -6,12 +6,10 @@ =================================================================*/ -#include "common.h" -#include "error.h" -#include "d2functions.h" #include "updateServer.h" // Install_UpdateServer() #include "plugYFiles.h" // Install_PlugYImagesFiles() #include "skillsPoints.h" +#include "common.h" #include int posXUnassignSkillBtn=-1; @@ -37,7 +35,7 @@ void STDCALL printSkillsPageBtns() if ( isOnButtonUnassignSkill(D2GetMouseX(),D2GetMouseY())) { - LPWSTR popupText = getTranslatedString(STR_SKILLS_UNASSIGN); + LPWSTR popupText = getLocalString(STR_SKILLS_UNASSIGN); D2PrintPopup(popupText, getXSkillBtn()+getLSkillBtn()/2, getYSkillBtn()-getHSkillBtn(), 0, 1); } } diff --git a/PlugY/Interface_Stash.cpp b/PlugY/Interface_Stash.cpp index f97172f..49e11de 100644 --- a/PlugY/Interface_Stash.cpp +++ b/PlugY/Interface_Stash.cpp @@ -6,13 +6,11 @@ =================================================================*/ -#include "common.h" -#include "error.h" #include "interface_Stash.h" -#include "d2functions.h" #include "updateServer.h" #include "infinityStash.h" #include "plugYFiles.h" // Install_PlugYImagesFiles() +#include "common.h" #include static struct @@ -142,31 +140,31 @@ void* STDCALL printBtns() D2SetFont(1); if (isOnButtonPreviousStash(mx,my)) { - lpText = getTranslatedString(STR_STASH_PREVIOUS_PAGE); + lpText = getLocalString(STR_STASH_PREVIOUS_PAGE); D2PrintPopup(lpText, getXPreviousBtn()+getLPreviousBtn()/2, getYPreviousBtn()-getHPreviousBtn(), WHITE, 1); } else if (isOnButtonNextStash(mx,my)) { - lpText = getTranslatedString(STR_STASH_NEXT_PAGE); + lpText = getLocalString(STR_STASH_NEXT_PAGE); D2PrintPopup(lpText, getXNextBtn()+getLNextBtn()/2, getYNextBtn()-getHNextBtn(), WHITE, 1); } else if (active_sharedStash && isOnButtonToggleSharedStash(mx,my)) { - lpText = getTranslatedString(PCPY->showSharedStash ? STR_TOGGLE_TO_PERSONAL : STR_TOGGLE_TO_SHARED); + lpText = getLocalString(PCPY->showSharedStash ? STR_TOGGLE_TO_PERSONAL : STR_TOGGLE_TO_SHARED); D2PrintPopup(lpText, getXSharedBtn()+getLSharedBtn()/2, getYSharedBtn()-getHSharedBtn(), WHITE, 1); } else if (isOnButtonPreviousIndexStash(mx,my)) { - swprintf(text, getTranslatedString(STR_STASH_PREVIOUS_INDEX) ,nbPagesPerIndex,nbPagesPerIndex2); + _snwprintf(text, sizeof(text), getLocalString(STR_STASH_PREVIOUS_INDEX) ,nbPagesPerIndex,nbPagesPerIndex2); D2PrintPopup(text, getXPreviousIndexBtn()+getLPreviousIndexBtn()/2, getYPreviousIndexBtn()-getHPreviousIndexBtn(), 0, 0); } else if (isOnButtonNextIndexStash(mx,my)) { - swprintf(text, getTranslatedString(STR_STASH_NEXT_INDEX) ,nbPagesPerIndex,nbPagesPerIndex2); + _snwprintf(text, sizeof(text), getLocalString(STR_STASH_NEXT_INDEX) ,nbPagesPerIndex,nbPagesPerIndex2); D2PrintPopup(text, getXNextIndexBtn()+getLNextIndexBtn()/2, getYNextIndexBtn()-getHNextIndexBtn(), WHITE, 1); } else if (active_sharedGold && isOnButtonPutGold(mx,my)) { - lpText = getTranslatedString(STR_PUT_GOLD); + lpText = getLocalString(STR_PUT_GOLD); D2PrintPopup(lpText, getXPutGoldBtn()+getLPutGoldBtn()/2, getYPutGoldBtn()-getHPutGoldBtn(), WHITE, 1); } else if (active_sharedGold && isOnButtonTakeGold(mx,my)) { - lpText = getTranslatedString(STR_TAKE_GOLD); + lpText = getLocalString(STR_TAKE_GOLD); D2PrintPopup(lpText, getXTakeGoldBtn()+getLTakeGoldBtn()/2, getYTakeGoldBtn()-getHTakeGoldBtn(), WHITE, 1); } @@ -275,15 +273,16 @@ void FASTCALL printPageNumber(LPWSTR maxGoldText, DWORD x, DWORD y, DWORD color, if (PCPY->currentStash) { bool isShared = PCPY->currentStash->isShared; + bool isIndex = PCPY->currentStash->isIndex; DWORD currentId = PCPY->currentStash->id; if (PCPY->currentStash->name && PCPY->currentStash->name[0]) mbstowcs(popupText,PCPY->currentStash->name,50);//strlen(PCPY->currentStash->name)+1 - else swprintf(popupText, getTranslatedString( isShared ? STR_SHARED_PAGE_NUMBER : STR_PERSONAL_PAGE_NUMBER), currentId+1); - D2PrintString(popupText,x,y, isShared?RED:WHITE ,bfalse); + else _snwprintf(popupText, sizeof(popupText), getLocalString( 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); } else { - swprintf(popupText, getTranslatedString(STR_NO_SELECTED_PAGE)); - D2PrintString(popupText,x,y, WHITE ,bfalse); + _snwprintf(popupText, sizeof(popupText), getLocalString(STR_NO_SELECTED_PAGE)); + D2PrintString(popupText, x, y, WHITE, bfalse); } //printGoldMaxPopup @@ -293,8 +292,7 @@ void FASTCALL printPageNumber(LPWSTR maxGoldText, DWORD x, DWORD y, DWORD color, { if (active_sharedGold) { - swprintf(popupText, L"%s\n", maxGoldText); - swprintf(popupText+wcslen(popupText), getTranslatedString(STR_SHARED_GOLD_QUANTITY), PCPY->sharedGold); + _snwprintf(popupText, sizeof(popupText), L"%s\n%s: %u", maxGoldText, getLocalString(STR_SHARED_GOLD_QUANTITY), PCPY->sharedGold); DWORD x = D2GetPixelLen(maxGoldText); DWORD x2 = D2GetPixelLen(popupText) - x; D2PrintPopup(popupText, RX(0xA8-max(x,x2)/2), RY(0x1CA), WHITE, 0); @@ -467,7 +465,7 @@ void Install_InterfaceStash() //6FB60FE2 |. E8 99C2F5FF CALL //6FB2DF62 |. E8 19F3F8FF CALL //6FB63632 |. E8 299DF5FF CALL - //6FB49A32 |. E8 91F4F6FF CALL + //6FB49A32 |. E8 4739F7FF CALL //6FB4DE02 |. E8 4739F7FF CALL // Manage mouse down (Play sound) diff --git a/PlugY/Interface_Stats.cpp b/PlugY/Interface_Stats.cpp index 43996ef..e051f2d 100644 --- a/PlugY/Interface_Stats.cpp +++ b/PlugY/Interface_Stats.cpp @@ -6,12 +6,10 @@ =================================================================*/ -#include "common.h" -#include "error.h" -#include "d2functions.h" -#include "plugYFiles.h" // Install_PlugYImagesFiles() #include "statsPoints.h" +#include "plugYFiles.h" // Install_PlugYImagesFiles() #include "newInterfaces.h" +#include "common.h" #include static struct @@ -49,17 +47,17 @@ void STDCALL printStatsPageBtns() sDrawImageInfo data; ZeroMemory(&data,sizeof(data)); - + if (printBackgroundOnMainPage && D2GetResolution()) - { + { setImage(&data, statsBackgroundImages); - setFrame(&data, 1); + setFrame(&data, 1); D2PrintImage(&data, getXPreviousPageBtn()-7, getYPreviousPageBtn()+8, -1, 5, 0); } - + setImage(&data, D2LoadBuySelBtn()); if (D2GetResolution()) - { + { setFrame(&data, 12 + isDownBtn.previousPage); D2PrintImage(&data, getXPreviousPageBtn(), getYPreviousPageBtn(), -1, 5, 0); } @@ -68,13 +66,13 @@ void STDCALL printStatsPageBtns() D2SetFont(1); if (D2GetResolution() && isOnPreviousPageBtn(mx,my)) //print popup "previous page" - { - lpText = getTranslatedString(STR_PREVIOUS_PAGE); + { + lpText = getLocalString(STR_PREVIOUS_PAGE); D2PrintPopup(lpText, getXPreviousPageBtn()+getLPreviousPageBtn()/2, getYPreviousPageBtn()-getHPreviousPageBtn(), WHITE, 1); } else if ( isOnNextPageBtn(mx,my)) - { - lpText = getTranslatedString(STR_NEXT_PAGE); + { + lpText = getLocalString(STR_NEXT_PAGE); D2PrintPopup(lpText, getXNextPageBtn()+getLNextPageBtn()/2, getYNextPageBtn()-getHNextPageBtn(), WHITE, 1); } } @@ -285,6 +283,7 @@ void Install_InterfaceStats() //6FB703B9 |. 5B POP EBX //6FB703BA |. 81C4 70030000 ADD ESP,370 //6FB7030 \. C3 RETN + if ( version_D2Client >= V111 ) { // Manage mouse down (Play sound) diff --git a/PlugY/Language.cpp b/PlugY/Language.cpp index b9c88e7..bad23d9 100644 --- a/PlugY/Language.cpp +++ b/PlugY/Language.cpp @@ -5,10 +5,8 @@ =================================================================*/ -#include "common.h" -#include "error.h" -#include "d2functions.h" #include "language.h" +#include "common.h" #include diff --git a/PlugY/LoadPlayerData.cpp b/PlugY/LoadPlayerData.cpp index f96d7d4..d6f33a0 100644 --- a/PlugY/LoadPlayerData.cpp +++ b/PlugY/LoadPlayerData.cpp @@ -6,12 +6,10 @@ =================================================================*/ -#include "common.h" -#include "error.h" -#include "d2functions.h" #include "infinityStash.h" #include "extendedSaveFile.h" #include "sharedSaveFile.h" +#include "common.h" /************************************ LOADING ***********************************/ diff --git a/PlugY/LocalizedStrings.cpp b/PlugY/LocalizedStrings.cpp new file mode 100644 index 0000000..1e978bb --- /dev/null +++ b/PlugY/LocalizedStrings.cpp @@ -0,0 +1,323 @@ +/*================================================================= + File created by Yohann NICOLAS. + + Localized strings functions. + +=================================================================*/ + +#include "INIfile.h" +#include "LocalizedStrings.h" +#include "common.h" +#include + +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 =================================*/ \ No newline at end of file diff --git a/PlugY/LocalizedStrings.h b/PlugY/LocalizedStrings.h new file mode 100644 index 0000000..b8d0b6b --- /dev/null +++ b/PlugY/LocalizedStrings.h @@ -0,0 +1,79 @@ +/*============================================== +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 + +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 =================================*/ \ No newline at end of file diff --git a/PlugY/MainScreen.cpp b/PlugY/MainScreen.cpp index fa18aef..2768738 100644 --- a/PlugY/MainScreen.cpp +++ b/PlugY/MainScreen.cpp @@ -2,14 +2,13 @@ File created by Yohann NICOLAS. Add support 1.13d by L'Autour. - - Add "plugY v1.00" on screen. + Print PlugY version on screen. =================================================================*/ +#include "extraOptions.h" +#include "windowed.h" #include "common.h" -#include "error.h" -#include "d2functions.h" #include char* versionText = ""; @@ -22,12 +21,17 @@ DWORD newTextBoxData[]={4,0x237,0x243,0xC8,0x14,0,0,0,0,0,0,2};//type,x,y,l,h,?, void STDCALL printPlugYVersion(void** childrens, DWORD* sgnNumChildren) { - char buf[20]; - void* textbox = D2CreateTextBox(newTextBoxData); - childrens[*sgnNumChildren]=textbox; - d2_assert((*sgnNumChildren)++ >= 40,"sgnNumChildren < MAX_CHILDREN", __FILE__, __LINE__); - sprintf(buf, "PlugY %s", PLUGY_VERSION); - D2PrintLineOnTextBox(textbox, buf, colorOfPlugYVersion); + if (active_Windowed) + SetWindowedOptions(); + if (active_PrintPlugYVersion) + { + char buf[20]; + void* textbox = D2CreateTextBox(newTextBoxData); + childrens[*sgnNumChildren] = textbox; + d2_assert((*sgnNumChildren)++ >= 40, "sgnNumChildren < MAX_CHILDREN", __FILE__, __LINE__); + sprintf(buf, "PlugY %s", PLUGY_VERSION); + D2PrintLineOnTextBox(textbox, buf, colorOfPlugYVersion); + } } FCT_ASM ( caller_printPlugYVersion ) diff --git a/PlugY/ModifMemory.cpp b/PlugY/ModifMemory.cpp index 6f75684..8ecb6c7 100644 --- a/PlugY/ModifMemory.cpp +++ b/PlugY/ModifMemory.cpp @@ -5,10 +5,9 @@ =================================================================*/ -#include "common.h" #include "error.h" +#include "parameters.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" "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)"; diff --git a/PlugY/NewInterface_CubeListing.cpp b/PlugY/NewInterface_CubeListing.cpp index e63e0f9..c2bd8dd 100644 --- a/PlugY/NewInterface_CubeListing.cpp +++ b/PlugY/NewInterface_CubeListing.cpp @@ -1,319 +1,273 @@ /*================================================================= File created by Yohann NICOLAS. - Modified by L'Autour. Cube Listing functions =================================================================*/ -#include "common.h" -#include "error.h" -#include "d2functions.h" #include "updateClient.h" +#include "common.h" #include #include // _getcwd() const char* CUBEFORMULA_FILE = "cube.txt"; -const LPWSTR STRING_ERROR= L"***Error***"; +const LPCWSTR STRING_ERROR = L"***Error***"; +bool InNoSocket; - -#define lenbuf 512 -#define lenbufi 256 -#define BUF &buf[cntbuf], lenbuf-cntbuf -bool InNoSocket; //~~~~~ +#define BUF (&buf[*len]) +#define PRINT *len += swprintf /* 6FC9275F |. E8 ECCCFFFF |CALL D2Game.6FC8F450 ; \D2Game.6FC8F450 - - */ -void printOutput(CubeOutput* output, WCHAR* buf, BYTE* nbOutputs) +void printOutputItem(CubeOutput* output, LPWSTR buf, LPINT len, LPINT nbOutputs) { - if (!output->outputType) + if (output->outputType == 0) return; - - int cntbuf = wcslen(buf); - - if (*nbOutputs) - cntbuf += swprintf(BUF,L" + "); + if (*nbOutputs > 0) + PRINT(BUF, L" + "); *nbOutputs += 1; if (output->outputType == 1) { - swprintf(BUF,getTranslatedString(STR_COW_PORTAL)); + PRINT(BUF, getLocalString(STR_COW_PORTAL)); return; } else if (output->outputType == 2) { - swprintf(BUF,getTranslatedString(STR_PANDEMONIUM_PORTAL)); + PRINT(BUF, getLocalString(STR_PANDEMONIUM_PORTAL)); return; } else if (output->outputType == 3) { - swprintf(BUF,getTranslatedString(STR_PANDEMONIUM_FINAL_PORTAL)); + PRINT(BUF, getLocalString(STR_PANDEMONIUM_FINAL_PORTAL)); return; } - + if ((output->quantityOrNbSockets>1) && !output->haveSockets) { - if (output->quantityOrNbSockets == 255) - {cntbuf += swprintf(BUF,getTranslatedString(STR_FULL));} + if (output->quantityOrNbSockets = 255) + PRINT(BUF, L"%s ", getLocalString(STR_FULL)); else - {cntbuf += swprintf(BUF,L"%u ", output->quantityOrNbSockets);} + PRINT(BUF, L"%u ", output->quantityOrNbSockets); } - - //------------------------------------------------------------------------------- - WCHAR itembuf[lenbufi]; - LPWSTR itemstr = &itembuf[0]; - if (!(output->isSpecificItem)) - { - ItemsBIN* items; LPWSTR string; - switch (output->outputType) - { - case 0xFC: - items = D2GetItemsBIN(output->ID); - wcsncpy(itemstr, D2GetStringFromIndex(items->NameStr), lenbufi); - break; - case 0xFD: - getTypeUString(output->ID, itemstr, lenbufi); - break; - case 0xFE: wcsncpy(itemstr, getTranslatedString(STR_ITEM),lenbufi);break; - case 0xFF: wcsncpy(itemstr, getTranslatedString(STR_ITEM_SAME_TYPE),lenbufi);break; - default: swprintf(BUF,STRING_ERROR);return; - } - - itemstr = cutStringGender(itemstr); - } - //------------------------------------------------------------------------------- - if (output->repair) - cntbuf += wSprintStringLastGender(BUF, STR_REPAIR); - if ((output->repair)&&(output->recharge)) - cntbuf += wSprintStringLastGender(BUF, STR_AND); + if (output->repair) + PRINT(BUF, L"%s ", getLocalString(STR_REPAIR)); + + if (output->repair && output->recharge) + PRINT(BUF, L"%s ", getLocalString(STR_AND)); if (output->recharge) - cntbuf += wSprintStringLastGender(BUF, STR_RECHARGE); - - if (output->isEthereal) - cntbuf += wSprintStringLastGender(BUF, STR_ETHERAL); + PRINT(BUF, L"%s ", getLocalString(STR_RECHARGE)); if (output->destroysFillers) - cntbuf += wSprintStringLastGender(BUF, STR_DESTROY_FILLERS); + PRINT(BUF, L"%s ", getLocalString(STR_DESTROY_FILLERS)); if (output->removeFillers) - cntbuf += wSprintStringLastGender(BUF, STR_REMOVE_FILLERS); + PRINT(BUF, L"%s ", getLocalString(STR_REMOVE_FILLERS)); if (output->regeneratesUnique) - cntbuf += wSprintStringLastGender(BUF, STR_REGENERATE); + PRINT(BUF, L"%s ", getLocalString(STR_REGENERATE)); if (output->upgradeToExceptional) - cntbuf += wSprintStringLastGender(BUF, STR_EXCEPTIONAL); + PRINT(BUF, L"%s ", getLocalString(STR_UPGRADE_TO_EXCEPTIONAL)); if (output->upgradeToElite) - cntbuf += wSprintStringLastGender(BUF, STR_ELITE); + PRINT(BUF, L"%s ", getLocalString(STR_UPGRADE_TO_ELITE)); + if (output->isEthereal) + PRINT(BUF, L"%s ", getLocalString(STR_ETHERAL)); if (output->isSpecificItem) { if (output->quality == ITEMQUALITY_UNIQUE) { UniqueItemsBIN* uniqueItems = SgptDataTables->uniqueItems + output->specificID-1; - LPWSTR string = D2GetStringFromIndex(uniqueItems->uniqueNameId); - cntbuf += swprintf(BUF,string); + PRINT(BUF, D2GetStringFromIndex(uniqueItems->uniqueNameId)); } else if (output->quality == ITEMQUALITY_SET) { SetItemsBIN* setItems = SgptDataTables->setItems + output->specificID-1; - LPWSTR string = D2GetStringFromIndex(setItems->setNameId); - cntbuf += swprintf(BUF,string); + PRINT(BUF, D2GetStringFromIndex(setItems->setNameId)); } else { - swprintf(BUF,STRING_ERROR);return; + PRINT(BUF,STRING_ERROR);return; } } else { switch (output->quality) { - case 1:cntbuf += wSprintStringLastGender(BUF, STR_CRACKED);break; - case 2:cntbuf += wSprintStringLastGender(BUF, STR_NORMAL);break; - case 3:cntbuf += wSprintStringLastGender(BUF, STR_SUPERIOR);break; - case 4:cntbuf += wSprintStringLastGender(BUF, STR_MAGIC);break; - case 5:cntbuf += wSprintStringLastGender(BUF, STR_SET);break; - case 6:cntbuf += wSprintStringLastGender(BUF, STR_RARE);break; - case 7:cntbuf += wSprintStringLastGender(BUF, STR_UNIQUE);break; - case 8:cntbuf += wSprintStringLastGender(BUF, STR_CRAFTED);break; - case 9:cntbuf += wSprintStringLastGender(BUF, STR_TEMPERED);break; - } /* - ItemsBIN* items; LPWSTR string; + case 1:PRINT(BUF, L"%s ", getLocalString(STR_CRACKED));break; + case 2:PRINT(BUF, L"%s ", getLocalString(STR_NORMAL));break; + case 3:PRINT(BUF, L"%s ", getLocalString(STR_SUPERIOR));break; + case 4:PRINT(BUF, L"%s ", getLocalString(STR_MAGIC));break; + case 5:PRINT(BUF, L"%s ", getLocalString(STR_SET));break; + case 6:PRINT(BUF, L"%s ", getLocalString(STR_RARE));break; + case 7:PRINT(BUF, L"%s ", getLocalString(STR_UNIQUE));break; + case 8:PRINT(BUF, L"%s ", getLocalString(STR_CRAFTED));break; + case 9:PRINT(BUF, L"%s ", getLocalString(STR_TEMPERED));break; + } switch (output->outputType) { - case 0xFC: - items = D2GetItemsBIN(output->ID); - string = D2GetStringFromIndex(items->NameStr); - cntbuf += swprintf(BUF,string); - break; - case 0xFD: - getTypeUString(output->ID,BUF); - break; - case 0xFE: cntbuf += swprintf(BUF,getTranslatedString(STR_ITEM));break; - case 0xFF: cntbuf += swprintf(BUF,getTranslatedString(STR_ITEM_SAME_TYPE));break; - default: cntbuf += swprintf(BUF,STRING_ERROR);return; - } */ - cntbuf += swprintf(BUF,setMonoString(itemstr)); - - } - if ((output->haveSockets==1)||InNoSocket) - { - if(output->quantityOrNbSockets>1) + case 0xFC: { - swprintf(BUF,getTranslatedString(STR_WITH_N_SOCKETS), output->quantityOrNbSockets); - } else + ItemsBIN* items = D2GetItemsBIN(output->ID); + PRINT(BUF, StripGender(D2GetStringFromIndex(items->NameStr))); + break; + } + case 0xFD: { - swprintf(BUF,getTranslatedString(STR_WITH_SOCKET)); + ItemTypesBIN* itemTypeData = D2GetItemTypesBIN(output->ID); + if (!itemTypeData) + PRINT(BUF, L"Unknow Item Type"); + else + PRINT(BUF, getLocalTypeString(itemTypeData->code)); + break; + } + case 0xFE: PRINT(BUF, L"%s", getLocalString(STR_ITEM)); break; + case 0xFF: PRINT(BUF, L"%s", getLocalString(STR_ITEM_SAME_TYPE)); break; + default: PRINT(BUF, L"%s ", STRING_ERROR); return; } } - + if (output->haveSockets == 1 || InNoSocket) + { + 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 printInput(CubeInput* input, WCHAR* buf, BYTE* nbInputs)//maxsize) +void printInputItem(CubeInput* input, LPWSTR buf, LPINT len, LPINT nbInputs)//maxsize) { if (!input->byItemID && !input->byItemTypeID) return; - - int cntbuf = wcslen(buf); - if (*nbInputs) - cntbuf += swprintf(BUF,L" + "); + PRINT(BUF, L" + "); BYTE nb = input->quantity > 0 ? input->quantity : 1; *nbInputs += nb; - if (nb>1) - cntbuf += swprintf(BUF,L"%u ", nb); + if (nb > 1) + PRINT(BUF, L"%u ", nb); - WCHAR itembuf[lenbufi]; - LPWSTR itemstr = &itembuf[0]; - //------------------------------------------------------------------------------- - if (!(input->isSpecificItem)) - { - if (input->byItemTypeID) { - getTypeUString(input->ID, itemstr, lenbufi); - } else if (input->ID == 0xFFFF) { - wcsncpy(itemstr, getTranslatedString(STR_ITEM), lenbufi); - } else { - ItemsBIN* items = D2GetItemsBIN(input->ID); - wcsncpy(itemstr, D2GetStringFromIndex(items->NameStr), lenbufi); - } - itemstr = cutStringGender(itemstr); - } - //------------------------------------------------------------------------------- if (input->isEthereal) - cntbuf += wSprintStringLastGender(BUF, STR_ETHERAL); + PRINT(BUF, L"%s ", getLocalString(STR_ETHERAL)); if (input->isNotEthereal) - cntbuf += wSprintStringLastGender(BUF, STR_NOT_ETHERAL); + PRINT(BUF, L"%s ", getLocalString(STR_NOT_ETHERAL)); if (input->isNotRuneword) - cntbuf += wSprintStringLastGender(BUF, STR_NOT_RUNEWORD); + PRINT(BUF, L"%s ", getLocalString(STR_NOT_RUNEWORD)); if (input->isBasic) - cntbuf += wSprintStringLastGender(BUF, STR_BASIC); + PRINT(BUF, L"%s ", getLocalString(STR_BASIC)); if (input->isExceptional) - cntbuf += wSprintStringLastGender(BUF, STR_EXCEPTIONAL); + PRINT(BUF, L"%s ", getLocalString(STR_EXCEPTIONAL)); if (input->isElite) - cntbuf += wSprintStringLastGender(BUF, STR_ELITE); + PRINT(BUF, L"%s ", getLocalString(STR_ELITE)); if (input->isSpecificItem) { if (input->quality == ITEMQUALITY_UNIQUE) { - UniqueItemsBIN* uniqueItems = SgptDataTables->uniqueItems + input->specificID-1; - LPWSTR string = D2GetStringFromIndex(uniqueItems->uniqueNameId); - cntbuf += swprintf(BUF,string); - } else if (input->quality == ITEMQUALITY_SET) { - SetItemsBIN* setItems = SgptDataTables->setItems + input->specificID-1; - LPWSTR string = D2GetStringFromIndex(setItems->setNameId); - cntbuf += swprintf(BUF,string); - } else { - swprintf(BUF,STRING_ERROR);return; + UniqueItemsBIN* uniqueItems = SgptDataTables->uniqueItems + input->specificID - 1; + PRINT(BUF, StripGender(D2GetStringFromIndex(uniqueItems->uniqueNameId))); } - } else { + else if (input->quality == ITEMQUALITY_SET) { + SetItemsBIN* setItems = SgptDataTables->setItems + input->specificID - 1; + PRINT(BUF, StripGender(D2GetStringFromIndex(setItems->setNameId))); + } + else { + PRINT(BUF, L"%s ", STRING_ERROR); return; + } + } + else { switch (input->quality) { - - case 1:cntbuf += wSprintStringLastGender(BUF, STR_CRACKED);break; - case 2:cntbuf += wSprintStringLastGender(BUF, STR_NORMAL);break; - case 3:cntbuf += wSprintStringLastGender(BUF, STR_SUPERIOR);break; - case 4:cntbuf += wSprintStringLastGender(BUF, STR_MAGIC);break; - case 5:cntbuf += wSprintStringLastGender(BUF, STR_SET);break; - case 6:cntbuf += wSprintStringLastGender(BUF, STR_RARE);break; - case 7:cntbuf += wSprintStringLastGender(BUF, STR_UNIQUE);break; - case 8:cntbuf += wSprintStringLastGender(BUF, STR_CRAFTED);break; - case 9:cntbuf += wSprintStringLastGender(BUF, STR_TEMPERED);break; - }/* + case 1:PRINT(BUF, L"%s ", getLocalString(STR_CRACKED)); break; + case 2:PRINT(BUF, L"%s ", getLocalString(STR_NORMAL)); break; + case 3:PRINT(BUF, L"%s ", getLocalString(STR_SUPERIOR)); break; + case 4:PRINT(BUF, L"%s ", getLocalString(STR_MAGIC)); break; + case 5:PRINT(BUF, L"%s ", getLocalString(STR_SET)); break; + case 6:PRINT(BUF, L"%s ", getLocalString(STR_RARE)); break; + case 7:PRINT(BUF, L"%s ", getLocalString(STR_UNIQUE)); break; + case 8:PRINT(BUF, L"%s ", getLocalString(STR_CRAFTED)); break; + case 9:PRINT(BUF, L"%s ", getLocalString(STR_TEMPERED)); break; + } if (input->byItemTypeID) { - getTypeUString(input->ID,BUF); - } else if (input->ID == 0xFFFF) { - cntbuf += swprintf(BUF,getTranslatedString(STR_ITEM)); - } else { + ItemTypesBIN* itemTypeData = D2GetItemTypesBIN(input->ID); + if (!itemTypeData) + PRINT(BUF, L"Unknow Item Type"); + else + PRINT(BUF, getLocalTypeString(itemTypeData->code)); + } + else if (input->ID == 0xFFFF) { + PRINT(BUF, getLocalString(STR_ITEM)); + } + else { ItemsBIN* items = D2GetItemsBIN(input->ID); - LPWSTR string = D2GetStringFromIndex(items->NameStr); - cntbuf += swprintf(BUF,string); - }*/ - cntbuf += swprintf(BUF,itemstr); + PRINT(BUF, StripGender(D2GetStringFromIndex(items->NameStr))); + } } if (input->includeUpgradedVersions && !input->isElite) - cntbuf += swprintf(BUF,getTranslatedString(STR_OR_UPGRADED)); + PRINT(BUF, L" %s", getLocalString(STR_INCLUDE_UPGRADED)); if (input->haveNoSocket) { - cntbuf += swprintf(BUF,getTranslatedString(STR_WITHOUT_SOCKET)); - InNoSocket = true;//~~~~~ + PRINT(BUF, L" %s", getLocalString(STR_WITHOUT_SOCKET)); + InNoSocket = true; } - if (input->haveSockets) - swprintf(BUF,getTranslatedString(STR_WITH_SOCKET)); + PRINT(BUF, L" %s", getLocalString(STR_WITH_SOCKETS)); } -DWORD print(CubeMainBIN* curForm, WCHAR* buf, DWORD)//maxsize) +DWORD print(CubeMainBIN* curForm, LPWSTR buf, LPINT len, DWORD)//maxsize) { if (!buf || !curForm || !curForm->enabled) return 0; - InNoSocket = false; //~~~~~ - BYTE 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); - int cntbuf = wcslen(buf); + InNoSocket = false; + int realNbInputs=0; + + 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) { - cntbuf += swprintf(BUF,L" *** ERROR : numInputs(%d) != realNbInputs(%d) ***", curForm->numinputs, realNbInputs); + PRINT(BUF, L" *** ERROR : numInputs(%d) != realNbInputs(%d) ***", curForm->numinputs, realNbInputs); return 1; } - cntbuf += swprintf(BUF,L" => "); - BYTE realNbOutputs=0; - printOutput(&curForm->output1, buf, &realNbOutputs); - printOutput(&curForm->output2, buf, &realNbOutputs); - printOutput(&curForm->output3, buf, &realNbOutputs); + PRINT(BUF,L" => "); + int realNbOutputs=0; + + printOutputItem(&curForm->output1, buf, len, &realNbOutputs); + printOutputItem(&curForm->output2, buf, len, &realNbOutputs); + printOutputItem(&curForm->output3, buf, len, &realNbOutputs); // if (curForm->ladder) -// cntbuf += swprintf(BUF," [ladder only]"); - +// sprintf(BUF," [ladder only]"); + if (curForm->minDiff == 1) - cntbuf += swprintf(BUF,getTranslatedString(STR_ONLY_N_H)); + PRINT(BUF, L" %s", getLocalString(STR_ONLY_N_H)); else if (curForm->minDiff == 2) - cntbuf += swprintf(BUF,getTranslatedString(STR_ONLY_HELL)); + PRINT(BUF, L" %s", getLocalString(STR_ONLY_HELL)); if (curForm->playerClass != 0xFF) { CharStatsBIN* charStats = D2GetCharStatsBIN(curForm->playerClass); - cntbuf += swprintf(BUF, getTranslatedString(STR_ONLY_CLASS), charStats->name); + PRINT(BUF, L" ("); + PRINT(BUF, getLocalString(STR_ONLY_CLASS), charStats->name); + PRINT(BUF, L")"); } - + if ((curForm->op>0) && (curForm->op!=28)) - cntbuf += swprintf(BUF, L" [op%d(%d,%d)]", curForm->op, curForm->param, curForm->value); + PRINT(BUF, L" [op%d(%d,%d)]", curForm->op, curForm->param, curForm->value); // if (curForm->version == 100) -// cntbuf += swprintf(BUF, " [expansion only]"); +// sprintf(BUF, " [expansion only]"); return 1; } @@ -323,66 +277,50 @@ DWORD print(CubeMainBIN* curForm, WCHAR* buf, DWORD)//maxsize) void listAllCubeFormula() { + log_msg("\n\n********** Print all cube formula **********\n"); + char filename[MAX_PATH]; - _getcwd( filename, MAX_PATH ); - if( filename[strlen(filename)] != '\\') - strcat(filename, "\\"); + D2FogGetSavePath(filename, MAX_PATH); strcat(filename, CUBEFORMULA_FILE); FILE* file = fopen(filename, "w"); - - 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); - - WCHAR buf[lenbuf]; - char bufa[lenbuf]; - - if (D2GetLang() != LNG_DEU) + if (!file) { - bufa[0] = (char)0xEF; - bufa[1] = (char)0xBB; - bufa[2] = (char)0xBF; - bufa[3] = (char)0x00; - fprintf(file,"%s",bufa); + log_msg("Failed to open save file.\n"); + return; } + int nbLines = D2GetNbCubeMainBIN(); + log_msg("nbLines : %d\n",nbLines); + + WCHAR buf[512]; + + // 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; icubemain + i; - UCS2toUTF8(&bufa[0], lenbuf, &buf[0], lenbuf); - if (res) fprintf(file,"%4u: %s\n",i,bufa); - if (res) fflush(file); + DWORD res = 1; + len = 0; + buf[len] = NULL; + res = print(D2GetCubeMainBIN(i), buf, &len, 512); + //wcstombs(bufa, buf, 1024); + if (res) + { + nbCubeReceipt++; + fwprintf(file, L"%3u: %s\n", i, buf); + } } fclose(file); 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 =================================*/ \ No newline at end of file diff --git a/PlugY/NewInterface_Runewords.cpp b/PlugY/NewInterface_Runewords.cpp index 68da2d7..18b6bb5 100644 --- a/PlugY/NewInterface_Runewords.cpp +++ b/PlugY/NewInterface_Runewords.cpp @@ -5,13 +5,11 @@ =================================================================*/ -#include "common.h" -#include "error.h" -#include "d2functions.h" #include "updateServer.h" // Install_UpdateServer() #include "plugYFiles.h" // Install_PlugYImagesFiles() #include "statsPoints.h" #include "newInterfaces.h" +#include "common.h" #include #define NB_RUNES_PER_PAGE 25 @@ -74,9 +72,10 @@ void printRuneword(RunesBIN* runesData, DWORD pos) { WORD type = runesData->Itypes[numItype]; if (!type) break; - getTypeUString(type,temp,50); + ItemTypesBIN* itemTypeData = D2GetItemTypesBIN(type); + LPCWSTR typeName = getLocalTypeString(itemTypeData->code); if (numItype) wcscat(typesList,L"/"); - wcscat(typesList,temp); + wcscat(typesList, typeName); numItype++; } nbPixel = D2GetPixelLen(typesList); @@ -200,7 +199,7 @@ void STDCALL printRunewordsPage() } else if (isOnNextPageBtn(x,y)) // print popup "next page" { - lpText = getTranslatedString(STR_NEXT_PAGE); + lpText = getLocalString(STR_NEXT_PAGE); D2PrintPopup(lpText, getXNextPageBtn()+getLNextPageBtn()/2, getYNextPageBtn()-getHNextPageBtn(), WHITE, 1); } } diff --git a/PlugY/NewInterface_Stats.cpp b/PlugY/NewInterface_Stats.cpp index 4ffc718..b843ee1 100644 --- a/PlugY/NewInterface_Stats.cpp +++ b/PlugY/NewInterface_Stats.cpp @@ -5,13 +5,11 @@ =================================================================*/ -#include "common.h" -#include "error.h" -#include "d2functions.h" #include "updateServer.h" // Install_UpdateServer() #include "plugYFiles.h" // Install_PlugYImagesFiles() #include "statsPoints.h" #include "newInterfaces.h" +#include "common.h" #include @@ -573,12 +571,12 @@ if (version_D2Client <= V110) } else if (isOnPreviousPageBtn(x,y)) //print popup "previous page" { - lpText = getTranslatedString(STR_PREVIOUS_PAGE); + lpText = getLocalString(STR_PREVIOUS_PAGE); D2PrintPopup(lpText, getXPreviousPageBtn()+getLPreviousPageBtn()/2, getYPreviousPageBtn()-getHPreviousPageBtn(), WHITE, 1); } else if (isOnNextPageBtn(x,y)) //print popup "next page" { - lpText = getTranslatedString(STR_NEXT_PAGE); + lpText = getLocalString(STR_NEXT_PAGE); D2PrintPopup(lpText, getXNextPageBtn()+getLNextPageBtn()/2, getYNextPageBtn()-getHNextPageBtn(), WHITE, 1); } else if (isOnRect(x, y, 0xAD, 0x137, 0x15, 0x13)) diff --git a/PlugY/NewInterface_StatsPageTwo.cpp b/PlugY/NewInterface_StatsPageTwo.cpp index acb3614..db9bed0 100644 --- a/PlugY/NewInterface_StatsPageTwo.cpp +++ b/PlugY/NewInterface_StatsPageTwo.cpp @@ -5,13 +5,11 @@ =================================================================*/ -#include "common.h" -#include "error.h" -#include "d2functions.h" #include "updateServer.h" #include "plugYFiles.h" #include "statsPoints.h" #include "newInterfaces.h" +#include "common.h" #include #define getXCloseBtn() RX(0x110) @@ -227,12 +225,12 @@ void STDCALL printNewStatsPageTwo(int currentPage) } else if (isOnPreviousPageBtn(mx,my)) //print popup "previous page" { - lpText = getTranslatedString(STR_PREVIOUS_PAGE); + lpText = getLocalString(STR_PREVIOUS_PAGE); D2PrintPopup(lpText, getXPreviousPageBtn()+getLPreviousPageBtn()/2, getYPreviousPageBtn()-getHPreviousPageBtn(), WHITE, 1); } else if (isOnNextPageBtn(mx,my)) //print popup "next page" { - lpText = getTranslatedString(STR_NEXT_PAGE); + lpText = getLocalString(STR_NEXT_PAGE); D2PrintPopup(lpText, getXNextPageBtn()+getLNextPageBtn()/2, getYNextPageBtn()-getHNextPageBtn(), WHITE, 1); } } diff --git a/PlugY/NewInterfaces.cpp b/PlugY/NewInterfaces.cpp index 4092d70..9671ec5 100644 --- a/PlugY/NewInterfaces.cpp +++ b/PlugY/NewInterfaces.cpp @@ -6,17 +6,15 @@ =================================================================*/ -#include "common.h" -#include "error.h" -#include "d2functions.h" +#include "plugYFiles.h" // Install_PlugYImagesFiles() #include "globalVariable.h" #include "updateServer.h" // Install_UpdateServer() -#include "plugYFiles.h" // Install_PlugYImagesFiles() #include "interface_Stats.h"// Install_InterfaceStats() #include "newInterfaces.h" #include "newInterface_Stats.h" #include "newInterface_StatsPageTwo.h" #include "newInterface_Runewords.h" +#include "common.h" #include bool active_newInterfaces=false; @@ -70,7 +68,6 @@ void STDCALL printCustomPage() DWORD STDCALL mouseCustomPageLeftDown(sWinMessage* msg) { - if(onRealm) return -1; if ( (selectedPage > 0) && (selectedPage<=lastPage) ) return mouseNewStatsPageTwoLeftDown(msg); diff --git a/PlugY/OthersFeatures.cpp b/PlugY/OthersFeatures.cpp index c9e1afe..967fdfc 100644 --- a/PlugY/OthersFeatures.cpp +++ b/PlugY/OthersFeatures.cpp @@ -6,8 +6,6 @@ =================================================================*/ #include "common.h" -#include "error.h" -#include "d2functions.h" bool active_othersFeatures = false; diff --git a/PlugY/Parameters.cpp b/PlugY/Parameters.cpp index af78253..30557d8 100644 --- a/PlugY/Parameters.cpp +++ b/PlugY/Parameters.cpp @@ -5,15 +5,12 @@ =================================================================*/ -// Core Class Headers +#include "error.h" +#include "INIfile.h" +#include "parameters.h" // loadParameters() #include #include #include -#include "common.h" -#include "error.h" -#include "parameters.h" // loadParameters() -#include "D2functions.h" -#include "INIfile.h" #define PARAMETERS_FILENAME "PlugY.ini" @@ -37,7 +34,7 @@ #include "extraOptions.h" #include "commands.h" #include "language.h" -extern bool displayGreenSetItemIncludeSharedStash; +#include "windowed.h" char* modDataDirectory = "PlugY"; @@ -60,6 +57,18 @@ const char* S_active_CheckMemory = "ActiveCheckMemory"; const char* S_active_Commands = "ActiveCommands"; const char* S_active_othersFeatures = "ActiveAllOthersFeatures"; +const char* S_WINDOWED = "WINDOWED"; +const char* S_ActiveWindowed = "ActiveWindowed"; +const char* S_RemoveBorder = "RemoveBorder"; +const char* S_WindowOnTop = "WindowOnTop"; +const char* S_Maximized = "Maximized"; +const char* S_SetWindowPos = "SetWindowPos"; +const char* S_X = "X"; +const char* S_Y = "Y"; +const char* S_Width = "Width"; +const char* S_Height = "Height"; +const char* S_LockMouseOnStartup = "LockMouseOnStartup"; + const char* S_LANGUAGE = "LANGUAGE"; const char* S_active_ChangeLanguage = "ActiveChangeLanguage"; const char* S_selectedLanguage = "SelectedLanguage"; @@ -85,6 +94,7 @@ const char* S_maxSelfPages = "MaxPersonnalPages"; const char* S_nbPagesPerIndex = "NbPagesPerIndex"; const char* S_nbPagesPerIndex2 = "NbPagesPerIndex2"; const char* S_active_sharedStash = "ActiveSharedStash"; +const char* S_openSharedStashOnLoading = "OpenSharedStashOnLoading"; const char* S_maxSharedPages = "MaxSharedPages"; const char* S_sharedStashFilename = "SharedStashFilename"; const char* S_separateHardSoftStash = "SeparateHardcoreStash"; @@ -167,6 +177,10 @@ const char* S_USER = "USER:\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)\ if (!iniFixedFile->GetPrivateProfileString(S, F, NULL, buffer, maxSize)) \ if (!iniFile->GetPrivateProfileString(S, F, NULL, buffer, maxSize)) \ @@ -183,7 +197,6 @@ if (!iniDefaultFile->GetPrivateProfileString(S, F, D, buffer, maxSize)) \ else log_msg(S_DEFAULT); \ else log_msg(S_USER) - #define GET_PRIVATE_PROFILE_STRING3(S,F,D)\ if (!iniFile->GetPrivateProfileString(S, F, NULL, buffer, maxSize)) \ if (!iniFixedFile->GetPrivateProfileString(S, F, NULL, buffer, maxSize)) \ @@ -210,7 +223,7 @@ void init_General(INIFile* iniFile, INIFile* iniFixedFile, INIFile* iniDefaultFi { GET_PRIVATE_PROFILE_STRING(S_GENERAL, S_active_DisableBattleNet, "0"); active_DisableBattleNet = atoi(buffer) != 0; - log_msg("active_DisableBattleNet\t\t\t\t= %d\n", active_DisableBattleNet); + log_msg("active_DisableBattleNet\t\t= %d\n", active_DisableBattleNet); GET_PRIVATE_PROFILE_STRING(S_GENERAL, S_active_logFile, "0"); active_logFile = atoi(buffer)+1; @@ -242,6 +255,51 @@ void init_General(INIFile* iniFile, INIFile* iniFixedFile, INIFile* iniDefaultFi log_msg("\n"); } +void init_Windowed(INIFile* iniFile, INIFile* iniFixedFile, INIFile* iniDefaultFile, char* buffer, DWORD maxSize) +{ + GET_PRIVATE_PROFILE_STRING(S_WINDOWED, S_ActiveWindowed, "0"); + active_Windowed = atoi(buffer) != 0; + log_msg("active_Windowed\t\t\t\t= %d\n", active_Windowed); + if (active_Windowed) + { + GET_PRIVATE_PROFILE_STRING(S_WINDOWED, S_RemoveBorder, "0"); + active_RemoveBorder = atoi(buffer) != 0; + log_msg("active_RemoveBorder\t\t\t= %d\n", active_RemoveBorder); + + GET_PRIVATE_PROFILE_STRING(S_WINDOWED, S_WindowOnTop, "0"); + active_WindowOnTop = atoi(buffer) != 0; + log_msg("active_WindowOnTop\t\t\t= %d\n", active_WindowOnTop); + + GET_PRIVATE_PROFILE_STRING(S_WINDOWED, S_Maximized, "0"); + active_Maximized = atoi(buffer) != 0; + log_msg("active_Maximized\t\t\t= %d\n", active_Maximized); + + GET_PRIVATE_PROFILE_STRING(S_WINDOWED, S_SetWindowPos, "0"); + active_SetWindowPos = atoi(buffer) != 0; + log_msg("active_MoveAndResizeWindow\t= %d\n", active_SetWindowPos); + + GET_PRIVATE_PROFILE_STRING(S_WINDOWED, S_X, "0"); + windowedX = atoi(buffer); + log_msg("windowedX\t\t\t\t\t= %d\n", windowedX); + + GET_PRIVATE_PROFILE_STRING(S_WINDOWED, S_Y, "0"); + windowedY = atoi(buffer); + log_msg("windowedY\t\t\t\t\t= %d\n", windowedY); + + GET_PRIVATE_PROFILE_STRING(S_WINDOWED, S_Width, "0"); + windowedWidth = atoi(buffer); + log_msg("windowedWidth\t\t\t\t= %d\n", windowedWidth); + + GET_PRIVATE_PROFILE_STRING(S_WINDOWED, S_Height, "0"); + windowedHeight = atoi(buffer); + log_msg("windowedHeight\t\t\t\t= %d\n", windowedHeight); + + GET_PRIVATE_PROFILE_STRING(S_WINDOWED, S_LockMouseOnStartup, "0"); + active_LockMouseOnStartup = atoi(buffer) != 0; + log_msg("active_LockMouseOnStartup\t= %d\n\n", active_LockMouseOnStartup); + } +} + void init_ActiveLanguage(INIFile* iniFile, INIFile* iniFixedFile, INIFile* iniDefaultFile, char* buffer, DWORD maxSize) { GET_PRIVATE_PROFILE_STRING(S_LANGUAGE, S_active_ChangeLanguage, "0"); @@ -251,7 +309,7 @@ void init_ActiveLanguage(INIFile* iniFile, INIFile* iniFixedFile, INIFile* iniDe if (active_ChangeLanguage) { GET_PRIVATE_PROFILE_STRING(S_LANGUAGE, S_selectedLanguage, "ENG"); - strupr(buffer); + _strupr(buffer); switch (*(DWORD*)buffer) { case BIN('E','N','G',0) : selectedLanguage=LNG_ENG;break; @@ -281,7 +339,7 @@ void init_ActiveLanguage(INIFile* iniFile, INIFile* iniFixedFile, INIFile* iniDe if (active_LanguageManagement) { GET_PRIVATE_PROFILE_STRING(S_LANGUAGE, S_defaultLanguage, "ENG"); - strupr(buffer); + _strupr(buffer); switch (*(DWORD*)buffer) { case BIN('E','N','G',0) : defaultLanguage=LNG_ENG;break; @@ -302,7 +360,7 @@ void init_ActiveLanguage(INIFile* iniFile, INIFile* iniFixedFile, INIFile* iniDe GET_PRIVATE_PROFILE_STRING(S_LANGUAGE, S_availableLanguages, "ENG|ESP|DEU|FRA|POR|ITA|JPN|KOR|SIN|CHI|POL|RUS"); availableLanguages.all = 0; - strupr(buffer); + _strupr(buffer); char* curString = strtok(buffer,"|"); while (curString) { @@ -392,11 +450,24 @@ void init_VersionText(INIFile* iniFile, INIFile* iniFixedFile, INIFile* iniDefau { switch(version_D2Game) { - case V109b: strcpy(buffer, "v 1.09b");break; - case V109d: strcpy(buffer, "v 1.09d");break; - //case V110: strcpy(buffer, "v 1.10");break; - //case V111: strcpy(buffer, "v 1.11");break; - case V111b: strcpy(buffer, "v 1.11b");break; + //case V107: //"v 1.07" + //case V108: //"v 1.08" + //case V109: //"v 1.09" + case V109b: //"v 1.09" + case V109d: //"v 1.09" + //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: active_VersionTextChange=0; } @@ -415,7 +486,6 @@ void init_VersionText(INIFile* iniFile, INIFile* iniFixedFile, INIFile* iniDefau active_PrintPlugYVersion = atoi(buffer) != 0; log_msg("active_PrintPlugYVersion\t= %u\n", active_PrintPlugYVersion); - if (active_PrintPlugYVersion) { GET_PRIVATE_PROFILE_STRING(S_MAIN_SCREEN, S_colorOfPlugYVersion, "4"); @@ -494,6 +564,10 @@ void init_Stash(INIFile* iniFile, INIFile* iniFixedFile, INIFile* iniDefaultFile 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"); maxSharedPages = atoi(buffer) - 1; log_msg("maxSharedPages\t\t\t\t= %u\n", maxSharedPages); @@ -757,7 +831,7 @@ void loadParameters() INIFile *iniFixedFile = new INIFile; INIFile *iniDefaultFile = new INIFile; - srand(time(NULL)); + srand((UINT)time(NULL)); log_msg("***** PARAMETERS *****\n"); if (iniFile->InitReadWrite(PARAMETERS_FILENAME, INIFILE_READ, 0)) @@ -783,6 +857,7 @@ void loadParameters() if (active_plugin) { init_General(iniFile, iniFixedFile, iniDefaultFile, buffer, BUFSIZE); + init_Windowed(iniFile, iniFixedFile, iniDefaultFile, buffer, BUFSIZE); init_ActiveLanguage(iniFile, iniFixedFile, iniDefaultFile, buffer,BUFSIZE); init_SavePath(iniFile, iniFixedFile, iniDefaultFile, buffer, BUFSIZE); init_VersionText(iniFile, iniFixedFile, iniDefaultFile, buffer, BUFSIZE); diff --git a/PlugY/PlayerCustomData.cpp b/PlugY/PlayerCustomData.cpp index d53624a..1a51d92 100644 --- a/PlugY/PlayerCustomData.cpp +++ b/PlugY/PlayerCustomData.cpp @@ -7,15 +7,15 @@ =================================================================*/ -#include "common.h" -#include "error.h" #include "updateClient.h" -#include "d2functions.h" #include "infinityStash.h" #include "savePlayerData.h" //Install_SavePlayerData() #include "loadPlayerData.h" //Install_LoadPlayerData() +#include "common.h" bool active_PlayerCustomData = true; +bool openSharedStashOnLoading = false; + /*********************************** UPDATING ***********************************/ @@ -72,7 +72,11 @@ void STDCALL updateClientPlayerOnLoading(Unit* ptChar) log_msg("--- Start updateClientPlayerOnLoading ---\n"); if (PCGame->isLODGame) { - selectStash(ptChar, PCPY->selfStash); + //selectStash(ptChar, openSharedStashOnLoading ? PCPY->sharedStash : PCPY->selfStash); + if (openSharedStashOnLoading) + toggleToSharedStash(ptChar); + else + toggleToSelfStash(ptChar); log_msg("End update client on loading.\n\n"); } updateClient(ptChar, UC_SHARED_GOLD, PCPY->sharedGold, 0, 0); @@ -271,7 +275,7 @@ void Install_PlayerCustomData() log_msg("Patch D2Game & D2Client & D2Common for Player's custom data. (PlayerCustomData)\n"); // 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 == 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 ); MEMJ_REF4( D2AllocMem, init_PlayerCustomData); //01BD0381 |. E8 C03F0000 CALL //6FD9ED5D |. E8 94A4FBFF CALL diff --git a/PlugY/PlugY.aps b/PlugY/PlugY.aps deleted file mode 100644 index 7a4caa8..0000000 Binary files a/PlugY/PlugY.aps and /dev/null differ diff --git a/PlugY/PlugY.cpp b/PlugY/PlugY.cpp index 38c35d5..3565171 100644 --- a/PlugY/PlugY.cpp +++ b/PlugY/PlugY.cpp @@ -1,22 +1,27 @@ /*================================================================= File created by Yohann NICOLAS. - Main file of this DLL + Main file of this DLL =================================================================*/ +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include -BOOL WINAPI DllMain(HANDLE /*hModule*/, DWORD dwReason, LPVOID /*lpReserved*/) +BOOL APIENTRY DllMain( HMODULE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) { - switch(dwReason) + switch (ul_reason_for_call) { - case DLL_PROCESS_ATTACH: - break; - case DLL_PROCESS_DETACH: + case DLL_PROCESS_ATTACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: break; } - return true; + return TRUE; } /*================================= END OF FILE =================================*/ \ No newline at end of file diff --git a/PlugY/PlugY.rc b/PlugY/PlugY.rc index c8ed211..33e0eea 100644 Binary files a/PlugY/PlugY.rc and b/PlugY/PlugY.rc differ diff --git a/PlugY/PlugY.sln b/PlugY/PlugY.sln index 8651a40..188f79b 100644 --- a/PlugY/PlugY.sln +++ b/PlugY/PlugY.sln @@ -1,6 +1,7 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PlugY", "PlugY.vcproj", "{F5E47DA0-4D85-41E4-954D-29237DF8AFCB}" + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PlugY", "PlugY.vcproj", "{EB63DF4E-A019-4522-A140-9E8C7350B331}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -8,10 +9,10 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F5E47DA0-4D85-41E4-954D-29237DF8AFCB}.Debug|Win32.ActiveCfg = Debug|Win32 - {F5E47DA0-4D85-41E4-954D-29237DF8AFCB}.Debug|Win32.Build.0 = Debug|Win32 - {F5E47DA0-4D85-41E4-954D-29237DF8AFCB}.Release|Win32.ActiveCfg = Release|Win32 - {F5E47DA0-4D85-41E4-954D-29237DF8AFCB}.Release|Win32.Build.0 = Release|Win32 + {EB63DF4E-A019-4522-A140-9E8C7350B331}.Debug|Win32.ActiveCfg = Debug|Win32 + {EB63DF4E-A019-4522-A140-9E8C7350B331}.Debug|Win32.Build.0 = Debug|Win32 + {EB63DF4E-A019-4522-A140-9E8C7350B331}.Release|Win32.ActiveCfg = Release|Win32 + {EB63DF4E-A019-4522-A140-9E8C7350B331}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/PlugY/PlugY.suo b/PlugY/PlugY.suo index f644524..efae88e 100644 Binary files a/PlugY/PlugY.suo and b/PlugY/PlugY.suo differ diff --git a/PlugY/PlugY.vcproj b/PlugY/PlugY.vcproj index b99c648..2fceb0d 100644 --- a/PlugY/PlugY.vcproj +++ b/PlugY/PlugY.vcproj @@ -1,11 +1,12 @@ - - @@ -191,179 +167,184 @@ + + + + + + + + + + diff --git a/PlugY/PlugY.vcproj.ATHLON64.Yohann.user b/PlugY/PlugY.vcproj.ATHLON64.Yohann.user deleted file mode 100644 index b35e81c..0000000 --- a/PlugY/PlugY.vcproj.ATHLON64.Yohann.user +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - diff --git a/PlugY/PlugYFiles.cpp b/PlugY/PlugYFiles.cpp index 475d01e..f89d03e 100644 --- a/PlugY/PlugYFiles.cpp +++ b/PlugY/PlugYFiles.cpp @@ -7,10 +7,8 @@ =================================================================*/ -#include "common.h" -#include "error.h" -#include "d2functions.h" #include "plugYFiles.h" +#include "common.h" #include //#include "newInterfaces.h" diff --git a/PlugY/Progress.txt b/PlugY/Progress.txt deleted file mode 100644 index 4c5c1d5..0000000 --- a/PlugY/Progress.txt +++ /dev/null @@ -1,52 +0,0 @@ -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 - - diff --git a/PlugY/SavePath.cpp b/PlugY/SavePath.cpp index 6f485d2..9f00a2a 100644 --- a/PlugY/SavePath.cpp +++ b/PlugY/SavePath.cpp @@ -8,8 +8,6 @@ #include "savePath.h" #include "common.h" -#include "error.h" -#include "d2functions.h" char* savePath = NULL; bool active_changingSavePath = false; diff --git a/PlugY/SavePlayerData.cpp b/PlugY/SavePlayerData.cpp index b5a15c1..0849204 100644 --- a/PlugY/SavePlayerData.cpp +++ b/PlugY/SavePlayerData.cpp @@ -2,16 +2,14 @@ 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 "extendedSaveFile.h" #include "sharedSaveFile.h" +#include "common.h" void STDCALL SaveSPPlayerCustomData(Unit* ptChar) diff --git a/PlugY/SharedSaveFile.cpp b/PlugY/SharedSaveFile.cpp index 139db8a..f342b38 100644 --- a/PlugY/SharedSaveFile.cpp +++ b/PlugY/SharedSaveFile.cpp @@ -5,12 +5,11 @@ =================================================================*/ -#include "common.h" #include "sharedSaveFile.h" -#include "error.h" -#include "d2functions.h" #include "infinityStash.h" #include "customLibraries.h" +#include "common.h" +#include #define FILE_SHAREDSTASH 0x00535353 //"SSS " #define BUFFER_SIZE 0x4000 diff --git a/PlugY/SkillPerLevelUp.cpp b/PlugY/SkillPerLevelUp.cpp index a63f7b5..578de3b 100644 --- a/PlugY/SkillPerLevelUp.cpp +++ b/PlugY/SkillPerLevelUp.cpp @@ -8,8 +8,6 @@ #include "skillPerLevelUp.h" #include "common.h" -#include "error.h" -#include "d2functions.h" bool active_SkillPerLevelUpChange=0; DWORD skillPerLevelUp=1; diff --git a/PlugY/SkillsPoints.cpp b/PlugY/SkillsPoints.cpp index a310f45..64c090a 100644 --- a/PlugY/SkillsPoints.cpp +++ b/PlugY/SkillsPoints.cpp @@ -5,11 +5,9 @@ =================================================================*/ -#include "common.h" -#include "error.h" -#include "d2functions.h" #include "updateServer.h" #include "interface_Skills.h" // Install_InterfaceSkills() +#include "common.h" bool active_SkillsPoints=0; bool unassignSkillsPointsOneByOne=0; diff --git a/PlugY/StatPerLevelUp.cpp b/PlugY/StatPerLevelUp.cpp index 4be88d6..824532b 100644 --- a/PlugY/StatPerLevelUp.cpp +++ b/PlugY/StatPerLevelUp.cpp @@ -8,8 +8,6 @@ #include "statPerLevelUp.h" #include "common.h" -#include "error.h" -#include "d2functions.h" bool active_StatPerLevelUpChange=0; DWORD statPerLevelUp=5; diff --git a/PlugY/StatsPoints.cpp b/PlugY/StatsPoints.cpp index 9b451cb..d39adc3 100644 --- a/PlugY/StatsPoints.cpp +++ b/PlugY/StatsPoints.cpp @@ -6,13 +6,10 @@ =================================================================*/ -#include "common.h" -#include "error.h" -#include "d2functions.h" - #include "plugYFiles.h" // Install_PlugYImagesFiles() #include "interface_Stats.h" // Install_InterfaceStats() #include "updateServer.h" +#include "common.h" #include bool active_StatsPoints=0; @@ -162,11 +159,12 @@ void STDCALL printDisabledStatsBtn(WORD statID, sDrawImageInfo* data, DWORD x, D { WCHAR text[100]; if (active_StatsShiftClickLimit) - swprintf(text, getTranslatedString(STR_STATS_UNASSIGN_WITH_LIMIT),limitValueToShiftClick); + _snwprintf(text, sizeof(text) - 1, getLocalString(STR_STATS_UNASSIGN_WITH_LIMIT), limitValueToShiftClick); else - swprintf(text, getTranslatedString(STR_STATS_UNASSIGN_WITHOUT_LIMIT)); + _snwprintf(text, sizeof(text) - 1, getLocalString(STR_STATS_UNASSIGN_WITHOUT_LIMIT)); wcscat(text,L"\n"); - swprintf(text+wcslen(text), getTranslatedString(STR_STATS_BASE_MIN), statValue, minValue); + int len = wcslen(text); + _snwprintf(text + len, sizeof(text) - len, getLocalString(STR_STATS_BASE_MIN), statValue, minValue); D2SetFont(1); D2PrintPopup(text, x+18, y-32, WHITE, 1); } @@ -329,8 +327,7 @@ void Install_StatsPoints() Install_UpdateServer(); log_msg("Patch D2Client for unassign stat points when specified key is press. (StatsPoints)\n"); -//if ( version_D2Client < V113 ) -{ + // Always print stat button images. mem_seek R7(D2Client, 29B12, 29B02, 30073, 82BBA, 8963A, 6B59A, BD1B5, BF955); memt_byte( 0x8B, 0xEB ); // JMP SHORT D2Client.6FAD0088 @@ -453,7 +450,7 @@ void Install_StatsPoints() MEMC_REF4( D2SendToServer3, caller_setValue); //6FAD1610 . E8 7BC3FDFF CALL D2Client.6FAAD990 } -} log_msg("\n"); + log_msg("\n"); isInstalled = true; } diff --git a/PlugY/UberQuest.cpp b/PlugY/UberQuest.cpp index 240acda..83cb6d6 100644 --- a/PlugY/UberQuest.cpp +++ b/PlugY/UberQuest.cpp @@ -6,9 +6,8 @@ =================================================================*/ +#include "uberQuest.h" #include "common.h" -#include "error.h" -#include "d2functions.h" bool active_UberQuest=0; diff --git a/PlugY/UpdateClient.cpp b/PlugY/UpdateClient.cpp index e09b102..0c4a6d8 100644 --- a/PlugY/UpdateClient.cpp +++ b/PlugY/UpdateClient.cpp @@ -6,14 +6,10 @@ =================================================================*/ -#include "common.h" #include "updateClient.h" -#include "error.h" -#include "d2functions.h" - #include "infinityStash.h" #include "commands.h" - +#include "common.h" void updateClient(Unit* ptChar, DWORD mFunc, DWORD p1, DWORD p2, DWORD p3) { @@ -36,14 +32,36 @@ void updateClient(Unit* ptChar, DWORD mFunc, DWORD p1, DWORD p2, DWORD p3) 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) { log_msg("[CLIENT] Received custom message: %d with param: %08X , %08X , %08X\n",packet->mFunc,packet->mParam1,packet->mParam2,packet->mParam3); switch (packet->mFunc) { - case UC_SELECT_STASH : setSelectedStashClient(packet->mParam1,packet->mParam2,packet->mParam3); return 1; + case UC_SELECT_STASH: setSelectedStashClient(packet->mParam1, packet->mParam2, packet->mParam3, (packet->mParam2 & 4) == 4); 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; } } diff --git a/PlugY/UpdateServer.cpp b/PlugY/UpdateServer.cpp index 0dd4044..3263e40 100644 --- a/PlugY/UpdateServer.cpp +++ b/PlugY/UpdateServer.cpp @@ -6,21 +6,23 @@ =================================================================*/ -#include "common.h" #include "updateServer.h" -#include "error.h" -#include "d2functions.h" - #include "statsPoints.h" #include "skillsPoints.h" #include "infinityStash.h" #include "commands.h" +#include "common.h" +int renameIndex = 0; +char renameString[16]; +DWORD PageSwap; int STDCALL handleServerUpdate(Unit* ptChar, WORD param) { - log_msg("Received custom message: %X\n", param); - switch(param & 0xFF) + int type = param & 0xFF; + DWORD arg = (param & 0xFF00) >> 8; + log_msg("Received custom message: type=%i, arg=%i\n", type, arg); + switch(type) { case US_UNASSIGN_STR_POINT : UnassignStrPoint( ptChar ); return 1; case US_UNASSIGN_ENE_POINT : UnassignEnePoint( ptChar ); return 1; @@ -31,29 +33,64 @@ int STDCALL handleServerUpdate(Unit* ptChar, WORD param) case US_UNASSIGN_DEX_POINTS : UnassignDexPoints( ptChar ); return 1; case US_UNASSIGN_VIT_POINTS : UnassignVitPoints( 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_NEXT : selectNextStash( 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_PREVIOUS_INDEX : selectPreviousIndexStash( ptChar ); return 1; case US_SELECT_NEXT_INDEX : selectNextIndexStash( ptChar ); return 1; - case US_SELECT_PREVIOUS2 : selectPrevious2Stash( ptChar ); return 1; case US_SELECT_NEXT2 : selectNext2Stash( ptChar ); return 1; case US_SELECT_PREVIOUS_INDEX2: selectPreviousIndex2Stash( 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_STARTSAVE : savePlayers( ptChar ); return 1; + case US_SAVE : savePlayers( ptChar ); return 1; case US_MAXGOLD : maxGold(ptChar); return 1; case US_PUTGOLD : putGold(ptChar, 0); return 1; case US_TAKEGOLD : takeGold(ptChar, 0); return 1; - default : return 0; + case US_SWAP3 : PageSwap = arg << 24; return 1; + case US_SWAP2 : PageSwap |= arg << 16; return 1; + case US_SWAP1 : PageSwap |= arg << 8; return 1; + case US_SWAP0: swapStash(ptChar, PageSwap | arg, false); PageSwap = 0; return 1; + case US_SWAP0_TOGGLE : swapStash(ptChar, PageSwap | arg, true); PageSwap = 0; return 1; + case US_RENAME : + 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 on Server : %s -> %s\n", ptChar->ptPlayerData->name, renameString); + strcpy(ptChar->ptPlayerData->name, renameString); + strcpy(ptChar->ptPlayerData->ptNetClient->name, renameString); + } + 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 : + return 0; } } FCT_ASM( caller_handleServerUpdate) - PUSH EAX + PUSH ESI PUSH EBX CALL handleServerUpdate TEST EAX,EAX @@ -118,6 +155,9 @@ void Install_UpdateServer() //6FCEC983 . C1EE 08 SHR ESI,8 //6FCEC986 . 57 PUSH EDI //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) { memt_byte( 0xC1, 0xE8 ); // CALL caller_handleServerUpdate MEMT_REF4( 0xF88B08EE, caller_handleServerUpdate); diff --git a/PlugY/Windowed.cpp b/PlugY/Windowed.cpp new file mode 100644 index 0000000..dacb174 --- /dev/null +++ b/PlugY/Windowed.cpp @@ -0,0 +1,98 @@ +/*================================================================= + 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; +} \ No newline at end of file diff --git a/PlugY/WorldEvent.cpp b/PlugY/WorldEvent.cpp index e18b501..6ffed05 100644 --- a/PlugY/WorldEvent.cpp +++ b/PlugY/WorldEvent.cpp @@ -6,9 +6,8 @@ =================================================================*/ +#include "worldEvent.h" #include "common.h" -#include "error.h" -#include "d2functions.h" #pragma pack(1) struct s_WEdata diff --git a/PlugY/bigStash.h b/PlugY/bigStash.h index 1f9ff67..cc23617 100644 --- a/PlugY/bigStash.h +++ b/PlugY/bigStash.h @@ -4,16 +4,13 @@ Use a more big stash =================================================================*/ +#pragma once -#ifndef __BIGSTASH_HPP__INCLUDED -#define __BIGSTASH_HPP__INCLUDED - -#include +#include "common.h" extern bool active_bigStash; extern bool active_bigStash_tested; void Install_BigStash(); - -#endif \ No newline at end of file +/*================================= END OF FILE =================================*/ \ No newline at end of file diff --git a/PlugY/clientSaveFile.h b/PlugY/clientSaveFile.h index b2a0734..cc0a3e5 100644 --- a/PlugY/clientSaveFile.h +++ b/PlugY/clientSaveFile.h @@ -4,13 +4,11 @@ Add an extra save file for each characters. =================================================================*/ -/* #pragma once - +/* #include "common.h" DWORD loadClientSaveFile(); DWORD saveClientSaveFile(); - - +*/ /*================================= END OF FILE =================================*/ \ No newline at end of file diff --git a/PlugY/commands.h b/PlugY/commands.h index 20777e7..ef44d24 100644 --- a/PlugY/commands.h +++ b/PlugY/commands.h @@ -4,9 +4,9 @@ Commands directly in game. =================================================================*/ +#pragma once -#ifndef __COMMANDS_H__INCLUDED -#define __COMMANDS_H__INCLUDED +#include "common.h" extern bool active_Commands; @@ -18,4 +18,4 @@ void updateSharedGold(DWORD goldAmount); void Install_Commands(); -#endif \ No newline at end of file +/*================================= END OF FILE =================================*/ \ No newline at end of file diff --git a/PlugY/common.h b/PlugY/common.h index 2e1b588..fe4488b 100644 --- a/PlugY/common.h +++ b/PlugY/common.h @@ -6,194 +6,30 @@ function related to some Diablo II mechanisms. /*============================================*/ - #pragma once +//#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include + #include "../Commons/d2Constants.h" #include "../Commons/d2BinFile.h" #include "../Commons/d2Struct.h" #include "../Commons/d2StringTblStruct.h" #include "../Commons/D2UnitStruct.h" #include "../Commons/updatingConst.h" +#include "../Commons/VersionInfo.h" -#include "customData.h" +#include "error.h" #include "modifMemory.h" #include "parameters.h" -#include "globalVariable.h" +#include "d2wrapper.h" +#include "playerCustomData.h" // include common.h +#include "globalVariable.h" // include common.h -//#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)) - -// 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,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))))))) - - -// 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, - V113c, - V113d, - V114a -}; - -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; - -int UCS2toUTF8(char* dst, int maxdst, LPWSTR src, int lensrc); -int UTF8toUCS2(LPWSTR dst, int maxdst, char* src, int lensrc); - - -bool initLocaleStrings(); -void freeLocaleStrings(); - -const LPWSTR getTypeString (DWORD code, char** IdxStr); -LPWSTR getTranslatedString(int stringID); -int wSprintStringLastGender(LPWSTR buf, int lenbuf,int stringID); -LPWSTR cutStringGender(LPWSTR str); -LPWSTR setMonoString(LPWSTR str); - -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, - 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_WITH_N_SOCKETS, - 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_OR_UPGRADED, - STR_WITHOUT_SOCKET, - STR_WITH_SOCKET, - STR_ONLY_N_H, - STR_ONLY_HELL, - STR_ONLY_CLASS -}; +#include "d2functions.h" +#include "LocalizedStrings.h" bool isOnRect(DWORD x, DWORD y, DWORD x0, DWORD y0, DWORD l, DWORD h); void freeMessage(sWinMessage* msg); -LPWSTR getTypeUString (WORD id, LPWSTR lpText, DWORD size); -//char* getTypeAString (WORD id, char* lpText, DWORD size); /*================================= END OF FILE =================================*/ \ No newline at end of file diff --git a/PlugY/customData.h b/PlugY/customData.h index 8605b01..3b769e3 100644 --- a/PlugY/customData.h +++ b/PlugY/customData.h @@ -4,7 +4,6 @@ Data added to D2 base-stucture =================================================================*/ - #pragma once #include "playerCustomData.h" diff --git a/PlugY/customLibraries.h b/PlugY/customLibraries.h index 1879a7e..76b9bca 100644 --- a/PlugY/customLibraries.h +++ b/PlugY/customLibraries.h @@ -4,9 +4,10 @@ Language management. =================================================================*/ - #pragma once +#include "common.h" + 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 *TinitSaveFile) (BYTE** data, DWORD* maxSize, DWORD* curSize); @@ -42,5 +43,4 @@ private: extern TCustomDll* customDlls; - /*================================= END OF FILE =================================*/ \ No newline at end of file diff --git a/PlugY/d2functions.h b/PlugY/d2functions.h index 7b02b42..88228cb 100644 --- a/PlugY/d2functions.h +++ b/PlugY/d2functions.h @@ -6,18 +6,56 @@ function related to some Diablo II mechanisms. ================================================*/ - #pragma once -#include "common.h" +// 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; + +//#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 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 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 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 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 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 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 C7(Z, A,B,C,D,E,F,G,H, T, N) extern T* pt##N; #include "../Commons/D2Funcs.h" diff --git a/PlugY/d2wrapper.h b/PlugY/d2wrapper.h new file mode 100644 index 0000000..bec1a83 --- /dev/null +++ b/PlugY/d2wrapper.h @@ -0,0 +1,55 @@ +/****************************************************************************** +File modified by Yohann NICOLAS. + +NAME +inifile.h + +DESCRIPTION +Memory cached INI file read/write class to replace legacy MS code + +COPYRIGHT +1999-2004 Ultrafunk (www.ultrafunk.com) - info@ultrafunk.com + +******************************************************************************/ +#pragma once + +#include + +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 =================================*/ \ No newline at end of file diff --git a/PlugY/error.h b/PlugY/error.h index 41da484..6143f86 100644 --- a/PlugY/error.h +++ b/PlugY/error.h @@ -8,9 +8,7 @@ error handling in D2External functions. ==============================================*/ - -#ifndef __ERROR_H__INCLUDED__ -#define __ERROR_H__INCLUDED__ +#pragma once #include @@ -21,4 +19,4 @@ void log_box( const char* pFormat, ... ); void log_msg( const char* pFormat, ... ); void d2_assert( bool pCondition, char* pLocation, char* pMessage, int pLineNbr ); -#endif \ No newline at end of file +/*================================= END OF FILE =================================*/ \ No newline at end of file diff --git a/PlugY/extendedSaveFile.h b/PlugY/extendedSaveFile.h index dfec118..475ebe8 100644 --- a/PlugY/extendedSaveFile.h +++ b/PlugY/extendedSaveFile.h @@ -4,11 +4,9 @@ Add an extra save file for each characters. =================================================================*/ - #pragma once #include "common.h" -#include BYTE* readExtendedSaveFile(char* name, DWORD* size); void writeExtendedSaveFile(char* name, BYTE* data, DWORD size); diff --git a/PlugY/extraOptions.h b/PlugY/extraOptions.h index 6ec75c7..52531e1 100644 --- a/PlugY/extraOptions.h +++ b/PlugY/extraOptions.h @@ -4,28 +4,28 @@ More little options. =================================================================*/ +#pragma once -#ifndef __EXTRAOPTIONS_H__INCLUDED -#define __EXTRAOPTIONS_H__INCLUDED +#include "common.h" -extern int active_RunLODs; -extern int active_alwaysRegenMapInSP; -extern DWORD nbPlayersCommandByDefault; extern int active_DisplayItemLevel; +extern DWORD nbPlayersCommandByDefault; +extern int active_alwaysRegenMapInSP; +extern int active_RunLODs; extern int active_AlwaysDisplayLifeMana; extern int active_EnabledTXTFilesWithMSExcel; extern int active_DisplayBaseStatsValue; extern int active_LadderRunewords; extern int active_EnabledCowPortalWhenCowKingWasKill; -void Install_RunLODs(); -void Install_AlwaysRegenMapInSP(); -void Install_SendPlayersCommand(); void Install_DisplayItemLevel(); +void Install_SendPlayersCommand(); +void Install_AlwaysRegenMapInSP(); +void Install_RunLODs(); void Install_AlwaysDisplayLifeMana(); void Install_EnabledTXTFilesWithMSExcel(); void Install_DisplayBaseStatsValue(); void Install_LadderRunewords(); void Install_EnabledCowPortalWhenCowKingWasKill(); -#endif \ No newline at end of file +/*================================= END OF FILE =================================*/ \ No newline at end of file diff --git a/PlugY/globalVariable.h b/PlugY/globalVariable.h index a3152b9..b2e642c 100644 --- a/PlugY/globalVariable.h +++ b/PlugY/globalVariable.h @@ -4,13 +4,13 @@ Set global variable. =================================================================*/ +#pragma once -#ifndef __GLOBAL_VARIABLE_H__INCLUDED -#define __GLOBAL_VARIABLE_H__INCLUDED +#include "common.h" extern bool onRealm; extern bool needToInit; void Install_VariableOnRealm(); -#endif \ No newline at end of file +/*================================= END OF FILE =================================*/ \ No newline at end of file diff --git a/PlugY/infinityStash.h b/PlugY/infinityStash.h index d19eed8..df4de52 100644 --- a/PlugY/infinityStash.h +++ b/PlugY/infinityStash.h @@ -4,7 +4,6 @@ infinity Stash gestion =================================================================*/ - #pragma once #include "common.h" @@ -22,9 +21,9 @@ extern char* sharedStashFilename; extern bool displaySharedSetItemNameInGreen; extern int posXPreviousBtn,posYPreviousBtn,posXNextBtn,posYNextBtn,posXSharedBtn,posYSharedBtn,posXPreviousIndexBtn,posYPreviousIndexBtn,posXNextIndexBtn,posYNextIndexBtn,posXPutGoldBtn,posYPutGoldBtn,posXTakeGoldBtn,posYTakeGoldBtn; - void toggleToSharedStash(Unit* ptChar); void toggleToSelfStash(Unit* ptChar); +void setCurrentStashIndex(Unit* ptChar, bool isIndex); void selectPreviousStash(Unit* ptChar); void selectNextStash(Unit* ptChar); void selectPreviousIndexStash(Unit* ptChar); @@ -33,9 +32,13 @@ void selectPrevious2Stash(Unit* ptChar); void selectNext2Stash(Unit* ptChar); void selectPreviousIndex2Stash(Unit* ptChar); void selectNextIndex2Stash(Unit* ptChar); +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 setSelectedStashClient(DWORD stashId, DWORD stashFlags, DWORD flags); +void setSelectedStashClient(DWORD stashId, DWORD stashFlags, DWORD flags, bool bOnlyItems); Stash* addStash(Unit* ptChar, bool isShared); DWORD loadStashList(Unit* ptChar, BYTE* data, DWORD maxSize, DWORD* curSize, bool isShared); diff --git a/PlugY/interface_Skills.h b/PlugY/interface_Skills.h index 60790cb..874c3aa 100644 --- a/PlugY/interface_Skills.h +++ b/PlugY/interface_Skills.h @@ -4,10 +4,10 @@ Interface Skills functions =================================================================*/ +#pragma once -#ifndef __INTERFACE_SKILLS_HPP__INCLUDED -#define __INTERFACE_SKILLS_HPP__INCLUDED +#include "common.h" void Install_InterfaceSkills(); -#endif \ No newline at end of file +/*================================= END OF FILE =================================*/ \ No newline at end of file diff --git a/PlugY/interface_Stash.h b/PlugY/interface_Stash.h index 588ebb0..2682a9c 100644 --- a/PlugY/interface_Stash.h +++ b/PlugY/interface_Stash.h @@ -4,10 +4,10 @@ Interface functions =================================================================*/ +#pragma once -#ifndef __INTERFACE_STASH_HPP__INCLUDED -#define __INTERFACE_STASH_HPP__INCLUDED +#include "common.h" void Install_InterfaceStash(); -#endif \ No newline at end of file +/*================================= END OF FILE =================================*/ \ No newline at end of file diff --git a/PlugY/interface_Stats.h b/PlugY/interface_Stats.h index e7282ad..98950dd 100644 --- a/PlugY/interface_Stats.h +++ b/PlugY/interface_Stats.h @@ -4,10 +4,10 @@ Interface Stats functions =================================================================*/ +#pragma once -#ifndef __INTERFACE_STATS_HPP__INCLUDED -#define __INTERFACE_STATS_HPP__INCLUDED +#include "common.h" void Install_InterfaceStats(); -#endif \ No newline at end of file +/*================================= END OF FILE =================================*/ diff --git a/PlugY/language.h b/PlugY/language.h index 5dbc9e2..4613b0c 100644 --- a/PlugY/language.h +++ b/PlugY/language.h @@ -4,9 +4,9 @@ Language management. =================================================================*/ +#pragma once -#ifndef __LANGUAGE_H__INCLUDED -#define __LANGUAGE_H__INCLUDED +#include "common.h" extern bool active_ChangeLanguage; extern DWORD selectedLanguage; @@ -36,4 +36,4 @@ extern t_availableLanguages availableLanguages; void Install_LanguageManagement(); -#endif \ No newline at end of file +/*================================= END OF FILE =================================*/ \ No newline at end of file diff --git a/PlugY/loadPlayerData.h b/PlugY/loadPlayerData.h index 0eb25ab..1fdb609 100644 --- a/PlugY/loadPlayerData.h +++ b/PlugY/loadPlayerData.h @@ -4,10 +4,10 @@ Load Player Custom Data. =================================================================*/ +#pragma once -#ifndef __LOADPLAYERDATA_H__INCLUDED -#define __LOADPLAYERDATA_H__INCLUDED +#include "common.h" void Install_LoadPlayerData(); -#endif \ No newline at end of file +/*================================= END OF FILE =================================*/ diff --git a/PlugY/mainScreen.h b/PlugY/mainScreen.h index 8514261..06b97c0 100644 --- a/PlugY/mainScreen.h +++ b/PlugY/mainScreen.h @@ -4,11 +4,9 @@ Add "plugY v1.00" on screen. =================================================================*/ +#pragma once -#ifndef __MAINSCREEN_H__INCLUDED -#define __MAINSCREEN_H__INCLUDED - -#include +#include "common.h" extern bool active_VersionTextChange; extern char* versionText; @@ -19,4 +17,4 @@ extern BYTE colorOfPlugYVersion; void Install_PrintPlugYVersion(); void Install_VersionChange(); -#endif \ No newline at end of file +/*================================= END OF FILE =================================*/ diff --git a/PlugY/modifMemory.h b/PlugY/modifMemory.h index 1ae47f1..82fccb8 100644 --- a/PlugY/modifMemory.h +++ b/PlugY/modifMemory.h @@ -4,9 +4,10 @@ Modification of code in memory functions. /*============================================*/ - #pragma once +#include + extern void* currentMemoryPos; DWORD mem_seek(DWORD newPos); diff --git a/PlugY/newInterface_CubeListing.h b/PlugY/newInterface_CubeListing.h index 8ad2b10..0040ae4 100644 --- a/PlugY/newInterface_CubeListing.h +++ b/PlugY/newInterface_CubeListing.h @@ -4,10 +4,10 @@ Cube Listing functions =================================================================*/ +#pragma once -#ifndef __NEWINTERFACE_CUBELISTING_H__INCLUDED -#define __NEWINTERFACE_CUBELISTING_H__INCLUDED +#include "common.h" void listAllCubeFormula(); -#endif \ No newline at end of file +/*================================= END OF FILE =================================*/ diff --git a/PlugY/newInterface_Runewords.h b/PlugY/newInterface_Runewords.h index 5220079..341a725 100644 --- a/PlugY/newInterface_Runewords.h +++ b/PlugY/newInterface_Runewords.h @@ -4,12 +4,12 @@ New runeword Interface =================================================================*/ +#pragma once -#ifndef __NEWINTERFACE_RUNEWORDS_H__INCLUDED -#define __NEWINTERFACE_RUNEWORDS_H__INCLUDED +#include "common.h" void STDCALL printRunewordsPage(); DWORD STDCALL mouseRunewordsPageLeftDown(sWinMessage* msg); DWORD STDCALL mouseRunewordsPageLeftUp(sWinMessage* msg); -#endif \ No newline at end of file +/*================================= END OF FILE =================================*/ diff --git a/PlugY/newInterface_Stats.h b/PlugY/newInterface_Stats.h index e11f242..599ce0e 100644 --- a/PlugY/newInterface_Stats.h +++ b/PlugY/newInterface_Stats.h @@ -4,12 +4,12 @@ New Stat Interface =================================================================*/ +#pragma once -#ifndef __NEWINTERFACE_STATS_H__INCLUDED -#define __NEWINTERFACE_STATS_H__INCLUDED +#include "common.h" void STDCALL printNewStatsPage(); DWORD STDCALL mouseNewStatsPageLeftDown(sWinMessage* msg); DWORD STDCALL mouseNewStatsPageLeftUp(sWinMessage* msg); -#endif \ No newline at end of file +/*================================= END OF FILE =================================*/ diff --git a/PlugY/newInterface_StatsPageTwo.h b/PlugY/newInterface_StatsPageTwo.h index f62c0bc..26e5dd0 100644 --- a/PlugY/newInterface_StatsPageTwo.h +++ b/PlugY/newInterface_StatsPageTwo.h @@ -4,12 +4,12 @@ New Stat Interface Page 2 =================================================================*/ +#pragma once -#ifndef __NEWINTERFACE_STATSPAGETWO_H__INCLUDED -#define __NEWINTERFACE_STATSPAGETWO_H__INCLUDED +#include "common.h" void STDCALL printNewStatsPageTwo(int currentPage); DWORD STDCALL mouseNewStatsPageTwoLeftDown(sWinMessage* msg); DWORD STDCALL mouseNewStatsPageTwoLeftUp(sWinMessage* msg); -#endif \ No newline at end of file +/*================================= END OF FILE =================================*/ \ No newline at end of file diff --git a/PlugY/newInterfaces.h b/PlugY/newInterfaces.h index 8d41b4b..9069564 100644 --- a/PlugY/newInterfaces.h +++ b/PlugY/newInterfaces.h @@ -4,9 +4,9 @@ New Interfaces functions =================================================================*/ +#pragma once -#ifndef __NEW_INTERFACES_H__INCLUDED -#define __NEW_INTERFACES_H__INCLUDED +#include "common.h" #define MILIEU(X,L,N) (X + ((N BYTE* readSharedSaveFile(char* name, DWORD* size); void writeSharedSaveFile(char* name, BYTE* data, DWORD size, bool isHardcore); diff --git a/PlugY/skillPerLevelUp.h b/PlugY/skillPerLevelUp.h index 3c1f135..ac2b9e1 100644 --- a/PlugY/skillPerLevelUp.h +++ b/PlugY/skillPerLevelUp.h @@ -4,10 +4,9 @@ Change Skill win per level up. =================================================================*/ - #pragma once -#include +#include "common.h" extern bool active_SkillPerLevelUpChange; extern DWORD skillPerLevelUp; diff --git a/PlugY/skillsPoints.h b/PlugY/skillsPoints.h index 9daf4ec..2b599d4 100644 --- a/PlugY/skillsPoints.h +++ b/PlugY/skillsPoints.h @@ -4,9 +4,9 @@ Unassign Skill Point for futher re-assignment. =================================================================*/ +#pragma once -#ifndef __SKILLSPOINTS_H__INCLUDED -#define __SKILLSPOINTS_H__INCLUDED +#include "common.h" extern bool active_SkillsPoints; extern bool unassignSkillsPointsOneByOne; @@ -17,4 +17,4 @@ void client_UnassignAllSkillsPoints(); void Install_SkillsPoints(); -#endif \ No newline at end of file +/*================================= END OF FILE =================================*/ \ No newline at end of file diff --git a/PlugY/statPerLevelUp.h b/PlugY/statPerLevelUp.h index 6bab6bd..cae6b4f 100644 --- a/PlugY/statPerLevelUp.h +++ b/PlugY/statPerLevelUp.h @@ -4,10 +4,9 @@ Change Stat win per level up. =================================================================*/ - #pragma once -#include +#include "common.h" extern bool active_StatPerLevelUpChange; extern DWORD statPerLevelUp; diff --git a/PlugY/statsPoints.h b/PlugY/statsPoints.h index 010803e..e6aaa1f 100644 --- a/PlugY/statsPoints.h +++ b/PlugY/statsPoints.h @@ -4,10 +4,9 @@ Unassign Stats Point for futher re-assignment. =================================================================*/ - #pragma once -#include +#include "common.h" extern bool active_StatsPoints; extern DWORD keyUsedForUnassignStatPoint; diff --git a/PlugY/targetver.h b/PlugY/targetver.h new file mode 100644 index 0000000..e5b6cb5 --- /dev/null +++ b/PlugY/targetver.h @@ -0,0 +1,24 @@ +#pragma once + +// Les macros suivantes dfinissent la plateforme minimale requise. La plateforme minimale requise +// est la version de Windows, Internet Explorer etc. qui dispose des fonctionnalits ncessaires pour excuter +// votre application. Les macros fonctionnent en activant toutes les fonctionnalits disponibles sur les versions de la plateforme jusqu' la +// version spcifie. + +// Modifiez les dfinitions suivantes si vous devez cibler une plateforme avant celles spcifies ci-dessous. +// Reportez-vous MSDN pour obtenir les dernires informations sur les valeurs correspondantes pour les diffrentes plateformes. +#ifndef WINVER // Spcifie que la plateforme minimale requise est Windows Vista. +#define WINVER 0x0600 // Attribuez la valeur approprie cet lment pour cibler d'autres versions de Windows. +#endif + +#ifndef _WIN32_WINNT // Spcifie que la plateforme minimale requise est Windows Vista. +#define _WIN32_WINNT 0x0600 // Attribuez la valeur approprie cet lment pour cibler d'autres versions de Windows. +#endif + +#ifndef _WIN32_WINDOWS // Spcifie que la plateforme minimale requise est Windows98. +#define _WIN32_WINDOWS 0x0410 // Attribuez la valeur approprie cet lment pour cibler WindowsMe ou version ultrieure. +#endif + +#ifndef _WIN32_IE // Spcifie que la plateforme minimale requise est Internet Explorer 7.0. +#define _WIN32_IE 0x0700 // Attribuez la valeur approprie cet lment pour cibler d'autres versions d'Internet Explorer. +#endif diff --git a/PlugY/uberQuest.h b/PlugY/uberQuest.h index 087cb7d..b72742d 100644 --- a/PlugY/uberQuest.h +++ b/PlugY/uberQuest.h @@ -4,9 +4,10 @@ Uber Quest Management. =================================================================*/ - #pragma once +#include "common.h" + extern bool active_UberQuest; void Install_UberQuest(); diff --git a/PlugY/updateClient.h b/PlugY/updateClient.h index f99575e..dbfef8b 100644 --- a/PlugY/updateClient.h +++ b/PlugY/updateClient.h @@ -4,13 +4,12 @@ Updating Client. =================================================================*/ - -#ifndef __UPDATECLIENT_H__INCLUDED -#define __UPDATECLIENT_H__INCLUDED +#pragma once #include "common.h" void Install_UpdateClient(); void updateClient(Unit* ptChar, DWORD mFunc, DWORD p1, DWORD p2, DWORD p3); +void updateClient(Unit* ptChar, DWORD mFunc, char* msg); -#endif \ No newline at end of file +/*================================= END OF FILE =================================*/ \ No newline at end of file diff --git a/PlugY/updateServer.h b/PlugY/updateServer.h index 640ef4c..9b80761 100644 --- a/PlugY/updateServer.h +++ b/PlugY/updateServer.h @@ -4,11 +4,9 @@ Updating Server. =================================================================*/ - #pragma once #include "common.h" -#include "D2functions.h" __inline void updateServer(WORD p) {if (!onRealm) D2SendToServer3(0x3A, p);}; void Install_UpdateServer(); diff --git a/PlugY/windowed.h b/PlugY/windowed.h new file mode 100644 index 0000000..a9c52b2 --- /dev/null +++ b/PlugY/windowed.h @@ -0,0 +1,27 @@ +/*================================================================= + File created by Yohann NICOLAS. + + Windowed mode options. + +=================================================================*/ +#pragma once + +#include "common.h" + +extern int active_Windowed; +extern int active_LockMouseCursor; +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 SetWindowedOptions(); +void lockMouseCursor(); +void unlockMouseCursor(); + +/*================================= END OF FILE =================================*/ \ No newline at end of file diff --git a/PlugY/worldEvent.h b/PlugY/worldEvent.h index f71c2ce..428b381 100644 --- a/PlugY/worldEvent.h +++ b/PlugY/worldEvent.h @@ -4,9 +4,10 @@ World Event Management. =================================================================*/ - #pragma once +#include "common.h" + extern bool active_WorldEvent; extern DWORD showSOJSoldCounterInAllDiff; extern char* itemsToSell; diff --git a/PlugYInstall/PlugYInstall.aps b/PlugYInstall/PlugYInstall.aps deleted file mode 100644 index 0be97cd..0000000 Binary files a/PlugYInstall/PlugYInstall.aps and /dev/null differ diff --git a/PlugYInstall/PlugYInstall.cpp b/PlugYInstall/PlugYInstall.cpp index b859adf..bd9fe35 100644 --- a/PlugYInstall/PlugYInstall.cpp +++ b/PlugYInstall/PlugYInstall.cpp @@ -1,3 +1,4 @@ + /*================================================================= File created by Yohann NICOLAS. Add support 1.13d by L'Autour. @@ -5,155 +6,110 @@ Patch D2gfx.dll to install PlugY. =================================================================*/ +#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup") +#include "../Commons/VersionInfo.h" #include #include -#include "../Commons/VersionInfo.h" const char* boxNameInstall = "Installation of PlugY, The Survival Kit Installation"; const char* boxNameUnInstall = "Uninstall PlugY, The Survival Kit "; -int CALL_LOAD[8] = {0x389B,0x389B,0x3870,0x8B23,0xB423,0x8F63,0xB423,0xAA03}; -BYTE callNewLoad[8][6]={{0xE8,0x60,0x85,0x00,0x00,0x90},// JMP 6FA7BE00-6FA738A0 ;install loadlibrary - {0xE8,0x60,0x85,0x00,0x00,0x90},// JMP 6FA7BE00-6FA738A0 ;install loadlibrary - {0xE8,0x8B,0x85,0x00,0x00,0x90},// JMP 6FA7BE00-6FA73875 ;install loadlibrary - {0xE8,0xD8,0x42,0x00,0x00,0x90},// JMP 6FA8CE00-6FA88B28 ;install loadlibrary - {0xE8,0xD8,0x19,0x00,0x00,0x90},// JMP 6FA8CE00-6FA8B428 ;install loadlibrary - {0xE8,0x98,0x3E,0x00,0x00,0x90},// JMP 6FA8CE00-6FA88F68 ;install loadlibrary - {0xE8,0xD8,0x19,0x00,0x00,0x90},// JMP 6FA8CE00-6FA8B428 ;install loadlibrary - {0xE8,0xF8,0x23,0x00,0x00,0x90}};// JMP 6FA8CE00-6FA8B428 ;install loadlibrary -BYTE callOldLoad[8][6]={{0xFF,0x15,0x3C,0xC0,0xA7,0x6F}, - {0xFF,0x15,0x3C,0xC0,0xA7,0x6F}, - {0xFF,0x15,0x40,0xC0,0xA7,0x6F}, - {0xFF,0x15,0x1C,0xD1,0xA8,0x6F}, - {0xFF,0x15,0x1C,0xD1,0xA8,0x6F}, - {0xFF,0x15,0x1C,0xD1,0xA8,0x6F}, - {0xFF,0x15,0x1C,0xD1,0xA8,0x6F}, - {0xFF,0x15,0x1C,0xD1,0xA8,0x6F}}; +int CALL_LOAD[8] = { 0x389B,0x389B,0x3870,0x8B23,0xB423,0x8F63,0xB423,0xAA03 }; +BYTE callNewLoad[8][6] = { { 0xE8,0x60,0x85,0x00,0x00,0x90 },// JMP 6FA7BE00-6FA738A0 ;install loadlibrary + { 0xE8,0x60,0x85,0x00,0x00,0x90 },// JMP 6FA7BE00-6FA738A0 ;install loadlibrary + { 0xE8,0x8B,0x85,0x00,0x00,0x90 },// JMP 6FA7BE00-6FA73875 ;install loadlibrary + { 0xE8,0xD8,0x42,0x00,0x00,0x90 },// JMP 6FA8CE00-6FA88B28 ;install loadlibrary + { 0xE8,0xD8,0x19,0x00,0x00,0x90 },// JMP 6FA8CE00-6FA8B428 ;install loadlibrary + { 0xE8,0x98,0x3E,0x00,0x00,0x90 },// JMP 6FA8CE00-6FA88F68 ;install loadlibrary + { 0xE8,0xD8,0x19,0x00,0x00,0x90 },// JMP 6FA8CE00-6FA8B428 ;install loadlibrary + { 0xE8,0xF8,0x23,0x00,0x00,0x90 }};// JMP 6FA8CE00-6FA8B428 ;install loadlibrary +BYTE callOldLoad[8][6] = { { 0xFF,0x15,0x3C,0xC0,0xA7,0x6F }, + { 0xFF,0x15,0x3C,0xC0,0xA7,0x6F }, + { 0xFF,0x15,0x40,0xC0,0xA7,0x6F }, + { 0xFF,0x15,0x1C,0xD1,0xA8,0x6F }, + { 0xFF,0x15,0x1C,0xD1,0xA8,0x6F }, + { 0xFF,0x15,0x1C,0xD1,0xA8,0x6F }, + { 0xFF,0x15,0x1C,0xD1,0xA8,0x6F }, + { 0xFF,0x15,0x1C,0xD1,0xA8,0x6F }}; -int CALL_FREE[8] = {0x3A8C,0x3A8C,0x3A6D,0x8ACA,0xB3CA,0x8F0A,0xB3CA,0xA9AA}; -BYTE callNewFree[8][6]={{0xE8,0xAF,0x83,0x00,0x00,0x90}, // JMP 6FA7BE40-6FA73A91 ;install freelibrary - {0xE8,0xAF,0x83,0x00,0x00,0x90}, // JMP 6FA7BE40-6FA73A91 ;install freelibrary - {0xE8,0xD2,0x83,0x00,0x00,0x90}, // JMP 6FA7BE44-6FA73A72 ;install freelibrary - {0xE8,0x75,0x43,0x00,0x00,0x90}, // JMP 6FA8CE44-6FA88ACF ;install freelibrary - {0xE8,0x75,0x1A,0x00,0x00,0x90}, // JMP 6FA8CE44-6FA8B3CF ;install freelibrary - {0xE8,0x35,0x3F,0x00,0x00,0x90}, // JMP 6FA8CE44-6FA88F0F ;install freelibrary - {0xE8,0x75,0x1A,0x00,0x00,0x90}, // JMP 6FA8CE44-6FA8B3CF ;install freelibrary - {0xE8,0x95,0x24,0x00,0x00,0x90}};// JMP 6FA8CE44-6FA8B3CF ;install freelibrary -BYTE callOldFree[8][6]={{0xFF,0x15,0x44,0xC0,0xA7,0x6F}, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>] - {0xFF,0x15,0x44,0xC0,0xA7,0x6F}, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>] - {0xFF,0x15,0x48,0xC0,0xA7,0x6F}, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>] - {0xFF,0x15,0x2C,0xD1,0xA8,0x6F}, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>] - {0xFF,0x15,0x2C,0xD1,0xA8,0x6F}, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>] - {0xFF,0x15,0x2C,0xD1,0xA8,0x6F}, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>] - {0xFF,0x15,0x2C,0xD1,0xA8,0x6F}, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>] - {0xFF,0x15,0x24,0xD1,0xA8,0x6F}};// CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>] +int CALL_FREE[8] = { 0x3A8C,0x3A8C,0x3A6D,0x8ACA,0xB3CA,0x8F0A,0xB3CA,0xA9AA }; +BYTE callNewFree[8][6] = { { 0xE8,0xAF,0x83,0x00,0x00,0x90 }, // JMP 6FA7BE40-6FA73A91 ;install freelibrary + { 0xE8,0xAF,0x83,0x00,0x00,0x90 }, // JMP 6FA7BE40-6FA73A91 ;install freelibrary + { 0xE8,0xD2,0x83,0x00,0x00,0x90 }, // JMP 6FA7BE44-6FA73A72 ;install freelibrary + { 0xE8,0x75,0x43,0x00,0x00,0x90 }, // JMP 6FA8CE44-6FA88ACF ;install freelibrary + { 0xE8,0x75,0x1A,0x00,0x00,0x90 }, // JMP 6FA8CE44-6FA8B3CF ;install freelibrary + { 0xE8,0x35,0x3F,0x00,0x00,0x90 }, // JMP 6FA8CE44-6FA88F0F ;install freelibrary + { 0xE8,0x75,0x1A,0x00,0x00,0x90 },// JMP 6FA8CE44-6FA8B3CF ;install freelibrary + { 0xE8,0x95,0x24,0x00,0x00,0x90 }};// JMP 6FA8CE44-6FA8B3CF ;install freelibrary +BYTE callOldFree[8][6] = { { 0xFF,0x15,0x44,0xC0,0xA7,0x6F }, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>] + { 0xFF,0x15,0x44,0xC0,0xA7,0x6F }, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>] + { 0xFF,0x15,0x48,0xC0,0xA7,0x6F }, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>] + { 0xFF,0x15,0x2C,0xD1,0xA8,0x6F }, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>] + { 0xFF,0x15,0x2C,0xD1,0xA8,0x6F }, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>] + { 0xFF,0x15,0x2C,0xD1,0xA8,0x6F }, // CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>] + { 0xFF,0x15,0x2C,0xD1,0xA8,0x6F },// CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>] + { 0xFF,0x15,0x24,0xD1,0xA8,0x6F }};// CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>] int CALLER_LOADPLUGY = 0xBE00;//6FA7BE00-6FA70000 -BYTE caller_LoadPlugY[]={ -0xFF,0x74,0x24,0x04, //PUSH DWORD PTR SS:[ESP+4] -0xFF,0x15,0x40,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.LoadLibraryA>] ; kernel32.LoadLibraryA -0x50, //PUSH EAX -0x68,0x80,0xBE,0xA7,0x6F, //PUSH d2gfx.6FA7BE80 ; ASCII "PlugY.dll" -0xFF,0x15,0x40,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.LoadLibraryA>] ; kernel32.LoadLibraryA -0xA3,0xFC,0xEF,0xA8,0x6F, //MOV DWORD PTR DS:[6FA8EFFC],EAX -0x85,0xC0, //TEST EAX,EAX -0x74,0x18, //JE SHORT d2gfx.6FA7BE37 -0x68,0x90,0xBE,0xA7,0x6F, //PUSH d2gfx.6FA7BE10 ;Init ID -0x50, //PUSH EAX -0xFF,0x15,0x3C,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.GetProcAddress>] ; kernel32.GetProcAddress -0x85,0xC0, //TEST EAX,EAX -0x74,0x04, //JE SHORT d2gfx.6FA7BDC1 -0x6A,0x00, //PUSH 0 -0xFF,0xD0, //CALL EAX -0x58, //POP EAX -0xC2,0x04,0x00, //RETN 4 -0x59, //POP ECX -0xB9,0x80,0xBE,0xA7,0x6F, //MOV ECX,d2gfx.6FA7BE80 ; ASCII "PlugY.dll" -0x83,0x04,0x24,0x11, //ADD DWORD PTR SS:[ESP],11 -0xC2,0x04,0x00}; //RETN 4 +BYTE caller_LoadPlugY[] = { + 0xFF,0x74,0x24,0x04, //PUSH DWORD PTR SS:[ESP+4] + 0xFF,0x15,0x40,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.LoadLibraryA>] ; kernel32.LoadLibraryA + 0x50, //PUSH EAX + 0x68,0x80,0xBE,0xA7,0x6F, //PUSH d2gfx.6FA7BE80 ; ASCII "PlugY.dll" + 0xFF,0x15,0x40,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.LoadLibraryA>] ; kernel32.LoadLibraryA + 0xA3,0xFC,0xEF,0xA8,0x6F, //MOV DWORD PTR DS:[6FA8EFFC],EAX + 0x85,0xC0, //TEST EAX,EAX + 0x74,0x18, //JE SHORT d2gfx.6FA7BE37 + 0x68,0x90,0xBE,0xA7,0x6F, //PUSH d2gfx.6FA7BE10 ;Init ID + 0x50, //PUSH EAX + 0xFF,0x15,0x3C,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.GetProcAddress>] ; kernel32.GetProcAddress + 0x85,0xC0, //TEST EAX,EAX + 0x74,0x04, //JE SHORT d2gfx.6FA7BDC1 + 0x6A,0x00, //PUSH 0 + 0xFF,0xD0, //CALL EAX + 0x58, //POP EAX + 0xC2,0x04,0x00, //RETN 4 + 0x59, //POP ECX + 0xB9,0x80,0xBE,0xA7,0x6F, //MOV ECX,d2gfx.6FA7BE80 ; ASCII "PlugY.dll" + 0x83,0x04,0x24,0x11, //ADD DWORD PTR SS:[ESP],11 + 0xC2,0x04,0x00 }; //RETN 4 int CALLER_FREEPLUGY = 0xBE44;//6FA7BE44-6FA70000 -BYTE caller_FreePlugY[]={ -0xFF,0x74,0x24,0x04, //PUSH DWORD PTR SS:[ESP+4] -0xFF,0x15,0x48,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>] ; kernel32.FreeLibrary -0x50, //PUSH EAX -0xA1,0xFC,0xEF,0xA8,0x6F, //MOV EAX,DWORD PTR DS:[6FA8EFFC] -0x85,0xC0, //TEST EAX,EAX -0x74,0x20, //JE SHORT d2gfx.6FA7BE74 -0x50, //PUSH EAX -0x68,0xA0,0xBE,0xA7,0x6F, //PUSH d2gfx.6FA7BE20 ;release -0x50, //PUSH EAX -0x33,0xC0, //XOR EAX,EAX -0xA3,0xFC,0xEF,0xA8,0x6F, //MOV DWORD PTR DS:[6FA8EFFC],EAX -0xFF,0x15,0x3C,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.GetProcAdd>; kernel32.GetProcAddress -0x85,0xC0, //TEST EAX,EAX -0x74,0x02, //JE SHORT d2gfx.6FA7BDEF -0xFF,0xD0, //CALL EAX -0xFF,0x15,0x48,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.FreeLibrar>; kernel32.FreeLibrary -0x58, //POP EAX -0xC2,0x04,0x00}; //RETN 4 +BYTE caller_FreePlugY[] = { + 0xFF,0x74,0x24,0x04, //PUSH DWORD PTR SS:[ESP+4] + 0xFF,0x15,0x48,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>] ; kernel32.FreeLibrary + 0x50, //PUSH EAX + 0xA1,0xFC,0xEF,0xA8,0x6F, //MOV EAX,DWORD PTR DS:[6FA8EFFC] + 0x85,0xC0, //TEST EAX,EAX + 0x74,0x20, //JE SHORT d2gfx.6FA7BE74 + 0x50, //PUSH EAX + 0x68,0xA0,0xBE,0xA7,0x6F, //PUSH d2gfx.6FA7BE20 ;release + 0x50, //PUSH EAX + 0x33,0xC0, //XOR EAX,EAX + 0xA3,0xFC,0xEF,0xA8,0x6F, //MOV DWORD PTR DS:[6FA8EFFC],EAX + 0xFF,0x15,0x3C,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.GetProcAdd>; kernel32.GetProcAddress + 0x85,0xC0, //TEST EAX,EAX + 0x74,0x02, //JE SHORT d2gfx.6FA7BDEF + 0xFF,0xD0, //CALL EAX + 0xFF,0x15,0x48,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.FreeLibrar>; kernel32.FreeLibrary + 0x58, //POP EAX + 0xC2,0x04,0x00 }; //RETN 4 int S_DLLNAME = 0xBE80;//6FA7BE30-6FA70000 -BYTE sDllName[]={'P','l','u','g','Y','.','d','l','l',0};// Dll filename to load. +BYTE sDllName[] = { 'P','l','u','g','Y','.','d','l','l',0 };// Dll filename to load. int S_INIT = 0xBE90;//6FA7BE10-6FA70000 -BYTE sInit[]={'_','I','n','i','t','@','4',0}; +BYTE sInit[] = { '_','I','n','i','t','@','4',0 }; int S_RELEASE = 0xBEA0;//6FA7BE20-6FA70000 -BYTE sRelease[]={'_','R','e','l','e','a','s','e','@','0',0}; - -enum eFileVersion -{ - V109b=0, - V109d, - V110, - V111, - V111b, - V112, - V113c, - V113d -}; -/* -int getVersion(FILE *dll) -{ - int ver; - //GET_VERSION(D2gfx, 80, 110, 0x00949FA8, 0x018866A8, 0x401526B2, 0x575C8A5E, 0x42E6C22A, 0x43028B19, 0xACBE1B9E, 0x00000000); - int addr; - fseek(dll,0x80,SEEK_SET); - fread(&addr,sizeof(addr),1,dll); - if (addr == 0x00949FA8) - ver = V109b; - else if (addr == 0x018866A8) - ver = V109d; - else if (addr == 0x401526B2) - ver = V110; - else if (addr == 0x575C8A5E) - { - fseek(dll,0x110,SEEK_SET); - fread(&addr,sizeof(addr),1,dll); - if (addr == 0x42E6C22A) - ver = V111; - else if (addr == 0x43028B19) - ver = V111b; - else - ver = UNKNOW; - } - else if (addr == 0xACBE1B9E) - ver = V112; - else if (addr == 0xACBE1BB6) - ver = V113c; - else - ver = UNKNOW; - return ver; -} -*/ +BYTE sRelease[] = { '_','R','e','l','e','a','s','e','@','0',0 }; void updateData(int version) { - switch(version) + switch (version) { case V109b: case V109d: @@ -179,16 +135,9 @@ void updateData(int version) *(DWORD*)(&caller_LoadPlugY[6]) = 0x6FA8D11C; *(DWORD*)(&caller_LoadPlugY[18]) = 0x6FA8D11C; *(DWORD*)(&caller_LoadPlugY[39]) = 0x6FA8D120; - if (version == V113d) - { - *(DWORD*)(&caller_FreePlugY[6]) = 0x6FA8D124; - *(DWORD*)(&caller_FreePlugY[48]) = 0x6FA8D124; - } else - { - *(DWORD*)(&caller_FreePlugY[6]) = 0x6FA8D12C; - *(DWORD*)(&caller_FreePlugY[48]) = 0x6FA8D12C; - } + *(DWORD*)(&caller_FreePlugY[6]) = (version == V113d) ? 0x6FA8D124 : 0x6FA8D12C; *(DWORD*)(&caller_FreePlugY[36]) = 0x6FA8D120; + *(DWORD*)(&caller_FreePlugY[48]) = (version == V113d) ? 0x6FA8D124 : 0x6FA8D12C; caller_LoadPlugY[13] += 0x10; caller_LoadPlugY[14]++; caller_LoadPlugY[25]++; @@ -203,55 +152,39 @@ void updateData(int version) break; } } - ////////////////////////////// EXPORTED FUNCTIONS ////////////////////////////// -int GetD2Ver() -{ - char currentpath[MAX_PATH]; - if (! GetD2Path(currentpath, MAX_PATH)) - { - MessageBox(0,"Can't find path to Game.exe.", - boxNameInstall, MB_OK|MB_ICONEXCLAMATION); - exit(0);; - } - return GetD2Version(currentpath); -} - void Patch() { - if (MessageBox(0,"This programm will modify the D2gfx.dll file of the current directory.\n" - "Before continue, don't forgot to backup D2gfx.dll if you want\n" - "Do you want patch D2gfx.dll for the launch of PlugY ?", - boxNameInstall, MB_YESNO|MB_ICONQUESTION) == IDNO) + if (MessageBox(0, "This programm will modify the D2gfx.dll file of the current directory.\n" + "Before continue, don't forgot to backup D2gfx.dll if you want\n" + "Do you want patch D2gfx.dll for the launch of PlugY ?", + boxNameInstall, MB_YESNO | MB_ICONQUESTION) == IDNO) { - MessageBox(0,"D2gfx.dll isn't patched.\n", - boxNameInstall, MB_OK|MB_ICONASTERISK); + MessageBox(0, "D2gfx.dll isn't patched.\n", + boxNameInstall, MB_OK | MB_ICONASTERISK); exit(0); } - FILE *dll=fopen("d2gfx.dll","rb+"); + FILE *dll; - if(!dll) + if (fopen_s(&dll, "d2gfx.dll", "rb+")) { - MessageBox(0,"Can't open D2gfx.dll in read/write mode\n" - "If Diablo II is running you can\'t install PlugY, The Survival Kit.\n" - "Quit Diablo II and try again.", - boxNameInstall, MB_OK|MB_ICONEXCLAMATION); + MessageBox(0, "Can't open D2gfx.dll in read/write mode.\n" + "If Diablo II is running you can\'t install PlugY, The Survival Kit.\n" + "Quit Diablo II and try again.", + boxNameInstall, MB_OK | MB_ICONEXCLAMATION); exit(0); } - //int version = getVersion(dll); - - int version = GetD2Ver(); + int version = GetD2Version("Game.exe"); - //if (version == UNKNOW) - if (version == -1) + if (version < V109 || version > V113d) { - MessageBox(0,"Bad version of D2gfx.dll.\n" - "You can try to uninstall any previous version of PlugY, The Survival Kit then retry.\n" - "Or re-install a clean version (between 1.09 and 1.12) of LOD.", - boxNameInstall, MB_OK|MB_ICONEXCLAMATION); + MessageBox(0, "Bad version of D2gfx.dll.\n" + "You can try to uninstall any previous version of PlugY, The Survival Kit then retry.\n" + "Or re-install a clean version (between 1.09 and 1.13d) of LOD.", + boxNameInstall, MB_OK | MB_ICONEXCLAMATION); exit(0); } @@ -261,86 +194,89 @@ void Patch() int ident = 0; BYTE buffer[100]; BYTE zeros[100]; - memset(zeros,0,sizeof(zeros)); + memset(zeros, 0, sizeof(zeros)); - fseek(dll,CALL_LOAD[version],SEEK_SET); - fread(buffer,6,1,dll); - if(memcmp(buffer, callOldLoad[version], 6) !=0 ) error = true; - if(memcmp(buffer, callNewLoad[version], 6) ==0 ) ident++; + version -= V109b; - fseek(dll,CALL_FREE[version],SEEK_SET); - fread(buffer,6,1,dll); - if(memcmp(buffer, callOldFree[version], 6) !=0 ) error = true; - if(memcmp(buffer, callNewFree[version], 6) ==0 ) ident++; + fseek(dll, CALL_LOAD[version], SEEK_SET); + fread(buffer, 6, 1, dll); + if (memcmp(buffer, callOldLoad[version], 6) != 0) error = true; + if (memcmp(buffer, callNewLoad[version], 6) == 0) ident++; - fseek(dll,CALLER_LOADPLUGY,SEEK_SET); - fread(buffer,sizeof(caller_LoadPlugY),1,dll); - if(memcmp(buffer, zeros, sizeof(caller_LoadPlugY)) !=0 ) error = true; - if(memcmp(buffer, caller_LoadPlugY, sizeof(caller_LoadPlugY)) ==0 ) ident++; + fseek(dll, CALL_FREE[version], SEEK_SET); + fread(buffer, 6, 1, dll); + if (memcmp(buffer, callOldFree[version], 6) != 0) error = true; + if (memcmp(buffer, callNewFree[version], 6) == 0) ident++; - fseek(dll,CALLER_FREEPLUGY,SEEK_SET); - fread(buffer,sizeof(caller_FreePlugY),1,dll); - if(memcmp(buffer, zeros, sizeof(caller_FreePlugY)) !=0 ) error = true; - if(memcmp(buffer, caller_FreePlugY, sizeof(caller_FreePlugY)) ==0 ) ident++; + fseek(dll, CALLER_LOADPLUGY, SEEK_SET); + fread(buffer, sizeof(caller_LoadPlugY), 1, dll); + if (memcmp(buffer, zeros, sizeof(caller_LoadPlugY)) != 0) error = true; + if (memcmp(buffer, caller_LoadPlugY, sizeof(caller_LoadPlugY)) == 0) ident++; - fseek(dll,S_INIT,SEEK_SET); - fread(buffer,sizeof(sInit),1,dll); - if(memcmp(buffer, zeros, sizeof(sInit)) !=0 ) error = true; - if(memcmp(buffer, sInit, sizeof(sInit)) ==0 ) ident++; + fseek(dll, CALLER_FREEPLUGY, SEEK_SET); + fread(buffer, sizeof(caller_FreePlugY), 1, dll); + if (memcmp(buffer, zeros, sizeof(caller_FreePlugY)) != 0) error = true; + if (memcmp(buffer, caller_FreePlugY, sizeof(caller_FreePlugY)) == 0) ident++; - fseek(dll,S_RELEASE,SEEK_SET); - fread(buffer,sizeof(sRelease),1,dll); - if(memcmp(buffer, zeros, sizeof(sRelease)) !=0 ) error = true; - if(memcmp(buffer, sRelease, sizeof(sRelease)) ==0 ) ident++; + fseek(dll, S_INIT, SEEK_SET); + fread(buffer, sizeof(sInit), 1, dll); + if (memcmp(buffer, zeros, sizeof(sInit)) != 0) error = true; + if (memcmp(buffer, sInit, sizeof(sInit)) == 0) ident++; - fseek(dll,S_DLLNAME,SEEK_SET); - fread(buffer,sizeof(sDllName),1,dll); - if(memcmp(buffer, zeros, sizeof(sDllName)) !=0 ) error = true; - if(memcmp(buffer, sDllName, sizeof(sDllName)) ==0 ) ident++; + fseek(dll, S_RELEASE, SEEK_SET); + fread(buffer, sizeof(sRelease), 1, dll); + if (memcmp(buffer, zeros, sizeof(sRelease)) != 0) error = true; + if (memcmp(buffer, sRelease, sizeof(sRelease)) == 0) ident++; + + fseek(dll, S_DLLNAME, SEEK_SET); + fread(buffer, sizeof(sDllName), 1, dll); + if (memcmp(buffer, zeros, sizeof(sDllName)) != 0) error = true; + if (memcmp(buffer, sDllName, sizeof(sDllName)) == 0) ident++; if (error) { - if (ident==7) + if (ident == 7) { MessageBox(0, "PlugY, The Survival Kit already installed.", - boxNameInstall, MB_OK|MB_ICONASTERISK); + boxNameInstall, MB_OK | MB_ICONASTERISK); exit(0); - } else + } + else { - MessageBox(0,"Bad version of D2gfx.dll.\n" - "You can try to uninstall any previous version of PlugY, The Survival Kit then retry.\n" - "Or re-install a clean version (between 1.09 and 1.11b) of LOD.", - boxNameInstall, MB_OK|MB_ICONEXCLAMATION); + MessageBox(0, "Bad version of D2gfx.dll.\n" + "You can try to uninstall any previous version of PlugY, The Survival Kit then retry.\n" + "Or re-install a clean version (between 1.09 and 1.13d) of LOD.", + boxNameInstall, MB_OK | MB_ICONEXCLAMATION); exit(0); } } - fseek(dll,CALL_LOAD[version],SEEK_SET); + fseek(dll, CALL_LOAD[version], SEEK_SET); fwrite(callNewLoad[version], 6, 1, dll); - fseek(dll,CALL_FREE[version],SEEK_SET); + fseek(dll, CALL_FREE[version], SEEK_SET); fwrite(callNewFree[version], 6, 1, dll); - fseek(dll,CALLER_LOADPLUGY,SEEK_SET); + fseek(dll, CALLER_LOADPLUGY, SEEK_SET); fwrite(caller_LoadPlugY, sizeof(caller_LoadPlugY), 1, dll); - fseek(dll,CALLER_FREEPLUGY,SEEK_SET); + fseek(dll, CALLER_FREEPLUGY, SEEK_SET); fwrite(caller_FreePlugY, sizeof(caller_FreePlugY), 1, dll); - fseek(dll,S_INIT,SEEK_SET); + fseek(dll, S_INIT, SEEK_SET); fwrite(sInit, sizeof(sInit), 1, dll); - fseek(dll,S_RELEASE,SEEK_SET); + fseek(dll, S_RELEASE, SEEK_SET); fwrite(sRelease, sizeof(sRelease), 1, dll); - fseek(dll,S_DLLNAME,SEEK_SET); + fseek(dll, S_DLLNAME, SEEK_SET); fwrite(sDllName, sizeof(sDllName), 1, dll); fclose(dll); - MessageBox(0,"D2gfx.dll patched successfully.\n" - "PlugY, The Survival Kit installed successfully.", - boxNameInstall, MB_OK|MB_ICONASTERISK); + MessageBox(0, "D2gfx.dll patched successfully.\n" + "PlugY, The Survival Kit installed successfully.", + boxNameInstall, MB_OK | MB_ICONASTERISK); exit(0); } @@ -349,37 +285,35 @@ void Patch() void Unpatch() { - if (MessageBox(0,"This programm will modify the D2gfx.dll file of the current directory.\n" - "Before continue, don't forgot to backup D2gfx.dll if you want\n" - "Do you want patch D2gfx.dll for remove the launch of PlugY ?", - boxNameUnInstall, MB_YESNO|MB_ICONQUESTION) == IDNO) + if (MessageBox(0, "This programm will modify the D2gfx.dll file of the current directory.\n" + "Before continue, don't forgot to backup D2gfx.dll if you want\n" + "Do you want patch D2gfx.dll for remove the launch of PlugY ?", + boxNameUnInstall, MB_YESNO | MB_ICONQUESTION) == IDNO) { - MessageBox(0,"D2gfx.dll isn't patched.\n", - boxNameUnInstall, MB_OK|MB_ICONASTERISK); + MessageBox(0, "D2gfx.dll isn't patched.\n", + boxNameUnInstall, MB_OK | MB_ICONASTERISK); exit(0); } - FILE *dll=fopen("d2gfx.dll","rb+"); + FILE *dll; - if(!dll) + if (fopen_s(&dll, "d2gfx.dll", "rb+")) { - MessageBox(0,"Can't open D2gfx.dll in read/write mode.\n" - "If Diablo II is running you can\'t install PlugY, The Survival Kit.\n" - "Quit Diablo and try again.", - boxNameUnInstall, MB_OK|MB_ICONEXCLAMATION); + MessageBox(0, "Can't open D2gfx.dll in read/write mode.\n" + "If Diablo II is running you can\'t install PlugY, The Survival Kit.\n" + "Quit Diablo II and try again.", + boxNameUnInstall, MB_OK | MB_ICONEXCLAMATION); exit(0); } - //int version = getVersion(dll); - int version = GetD2Ver(); + int version = GetD2Version("Game.exe"); - //if (version == UNKNOW) - if (version == -1) + if (version < V109 || version > V113d) { - MessageBox(0,"Bad version of D2gfx.dll.\n" - "You can try to uninstall any previous version of PlugY, The Survival Kit then retry.\n" - "Or re-install a clean version (between 1.09 and 1.12) of LOD.", - boxNameUnInstall, MB_OK|MB_ICONEXCLAMATION); + MessageBox(0, "Bad version of D2gfx.dll.\n" + "You can try to uninstall any previous version of PlugY, The Survival Kit then retry.\n" + "Or re-install a clean version (between 1.09 and 1.13d) of LOD.", + boxNameUnInstall, MB_OK | MB_ICONEXCLAMATION); exit(0); } @@ -389,99 +323,102 @@ void Unpatch() int ident = 0; BYTE buffer[100]; BYTE zeros[100]; - memset(zeros,0,sizeof(zeros)); + memset(zeros, 0, sizeof(zeros)); - fseek(dll,CALL_LOAD[version],SEEK_SET); - fread(buffer,6,1,dll); - if(memcmp(buffer, callNewLoad[version], 6) !=0 ) error = true; - if(memcmp(buffer, callOldLoad[version], 6) ==0 ) ident++; + version -= V109b; - fseek(dll,CALL_FREE[version],SEEK_SET); - fread(buffer,6,1,dll); - if(memcmp(buffer, callNewFree[version], 6) !=0 ) error = true; - if(memcmp(buffer, callOldFree[version], 6) ==0 ) ident++; + fseek(dll, CALL_LOAD[version], SEEK_SET); + fread(buffer, 6, 1, dll); + if (memcmp(buffer, callNewLoad[version], 6) != 0) error = true; + if (memcmp(buffer, callOldLoad[version], 6) == 0) ident++; - fseek(dll,CALLER_LOADPLUGY,SEEK_SET); - fread(buffer,sizeof(caller_LoadPlugY),1,dll); - if(memcmp(buffer, caller_LoadPlugY, sizeof(caller_LoadPlugY)) !=0 ) error = true; - if(memcmp(buffer, zeros, sizeof(caller_LoadPlugY)) ==0 ) ident++; + fseek(dll, CALL_FREE[version], SEEK_SET); + fread(buffer, 6, 1, dll); + if (memcmp(buffer, callNewFree[version], 6) != 0) error = true; + if (memcmp(buffer, callOldFree[version], 6) == 0) ident++; - fseek(dll,CALLER_FREEPLUGY,SEEK_SET); - fread(buffer,sizeof(caller_FreePlugY),1,dll); - if(memcmp(buffer, caller_FreePlugY, sizeof(caller_FreePlugY)) !=0 ) error = true; - if(memcmp(buffer, zeros, sizeof(caller_FreePlugY)) ==0 ) ident++; + fseek(dll, CALLER_LOADPLUGY, SEEK_SET); + fread(buffer, sizeof(caller_LoadPlugY), 1, dll); + if (memcmp(buffer, caller_LoadPlugY, sizeof(caller_LoadPlugY)) != 0) error = true; + if (memcmp(buffer, zeros, sizeof(caller_LoadPlugY)) == 0) ident++; - fseek(dll,S_INIT,SEEK_SET); - fread(buffer,sizeof(sInit),1,dll); - if(memcmp(buffer, sInit, sizeof(sInit)) !=0 ) error = true; - if(memcmp(buffer, zeros, sizeof(sInit)) ==0 ) ident++; + fseek(dll, CALLER_FREEPLUGY, SEEK_SET); + fread(buffer, sizeof(caller_FreePlugY), 1, dll); + if (memcmp(buffer, caller_FreePlugY, sizeof(caller_FreePlugY)) != 0) error = true; + if (memcmp(buffer, zeros, sizeof(caller_FreePlugY)) == 0) ident++; - fseek(dll,S_RELEASE,SEEK_SET); - fread(buffer,sizeof(sRelease),1,dll); - if(memcmp(buffer, sRelease, sizeof(sRelease)) !=0 ) error = true; - if(memcmp(buffer, zeros, sizeof(sRelease)) ==0 ) ident++; + fseek(dll, S_INIT, SEEK_SET); + fread(buffer, sizeof(sInit), 1, dll); + if (memcmp(buffer, sInit, sizeof(sInit)) != 0) error = true; + if (memcmp(buffer, zeros, sizeof(sInit)) == 0) ident++; - fseek(dll,S_DLLNAME,SEEK_SET); - fread(buffer,sizeof(sDllName),1,dll); - if(memcmp(buffer, sDllName, sizeof(sDllName)) !=0 ) error = true; - if(memcmp(buffer, zeros, sizeof(sDllName)) ==0 ) ident++; + fseek(dll, S_RELEASE, SEEK_SET); + fread(buffer, sizeof(sRelease), 1, dll); + if (memcmp(buffer, sRelease, sizeof(sRelease)) != 0) error = true; + if (memcmp(buffer, zeros, sizeof(sRelease)) == 0) ident++; + + fseek(dll, S_DLLNAME, SEEK_SET); + fread(buffer, sizeof(sDllName), 1, dll); + if (memcmp(buffer, sDllName, sizeof(sDllName)) != 0) error = true; + if (memcmp(buffer, zeros, sizeof(sDllName)) == 0) ident++; if (error) { - if (ident==7) + if (ident == 7) { - MessageBox(0,"PlugY, The Survival Kit already uninstalled.", - boxNameUnInstall, MB_OK|MB_ICONASTERISK); + MessageBox(0, "PlugY, The Survival Kit already uninstalled.", + boxNameUnInstall, MB_OK | MB_ICONASTERISK); exit(0); - } else { - MessageBox(0,"Bad version of D2gfx.dll.\n" - "Unable to uninstall PlugY, The Survival Kit.", - boxNameUnInstall, MB_OK|MB_ICONEXCLAMATION); + } + else + { + MessageBox(0, "Bad version of D2gfx.dll.\n" + "Unable to uninstall PlugY, The Survival Kit.", + boxNameUnInstall, MB_OK | MB_ICONEXCLAMATION); exit(0); } } - fseek(dll,CALL_LOAD[version],SEEK_SET); + fseek(dll, CALL_LOAD[version], SEEK_SET); fwrite(callOldLoad[version], 6, 1, dll); - fseek(dll,CALL_FREE[version],SEEK_SET); + fseek(dll, CALL_FREE[version], SEEK_SET); fwrite(callOldFree[version], 6, 1, dll); - fseek(dll,CALLER_LOADPLUGY,SEEK_SET); + fseek(dll, CALLER_LOADPLUGY, SEEK_SET); fwrite(zeros, sizeof(caller_LoadPlugY), 1, dll); - fseek(dll,CALLER_FREEPLUGY,SEEK_SET); + fseek(dll, CALLER_FREEPLUGY, SEEK_SET); fwrite(zeros, sizeof(caller_FreePlugY), 1, dll); - fseek(dll,S_INIT,SEEK_SET); + fseek(dll, S_INIT, SEEK_SET); fwrite(zeros, sizeof(sInit), 1, dll); - fseek(dll,S_RELEASE,SEEK_SET); + fseek(dll, S_RELEASE, SEEK_SET); fwrite(zeros, sizeof(sRelease), 1, dll); - fseek(dll,S_DLLNAME,SEEK_SET); + fseek(dll, S_DLLNAME, SEEK_SET); fwrite(zeros, sizeof(sDllName), 1, dll); fclose(dll); - MessageBox(0,"D2gfx.dll patched successfully.\n" - "PlugY, The Survival Kit uninstalled successfully.", - boxNameUnInstall, MB_OK|MB_ICONASTERISK); + MessageBox(0, "D2gfx.dll patched successfully.\n" + "PlugY, The Survival Kit uninstalled successfully.", + boxNameUnInstall, MB_OK | MB_ICONASTERISK); exit(0); } int main(int argc, char * argv[]) { -// if ((argc>1) && !strcmp(argv[1],"-u")) + // if ((argc>1) && !strcmp(argv[1],"-u")) #ifdef RESTORE Unpatch(); #else - if ((argc>1) && !strcmp(argv[1],"-u")) + if ((argc>1) && !strcmp(argv[1], "-u")) Unpatch(); else Patch(); #endif + + return 1; } - - -/*================================= END OF FILE =================================*/ \ No newline at end of file diff --git a/PlugYInstall/PlugYInstall.h b/PlugYInstall/PlugYInstall.h new file mode 100644 index 0000000..e60f2eb --- /dev/null +++ b/PlugYInstall/PlugYInstall.h @@ -0,0 +1,3 @@ +#pragma once + +#include "resource.h" diff --git a/PlugYInstall/PlugYInstall.ico b/PlugYInstall/PlugYInstall.ico new file mode 100644 index 0000000..d551aa3 Binary files /dev/null and b/PlugYInstall/PlugYInstall.ico differ diff --git a/PlugYInstall/PlugYInstall.rc b/PlugYInstall/PlugYInstall.rc index b62a53f..68f4efd 100644 --- a/PlugYInstall/PlugYInstall.rc +++ b/PlugYInstall/PlugYInstall.rc @@ -1,63 +1,26 @@ -// Microsoft Visual C++ generated resource script. +//Script de ressources gnr par Microsoft Visual C++. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // -// Generated from the TEXTINCLUDE 2 resource. +// Gnr partir de la ressource TEXTINCLUDE 2. // -#include "afxres.h" - +#ifndef APSTUDIO_INVOKED +#include "targetver.h" +#endif +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - ///////////////////////////////////////////////////////////////////////////// // French (France) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA) -#ifdef _WIN32 LANGUAGE LANG_FRENCH, SUBLANG_FRENCH -#pragma code_page(1252) -#endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// // @@ -67,13 +30,13 @@ LANGUAGE LANG_FRENCH, SUBLANG_FRENCH VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,5,0 PRODUCTVERSION 1,0,5,0 - FILEFLAGSMASK 0x17L + FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif - FILEOS 0x4L + FILEOS 0x40004L FILETYPE 0x1L FILESUBTYPE 0x0L BEGIN @@ -81,10 +44,13 @@ BEGIN BEGIN BLOCK "040c04b0" BEGIN - VALUE "FileVersion", "1.05" - VALUE "OriginalFilename", "PlugY_Install.exe" - VALUE "ProductName", "PlugY Installation" - VALUE "ProductVersion", "1.05" + VALUE "CompanyName", "Yohann Nicolas" + VALUE "FileDescription", "PlugY patcher" + VALUE "FileVersion", "1.0.5.0" + VALUE "LegalCopyright", "Copyright (C) 2017" + VALUE "OriginalFilename", "PlugYInstall.exe" + VALUE "ProductName", "PlugY, The Survival Kit" + VALUE "ProductVersion", "11.01" END END BLOCK "VarFileInfo" @@ -94,17 +60,4 @@ BEGIN END #endif // French (France) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - +///////////////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/PlugYInstall/PlugYInstall.sln b/PlugYInstall/PlugYInstall.sln index 46222c0..aaeb36f 100644 --- a/PlugYInstall/PlugYInstall.sln +++ b/PlugYInstall/PlugYInstall.sln @@ -1,6 +1,7 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PlugYInstall", "PlugYInstall.vcproj", "{F7666190-876A-4D43-BA04-82F8F3F986DC}" + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PlugYInstall", "PlugYInstall.vcproj", "{66A1FF3D-F0DC-4D2D-BDB9-1A853A20C42D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -9,12 +10,12 @@ Global Restore|Win32 = Restore|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F7666190-876A-4D43-BA04-82F8F3F986DC}.Debug|Win32.ActiveCfg = Release|Win32 - {F7666190-876A-4D43-BA04-82F8F3F986DC}.Debug|Win32.Build.0 = Release|Win32 - {F7666190-876A-4D43-BA04-82F8F3F986DC}.Release|Win32.ActiveCfg = Release|Win32 - {F7666190-876A-4D43-BA04-82F8F3F986DC}.Release|Win32.Build.0 = Release|Win32 - {F7666190-876A-4D43-BA04-82F8F3F986DC}.Restore|Win32.ActiveCfg = Restore|Win32 - {F7666190-876A-4D43-BA04-82F8F3F986DC}.Restore|Win32.Build.0 = Restore|Win32 + {66A1FF3D-F0DC-4D2D-BDB9-1A853A20C42D}.Debug|Win32.ActiveCfg = Debug|Win32 + {66A1FF3D-F0DC-4D2D-BDB9-1A853A20C42D}.Debug|Win32.Build.0 = Debug|Win32 + {66A1FF3D-F0DC-4D2D-BDB9-1A853A20C42D}.Release|Win32.ActiveCfg = Release|Win32 + {66A1FF3D-F0DC-4D2D-BDB9-1A853A20C42D}.Release|Win32.Build.0 = Release|Win32 + {66A1FF3D-F0DC-4D2D-BDB9-1A853A20C42D}.Restore|Win32.ActiveCfg = Restore|Win32 + {66A1FF3D-F0DC-4D2D-BDB9-1A853A20C42D}.Restore|Win32.Build.0 = Restore|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/PlugYInstall/PlugYInstall.suo b/PlugYInstall/PlugYInstall.suo index 1c9f7b7..a5f1a4a 100644 Binary files a/PlugYInstall/PlugYInstall.suo and b/PlugYInstall/PlugYInstall.suo differ diff --git a/PlugYInstall/PlugYInstall.vcproj b/PlugYInstall/PlugYInstall.vcproj index b5749fc..249dbec 100644 --- a/PlugYInstall/PlugYInstall.vcproj +++ b/PlugYInstall/PlugYInstall.vcproj @@ -1,11 +1,12 @@ - - - @@ -262,11 +243,12 @@ + + + + diff --git a/PlugYInstall/PlugYInstall.vcproj.ATHLON64.Yohann.user b/PlugYInstall/PlugYInstall.vcproj.ATHLON64.Yohann.user deleted file mode 100644 index 5cbdb0a..0000000 --- a/PlugYInstall/PlugYInstall.vcproj.ATHLON64.Yohann.user +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - diff --git a/PlugYInstall/resource.h b/PlugYInstall/resource.h index 1c031f4..3169bbf 100644 --- a/PlugYInstall/resource.h +++ b/PlugYInstall/resource.h @@ -1,14 +1,25 @@ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by PlugYInstall.rc +// -// Next default values for new objects -// +#define IDS_APP_TITLE 103 + +#define IDM_EXIT 105 +#define IDI_PLUGYINSTALL 107 +#define IDC_PLUGYINSTALL 109 +#ifndef IDC_STATIC +#define IDC_STATIC -1 +#endif +// Valeurs par dfaut suivantes des nouveaux objets +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 101 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 + +#define _APS_NO_MFC 130 +#define _APS_NEXT_RESOURCE_VALUE 129 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 110 #endif #endif diff --git a/PlugYInstall/targetver.h b/PlugYInstall/targetver.h new file mode 100644 index 0000000..e5b6cb5 --- /dev/null +++ b/PlugYInstall/targetver.h @@ -0,0 +1,24 @@ +#pragma once + +// Les macros suivantes dfinissent la plateforme minimale requise. La plateforme minimale requise +// est la version de Windows, Internet Explorer etc. qui dispose des fonctionnalits ncessaires pour excuter +// votre application. Les macros fonctionnent en activant toutes les fonctionnalits disponibles sur les versions de la plateforme jusqu' la +// version spcifie. + +// Modifiez les dfinitions suivantes si vous devez cibler une plateforme avant celles spcifies ci-dessous. +// Reportez-vous MSDN pour obtenir les dernires informations sur les valeurs correspondantes pour les diffrentes plateformes. +#ifndef WINVER // Spcifie que la plateforme minimale requise est Windows Vista. +#define WINVER 0x0600 // Attribuez la valeur approprie cet lment pour cibler d'autres versions de Windows. +#endif + +#ifndef _WIN32_WINNT // Spcifie que la plateforme minimale requise est Windows Vista. +#define _WIN32_WINNT 0x0600 // Attribuez la valeur approprie cet lment pour cibler d'autres versions de Windows. +#endif + +#ifndef _WIN32_WINDOWS // Spcifie que la plateforme minimale requise est Windows98. +#define _WIN32_WINDOWS 0x0410 // Attribuez la valeur approprie cet lment pour cibler WindowsMe ou version ultrieure. +#endif + +#ifndef _WIN32_IE // Spcifie que la plateforme minimale requise est Internet Explorer 7.0. +#define _WIN32_IE 0x0700 // Attribuez la valeur approprie cet lment pour cibler d'autres versions d'Internet Explorer. +#endif diff --git a/PlugYInstaller/PlugY.ini b/PlugYInstaller/PlugY.ini index 4268f34..26f1421 100644 --- a/PlugYInstaller/PlugY.ini +++ b/PlugYInstaller/PlugY.ini @@ -5,7 +5,7 @@ ; ; ; by Yohann Nicolas ; ; ; -; version 10.00 ; +; version 11.01 ; ; ; ;--------------------------------------------------------------------------------------; @@ -28,6 +28,19 @@ ActiveCommands=1 ActiveCheckMemory=1 +[WINDOWED] +ActiveWindowed=0 +RemoveBorder=1 +WindowOnTop=0 +Maximized=0 +SetWindowPos=0 +X=0 +Y=0 +Width=0 +Height=0 +LockMouseOnStartup=1 + + [LANGUAGE] ;ENG|ESP|DEU|FRA|POR|ITA|JPN|KOR|SIN|CHI|POL|RUS ActiveChangeLanguage=0 @@ -58,6 +71,7 @@ MaxPersonnalPages=0 ActiveSharedStash=1 SeparateHardcoreStash=1 +OpenSharedStashOnLoading=0 displaySharedSetItemNameInGreen=1 MaxSharedPages=0 ActiveSharedGold=1 diff --git a/PlugYInstaller/PlugY.nsi b/PlugYInstaller/PlugY.nsi index 7fa7cfd..90c0274 100644 --- a/PlugYInstaller/PlugY.nsi +++ b/PlugYInstaller/PlugY.nsi @@ -2,7 +2,7 @@ ; Modified by L'Autour. !include "MUI2.nsh" -!define VERSION "11.00" +!define VERSION "11.01" !define D2FILES "." !define NAME "PlugY, The Survival Kit" !define MOD_DIR "Mod PlugY" @@ -12,14 +12,14 @@ !define MUI_COMPONENTSPAGE_SMALLDESC !define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_BITMAP "PlugYInstallerHeader.bmp" - -;!define MUI_LANGDLL_REGISTRY_ROOT "HKLM" -;!define MUI_LANGDLL_REGISTRY_KEY "SOFTWARE\${NAME}" -;!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language" +!define MUI_LANGDLL_REGISTRY_ROOT HKLM +!define MUI_LANGDLL_REGISTRY_KEY "SOFTWARE\${NAME}" +!define MUI_LANGDLL_REGISTRY_VALUENAME "Install Language" !define MUI_FINISHPAGE_NOAUTOCLOSE !define MUI_UNFINISHPAGE_NOAUTOCLOSE !define MUI_FINISHPAGE_SHOWREADME "$(README_FILENAME)" -!define MUI_FINISHPAGE_RUN "PlugY.exe" +!define MUI_FINISHPAGE_RUN ;"PlugY.exe" +!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchPlugY" !define MUI_FINISHPAGE_RUN_NOTCHECKED !define MUI_FINISHPAGE_NOREBOOTSUPPORT !define MUI_ABORTWARNING @@ -27,7 +27,7 @@ Name "${NAME} v${VERSION}" OutFile "PlugY_The_Survival_Kit_v${VERSION}.exe" -InstallDirRegKey HKCU "${REGKEY}" "InstallPath" +InstallDirRegKey HKLM "${REGKEY}" "InstallPath" ;-------------------------------- ; Pages @@ -88,14 +88,12 @@ LangString ERROR_NO_D2_DIRECTORY_FOUND ${LANG_ENGLISH} "Error : Diablo II instal LangString ERROR_NO_D2_DIRECTORY_FOUND ${LANG_FRENCH} "Erreur : Le rpertoire d'installation de Diablo II n'a pas t trouv.$\nVeuillez r-installer votre copie de Diablo II - Lord of Destruction." LangString ERROR_NO_D2_DIRECTORY_FOUND ${LANG_RUSSIAN} " : Diablo II .$\n Diablo II - Lord of Destruction." -;!insertmacro MUI_RESERVEFILE_LANGDLL - Var D2Path ;-------------------------------- ; Initialisation Function .onInit !define MUI_LANGDLL_WINDOWTITLE "${NAME} v${VERSION}" - !define MUI_LANGDLL_INFO "Select your language:$\nChoisissez votre langue:$\n :" + !define MUI_LANGDLL_INFO "Select your language:$\nChoisissez votre langue:" !insertmacro MUI_LANGDLL_DISPLAY !undef MUI_LANGDLL_WINDOWTITLE !undef MUI_LANGDLL_INFO @@ -125,6 +123,11 @@ Function Un.onInit ReadRegStr $D2Path HKLM "${REGKEY}" "PlugYDllPath" FunctionEnd +Function LaunchPlugY + SetOutPath "$INSTDIR" + ExecShell "" "$INSTDIR\PlugY.exe" +FunctionEnd + ;-------------------------------- ; Custom Page ;Function OptionsPage @@ -170,12 +173,11 @@ Section "!$(SECTION_NAME_CORE)" Core File "${D2FILES}\PlugY_The_Survival_Kit_-_Readme.txt" File "${D2FILES}\PlugY_The_Survival_Kit_-_LisezMoi.txt" File "${D2FILES}\PlugY_The_Survival_Kit_-_Liesmich.txt" - ;File "${D2FILES}\PlugY_The_Survival_Kit_-_.txt" - CreateDirectory "$D2Path\PlugY" setOutPath "$D2Path\PlugY" File "${D2FILES}\PlugY\EmptyPage.dc6" File "${D2FILES}\PlugY\PlugYDefault.ini" File "${D2FILES}\PlugY\PlugYFixed.ini" + File "${D2FILES}\PlugY\LocalizedStrings.ini" File "${D2FILES}\PlugY\SharedGoldBtns.dc6" File "${D2FILES}\PlugY\StashBtns.dc6" File "${D2FILES}\PlugY\StatsBackground.dc6" @@ -183,8 +185,6 @@ Section "!$(SECTION_NAME_CORE)" Core File "${D2FILES}\PlugY\TradeStash.dc6" File "${D2FILES}\PlugY\UnassignSkillsBtns.dc6" File "${D2FILES}\PlugY\UnassignStatsBtns.dc6" - File "${D2FILES}\PlugY\PlugYLocal.dll" - File "${D2FILES}\PlugY\PlugYLocal.ini" SectionEnd Section "$(SECTION_NAME_DESKTOP_SHORTCUT)" DesktopShortcuts @@ -209,13 +209,13 @@ Section $(SECTION_NAME_UNINSTALLER) Uninstaller WriteUninstaller "${UNINSTALL_FILE}" ; Write the installation path into the registry - WriteRegStr HKLM "${REGKEY}" "InstallPath" "$INSTDIR" + WriteRegStr HKLM "${REGKEY}" "InstallPath" $INSTDIR WriteRegStr HKLM "${REGKEY}" "PlugYDllPath" "$D2Path" ; Write the uninstall keys for Windows WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "InstallLocation" "$$INSTDIR" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "DisplayName" "${NAME}" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "HelpLink" "http://djaftal.chez-alice.fr/" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "HelpLink" "http://plugy.free.fr" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "DisplayVersion" "${VERSION}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "UninstallString" '"$INSTDIR\${UNINSTALL_FILE}"' WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" "NoModify" 1 @@ -246,24 +246,23 @@ Section "Uninstall" Uninstall Delete "$D2Path\RestoreD2gfxDll.exe" Delete "$INSTDIR\PlugY.exe" Delete "$INSTDIR\PlugY.log" + Delete "$INSTDIR\BnetLog.txt" Delete "$INSTDIR\PlugY.ini" Delete "$INSTDIR\PlugY_The_Survival_Kit_-_Readme.txt" Delete "$INSTDIR\PlugY_The_Survival_Kit_-_LisezMoi.txt" Delete "$INSTDIR\PlugY_The_Survival_Kit_-_Liesmich.txt" - ;Delete "$INSTDIR\PlugY_The_Survival_Kit_-_.txt" - Delete "$INSTDIR\PlugY\EmptyPage.dc6" - Delete "$INSTDIR\PlugY\PlugYDefault.ini" - Delete "$INSTDIR\PlugY\PlugYFixed.ini" - Delete "$INSTDIR\PlugY\SharedGoldBtns.dc6" - Delete "$INSTDIR\PlugY\StashBtns.dc6" - Delete "$INSTDIR\PlugY\StatsBackground.dc6" - Delete "$INSTDIR\PlugY\statsinterface.txt" - Delete "$INSTDIR\PlugY\TradeStash.dc6" - Delete "$INSTDIR\PlugY\UnassignSkillsBtns.dc6" - Delete "$INSTDIR\PlugY\UnassignStatsBtns.dc6" - Delete "$INSTDIR\PlugY\PlugYLocal.dll" - Delete "$INSTDIR\PlugY\PlugYLocal.ini" - RMDir "$INSTDIR\PlugY" + Delete "$D2Path\PlugY\EmptyPage.dc6" + Delete "$D2Path\PlugY\PlugYDefault.ini" + Delete "$D2Path\PlugY\PlugYFixed.ini" + Delete "$D2Path\PlugY\LocalizedStrings.ini" + Delete "$D2Path\PlugY\SharedGoldBtns.dc6" + Delete "$D2Path\PlugY\StashBtns.dc6" + Delete "$D2Path\PlugY\StatsBackground.dc6" + Delete "$D2Path\PlugY\statsinterface.txt" + Delete "$D2Path\PlugY\TradeStash.dc6" + Delete "$D2Path\PlugY\UnassignSkillsBtns.dc6" + Delete "$D2Path\PlugY\UnassignStatsBtns.dc6" + RMDir "$D2Path\PlugY" Delete "$INSTDIR\${UNINSTALL_FILE}" RMDir "$INSTDIR" SectionEnd diff --git a/PlugYInstaller/PlugY/LocalizedStrings.ini b/PlugYInstaller/PlugY/LocalizedStrings.ini new file mode 100644 index 0000000..86afc7d Binary files /dev/null and b/PlugYInstaller/PlugY/LocalizedStrings.ini differ diff --git a/PlugYInstaller/PlugY/PlugYDefault.ini b/PlugYInstaller/PlugY/PlugYDefault.ini index c0a7bde..ba4691c 100644 --- a/PlugYInstaller/PlugY/PlugYDefault.ini +++ b/PlugYInstaller/PlugY/PlugYDefault.ini @@ -2,10 +2,11 @@ ; ; ; "PlugY, The Survival Kit" ; ; Configuration file ; +; Default ; ; ; ; by Yohann Nicolas ; ; ; -; version 10.00 ; +; version 11.01 ; ; ; ;--------------------------------------------------------------------------------------; @@ -25,6 +26,19 @@ ActiveCheckMemory=1 ActiveAllOthersFeatures=0 +[WINDOWED] +ActiveWindowed=0 +RemoveBorder=0 +WindowOnTop=0 +Maximized=0 +SetWindowPos=0 +X=0 +Y=0 +Width=0 +Height=0 +LockMouseOnStartup=0 + + [LANGUAGE] ;ENG|ESP|DEU|FRA|POR|ITA|JPN|KOR|SIN|CHI|POL|RUS ActiveChangeLanguage=0 @@ -59,8 +73,9 @@ MaxPersonnalPages=0 ActiveSharedStash=0 SeparateHardcoreStash=1 -displaySharedSetItemNameInGreen=1 +OpenSharedStashOnLoading=0 SharedStashFilename=SharedStashSave +displaySharedSetItemNameInGreen=1 MaxSharedPages=0 ActiveSharedGold=1 diff --git a/PlugYInstaller/PlugY/PlugYFixed.ini b/PlugYInstaller/PlugY/PlugYFixed.ini index dcd6fe5..189a5fe 100644 --- a/PlugYInstaller/PlugY/PlugYFixed.ini +++ b/PlugYInstaller/PlugY/PlugYFixed.ini @@ -6,7 +6,7 @@ ; ; ; by Yohann Nicolas ; ; ; -; version 10.00 ; +; version 11.01 ; ; ; ;--------------------------------------------------------------------------------------; @@ -16,6 +16,8 @@ [GENERAL] +[WINDOWED] + [LANGUAGE] [SAVEPATH] diff --git a/PlugYInstaller/PlugY/PlugYLocal.ini b/PlugYInstaller/PlugY/PlugYLocal.ini deleted file mode 100644 index 422d385..0000000 --- a/PlugYInstaller/PlugY/PlugYLocal.ini +++ /dev/null @@ -1,1659 +0,0 @@ -;UTF8 -;Sorry for https:;translate.google.com -;In the absence of the text at localization, the text for the English version is used. - -[STR_STATS_UNASSIGN_WITH_LIMIT] -ENG="+Alt: Unassign, +Shift: by %d points" -ESP="+Alt: Désallocation, +Shift: par %d points" -DEU="+Alt: Zurücksetzen, +Shift: um %d Punkte" -FRA="+Alt: Rimuovi, +Shift: Assegna %d punti" -POR="+Alt: Quita, +Shift: por %d puntos" -ITA="+Alt: Odejmij, +Shift: %d punktów" -JPN="+Alt: 取消加点, +Shift: %d 点数" -KOR="+Alt: 할당, +Shift: %d 포인트로" -SIN= -CHI="+Alt: 分配, +Shift: %d 分" -POL="+Alt: Przypisywanie, +Shift: o %d punkty" -RUS="+Alt: Вычесть, +Shift: по %d очка" - -[STR_STATS_UNASSIGN_WITHOUT_LIMIT] -ENG="+Alt: Unassign, +Shift: all remaining points" -ESP="+Alt: Désallocation, +Shift: Tous les points restants" -DEU="+Alt: Zurücksetzen, +Shift: Alle verbleibenden Punkte" -FRA="+Alt: Rimuovi, +Shift: Assegna tutti i punti rimanenti" -POR="+Alt: Quita, +Shift: Todos los puntos restantes" -ITA="+Alt: Odejmij, +Shift: wszystkie pozostale punkty" -JPN="+Alt: 取消加点, +Shift: 所有剩" -KOR="+Alt: 할당, +Shift: 남아있는 모든 포인트를" -SIN= -CHI="+Alt:分配, + Shift: 所有剩余点" -POL="+Alt: Przypisywanie, +Shift: wszystkie pozostałe punkty" -RUS="+Alt: Вычесть, +Shift: все оставшиеся очки" - -[STR_STATS_BASE_MIN] -ENG="Base: %d (Min: %d)" -ESP="Base: %d (Min: %d)" -DEU="Basiswert: %d (Min: %d)" -FRA="Base: %d (Min: %d)" -POR="Base: %d (Min: %d)" -ITA="Bazowo: %d (Minimum: %d)" -JPN="基础: %d (最小: %d)" -KOR="기본: %d (최소: %d)" -SIN= -CHI="基地: %d (最小: %d)" -POL="Podstawowe %d Min.: %d)" -RUS="Базовое: %d (Мин.: %d)" - -[STR_SKILLS_UNASSIGN] -ENG="Un-allocate all skills points" -ESP="Désalloue tous les points d'aptitudes" -DEU="Alle Fertigkeitspunkte zurücksetzen" -FRA="Rimuovi tutte le abilità" -POR="Quita todos los puntos de habilidades" -ITA="Rozdaj od nowa wszystkie punkty umiejetnosci" -JPN="取消所有技能加点" -KOR="모든 스킬 포인트를 해제 할당" -SIN= -CHI="取消分配所有技能點" -POL="Un przydzielić wszystkie punkty umiejętności" -RUS="Сбросить все навыки" - -[STR_STASH_PREVIOUS_PAGE] -ENG="Previous Page (+Shift: First Page)" -ESP="Page précédente (+Shift: Première page)" -DEU="Vorherige Seite (+Shift: Erste Seite)" -FRA="Pagina Precedente (+Shift: Prima Pagina)" -POR="Pagina anterior (+Shift: Primera Pagina)" -ITA="Poprzednia Strona (+Shift: Pierwsza Strona)" -JPN="上一页 (+Shift: 首页)" -KOR="이전 페이지 (+Shift: 첫 페이지)" -SIN= -CHI="上一頁 (+Shift: 第一頁)" -POL="Poprzednia strona (+Shift: pierwsza strona)" -RUS="Предыдущая страница (+Shift: первая страница)" - -[STR_STASH_NEXT_PAGE] -ENG="Next Page (+Shift: Last not empty Page)" -ESP="Page suivante (+Shift: Dernière page non vide)" -DEU="Nächste Seite (+Shift: Letzte nicht leere Seite )" -FRA="Pagina Successiva (+Shift: Ultima Pagina non vuota)" -POR="Pagina Siguiente (+Shift: Ultima pagina non vacia)" -ITA="Nastepna Strona (+Shift: Ostatnia nie pusta Strona)" -JPN="下一页 (+Shift: 最后非空页)" -KOR="다음 페이지 (+Shift: 마지막 비어 있지 않은 페이지)" -SIN= -CHI="下一頁 (+Shift: 最後非空頁)" -POL="Następna strona (+Shift: Ostatnio nie pusta strona)" -RUS="Последняя страница (+Shift: последняя непустая страница)" - -[STR_TOGGLE_TO_PERSONAL] -ENG="Toggle to Personal Stash" -ESP="Voir coffre personnel" -DEU="Wechselt zum persönlichen Goldschatz" -FRA="Vai all'Inventario Personale" -POR="Ver el cofre personal" -ITA="Przejdz do Skrzyni Osobistej" -JPN="切换到个人储物箱" -KOR="개인 은닉로 전환" -SIN= -CHI="切換到個人藏匿處" -POL="Przełącz do osobistego pierś" -RUS="Переключить на личный сундук" - -[STR_TOGGLE_TO_SHARED] -ENG="Toggle to Shared Stash" -ESP="Voir coffre partagé" -DEU="Wechselt zum gemeinsamen Goldschatz" -FRA="Vai all'Inventario Condiviso" -POR="Ver el cofre compartido" -ITA="Przejdz do Skrzyni Wspólnej" -JPN="切换到共享储物箱" -KOR="공유 은닉로 전환" -SIN= -CHI="切換到共享藏匿處" -POL="Przełącz się na wspólnym pierś" -RUS="Переключить на общий сундук" - -[STR_STASH_PREVIOUS_INDEX] -ENG="Previous Index : by %d Pages (+Shift: %d)" -ESP="Index précédent : par %d pages (+shift: %d)" -DEU="Vorheriger Index: in %d Seiten (+shift: %d)" -FRA="Schermata Precedente : Indietro di %d Pagine (+Shift: %d)" -POR="Indice anterior : por %d paginas (+shift: %d)" -ITA="Poprzednia Strona : po %d Stron (+Shift: %d)" -JPN="向前索引 : %d 页 (+Shift: %d)" -KOR="이전 색인 : %d 페이지로 (+Shift: %d)" -SIN= -CHI="上一頁目錄 : %d 個頁面 (+Shift: %d)" -POL="Poprzednie Index : przez %d Pages (+Shift: %d)" -RUS="Переход назад на %d страниц (+Shift: %d)" - -[STR_STASH_NEXT_INDEX] -ENG="Next Index : by %d Pages (+shift: %d)" -ESP="Index suivant : par %d pages (+shift: %d)" -DEU="Nächster Index: in %d Seiten (+shift: %d)" -FRA="Schermata Successiva : Avanti di %d Pagine (+shift: %d)" -POR="Indice siguiente : por %d paginas (+shift: %d)" -ITA="Nastepna Strona : po %d Stron (+shift: %d)" -JPN="向后索引 : %d 页 (+shift: %d)" -KOR="다음 인덱스 : %d 페이지로 (+shift: %d)" -SIN= -CHI="下一頁索引 : %d 個頁面 (+shift: %d)" -POL="Następny Index : przez d% Strony (+shift: %d)" -RUS="Переход вперед : на %d страниц (+shift: %d)" - -[STR_PUT_GOLD] -ENG="Put Gold" -ESP="Poser de l'Or" -DEU="Gib Gold" -FRA="Immetti Oro" -POR="Poner oro" -ITA="Zdeponuj Zloto" -JPN="放入金币" -KOR="골드 넣어" -SIN= -CHI="金放" -POL="Put złoto" -RUS="Добавить золото" - -[STR_TAKE_GOLD] -ENG="Take Gold" -ESP="Prendre de l'Or" -DEU="Nehme Gold" -FRA="Ritira Oro" -POR="Tomar oro" -ITA="Wyplac zloto" -JPN="取出金币" -KOR="금을" -SIN= -CHI="拿到金牌" -POL="Weź złoto" -RUS="Забрать золото" - -[STR_PERSONAL_PAGE_NUMBER] -ENG="Personal Page n°%u" -ESP="Page perso n°%u" -DEU="Persönliche Seite n°%u" -FRA="Pagina Personale n°%u" -POR="Pagina personal n°%u" -ITA="Strona Osobista n°%u" -JPN="个人储物箱 n°%u" -KOR="개인 페이지 n°%u" -SIN= -CHI="個人主頁 n°%u" -POL="Strona osobista n°%u" -RUS="Личная страница n°%u" - -[STR_SHARED_PAGE_NUMBER] -ENG="Shared Page n°%u" -ESP="Page partagée n°%u" -DEU="Gemeinsame Seite n°%u" -FRA="Pagina Condivisa n°%u" -POR="Pagina personal n°%u" -ITA="Strona Wspólna n°%u" -JPN="共享储物箱 n°%u" -KOR="공유 페이지 n°%u" -SIN= -CHI="共享頁 n°%u" -POL="Wspólna strona n°%u" -RUS="Общая страница N°%u" - -[STR_NO_SELECTED_PAGE] -ENG="No selected page" -ESP="Aucune page sélectionnée" -DEU="Keine ausgewählte Seite" -FRA="Nessuna pagina selezionata" -POR="Ninguna pagina seleccionada" -ITA="Nie zaznaczono strony" -JPN="未使用页" -KOR="없음 선택한 페이지가 없습니다" -SIN= -CHI="沒有選擇的頁" -POL="Nie wybrano stronę" -RUS="Нет указанной страницы" - -[STR_SHARED_GOLD_QUANTITY] -ENG="Shared Gold : %u" -ESP="Or partagé : %u" -DEU="Gemeinsamen Gold : %u" -FRA="Oro Condiviso : %u" -POR="Oro compartido : %u" -ITA="Wspólne Zloto : %u" -JPN="共享金币 : %u" -KOR="공유 골드 : %u" -SIN= -CHI="共享金 : %u" -POL="Wspólna Złoto : %u" -RUS="Общее золото : %u" - -[STR_PREVIOUS_PAGE] -ENG="Previous Page" -ESP="Page précédente" -DEU="Vorherige Seite" -FRA="Pagina Precedente" -POR="Pagina anterior" -ITA="Poprzednia Strona" -JPN="上一页" -KOR="이전 페이지" -SIN= -CHI="上一頁" -POL="Poprzednia strona" -RUS="Предыдущая страница" - -[STR_NEXT_PAGE] -ENG="Next Page" -ESP="Page suivante" -DEU="Nächste Seite" -FRA="Pagina Successiva" -POR="Pagina siguiente" -ITA="Nastepna Strona" -JPN="下一页" -KOR="다음 페이지" -SIN= -CHI="下一頁" -POL="Następna strona" -RUS="Следующая страница" - -[STR_ITEM_LEVEL] -ENG="Item Level: %u" -ESP="Nivel de objeto: %u" -DEU="Gegenstandsstufe: %u" -FRA="Niveau d'objet: %u" -POR="Nível do item: %u" -ITA="Livello oggetto" -JPN="アイテム・レベル: %u" -KOR="아이템 레벨: %u" -SIN= -CHI="物品等級: %u" -POL="Poziom przedmiotu: %u" -RUS="Уровень предмета: %u" - -;Localization of the text for recipes of a cube -;For the commented-out keys the text undertakes from game, but it can be changed. -;who should - add translation -[STR_COW_PORTAL] -ENG="Cow Portal" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Коровий портал" - -[STR_PANDEMONIUM_PORTAL] -ENG="Pandemonium Portal" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Адский Портал" - -[STR_PANDEMONIUM_FINAL_PORTAL] -ENG="Pandemonium Final Portal" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Финальный Адский Портал" - -[STR_FULL] -ENG="Fully " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Полностью " - -[STR_REPAIR] -ENG="Repair " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Починенный [fs]Починенная [ns]Починенное [pl]Починенные " - -[STR_AND] -ENG="and " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="и " - -[STR_RECHARGE] -ENG="Recharge " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Перезаряженный [fs]Перезаряженная [ns]Перезаряженное [pl]Перезаряженные " - -[STR_DESTROY_FILLERS] -ENG="Destroys Fillers " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Без ячеек " - -[STR_REMOVE_FILLERS] -ENG="Remove Fillers " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="С пустыми ячейками в " - -[STR_REGENERATE] -ENG="Regenerate " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Восстановленный [fs]Восстановленная [ns]Восстановленное [pl]Восстановленные " - -[STR_WITH_N_SOCKETS] -ENG="with %u Sockets " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="c %u ячейками " - -[STR_ETHERAL] -ENG="Ethereal " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Эфирный [fs]Эфирная [ns]Эфирное [pl]Эфирные " - -[STR_NOT_ETHERAL] -ENG="Not Ethereal " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Не эфирный [fs]Не эфирная [ns]Не эфирное [pl]Не эфирные " - -[STR_NOT_RUNEWORD] -ENG="Not Runeword " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Без рунного слова " - -[STR_BASIC] -ENG="Basic " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Простой [fs]Простая [ns]Простое [pl]Простые " - -[STR_EXCEPTIONAL] -ENG="Exceptional " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Исключительный [fs]Исключительная [ns]Исключительное [pl]Исключительные " - -[STR_ELITE] -ENG="Elite " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Элитный [fs]Элитная [ns]Элитное [pl]Элитные " - -[STR_CRACKED] -ENG="Cracked " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Сломанный [fs]Сломанная [ns]Сломанное [pl]Сломанные " - -[STR_NORMAL] -ENG="Normal " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Нормальный [fs]Нормальная [ns]Нормальное [pl]Нормальные " - -[STR_SUPERIOR] -ENG="Superior " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Превосходный [fs]Превосходная [ns]Превосходное [pl]Превосходные " - -[STR_MAGIC] -ENG="Magic " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Магический [fs]Магическая [ns]Магическое [pl]Магические " - -[STR_SET] -ENG="Set " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Наборный [fs]Наборная [ns]Наборное [pl]Наборные " - -[STR_RARE] -ENG="Rare " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Редкий [fs]Редкая [ns]Редкое [pl]Редкие " - -[STR_UNIQUE] -ENG="Unique " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Уникальный [fs]Уникальная [ns]Уникальное [pl]Уникальные " - -[STR_CRAFTED] -ENG="Crafted " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Создаваемый [fs]Создаваемая [ns]Создаваемое [pl]Создаваемые " - -[STR_TEMPERED] -ENG="Tempered " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Закаленный [fs]Закаленная [ns]Закаленное [pl]Закаленные " - -[STR_ITEM] -ENG="Item" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Предмет" - -[STR_ITEM_SAME_TYPE] -ENG="Item of the same type" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Предмет того же типа" - -[STR_OR_UPGRADED] -ENG=" (or upgraded)" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS=" (или выше уровнем)" - -[STR_WITHOUT_SOCKET] -ENG=" without Socket" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS=" без ячеек" - -[STR_WITH_SOCKET] -ENG=" with Sockets" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS=" с ячейками" - - -[STR_ONLY_N_H] -ENG=" (Nightmare and Hell only)" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS=" (только на уровнях Кошмар и Ад)" - -[STR_ONLY_HELL] -ENG=" (Hell only)" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS=" (только на уровне Ад)" - -[STR_ONLY_CLASS] -ENG=" (%s only)" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS=" (только %s)" - -[shie] -ENG="Shield (Not Class Specific)" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Щит (без привязки к классу)" - -[tors] -ENG="Body Armor" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[fs]Нательная броня" - -;[gold] -;ENG="Gold" - -;[bowq] -;ENG="Arrows" - -;[xboq] -;ENG="Bolts" - -;[play] -;ENG="Ear" - -;[herb] -;ENG="Herb" - -[poti] -ENG="Potion" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Зелье" - -;[ring] -;ENG="Ring" - -;[elix] -;ENG="Elixir" - -;[amul] -;ENG="Amulet" - -[char] -ENG="Charm" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[msы]Талисман" - -;[boot] -;ENG="Boots" - -[glov] -ENG="Gloves" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[pl]Перчатки" - -[book] -ENG="Book" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Книга" - -;[belt] -;ENG="Belt" - -[gem ] -ENG="Gem" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Драгоценный камень" - -;[torc] -;ENG="Torch" - -[scro] -ENG="Scroll" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Свиток" - -;[scep] -;ENG="Scepter" - -;[wand] -;ENG="Wand" - -[staf] -ENG="Staff" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Посох" - -[bow ] -ENG="Bow" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Лук" - -;[axe ] -;ENG="Axe" - -;[club] -;ENG="Club" - -[swor] -ENG="Sword" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Меч" - -[hamm] -ENG="Hammer" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Молот" - -[knif] -ENG="Knife" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Нож" - -;[spea] -;ENG="Spear" - -[pole] -ENG="Polearm" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[fs]Алебарада" - -;[xbow] -;ENG="Crossbow" - -;[mace] -;ENG="Mace" - -;[helm] -;ENG="Helm" - -[tpot] -ENG="Missile Potion" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Зелье стрельбы" - -[ques] -ENG="Quest Item" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Квестовая вещь" - -[body] -ENG="Body Part" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Часть тела" - -;[key ] -;ENG="Key" - -;[tkni] -;ENG="Throwing Knife" - -;[taxe] -;ENG="Throwing Axe" - -;[jave] -;ENG="Javelin" - -[weap] -ENG="Weapon" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ns]Оружие" - -[mele] -ENG="Melee Weapon" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ns]Оружие ближнего боя" - -[miss] -ENG="Missile Weapon" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ns]Стреляющее оружие" - -[thro] -ENG="Throwing Weapon" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ns]Метательное оружие" - -[comb] -ENG="Combo Weapon" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ns]Комбинированное оружие" - -[armo] -ENG="Armor" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[fs]Броня" - -[shld] -ENG="Any Shield" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Любой щит" - -[misc] -ENG="Miscellaneous" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Любой предмет" - -[sock] -ENG="Socket Filler" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS= - -[seco] -ENG="Second Hand Item" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Предмет для второй руки" - -[rod ] -ENG="Staves And Rods" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[pl]Посохи и Жезлы" - -[misl] -ENG="Missile" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Снаряд" - -[blun] -ENG="Blunt" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Тупое оружие" - -;[jewl] -;ENG="Jewel" - -[clas] -ENG="Class Specific" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS= - -[amaz] -ENG="Amazon Item" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Предмет для амазонки" - -[barb] -ENG="Barbarian Item" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Предмет для варвара" - -[necr] -ENG="Necromancer Item" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Предмет для некроманта" - -[pala] -ENG="Paladin Item" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Предмет для паладина" - -[sorc] -ENG="Sorceress Item" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Предмет для волшебницы" - -[assn] -ENG="Assassin Item" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Предмет для ассасины" - -[drui] -ENG="Druid Item" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Предмет для друида" - -[h2h ] -ENG="Claw" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Коготь" - -[h2h2] -ENG="Assassin Claw" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Коготь ассасин" - -[orb ] -ENG="Orb" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[fs]Сфера" - -[head] -ENG="Voodoo Heads" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[fs]Голова Вуду" - -[ashd] -ENG="Paladin Shield" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Щит паладина" - -[phlm] -ENG="Barbarian Helm" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Шлем варвара" - -[pelt] -ENG="Druid Helm" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Шлем друида" - -;[cloa] -;ENG="Cloak" - -[rune] -ENG="Rune" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Руна" - -;[circ] -;ENG="Circlet" - -;[hpot] -;ENG="Healing Potion" - -;[mpot] -;ENG="Mana Potion" - -;[rpot] -;ENG="Rejuvenation potion" - -;[spot] -;ENG="Stamina Potion" - -;[apot] -;ENG="Antidote Potion" - -;[wpot] -;ENG="Thawing Potion" - -;[scha] -;ENG="Small Charm" - -;[mcha] -;ENG="Large Charm" - -;[lcha] -;ENG="Grand Charm" - -[abow] -ENG="Amazon Bow" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Лук амазонки" - -[aspe] -ENG="Amazon Spear" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ns]Копье амазонки" - -[ajav] -ENG="Amazon Javelin" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Дротик амазонки" - -[mboq] -ENG="Magic Arrows" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Магические стрелы" - -[mxbq] -ENG="Magic Bolts" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Магические арбалетные стрелы" - -[gem0] -ENG="Chipped Gem" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Надколотый драгоценный камень" - -[gem1] -ENG="Flawed Gem" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Мутный драгоценный камень" - -[gem2] -ENG="Normal Gem" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Нормальный драгоценный камень" - -[gem3] -ENG="Flawless Gem" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Безупречный драгоценный камень" - -[gem4] -ENG="Perfect Gem" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Идеальный драгоценный камень" - -;[gema] -;ENG="Amethyst" - -;[gemd] -;ENG="Diamond" - -;[geme] -;ENG="Emerald" - -;[gemr] -;ENG="Ruby" - -;[gems] -;ENG="Sapphire" - -;[gemt] -;ENG="Topaz" - -;[gemz] -;ENG="Skull" diff --git a/PlugYInstaller/PlugY_The_Survival_Kit_-_Liesmich.txt b/PlugYInstaller/PlugY_The_Survival_Kit_-_Liesmich.txt index 894be55..6e249de 100644 --- a/PlugYInstaller/PlugY_The_Survival_Kit_-_Liesmich.txt +++ b/PlugYInstaller/PlugY_The_Survival_Kit_-_Liesmich.txt @@ -1,322 +1,334 @@ ;--------------------------------------------------------------------------------------; ; ; -; "PlugY, The Survival Kit" ; +; "PlugY, The Survival Kit" ; ; ; ; von Yohann Nicolas ; -; (Modifizierung durch L'Autour) ; -; version 11.00 ; +; ; +; version 11.01 ; ; ; ;--------------------------------------------------------------------------------------; -Offizielle website : http://plugy.free.fr -Ihr dürft spenden, falls ihr möchtet. +Official website : http://plugy.free.fr +You can make a donation if you want. WARNUNG: -- Dieses Plug-In ist NUR für LOD 1.09 zu 1.13d ! +- Dieses Plug-In ist NUR fr LOD 1.09 zu 1.13d ! - Dieses Plug-In ist NICHT das closed Battle.net! -- Alle Dateien können sich seit der letzten Version verändert haben, benutzt keine alten Dateien! -- Bitte benutzt eine neue D2gfx.dll bevor ihr das PlugY benutzt (Kann man auf http://d2mods.com downloaden) -- PlugY.ini wurde stark verändert, bitte nehmt die Neue! -- Vergesst nicht den Teil: "Kommentare zur Konfigurations-Datei" zu lesen. -- Bitte lest im PlugY-Forum: http://d2mods.info/forum/viewforum.php?f=133 +- Alle Dateien knnen sich seit der letzten Version verndert haben, benutzt keine alten Dateien! +- PlugY.ini wurde stark verndert, bitte nehmt die Neue! +- Bitte lest im PlugY-Forum: + http://d2mods.info/forum/viewforum.php?f=133 + ******** ALLE FUNKTIONEN ******** -- Battle.net LogIn via Hauptmenu deaktiviert. -- Nahezu unbegrenzter Speicherplatz im Goldschatz (bis zu 4,294,967,296 persönliche Seiten!) -- Gemeinsam genutzter Speicherplatz im Goldschatz (bis zu 4,294,967,296 gemeinsame Seiten!) -- Die Ladder-Only Runenwörter können für den Singleplayer aktivert werden. +Each features can be turn on/off via PlugY.ini (see "Kommentare aus der Konfigurations-Datei") +- Disable access to Battle.net via main menu button. +- Nahezu unbegrenzter Speicherplatz im Goldschatz. +- Gemeinsam genutzter Speicherplatz im Goldschatz. +- Die Ladder-Only Runenwrter knnen fr den Singleplayer aktivert werden. - Lokaler World Event ! (nicht 1.09) - Lokaler Uber Quest! (nicht 1.09 und 1.10) -- Zurücksetzen von Fertigkeitspunkten -- Man kann die Skill- und Statuspunkte zurücksetzen. -- Man kann die gewählte Sprache verändern +- Zurcksetzen von Fertigkeitspunkten +- Man kann die Skill- und Statuspunkte zurcksetzen. +- Man kann die gewhlte Sprache verndern - Man kann einstellen das im Einzelspieler-Modus die Karte mit jedem Spiel erneuert wird -- Man kann /players X automatisch ausführen lassen -- Es gibt eine weitere Charakter Anzeige Seite mit zusätzlichen Informationen +- Man kann /players X automatisch ausfhren lassen +- Es gibt eine weitere Charakter Anzeige Seite mit zustzlichen Informationen - Anzeige des Itemlevel in der Gegenstandsinfo - Man kann beliebig oft Diablo II auf dem gleichen Computer starten. - Der Goldschatz hat 10x10 Felder. -- Man kann das "SAVE" Verzeichnis ändern. +- Man kann das "SAVE" Verzeichnis ndern. - Man kann die Versionsanzeige im Hauptbildschirm anpassen. -- Diablo kann nun auf Text-Dateien laden die von Microsoft Excel geöffnet sind. -- Lokalisiert in Englisch, Franzosisch, Deutsch, Italienisch, Spanisch, Polnisch, *Portugiesisch, Japanisch, Koreanisch, Chinesisch, Polnisch, *Russisch. - (* - hat informelle Lokalisierung des Spiels verlangt.) +- Diablo kann nun auf Text-Dateien laden die von Microsoft Excel geffnet sind. +- Add following commands (see "Kommentare aus der Konfigurations-Datei") : + /save : Save game without exit. + /page 1 : Show normal stats page (stats page must be opened). + /page 2 : Show extra stats page (stats page must be opened). + /page 3 : Show resistance stats page (stats page must be opened). + /page 4 : (beta) Show available runewords (stats page must be opened). + /lockmouse : Lock mouse cursor in the window. + /lock : Same as /lockmouse. + /unlockmouse : Unlock mouse cursor in the window. + /unlock : Same as /unlockmouse. + /renamechar newname : Rename your character and save it. + /renamepage name : Rename current page stash. + /setindex : Set current stash page as index + /resetindex : Remove index flag on the current stash page. + /insertpage : Insert a new page after the current page. + /deletepage : Delete current page if empty. + /swap page : Swap the content of current stash page with the content of another page. + /toggle page : Swap the content of current stash page with the content of another page in opposing stash shared/personal. + /dlm : Toggle always display mana and life mode. + /dml : Same as /dlm. + /dl : Toggle always display life mode. + /dm : Toggle always display mana mode. + /listcube : (beta) Create a "cube.txt" file in save directory containing all cube's receipts. -v11.00 Änderungen : -- PlugY funktioniert nun auch mit LoD 1.13d Versionen. -- Voller support fur verschiedene sprachen im spiel. +v11.01 nderungen : +Compatibily with 1.13d (thanks to L'Autour) +Add command /unlockmouse : Unlock the mouse +Add command /unlock : same as /unlockmouse +Add command /renamepage : stash page name are now successfully saved. +Add command /setindex : Set the current stash page as index (prev/next index button go to an index if exists) +Add command /resetindex : Remove index flag on the current stash page (prev/next index button go to this index if exists). +Add command /insertpage : Insert a new page after the current page. +Add command /deletepage : Delete current page if empty. +Add localizion in Russian and google traduction for not translated language. (thanks to L'Autour) +Add an option in PlugY.ini to select shared stash (instead of personal one) on character loading. +Rename command /rename to /renamechar. +Remove unfinished command /reload. +v11.00 nderungen : Unofficial version supporting LOD 1.13d -v10.00 Änderungen : -- Battle.net LogIn via Hauptmenu deaktiviert. +v10.01 nderungen : +- Add windowed mode. +- Can lock mouse cursor in the window (windowed mode). +- Can remove border (windowed mode). +- Can resize or maximize window (windowed mode). +- Can fix window above any others windows including taskbar (windowed mode). +- Can lock mouse cursor in the windows on startup and with command "/lockmouse" or "/lock" (windowed mode). +- Add command "/swap page" to swap the content of current stash page with the content of another page. +- Add command "/toggle page" to swap the content of current stash page with the content of another page in opposing stash shared/personal. +- Add command "/rename newname" to rename your character. This feature is still in beta and you must exit the game to update the stats page. + +v10.00 nderungen : +- Disable access to Battle.net via main menu button. - PlugY funktioniert nun auch mit LoD 1.13c Versionen. - Fix shortcut in start menu - -v9.00 Änderungen : +v9.00 nderungen : - PlugY funktioniert nun auch mit LoD 1.12 Versionen. - Ein paar Bugs behoben. -- Eine neue Möglichkeit zum Skills neuverteilen in Mods hinzugefügt. +- Eine neue Mglichkeit zum Skills neuverteilen in Mods hinzugefgt. - -v8.00 Änderungen : +v8.00 nderungen : - Einfachere Installation : Neuer Installer. -- Das Portal zum Cow-Level kann nun geöffnet werden auch wenn der Spieler den Cow-King in der aktuellen Schwierigkeit bereits getötet hat. +- Das Portal zum Cow-Level kann nun geffnet werden auch wenn der Spieler den Cow-King in der aktuellen Schwierigkeit bereits gettet hat. - Die wirkliche Versionsnummer wird angezeigt (v 1.09d oder v 1.11b statt v 1.09 oder v 1.11) -- Die Möglichkeit hinzugefügt den Skill-Neuverteilungs-Button zu verschieben (für Modder). +- Die Mglichkeit hinzugefgt den Skill-Neuverteilungs-Button zu verschieben (fr Modder). - Behoben : Absturz wenn man einem Superunique Monster in Lod v1.11 begegnet ist. - Behoben : Verlorene Skillpunkte beim neu verteilen in Mods mit speziellen Skills. -- Multiplayer : Die Truhendaten werden jetzt korrekt gespeichert wenn es einen Disconnect oder einen Fehler während des Speicherns gibt. +- Multiplayer : Die Truhendaten werden jetzt korrekt gespeichert wenn es einen Disconnect oder einen Fehler whrend des Speicherns gibt. - Die "check load memory failed" Meldung, wenn die D2gfx.dll gepachtt war, wurde entfernt. - -v7.01b Änderungen : +v7.01b nderungen : - Behoben : Die Ladder-only Runenwortfeatures in den LoD-Versionen 1.11 und 1.10. - Behoben : Seltsame Zeichen in manchen Texten. - -v7.01 Änderungen : -- Die Ladder-Only Runenwörter können für den Singleplayer aktivert werden. -- Fehler bei der AI des Überbaals behoben -- Die Parameter in der PlugY.ini standaratmäßig entfernt (wie -w um im Fenster zu starten) +v7.01 nderungen : +- Die Ladder-Only Runenwrter knnen fr den Singleplayer aktivert werden. +- Fehler bei der AI des berbaals behoben +- Die Parameter in der PlugY.ini standaratmig entfernt (wie -w um im Fenster zu starten) - Die Basiswerte der Statuspunkte werden angezeigt (ohne magische Boni) auch wenn die Statneuverteilung deaktiviert ist -- Eine eigene EXE wurde hinzugefügt um PlugY zu starten (es werden keine LoD-Dateien mehr verändert) -- Spanische und Polnische Übersetzung hinzugefügt. +- Eine eigene EXE wurde hinzugefgt um PlugY zu starten (es werden keine LoD-Dateien mehr verndert) +- Spanische und Polnische bersetzung hinzugefgt. - -V7.00 Änderungen : +V7.00 nderungen : - PlugY funktioniert nun auch mit LoD 1.11b Versionen. -- Den Basiswert für jeden Stat im Mausübertext hinzugefügt. +- Den Basiswert fr jeden Stat im Mausbertext hinzugefgt. - Behoben: Unendliche Statuspunkte bei der Neuverteilung - Behoben: Einige Features blieben auch im Battle.net aktiviert -- Italienische Übersetzung hinzugefügt. +- Italienische bersetzung hinzugefgt. - -v6.01b Änderungen : +v6.01b nderungen : - Fehler mit dem Popups der Statuspunktvergabe-Buttons behoben. - -v6.01 Änderungen : +v6.01 nderungen : - Behoben : unique carry1 items verschwinden nicht wenn sie in LoD 1.10 gecubt werden -- Schlüssel und Uber-Organe werden nicht mehr entfernt wenn man das rote Portal ausserhalb von Harrogath öffnen wollte. +- Schlssel und Uber-Organe werden nicht mehr entfernt wenn man das rote Portal ausserhalb von Harrogath ffnen wollte. - Fehler in der Versionsanzeige wegen einem Konflikt mit D2Mod behoben. - -V6.00 Änderungen : +V6.00 nderungen : - PlugY funktioniert nun auch mit LoD 1.11 Versionen -- Freischaltung des Über-Quests ausserhalb von der Realm (LoD 1.11 only). +- Freischaltung des ber-Quests ausserhalb von der Realm (LoD 1.11 only). - PlugY Start-Absturz behoben, wenn die LoD Installation unsauber war - Kleine Fehler behoben, und kleine Verbesserungen eingebaut -- "/save"-Befehl hinzugefügt um das Spiel zu speichern ohne es zu verlassen (nur LoD 1.11). +- "/save"-Befehl hinzugefgt um das Spiel zu speichern ohne es zu verlassen (nur LoD 1.11). - -v5.06 Änderungen : -- Knöpf for gemeinsamen Goldvorrat hinzugefügt. -- Gemeinsamer Goldvorrat in Multiplayer hinzugefügt. +v5.06 nderungen : +- Knpf for gemeinsamen Goldvorrat hinzugefgt. +- Gemeinsamer Goldvorrat in Multiplayer hinzugefgt. - Befehl "/DisplayLifeMana" ersetzt durch "/dlm". - Diverse Fehler behoben. - -v5.05 Änderungen : -- Standard Hintergrundfarbe im Status Interface geändert -- Gemeinsames Gold per Kommando hinzugefügt. +v5.05 nderungen : +- Standard Hintergrundfarbe im Status Interface gendert +- Gemeinsames Gold per Kommando hinzugefgt. - Kommando "/DisplayLifeAndMana" ist nun "/DisplayLifeMana". -- Möglichkeit die Namen von Setgegenständ in Grün bei Mouseover in der gemeinsamen Kiste anzuzeigen +- Mglichkeit die Namen von Setgegenstnd in Grn bei Mouseover in der gemeinsamen Kiste anzuzeigen - Multiplayer Fehler behoben, indem der gesamte Prozess neu programmiert wurde - -v5.04 Änderungen : +v5.04 nderungen : - Behoben : Status/Skill Punkte per Levelup bug. - Behoben : Multiplayer bugs. -- PlugY/PlugYDefault.ini sind jetzt vollständig. +- PlugY/PlugYDefault.ini sind jetzt vollstndig. - -v5.03 Änderungen : +v5.03 nderungen : - Behoben : Bug der manchmal zwischen den Hardcore und Softcore gemeinsamen Truhen gewechselt hat. -- Farbänderung der Schrift in den Extra-Seiten möglich. -- Standartwerte in den Extra-Seiten geändert. -- EnabledTXTFilesWhenMSExcelOpenIt in der PlugY.ini ist nun standartmäßig aktiviert. +- Farbnderung der Schrift in den Extra-Seiten mglich. +- Standartwerte in den Extra-Seiten gendert. +- EnabledTXTFilesWhenMSExcelOpenIt in der PlugY.ini ist nun standartmig aktiviert. +v5.02 nderungen : +- Behoben : Bug der das Verschwinden von Gegenstnden hervorgerufen hat. -v5.02 Änderungen : -- Behoben : Bug der das Verschwinden von Gegenständen hervorgerufen hat. - - -v5.01 Änderungen : -- Behoben : Größere bugs bei der gemeinsamen Truhe. -- Behoben : ActiveLogFile ist jetzt in der PlugY.ini standartmäßig deaktiviert. +v5.01 nderungen : +- Behoben : Grere bugs bei der gemeinsamen Truhe. +- Behoben : ActiveLogFile ist jetzt in der PlugY.ini standartmig deaktiviert. - Behoben : Bug der auftrat wenn die gemeinsame Truhe deaktiviert war. -v5.00 Änderungen : -- PlugY funktioniert jetzt mit den LoD Versionen 1.09, 1.09b, 1.09d, inklusive zusätzlicher Mods ! +v5.00 nderungen : +- PlugY funktioniert jetzt mit den LoD Versionen 1.09, 1.09b, 1.09d, inklusive zustzlicher Mods ! - PlugY kann jetzt das D2ModSystem (D2Mod.dll) laden. -- Diablo kann nun auf Text-Dateien laden die von Microsoft Excel geöffnet sind. -- Das World Event Monster kann jetzt verändert werden. -- Neue Einstellungsmöglichkeiten für Modder. -- Behebt größere Bugs im Multiplayer : Fingerprints zurückgesetzt, unidentifizierte Items Bug, etc. +- Diablo kann nun auf Text-Dateien laden die von Microsoft Excel geffnet sind. +- Das World Event Monster kann jetzt verndert werden. +- Neue Einstellungsmglichkeiten fr Modder. +- Behebt grere Bugs im Multiplayer : Fingerprints zurckgesetzt, unidentifizierte Items Bug, etc. - Behoben : Schreibfehler in der PlugY.ini (Commands). -- Behoben : Keine weiteren Groß- und Kleinschreibungs Beschränkung für die Commands im Spiel. -- Behoben : Character Seiten Auswahl beim öffnen. -- Behoben : Ersetzt die Anzeige von "Kritischer Schlag"/"Tötlicher Schlag" nur mit "Tötlicher Schlag". +- Behoben : Keine weiteren Gro- und Kleinschreibungs Beschrnkung fr die Commands im Spiel. +- Behoben : Character Seiten Auswahl beim ffnen. +- Behoben : Ersetzt die Anzeige von "Kritischer Schlag"/"Ttlicher Schlag" nur mit "Ttlicher Schlag". - Behoben : Das Erscheinen des Diablo Klones am Spielstart. - Behoben : Andere kleine Bugs. - -v4.04 Änderungen : +v4.04 nderungen : - Behoben : Anzeige-bug wenn StatPerLevelUp aktiviert war. - Behoben : Fehler bei der Speicherprozedur wenn die Festplatte voll war. -- Neues Konfigurations-System für Modder. -- Man kann auswählen, ob die Mana und Lebens Anzeige immer über den Kugeln erscheint. +- Neues Konfigurations-System fr Modder. +- Man kann auswhlen, ob die Mana und Lebens Anzeige immer ber den Kugeln erscheint. +v4.03 nderungen +- Behoben: Wenn man einen "carry1" - einzigartigen Gegenstand (einzigartiger Zauber) in den Wrfel steckt +- Man kann direkt zur ersten und letzten Seite der Kiste gehen (shift + klick auf Nchste/Vorherige Seite) +- Zweiten Index hinzugefgt (shift + klick auf den Index Knopf) +- Weitere Status Informationen hinzugefgt (Jetzt 2 Seiten) +- Vorherige Seite - Button hinzugefgt auf der Hauptstatusseite (nur in 800x600) +- Button fr die zustzlichen Status Seiten an die gleiche Stelle verschoben, wie die original Buttons (nur in 800x600) +- Man kann auswhlen, ob die zuletzt angezeigte Seite erscheint, oder die Hauptseite -v4.03 Änderungen -- Behoben: Wenn man einen "carry1" - einzigartigen Gegenstand (einzigartiger Zauber) in den Würfel steckt -- Man kann direkt zur ersten und letzten Seite der Kiste gehen (shift + klick auf Nächste/Vorherige Seite) -- Zweiten Index hinzugefügt (shift + klick auf den Index Knopf) -- Weitere Status Informationen hinzugefügt (Jetzt 2 Seiten) -- Vorherige Seite - Button hinzugefügt auf der Hauptstatusseite (nur in 800x600) -- Button für die zusätzlichen Status Seiten an die gleiche Stelle verschoben, wie die original Buttons (nur in 800x600) -- Man kann auswählen, ob die zuletzt angezeigte Seite erscheint, oder die Hauptseite - - -v4.02b Änderungen : +v4.02b nderungen : - Behoben : Alle Funktionen bleiben im offenen Battle.net eingeschaltet. - -v4.02 Änderungen : -- Behoben : Das vergessene "d" in "SeparateHardcoreStash=1" in der PlugY.ini ergänzt -- Behoben : Standardmässig wird dei Sprache in der PlugY.ini nicht geändert. +v4.02 nderungen : +- Behoben : Das vergessene "d" in "SeparateHardcoreStash=1" in der PlugY.ini ergnzt +- Behoben : Standardmssig wird dei Sprache in der PlugY.ini nicht gendert. - Behoben : Item Level sollte nun in allen Konfigurationen von PlugY korrekt angezeigt werden. - Behoben : No more conflict with Battle.net (BigStash disabled on realms) -- Weitere Daten auf der zusätzlichen Statusseite eingefügt. +- Weitere Daten auf der zustzlichen Statusseite eingefgt. -v4.01 Änderungen : +v4.01 nderungen : - Behoben: NbPlayers Schalter stellte immer 8 Spieler ein. -- Zusätzliche Daten auf der neuen Status Seite hinzugefügt. +- Zustzliche Daten auf der neuen Status Seite hinzugefgt. -v4.00b Änderungen : +v4.00b nderungen : - Behoben : Problem wenn MSVCR70.dll nicht gefunden wurde. -v4.00 Änderungen : -- Wechsel der ausgewählten Sprache (in MODs, default und verfügbare Sprachen). +v4.00 nderungen : +- Wechsel der ausgewhlten Sprache (in MODs, default und verfgbare Sprachen). - - Generiere die Karte im Einzelspieler immer neu, wie im MultiSpieler. - Man kann einstellen das im Einzelspieler-Modus die Karte mit jedem Spiel erneuert wird -- Man kann /players X automatisch ausführen lassen -- Gemeinsame Kiste für Softcore und Hardcore getrennt -- Installation geändert (kann nun direkt unter Linux installiert werden) -- Der World Event Gegenstand kann ausgewählt werden -- Beliebig viele carry1 Gegenstände (wie Annihilus) können in die Kiste getan werden +- Man kann /players X automatisch ausfhren lassen +- Gemeinsame Kiste fr Softcore und Hardcore getrennt +- Installation gendert (kann nun direkt unter Linux installiert werden) +- Der World Event Gegenstand kann ausgewhlt werden +- Beliebig viele carry1 Gegenstnde (wie Annihilus) knnen in die Kiste getan werden - Behoben : Man kann icht mehr als einen carry1 Gegenstand in andere Seiten legen ausser in die Kistenhauptseite -- Behoben : Anzeigefehler von gesockelten Gegenständen in der Kiste +- Behoben : Anzeigefehler von gesockelten Gegenstnden in der Kiste - Behoben : Leerzeichenfehler in PlugY.ini behoben - Behoben : Diablo Clone kann nicht mehr in Normal und Albtraum erscheinen -- Behoben : Zerstörung von zusätzlichen Minions wenn man Fertigkeitspukte zurücksetzt +- Behoben : Zerstrung von zustzlichen Minions wenn man Fertigkeitspukte zurcksetzt - -v3.02 Änderungen : +v3.02 nderungen : - Fehler im Bereich Statuspunkte pro LevelUp behoben - Fehler behoben der verhinderte das bei abgeschalteter gemeinsamer Kiste ein Charkter nicht geladen werden konnte. - Fehler behoben der es erlaubte Werte zu setzen, ohne das Fertigkeiten pro LevelUp aktiviert waren. +v3.01 nderungen : +- Man kann die Statuspunkte ndern, die man beim LevelUp bekommt. +- Problem mit fehlerhafter Menge der Fertigkeitspunkte beim zurcksetzen behoben. +- Konfigurationsparameter fr den World Event hinzugefgt +- Standardmssig wird nur inHlle der World Event Zhler gezeigt "X SOJ verkauft". -v3.01 Änderungen : -- Man kann die Statuspunkte ändern, die man beim LevelUp bekommt. -- Problem mit fehlerhafter Menge der Fertigkeitspunkte beim zurücksetzen behoben. -- Konfigurationsparameter für den World Event hinzugefügt -- Standardmässig wird nur inHölle der World Event Zähler gezeigt "X SOJ verkauft". - - -v3.00 Änderungen : +v3.00 nderungen : - Lokaler World Event ! -- Zurücksetzen von Fertigkeitspunkten +- Zurcksetzen von Fertigkeitspunkten - -v2.05 Änderungen : +v2.05 nderungen : - Wichtiger Ffix : Alle Fehler die einen Start von Diablo2 verhinderten sind entfernt - -v2.04 Änderungen : -- Das zurücksetzen der Statuspunkte, sowie die Fertigkeiten pro LevelUp werden abgeschaltet, wenn man sich in ein Realm-Spiel einklinkt (wie bei der Goldkiste die Knöpfe) +v2.04 nderungen : +- Das zurcksetzen der Statuspunkte, sowie die Fertigkeiten pro LevelUp werden abgeschaltet, wenn man sich in ein Realm-Spiel einklinkt (wie bei der Goldkiste die Knpfe) - Es wird eine Fehlermeldung angezeigt, anstelle eines Absturzes, wenn PlugY.dll nicht gefunden werden kann - Einige Fehler in der Installationsroutine behoben -- Einen Fehler bezüglich der verschwindenden Knöpfe behoben +- Einen Fehler bezglich der verschwindenden Knpfe behoben - Abspeicher-Problem unter Win95/98/Me behoben - -v2.03b Änderungen : +v2.03b nderungen : - Anzeige der PlugY Version nur im Hauptbild - -v2.03 Änderungen : -- Wichtigster Fix : Die Abspeicher-Routine geändert, damit bei einem Spiel-Absturz keine Items in der Kiste verloren gehen, und der Charakter korrupt wird. +v2.03 nderungen : +- Wichtigster Fix : Die Abspeicher-Routine gendert, damit bei einem Spiel-Absturz keine Items in der Kiste verloren gehen, und der Charakter korrupt wird. - Kein Absturz des Host Spiels, wenn ein Charakter nicht ins Spiel kann. - Ausgegrauter Status-Knopf bei mehr als 255 Status-Punkten gefixed. -- Die Versionsanzeige auf der Hauptseite geändert (PlugY Version jetzt rechts, und Farben sind nun möglich) -- Charaktere ohne PlugY können nun an Spielen teilnehmen die gehosted werden von PlugY-Spilern. +- Die Versionsanzeige auf der Hauptseite gendert (PlugY Version jetzt rechts, und Farben sind nun mglich) +- Charaktere ohne PlugY knnen nun an Spielen teilnehmen die gehosted werden von PlugY-Spilern. - -v2.02 Änderungen : +v2.02 nderungen : - PlugY nutzt die D2win.dll nicht mehr zum laden. -- PlugY enthält einen Patcher/Ent-Patcher um die D2gfx.dll so zu verändern, das PlugY gestartet wird. -- PlugY kann von SVR´s D2Mod System gestartet werden. +- PlugY enthlt einen Patcher/Ent-Patcher um die D2gfx.dll so zu verndern, das PlugY gestartet wird. +- PlugY kann von SVRs D2Mod System gestartet werden. - Die Goldkistenerweiterung wird bei Realm Spielen automatisch abgeschaltet. - Index Button Fehler behoben. - -v.2.01 Änderungen +v.2.01 nderungen - Fertigkeitsfehler beim LevelUp behoben. - Anzeigefehler im Hauptbildschirm behoben. - -v2.00 Änderungen : -- Deutsche Lokalisierung hinzugefügt. -- Die Anzahl der Fertigkeitspunkte beim erreichen des nächsten Levels ist einstellbar. +v2.00 nderungen : +- Deutsche Lokalisierung hinzugefgt. +- Die Anzahl der Fertigkeitspunkte beim erreichen des nchsten Levels ist einstellbar. - Man kann beliebig oft das Spiel Diablo II auf einem Computer starten. -- Man kann die Statuspunkte zurücksetzen. -- Es gibt 2 Knöpfe um jeweils zur vorherigen/nächsten Index-Seite zu springen. +- Man kann die Statuspunkte zurcksetzen. +- Es gibt 2 Knpfe um jeweils zur vorherigen/nchsten Index-Seite zu springen. - Es wird nur noch der aktuelle Gold-Inhalt der Kiste angezeigt, der Maximal Wert wird als Pop-Up angezeigt. -- Komplett überarbeitete Konfigurationsdatei. +- Komplett berarbeitete Konfigurationsdatei. - Die Ini-Datei kann in das MPQ gepackt werden (wie bereits die PlugY Grafik-Dateien) -- Die Kompatibilität mit MODs wurde verbessert. +- Die Kompatibilitt mit MODs wurde verbessert. - Den TCP/IP Absturz korrigiert. - Den Fehler mit Seitennummern bei Charakterwechsel behoben. -- Der Anzeige-Fehler von Set-Gegenständen wurde behoben -- Der Fehler mir carry1 Gegenständen wurde behoben (Uniques die nur einaml getragen werden dürfen) +- Der Anzeige-Fehler von Set-Gegenstnden wurde behoben +- Der Fehler mir carry1 Gegenstnden wurde behoben (Uniques die nur einaml getragen werden drfen) - Weitere kleine Verbesserungen eingebaut. - -v1.03 Änderungen : -- Französische Liesmich- und Ini-Datei hinzugefügt. +v1.03 nderungen : +- Franzsische Liesmich- und Ini-Datei hinzugefgt. - Fehler in D2Classic-Spielen entfernt (es gibt dort keine Seiten-Erweiterungen, dies ist kein Fehler) - Fehler behoben, der beim laden mit vor LOD 1.10 generierten Charakteren auftrat. (zB: ShadowMaster Charakter oder 1.09 oder D2Classic Charakter) +v1.02 nderungen : +- Dateinamen gendert wegen eines Fehlers mit dem IE und ZIP-Files +- Man kann die Versions-Information im Hauptbildschirm ndern (siehe Ini-Datei). -v1.02 Änderungen : -- Dateinamen geändert wegen eines Fehlers mit dem IE und ZIP-Files -- Man kann die Versions-Information im Hauptbildschirm ändern (siehe Ini-Datei). - - -v1.01 Änderungen : -- Französische Lokalisierung hinzugefügt (Französisches Liesmich.txt folgt) -- Dateinamen von "PlugY, The Survival Kit.ini" in "PlugY,The_Survival_Kit" geändert. -- Installationsbeispiele im Liesmich hinzugefügt. +v1.01 nderungen : +- Franzsische Lokalisierung hinzugefgt (Franzsisches Liesmich.txt folgt) +- Dateinamen von "PlugY, The Survival Kit.ini" in "PlugY,The_Survival_Kit" gendert. +- Installationsbeispiele im Liesmich hinzugefgt. - Fehlerhafte Installation beim PlugY-Aufruf eingebaut. - Den Eintrag "[GENERAL]PlugYDirectory=PlugY\" aus der Ini-Datei entfernt - (Man kann ihn weiterhin hinzufügen, sollte aber wissen, was man tut...) + (Man kann ihn weiterhin hinzufgen, sollte aber wissen, was man tut...) - Paket von .rar auf .zip umgestellt - -v1.00 Funktionen (es können alle einfach ein- und ausgeschaltet werden) : +v1.00 Funktionen (es knnen alle einfach ein- und ausgeschaltet werden) : - Man kann den "Save"-Pfad anpassen. -- Man kann jeden MOD starten, ohne die gesicherten Spielstände verschieben zu müssen. +- Man kann jeden MOD starten, ohne die gesicherten Spielstnde verschieben zu mssen. - Der Goldschatz kann auf 10x10 Felder erweitert werden. -- Bis zu 4,294,967,296 Seiten im Goldschatz möglich (nahezu unbegrenzter Speicherplatz) ! - Achtung : Dies ist nur für LOD1.10 charaktere. -- Mit dem gemeinsamen Goldschatz kann man Gegenstände an andere Charaktere übergeben +- Bis zu 4,294,967,296 Seiten im Goldschatz mglich (nahezu unbegrenzter Speicherplatz) ! + Achtung : Dies ist nur fr LOD1.10 charaktere. +- Mit dem gemeinsamen Goldschatz kann man Gegenstnde an andere Charaktere bergeben ******** INHALT ******** @@ -327,10 +339,9 @@ v1.00 Funktionen (es können alle einfach ein- und ausgeschaltet werden) : - PlugY.exe - PlugY.dll (in Diablo II directory) - PlugY.ini -- Plugy\PlugYLocal.dll -- Plugy\PlugYLocal.ini - PlugY\PlugYFixed.ini - PlugY\PlugYDefault.ini +- PlugY\LocalizedStrings.ini - PlugY\EmptyPage.dc6 - PlugY\SharedGoldBtns.dc6 - PlugY\StashBtns.dc6 @@ -346,24 +357,17 @@ v1.00 Funktionen (es können alle einfach ein- und ausgeschaltet werden) : ******** INSTALLATION ******** -- The officials sites are : -http://djaftal.chez-alice.fr/ -http://d2mods.info/forum/viewforum.php?f=133 -http://diablo2.judgehype.com/index.php?page=telechargements - Installation : - Entpacke alle Dateien in dein Diablo Verzeichnis. - Kopiere die PlugY.ini und die PlugY.exe in das Verzeichnis in dem dein Mod ist. -- Bearbeite die PlugY.ini um die gewünschten Features zu de/aktivieren (dazu weiter unten). +- Bearbeite die PlugY.ini um die gewnschten Features zu de/aktivieren (dazu weiter unten). - Run PlugY.exe and enjoy :-) Beispiel : Du hast LoD in folgendem Verzeichnis installiert : C:\Games\Diablo II\ Der Mod und PlugY befindet sich hier : D:\D2Mod\MyMod\ -Dann müssen die Einstellungen wie folgt lauten : +Dann mssen die Einstellungen wie folgt lauten : C:\Games\Diablo II\PlugY.dll - C:\Games\Diablo II\PlugY\PlugYLocal.dll - C:\Games\Diablo II\PlugY\PlugYLocal.ini C:\Games\Diablo II\PlugY\EmptyPage.dc6 C:\Games\Diablo II\PlugY\SharedGoldBtns.dc6 C:\Games\Diablo II\PlugY\StashBtns.dc6 @@ -372,20 +376,21 @@ Dann müssen die Einstellungen wie folgt lauten : C:\Games\Diablo II\PlugY\UnassignSkillsBtns.dc6 C:\Games\Diablo II\PlugY\UnassignStatsBtns.dc6 C:\Games\Diablo II\PlugY\statsinterface.txt + C:\Games\Diablo II\PlugY\LocalizedStrings.ini D:\D2Mod\MyMod\PlugY.ini D:\D2Mod\MyMod\PlugY.exe -Deinstallation : Einfach alle PlugY-Dateien löschen +Deinstallation : Einfach alle PlugY-Dateien lschen -Wenn Probleme auftreten beim Ausführen der PlugY.exe benutze einfach die alte Installation (PlugY_Installer.exe). +Wenn Probleme auftreten beim Ausfhren der PlugY.exe benutze einfach die alte Installation (PlugY_Installer.exe). Wenn das Spiel unter Windows 2000 nicht startet nimm auch die alte Installation. -1. Entzippe das Paket in einen temporären Ordner +1. Entzippe das Paket in einen temporren Ordner 2. Entzippe das Manual_Installer.zip in das selbe Verzeichnis 3. Kopiere die PlugY.dll und PlugY_Install.exe in Dein D2 Installations-Verzeichnis. -4. Kopiere das "PlugY\" Verzeichnis in Dein D2 Installations-Verzeichnis oder füge es Deiner MPQ-Datei direkt als PlugY\ hinzu (nicht unter "data\...") -5. Kopiere die PlugY.ini in das MOD-Zielverzeichnis und konfiguriere sie nach Deinen Wünschen. -6. Erzeuge eine Verknüpfung : Gebe das MOD Ziel-Verzeichniss im "Ausführen in" Feld der Eigenschaften von ->xxx Verknüpfung an +4. Kopiere das "PlugY\" Verzeichnis in Dein D2 Installations-Verzeichnis oder fge es Deiner MPQ-Datei direkt als PlugY\ hinzu (nicht unter "data\...") +5. Kopiere die PlugY.ini in das MOD-Zielverzeichnis und konfiguriere sie nach Deinen Wnschen. +6. Erzeuge eine Verknpfung : Gebe das MOD Ziel-Verzeichniss im "Ausfhren in" Feld der Eigenschaften von ->xxx Verknpfung an Hinweis : Man kann ebenfalls die PlugY.dll in das Mod Verzeichnis installierne und die dc6 Dateien in das mpq. @@ -393,36 +398,36 @@ Hinweis : Man kann ebenfalls die PlugY.dll in das Mod Verzeichnis installierne u ******** KONFIGURATION ******** -Wie konfiguriert man dieses Plug-In für einen MOD: -- Kopiere die PlugY-Ini-Datei in das MOD-Zielverzeichnis. (Das Verzeichnis aus dem der MOD gestartet wird, beachte die Eigenschaften der Diablo Verknüpfung). -- In den meisten Fällen passt man das "SAVE"-Verzeichnis in der Ini-Datei an. -- Füge alle zusätzlichen DLLs des MODs in der Ini-Datei hinzu (siehe .ini Datei) falls vorhanden. -- Als letztes aktiviert man noch die gewünschten Funktionen, wie zB: Gemeinesamer Goldschatz, Goldschatz-Zusatzseiten, usw. +Wie konfiguriert man dieses Plug-In fr einen MOD: +- Kopiere die PlugY-Ini-Datei in das MOD-Zielverzeichnis. (Das Verzeichnis aus dem der MOD gestartet wird, beachte die Eigenschaften der Diablo Verknpfung). +- In den meisten Fllen passt man das "SAVE"-Verzeichnis in der Ini-Datei an. +- Fge alle zustzlichen DLLs des MODs in der Ini-Datei hinzu (siehe .ini Datei) falls vorhanden. +- Als letztes aktiviert man noch die gewnschten Funktionen, wie zB: Gemeinesamer Goldschatz, Goldschatz-Zusatzseiten, usw. - Nun kann man den MOD auf klassische Art starten (mit oder ohne "-direct -txt", je nach MOD). D2Mod Konfiguration : -Ihr könnt die Version des D2Mod-System (v1.02 und Folgende) nutzen um PlugY zu starten. +Ihr knnt die Version des D2Mod-System (v1.02 und Folgende) nutzen um PlugY zu starten. - Startet PlugY_Uninstall.bat um alles zu deinstallieren -- Fügt die Zeile "PlugY=PlugY.dll" in den [D2MOD] Abschnitt der D2Mod.ini ein. +- Fgt die Zeile "PlugY=PlugY.dll" in den [D2MOD] Abschnitt der D2Mod.ini ein. Achtung, -- Gegenstände im Horadrim-Würfel werden immer im Spieler-Profil gespeichert. Wenn Ihr diese Gegenstände weitergeben wollt, müsst Ihr sie in den Goldschatz umpacken. +- Gegenstnde im Horadrim-Wrfel werden immer im Spieler-Profil gespeichert. Wenn Ihr diese Gegenstnde weitergeben wollt, msst Ihr sie in den Goldschatz umpacken. Warnung : - Editiere die Konfigurations-Datei nicht nachdem der MOD gestartet wurde. -- Prüfe bei Multiplayer-Spielen, dass alle die gleiche Konfiguration haben.than Clients. +- Prfe bei Multiplayer-Spielen, dass alle die gleiche Konfiguration haben.than Clients. - Erinnerung : PlugY funktioniert nicht auf REALM-Servern, es kann dort zum Crash kommen -*** Konfiguration für Modder *** +*** Konfiguration fr Modder *** Es gibt 3 Dateien mit dem selben Aufbau um PlugY zu konfigurieren: - "PlugY/PlugYFixed.ini" in einer Mpq oder im -direct Modus -Alle Einstellungen in der PlugYFixed.ini können nicht von Benutzern in der PlugY.ini verändert werden. -Zum An und Ausschalten (un)gewünschter Features. +Alle Einstellungen in der PlugYFixed.ini knnen nicht von Benutzern in der PlugY.ini verndert werden. +Zum An und Ausschalten (un)gewnschter Features. Achtung: 1. ActivePlugin=0 funktioniert hier nicht (nur ActivePlugin=1) -2. Speicherpfadänderungen funktioniern hier nicht. -3. Übertreibt es nicht, die meisten Einstllungen sollten vom Benutzer eingestellt werden dürfen. (Anmerkung weiter unten) +2. Speicherpfadnderungen funktioniern hier nicht. +3. bertreibt es nicht, die meisten Einstllungen sollten vom Benutzer eingestellt werden drfen. (Anmerkung weiter unten) - "PlugY/PlugYDefault.ini" in einer Mpq oder im -direct Modus Alle Einstllellungen in der PlugYDefault.ini werden als Standart benutzt. @@ -431,74 +436,74 @@ Alle Einstellungen die nicht in der PlugYFixed.ini stehen (und schon geladen sin Die meisten Einstellungen sollten hier sein. - "PlugY.ini" nur im Standartverzeichnis. -Für Benutzerkonfigurationen (wie in den voherigen Versionen). -Einstellungen die nicht in der PlugYFixed.ini stehen müssen hier sein. -In den meisten Fällen ist die "PlugY.ini" die selbe wie die PlugYDefault.ini nur das der Benutzer Einstellungen vornehmen kann. +Fr Benutzerkonfigurationen (wie in den voherigen Versionen). +Einstellungen die nicht in der PlugYFixed.ini stehen mssen hier sein. +In den meisten Fllen ist die "PlugY.ini" die selbe wie die PlugYDefault.ini nur das der Benutzer Einstellungen vornehmen kann. Anmerkung: -Überlege bei jeder Einstlellung ob sie wirklich ausgeschaltet sein muss. -- Die Speicherpfadeinstellungen funktionieren nicht in der Fixed.ini (Es sollte dem Benutzer überlassen sein wo er seine Speicherstände ablegt) -- Die Skill-Neuverteilung kann sehr nützlich sein umd neue Skills kennenzulernens. Ich habe aufgehört manche Mods zu spielen weil ich nicht wusste welche Skills im High-Level Bereich nützlich sein würden und welche nicht. Es macht mehr Spass wenn man alle Skills ausprobieren kann und sich dann aussucht welche man benutzt. Also stellt es nicht in der PlugYFixed.ini ein. +berlege bei jeder Einstlellung ob sie wirklich ausgeschaltet sein muss. +- Die Speicherpfadeinstellungen funktionieren nicht in der Fixed.ini (Es sollte dem Benutzer berlassen sein wo er seine Speicherstnde ablegt) +- Die Skill-Neuverteilung kann sehr ntzlich sein umd neue Skills kennenzulernens. Ich habe aufgehrt manche Mods zu spielen weil ich nicht wusste welche Skills im High-Level Bereich ntzlich sein wrden und welche nicht. Es macht mehr Spass wenn man alle Skills ausprobieren kann und sich dann aussucht welche man benutzt. Also stellt es nicht in der PlugYFixed.ini ein. - Das World Event sollte in jedem Mod in der Fixed.ini konfiguriert oder ausgeschaltet sein. - Die Extra Character Seiten sollten auch nicht in der Fixed.ini sein -Modder können mich erreichen, wenn sie Hilfe brauchen oder mehr Details über das Konfigurations-System haben möchten. +Modder knnen mich erreichen, wenn sie Hilfe brauchen oder mehr Details ber das Konfigurations-System haben mchten. -WARNUNG : Vergesst nicht, dass wenn Konfigurations-System missbraucht wird werden die Benutzer auf alte PlugY Versionen zurückgreifen und ich werde kein andere Möglichkeit haben als es zu deaktivieren. +WARNUNG : Vergesst nicht, dass wenn Konfigurations-System missbraucht wird werden die Benutzer auf alte PlugY Versionen zurckgreifen und ich werde kein andere Mglichkeit haben als es zu deaktivieren. ******************** FAQ ****************** Ich kann die PlugY.ini nicht finden ? -Öffne im Explorer Extras/Ordneroptionen/Anzeige und nimm den Haken raus bei Erweiterung bekannter Dateien ausblenden -Generell sehr sinnvoll, da man so leichter Viren identifiziert (zB virus.txt.exe da würde man sonst nur txt statt auch das exe sehen..) ! +ffne im Explorer Extras/Ordneroptionen/Anzeige und nimm den Haken raus bei Erweiterung bekannter Dateien ausblenden +Generell sehr sinnvoll, da man so leichter Viren identifiziert (zB virus.txt.exe da wrde man sonst nur txt statt auch das exe sehen..) ! Wie kann ich gelegentlich im Battle.net spielen, wenn PlugY aktiviert ist ? -2 Möglichkeiten: +2 Mglichkeiten: 1) Starte PlugY_Uninstall.bat bevor Du Diablo2 startest und starte PlugY_Install.exe danach wenn Du wieder Einzelspieler spielen willst 2) Nutze die klassische Installation. (Vergiss icht die PlugY.ini im Diablo2 Verziechniss zu entfernen) -Tips : Erzeuge eien Verknüpfung und füge -skiptobnet im "Ziel" Feld mit einem Leerzeichen hinter dem Anfühnrungszeichen hinzu, um direkt ins Battle.Net zu gelangen ohne die Videos. +Tips : Erzeuge eien Verknpfung und fge -skiptobnet im "Ziel" Feld mit einem Leerzeichen hinter dem Anfhnrungszeichen hinzu, um direkt ins Battle.Net zu gelangen ohne die Videos. Was tun wenn man "Bad Generic File" mit einem neuen Charakter bekommt ? Dies passiert wenn man einen "schlechten" Gegenstand in der gemeinsamen Kiste hat -Eine mögliche Ursache ist das Du das SAVE Verzeichnis für mehrere MODs benutzt, in diesem Fall musst Du das SAVE Verzeichnis in der PlugY.ini ändern. +Eine mgliche Ursache ist das Du das SAVE Verzeichnis fr mehrere MODs benutzt, in diesem Fall musst Du das SAVE Verzeichnis in der PlugY.ini ndern. I sehe "sUnitItemInsertItemInvGridBase failed at 1046 in C:\projects\D2\head\Diablo2\Source\D2Client\UNIT\Item.cpp" in der D2YYMMDD.txt ? -Das sind nur Warnungen, die Ihr einfach ignorieren könnt +Das sind nur Warnungen, die Ihr einfach ignorieren knnt Ich habe einen anderen Fehler, was kann ich tun ? 1) Lies meinen Thread und poste eine Frage im PhrozenKeep member annoucement forum. -2) Wenn dies Dir nicht weitergeholfen hat, sende mir eine email (at ynicolas@worldonline.fr) mit "PlugY bug" im Betreff und schreib auf Englisch oder Französisch, da ich kein Deutsch spreche -Hänge bitte folgende Dateien an: +2) Wenn dies Dir nicht weitergeholfen hat, sende mir eine email (at ynicolas@worldonline.fr) mit "PlugY bug" im Betreff und schreib auf Englisch oder Franzsisch, da ich kein Deutsch spreche +Hnge bitte folgende Dateien an: - PlugY.ini - PlugY.log (dazu muss active_logfile=1 in der plugY.ini aktiviert sein) - D2XXYYZZ.txt log Log Datei von Diablo - Beantworte die Fragen : wann,wo,wie,warum,... passiert das, und evtl mit welchem MOD ? Danke -Warum sind die fingerprint auf meinen Gegenständen auf 0 zurückgesetzt? +Warum sind die fingerprint auf meinen Gegenstnden auf 0 zurckgesetzt? - Anscheinend ein Bug, warnt mich bitte, falls ihr ihn habt. ******** Kommentare aus der Konfigurations-Datei ******** -Standardwerte bedeuten, das sie auch benutzt werden, wenn Ihr die Zeilen in der PlugY.ini löscht. +Standardwerte bedeuten, das sie auch benutzt werden, wenn Ihr die Zeilen in der PlugY.ini lscht. Die Werte in der PlugY.ini (die dem ZIP beiliegt) sind ein Beispiel einer Konfiguration, nicht die Standardwerte.value. [LAUNCHING] -Dieser Abschnitt beinhaltet Informationen für die PlugY.exe und funktioniert nicht in der PlugYDefault.ini und PlugYFixed.ini +Dieser Abschnitt beinhaltet Informationen fr die PlugY.exe und funktioniert nicht in der PlugYDefault.ini und PlugYFixed.ini -Füge Parameter hinzu um LoD mit der gewünschten Einstellung zu starten -Parameter die der PlugY.exe hinzugefügt wurden werden auch an LoD weitergeleitet -Standartmäßig werden keine Parameter ausgeführt -Die häufigsten Parameter sind (ohne Anführungszeichen) : -"-w" Starte LoD im Fenstermodus +Fge Parameter hinzu um LoD mit der gewnschten Einstellung zu starten +Parameter die der PlugY.exe hinzugefgt wurden werden auch an LoD weitergeleitet +Standartmig werden keine Parameter ausgefhrt +Die hufigsten Parameter sind (ohne Anfhrungszeichen) : +"-w" Starte LoD im Fenstermodus. (See WINDOWED section instead) "-direct" Die Dateien im data-Ordner werden anstatt der in den MPQ's enthaltenen verwendet "-txt" Wandelt beim Spielstart die txt-dateien im data-Ordner in bin-dateien um -Zwischen den folgenden {} sind Beispielparameter mit Erklärung : +Zwischen den folgenden {} sind Beispielparameter mit Erklrung : Param= {-direct -txt -w: these 3 commands are passed on the command line} -Wähle die Dll aus die geladen werden soll. -Das gewählte Verzeichnis wird von LoD benutzt (wie die "Ausführen in"-Zeile in einer Verknüpfung). +Whle die Dll aus die geladen werden soll. +Das gewhlte Verzeichnis wird von LoD benutzt (wie die "Ausfhren in"-Zeile in einer Verknpfung). Wenn keine Dll angegeben ist startet LoD ohne PlugY Library=PlugY.dll @@ -511,7 +516,7 @@ Beispiel: Erzeugen der Log-Datei "PlugY.log" im aktuellen Verzeichnis. Beispiel: -- ActiveLogFile=0 (Deaktiviert, Standard, keine Informationen werden während des Spiels geschrieben) +- ActiveLogFile=0 (Deaktiviert, Standard, keine Informationen werden whrend des Spiels geschrieben) - ActiveLogFile=1 (Aktiviert) Enable or disable BattleNet Access. @@ -522,35 +527,81 @@ Beispiel: Laden von weiteren DLLs, wenn PlugY genutzt wird. Trenne jeden DLL-Namen durch das Zeichen Pipe (|) Alle Dateien im "DllToLoad"-Feld werden immer geladen. -Beispiele um zwei DLLs für einen MOD zu laden, und der Standard: +Beispiele um zwei DLLs fr einen MOD zu laden, und der Standard: - DllToLoad=D2extra.dll|myDll.dll - DllToLoad= (Keine DLL zu laden, Standard) - DllToLoad2=D2OtherExtra.dll|myDll2.dll - DllToLoad2= (Keine DLL zu laden, Standard) -Neue Kommandos in PlugY hinzugefügt, diese können während des Spiels genutzt werden -"/dlm" schaltet den Wert von AlwaysDisplayLifeandManaValues=1 auf 0 -"/page x" Gehe zu Seite X in den Extra Status Seiten. -"/save" Save the game without exit (LoD 1.11 und 1.11b einzig). +Neue Kommandos in PlugY hinzugefgt, diese knnen whrend des Spiels genutzt werden +/save : Save game without exit (LoD 1.11 minimum). +/page 1 : Show normal stats page (stats page must be opened, space not mandatory). +/page 2 : Show extra stats page (stats page must be opened, space not mandatory). +/page 3 : Show resistance stats page (stats page must be opened, space not mandatory). +/page 4 : (beta) Show available runewords (stats page must be opened, space not mandatory). +/lockmouse : Lock mouse cursor in the window. +/lock : Same as /lockmouse. +/unlockmouse : Unlock mouse cursor in the window. +/unlock : Same as /unlockmouse. +/renamechar newname : Rename your character and save it. (You must exit the game to update the stats page.) +/renamepage name : Rename current page stash (MultiStash activated). +/setindex : Set current stash page as index (prev/next index button go to an index if exists) (MultiStash activated). +/resetindex : Remove index flag on the current stash page (MultiStash activated). +/insertpage : Insert a new page after the current page (MultiStash activated). +/deletepage : Delete current page if empty (MultiStash activated). +/swap page : Swap the content of current stash page with the content of another page (space not mandatory) (MultiStash activated). +/toggle page : Swap the content of current stash page with the content of another page in opposing stash shared/personal (space not mandatory) (MultiStash activated). +/dlm : Toggle always display mana and life mode. (Since 1.13c, you can click on the bottom of each orbs) +/dml : Same as /dlm. +/dl : Toggle always display life mode. (Since 1.13c, you can click on the bottom of the orb) +/dm : Toggle always display mana mode. (Since 1.13c, you can click on the bottom of the orb) +/listcube : (beta) Create a "cube.txt" file in current directory containing all cube's receipts (LoD 1.10 minimum). - ActiveCommands=0 (0=Aus; 1=Ein) Beendet D2, wenn PlugY nicht alle Features installieren konnte. Nur Ausschalten wenn du weist was du machst. - ActiveCheckMemory=1 +Activate hidden or not finished feature. (don't use it) +- ActiveAllOthersFeatures=0 {0:Disabled; 1:Enabled} + + +[WINDOWED] +Launch in windowed mode. +- ActiveWindowed=0 {0:Disabled; 1:Enabled} + +Remove border in windowed mode. +- RemoveBorder=0 {0:Disabled; 1:Enabled} + +Set window at most top (above taskbar) in windowed mode. +- WindowOnTop=0 {0:Disabled; 1:Enabled} + +Maximized and center window (keep ratio 4/3) in windowed mode (if SetWindowPos=0). +- Maximized=0 {0:Disabled; 1:Enabled} + +Set position and size of the window in windowed mode. +- SetWindowPos=0 {0:Disabled; 1:Enabled} +- X=0 {0:Window Position X} +- Y=0 {0:Window Position Y} +- Width=0 {0:Window Width} +- Height=0 {0:Window Height} + +Lock cursor mouse in the window in windowed mode. +- LockMouseOnStartup=0 {0:Disabled; 1:Enabled} + [LANGUAGE] -Wechselt die ausgewählte Sprache -Ihr müsst die Dateien der Sprache besitzen!!! +Wechselt die ausgewhlte Sprache +Ihr msst die Dateien der Sprache besitzen!!! Alle D2/LoD Versionen beinhalten Englisch (nur Text, kein TON). -Alle möglcihen Sprachen: ENG|ESP|DEU|FRA|POR|ITA|JPN|KOR|SIN|CHI|POL|RUS +Alle mglcihen Sprachen: ENG|ESP|DEU|FRA|POR|ITA|JPN|KOR|SIN|CHI|POL|RUS - ActiveChangeLanguage=1 {0:Ausgeschaltet; 1:Eingeschaltet} -- SelectedLanguage=ENG {FRA: Wähle Französisch als SPrache} +- SelectedLanguage=ENG {FRA: Whle Franzsisch als SPrache} -Für Modder die die möglichen Sprachen einschränken wollen: +Fr Modder die die mglichen Sprachen einschrnken wollen: - ActiveLanguageManagement=1 {0:Ausgeschaltet; 1:Eingeschaltet} -- DefaultLanguage=ENG {leer:D2 default Sprache; FRA:Französisch ist default Sprache} +- DefaultLanguage=ENG {leer:D2 default Sprache; FRA:Franzsisch ist default Sprache} - AvailableLanguages=ENG|FRA {ENG|ESP|DEU|FRA|POR|ITA|JPN|KOR|SIN|CHI|POL|RUS} @@ -558,18 +609,16 @@ Für Modder die die möglichen Sprachen einschränken wollen: Hier werden alle Charaktere und der gemeinsame Goldschatz gespeichert. Man kann feste Pfade benutzen Beispiele: -- ActiveSavePathChange=0 (Deaktiviert, Standard, der Speicherort ist der Original-D2 Save-Ordner) -- ActiveSavePathChange=1 (Aktiviert, man muss "SavePath" ausfüllen) -- SavePath=D:\Save Games\diablo II\Current Mod\ -- SavePath=Save\ (Standard) +- ActiveSavePathChange=0 {0:Disabled; 1:Aktiviert, man muss "SavePath" ausfllen} +- SavePath=Save\ {Save\MyMod\ or D:\Save Games\diablo II\Current Mod\} [MAIN SCREEN] -Hier kann man die Versionsinfo des Hauptbildschirms ändern (Original ist : v 1.10) +Hier kann man die Versionsinfo des Hauptbildschirms ndern (Original ist : v 1.10) Die Farbcodes sind Integer,identisch zu den D2 Farben. Beispiele : - ActiveVersionTextChange=0 {0:Deaktiviert; 1=Aktiviert} -- VersionText=v 1.10 {Aktuelle Mod Version (Text links unten) :Textlänge maximal 23 Zeichen} +- VersionText=v 1.10 {Aktuelle Mod Version (Text links unten) :Textlnge maximal 23 Zeichen} - ColorOfVersionText=0 {0:Weiss; 1:Rot; 4:Gold; usw.} - ActivePrintPlugYVersion=1 {0:Deaktiviert; 1=Aktiviert (Text rechts unten) ) - ColorOfPlugYVersion=4 {0:Weiss; 1:Rot; 4:Gold; usw.} @@ -577,24 +626,24 @@ Beispiele : [STASH] Es gibt zwei Goldschatzkisten mit Mehrfach-Seiten : -- eine persönliche die nur der Spieler sieht ; +- eine persnliche die nur der Spieler sieht ; - eine gemeinsame die jeder Spieler sieht. Benutzt den "Goldschatz"-Knopf um zwischen den beiden Kisten zu wechseln (unten links). Benutze die Pfeiltasten am unteren Rand der Kiste (und die Shift Taste) um zwischen den Seiten umzuschalten -Definition: Die letzte Seite, ist die letzte Seite die einen Gegenstand enthält -Die Mehrfach-Seiten sind deaktiviert für Diablo2 Classic Charaktere. -Startet NIEMALS mehrere Spiele auf einem PC die den gleichen Speicherort für den gemeinsamen Goldschatz benutzen und in Realm Spielen. +Definition: Die letzte Seite, ist die letzte Seite die einen Gegenstand enthlt +Die Mehrfach-Seiten sind deaktiviert fr Diablo2 Classic Charaktere. +Startet NIEMALS mehrere Spiele auf einem PC die den gleichen Speicherort fr den gemeinsamen Goldschatz benutzen und in Realm Spielen. -Beispiele für den Mehrfachseiten-Goldschatz: +Beispiele fr den Mehrfachseiten-Goldschatz: - ActiveMultiPageStash=0 (Deaktiviert, Standard) - ActiveMultiPageStash=1 (Aktiviert) - NbPagesPerIndex=10 (Standard, Index Seiten sind :1,10,20,30,...,max) - NbPagesPerIndex=5 (Index Seiten sind :1,5,10,15,...,max) - NbPagesPerIndex2=100 {50: Index Seite (+shift) ist 1, 50, 100, 150,...max) -Beispiel Konfiguration des persönlichen Goldschatz : -- MaxPersonnalPages=0 (Standard, nahezu unbegrenzte Speicherseiten in dem persönlichen Goldschatz) -- MaxPersonnalPages=1000 (Maximum von 1000 persönlichen Speicherseiten) +Beispiel Konfiguration des persnlichen Goldschatz : +- MaxPersonnalPages=0 (Standard, nahezu unbegrenzte Speicherseiten in dem persnlichen Goldschatz) +- MaxPersonnalPages=1000 (Maximum von 1000 persnlichen Speicherseiten) Beispiel Konfiguration des gemeinsamen Goldschatz : - ActiveSharedStash=0 (Deaktiviert, Standard) @@ -602,38 +651,40 @@ Beispiel Konfiguration des gemeinsamen Goldschatz : - MaxSharedPages=0 (Standard, nahezu unbegrenzte Speicherseiten in dem gemeinsamen Goldschatz) - MaxSharedPages=50000 (Maximum von 50000 gemeinsamen Seicherseiten) - SeparateHardcoreStash=1 {0:Same shared stash for HC and SC; 1:Use 2 differents stashes} +- OpenSharedStashOnLoading=0 {0:Disabled; 1:Select shared stash (instead of personal one) on character loading} - SharedStashFilename=SharedStashSave {Die Datei heisst dann: _LOD_MeinGemeinsamerGoldSchatz.sss} -- ActiveSharedGold=1 {0:Abschalten; 1:Schaltet die Kommandos frei, um Gold in der gemeinsame Kiste nutzen zu können (siehe Kommando-Abschnitt)} +- ActiveSharedGold=1 {0:Abschalten; 1:Schaltet die Kommandos frei, um Gold in der gemeinsame Kiste nutzen zu knnen (siehe Kommando-Abschnitt)} -Grössenänderung des Goldschatz auf 10x10 Felder. -Benutze PlugY\TradeStash.dc6 um das Hintergrundbild zu ändern. +Grssennderung des Goldschatz auf 10x10 Felder. +Benutze PlugY\TradeStash.dc6 um das Hintergrundbild zu ndern. Beispiel: -- ActiveBigStash=0 (Deaktiviert, Standard, original GOldkistengrösse aus der MPQ wird benutzt) +- ActiveBigStash=0 (Deaktiviert, Standard, original GOldkistengrsse aus der MPQ wird benutzt) - ActiveBigStash=1 (Aktiviert) [STATS POINTS] Dies kann man nutzen, um versehentlich vergebene Status-Punkte neu zu verteilen. -Zum Beispiel wenn man 30 Punkte in Energie für Barbaren vergeben hat!) -Auf der Charakter Status Seite, drückt die ausgewählte Taste und klickt mit der Maus auf den "Minus"-Knopf. +Zum Beispiel wenn man 30 Punkte in Energie fr Barbaren vergeben hat!) +Auf der Charakter Status Seite, drckt die ausgewhlte Taste und klickt mit der Maus auf den "Minus"-Knopf. Festlegen der Taste mit KeyUsed (entweder 17 oder 18). Settings example to unassign stats points : - ActiveStatsUnassignment=0 (Deaktiviert, Standard) -- ActiveStatsUnassignment=1 (Aktiviert, drücke die Taste beim klicken) +- ActiveStatsUnassignment=1 (Aktiviert, drcke die Taste beim klicken) - KeyUsed=17 (Steuerungs-Taste (Strg oder Ctrl), Standard) - KeyUsed=18 (Alt Taste) -Mit der "Shift"-Taste könnt Ihr die Status-Punkte in grösseren Stufen vergeben/zurücksetzen (maximal alles mt einem Klick). +Mit der "Shift"-Taste knnt Ihr die Status-Punkte in grsseren Stufen vergeben/zurcksetzen (maximal alles mt einem Klick). Man kann ein Limit setzen. Beispiel: - ActiveShiftCkickLimit=0 (Deaktiviert, Standard) - ActiveShiftCkickLimit=1 (Aktiviert) -- LimitValueToShiftClick=5 (Standard, es werden maximal 5 Statuspunkte auf einmal verändert) +- LimitValueToShiftClick=5 (Standard, es werden maximal 5 Statuspunkte auf einmal verndert) [STAT ON LEVEL UP] -Ändert die Anzahl der Statuspunkte beim LevelUp +WARNING : CHEAT, DON'T USE IN NORMAL GAME. +ndert die Anzahl der Statuspunkte beim LevelUp Beispiel: - ActiveStatPerLevelUp=0 {0:Deaktiviert; 1:Aktiviert} - StatPerLevelUp=11 {0:keine Statuspunkte beim LevelUp; 11:elf Punkte beim LevelUp} @@ -641,8 +692,8 @@ Beispiel: [SKILLS POINTS] Kann genutzt werden um versehentlich gesetzte Fertigkeitspunkte zu korrigieren - Klickt auf den Knopf auf der Fertigkeits-Seite, um alle Punkte zurückzusetzen . -Hinweis: Überprüft die wahren "Kosten" für jede Fertigkeit ( kann grösser als 1 sein in einem MOD) + Klickt auf den Knopf auf der Fertigkeits-Seite, um alle Punkte zurckzusetzen . +Hinweis: berprft die wahren "Kosten" fr jede Fertigkeit ( kann grsser als 1 sein in einem MOD) Im folgenden die Standardwerte und in {} einige Beispiel Werte mit Beschreibungen: - ActiveSkillsUnassignment=0 {0: Ausgeschaltet ; 1: Eingeschaltet } - ActiveSkillsUnassignmentOneForOne=0 {0:Normal; 1:Force the skill unassign 1 for 1 (for mods).} @@ -651,7 +702,8 @@ Hinweis: Überprüft die wahren "Kosten" für jede Fertigkeit ( kann grösser a [SKILL ON LEVEL UP] -Ändert die Menge der Fertigkeitspunkte beim LevelUp. +WARNING : CHEAT, DON'T USE IN NORMAL GAME. +ndert die Menge der Fertigkeitspunkte beim LevelUp. Beispiel : - ActiveSkillPerLevelUp=0 (Deakiviert, Standard) - ActiveSkillPerLevelUp=1 (Aktiviert) @@ -662,53 +714,53 @@ Beispiel : [WORLD EVENT] Aktiviert den lokalen World Event -World Event kann nur in Hölle und nur einmal pro Spiel aktiviert werden. +World Event kann nur in Hlle und nur einmal pro Spiel aktiviert werden. WorldEvent wird alle 75-125 verkauften SOJ aktivert -Der Verkauf eines echten SOJ erhöht den Zähler um 100 -Bei Start eines D2 Spiels ist der SOJ Zähler zwischen 200-3000 -Der SOJ Zähler wird alle 10-20 Minuten um 1 erhöht, auch wenn man nicht in einem Spiel ist. -When der World Event ausgelöst wird, und man nicht in einem Spiel ist, verliert man ihn. +Der Verkauf eines echten SOJ erhht den Zhler um 100 +Bei Start eines D2 Spiels ist der SOJ Zhler zwischen 200-3000 +Der SOJ Zhler wird alle 10-20 Minuten um 1 erhht, auch wenn man nicht in einem Spiel ist. +When der World Event ausgelst wird, und man nicht in einem Spiel ist, verliert man ihn. Hinweis 1: Es besteht eine Chance von 1/12 einen WE in der ersten Spielstunde zu erhalten -Hinweis 2: Von Beginn eines neuen Spiels kommt der nächste WE wird innerhalb weniger Sekunden bis 41:40 Stunden danach +Hinweis 2: Von Beginn eines neuen Spiels kommt der nchste WE wird innerhalb weniger Sekunden bis 41:40 Stunden danach Im folgenden die Standardwerte und in {} einige Beispiel Werte mit Beschreibungen: - ActiveWorldEvent=0 {0: Ausgeschaltet ; 1: Eingeschaltet } -- ShowCounterInAllDifficulty=0 {0:Zeige die Meldung "SOJ verkauft" nur in Hölle; 1:Zeige es in allen Schwierigkeitsgraden} +- ShowCounterInAllDifficulty=0 {0:Zeige die Meldung "SOJ verkauft" nur in Hlle; 1:Zeige es in allen Schwierigkeitsgraden} - ItemsToSell=The Stone of Jordan {r01: rune EL; cap,rar,upg: Jede cap/war hat/shako rare} - MonsterID=333 {333: DiabloKlon erscheint} -- OwnSOJSoldChargeFor=100 {100:Wenn Du einen SOJ verkaufst wird der SOJ Zähler um 100 erhöht} -- InititalSOJSoldMin=200 {200:Der SOJ Zähler ist mindestens bei 200 wenn Du D2 startest} -- InititalSOJSoldMax=3000 {3000:Der SOJ Zähler ist maximal bei 3000 wenn Du D2 startest} +- OwnSOJSoldChargeFor=100 {100:Wenn Du einen SOJ verkaufst wird der SOJ Zhler um 100 erhht} +- InititalSOJSoldMin=200 {200:Der SOJ Zhler ist mindestens bei 200 wenn Du D2 startest} +- InititalSOJSoldMax=3000 {3000:Der SOJ Zhler ist maximal bei 3000 wenn Du D2 startest} - TriggerAtEachSOJSoldMin=75 {75:Man muss mindestens 75 SOJ verkaufen zwischen zwei World Event} - TriggerAtEachSOJSoldMax=125 {125:Man muss maximal 125 SOJ verkaufen zwischen zwei World Event} -- ActiveAutoSell=1 {0:Deaktiviert; 1:Aktiviert das automatische erhöhen des SOJ Zählers um 1} -- TimeBeforeAutoSellMin=0 {50:Es dauert mindestens 0 Sekunden zwischen 2 Hintergrund Verkäufen} -- TimeBeforeAutoSellMin=1200 {1200:Es dauert maximal 20 Minuten (1200 Sekunden) zwischen 2 Hintergrund Verkäufen} +- ActiveAutoSell=1 {0:Deaktiviert; 1:Aktiviert das automatische erhhen des SOJ Zhlers um 1} +- TimeBeforeAutoSellMin=0 {50:Es dauert mindestens 0 Sekunden zwischen 2 Hintergrund Verkufen} +- TimeBeforeAutoSellMin=1200 {1200:Es dauert maximal 20 Minuten (1200 Sekunden) zwischen 2 Hintergrund Verkufen} [UBER QUEST] -Aktiviert den Über-Quest im Single-Player -Du musst die 3 Schlüssel, danach die 3 Organe verwandeln. +Aktiviert den ber-Quest im Single-Player +Du musst die 3 Schlssel, danach die 3 Organe verwandeln. Dies muss jeweils in Harrogath erfolgen -Notiz: Dieser Quest wird in einer späteren PlugY Version mehr dem Verhalten im Battle.net angepasst -Warnung: Aktuell sind die Über-Monster direkt neben dem Portal, also sei vorsichtig, wenn Du durch das Portal gehst!!! +Notiz: Dieser Quest wird in einer spteren PlugY Version mehr dem Verhalten im Battle.net angepasst +Warnung: Aktuell sind die ber-Monster direkt neben dem Portal, also sei vorsichtig, wenn Du durch das Portal gehst!!! ActiveUberQuest=0 {0:Deaktiviert; 1:Aktiviert} [INTERFACE] -Fügt eine zusätzliche Charakter Info Seite hinzu -Man kann auswählen, ob die zuletzt angezeigte Seite erscheint, oder die Hauptseite -Die Eigenschaften die in den Extraseiten angezeigt werden können in der PlugY\statsinterface.txt verändert werden (Mit MS Excel öffnen) +Fgt eine zustzliche Charakter Info Seite hinzu +Man kann auswhlen, ob die zuletzt angezeigte Seite erscheint, oder die Hauptseite +Die Eigenschaften die in den Extraseiten angezeigt werden knnen in der PlugY\statsinterface.txt verndert werden (Mit MS Excel ffnen) Es gibt kein Seitenlimit. -Unterdrückt den Hintergrund von Schaltflächen, wenn der MOD diese bereits ändert +Unterdrckt den Hintergrund von Schaltflchen, wenn der MOD diese bereits ndert - ActiveNewStatsInterface=0 {0:Deaktiviert ; 1: Aktiviert} -- SelectMainPageOnOpenning=1 {0:Zuletzt ausgewählte Seite wird angezeigt; 1: Hauptseite wird angezeigt} +- SelectMainPageOnOpenning=1 {0:Zuletzt ausgewhlte Seite wird angezeigt; 1: Hauptseite wird angezeigt} - PrintButtonsBackgroundOnMainStatsPage=1 {0: Zeigt nicht den Hintergrund an ; 1: Zeigt ihn an } [EXTRA] Man kann LOD beliebig oft auf einem Comuter starten. -Zum Beispiel können Modder Multiplayer-Spiele auf einem PC testen. +Zum Beispiel knnen Modder Multiplayer-Spiele auf einem PC testen. Warnung : Startet keine Spiele mit dem gleichen Speicherort (SavePath), wenn Ihr den gemeinsamen Goldschatz aktiviert habt. Benutzt nicht zweimal den gleichen Charakter zur gleichen Zeit. @@ -726,11 +778,11 @@ Anzeige des ItemLevels im Gegenstandsinfobereich Dauerhafte Anzeige der Mana/Lebens- Werte oberhalb der Kugeln - AlwaysDisplayLifeAndManaValues=0 {0:Deaktiviert ; 1: Aktiviert; 2:Ausgeschaltet, kann per Kommando eingeschaltet werden} -Behebt den Bug der verhindert das von Microsoft Excel geöffnete Text-Dateien nich geladen werden konnten. +Behebt den Bug der verhindert das von Microsoft Excel geffnete Text-Dateien nich geladen werden konnten. - EnabledTXTFilesWhenMSExcelOpenIt=0 {0:Deaktivert; 1:Aktiviert} -Die Ladder-Only Runenwörter können für den Singleplayer aktivert werden. -Das wird ermöglicht indem die Spalte "Server" in der runes.txt deaktiviert wird. +Die Ladder-Only Runenwrter knnen fr den Singleplayer aktivert werden. +Das wird ermglicht indem die Spalte "Server" in der runes.txt deaktiviert wird. Benutze diese Spalte also nicht in deinem Mod wenn diese Funktion aktivert ist. - ActiveLadderRunewords=0 {0:Deaktivert; 1:Aktiviert} @@ -739,30 +791,28 @@ Weitere Funktionen folgen... :) Wenn Ihr Anregungen habt, Fehler findet oder Konflikte mit MODs feststellt, schickt eine eMail an ynicolas@worldonline.fr mit "DiabloII" als Betreffzeile! -Zur Korrektur der deutschen Übersetzung bitte eine eMail an ChaosEnergy@planetdiablo.com +Zur Korrektur der deutschen bersetzung bitte eine eMail an ChaosEnergy@planetdiablo.com ******** Dank geht an: ******** -- Blizzard für Diablo2 und Lord of Destruction. -- Kingpin, Afj666, Joel, SVR, Myrdinn für Ihre Hilfe. +- Blizzard fr Diablo2 und Lord of Destruction. +- Kingpin, Afj666, Joel, SVR, Myrdinn fr Ihre Hilfe. - Pralinor fo his help in the convertion to 1.12. -- ChaosEnergy für Beta-Tests und die deutsche Übersetzung. -- Char & Darque für die Hilfe bei der englischen Übersetzung. -- Shaitane, K&V, TheMasterCaster, raspa und onyx für Tests. -- Golvmopp, Dark Spot in the Corner, Megalixir und Athara für ihr Hilfe. -- ItalianPlayer für Italienisch Übersetzung. -- Alle Mitglieder des ProzenKeep Chat und Forum für Ihre Informationen und das Feedback. -- PhrozenKeep für alle Dinge die sie mit uns teilen (inklusive meinen ;) -- Übersetzung : +- L'Autour fo his help in the convertion to 1.13d. +- ChaosEnergy fr Beta-Tests und die deutsche bersetzung. +- Char & Darque fr die Hilfe bei der englischen bersetzung. +- Shaitane, K&V, TheMasterCaster, raspa und onyx fr Tests. +- Golvmopp, Dark Spot in the Corner, Megalixir und Athara fr ihr Hilfe. +- ItalianPlayer fr Italienisch bersetzung. +- Alle Mitglieder des ProzenKeep Chat und Forum fr Ihre Informationen und das Feedback. +- PhrozenKeep fr alle Dinge die sie mit uns teilen (inklusive meinen ;) +- bersetzung : * Englisch : Yohann, Jurica. - * Französisch : Yohann + * Franzsisch : Yohann * Deutch : ChaosEnergy, TheMasterCaster. * Italienisch : ItalianPlayer * Spanish : Acrerune - * Polnisch : Serdel + https://translate.google.com - * Russisch: L'Autour. - * Portugiesisch: https://translate.google.com - * Japanisch: https://translate.google.com - * Koreanisch: https://translate.google.com - * Chinesisch: https://translate.google.com - ~~~~~~~~~~~~. + * Polnisch : Serdel + * Russisch : L'Autour + +;--------------------------------------------------------------------------------------; \ No newline at end of file diff --git a/PlugYInstaller/PlugY_The_Survival_Kit_-_LisezMoi.txt b/PlugYInstaller/PlugY_The_Survival_Kit_-_LisezMoi.txt index 7eea841..803ae78 100644 --- a/PlugYInstaller/PlugY_The_Survival_Kit_-_LisezMoi.txt +++ b/PlugYInstaller/PlugY_The_Survival_Kit_-_LisezMoi.txt @@ -3,8 +3,8 @@ ; "PlugY, The Survival Kit" ; ; ; ; par Yohann Nicolas ; -; (modification par L'Autour) ; -; version 11.00 ; +; ; +; version 11.01 ; ; ; ;--------------------------------------------------------------------------------------; @@ -15,21 +15,19 @@ Vous pouvez y faire un don si vous le souhaitez. ******** ATTENTION ******** - Ce plugin fonctionne sur LoD version 1.09 1.13d et sur leurs mods. -- Ce plugin ne fonctionne pas sur les royaumes (Battle.net ou priv). +- Ce plugin ne fonctionne pas sur les royaumes Battle.net. - Tous les fichiers ont changs depuis les versions prcdentes, donc dinstaller toutes les versions prcdentes. -- S'il vous plait, utilis le D2gfx.dll non modifi avant de rapporter une erreur. - PlugY.ini a t modifi depuis les versions prcdentes, utiliser celui fourni dans cette archive. -- Ne pas oubliez de lire la partie nomme "COMMENTAIRES SUR LE FICHIER DE CONFIGURATION". -- Les moddeurs devraient lire la version anglaise de ce readme. - N'oubliez pas de lire les forums : http://forum.judgehype.com/judgehype/ModsetModding/liste_sujet-1.htm http://d2mods.info/forum/viewforum.php?f=133 (anglais) ******** CARACTERISTIQUES ******** +Toutes ces fonctions peuvent tre activ/dsactiv via PlugY.ini (voir "COMMENTAIRES SUR LE FICHIER DE CONFIGURATION") - Dsactive l'accs Battle.net -- Espace de stockage infini dans le coffre (jusqu' 4 294 967 296 pages personnelles!) -- Espace de stockage partag dans le coffre (jusqu' 4 294 967 296 pages partages aussi!) +- Espace de stockage infini dans le coffre ! +- Espace de stockage partag dans le coffre ! - Active les mots runiques du ladder en dehors des royaumes. - World Event et Uber Quest en Local pour le monojoueur et le multijoueur hors royaumes ! - Permet d'ouvrir le portail vers le Cow Level mme quand on a tuer le Cow King dans cette difficult. @@ -46,23 +44,68 @@ Vous pouvez y faire un don si vous le souhaitez. - D2 peut charger tout les fichiers, mme ceux ouvert par Microsoft Excel (dsactiv par defaut). - Affiche la valeur courante des caracs (sans les bonus magiques). - Localis en franais, anglais, allemand, italien, espagnol et polonais. +- Ajout des commandes suivantes (voir "COMMENTAIRES SUR LE FICHIER DE CONFIGURATION") : + /save : Sauvegarde la partie sans quitter. + /page 1 : Affiche la page des stats de base (la page des stats doit tre ouverte). + /page 2 : Affiche la page des stats en plus (la page des stats doit tre ouverte). + /page 3 : Affiche la page des stats de resistances (la page des stats doit tre ouverte). + /page 4 : (bta) Affiche la page des mots runiques actifs (la page des stats doit tre ouverte). + /lockmouse : Bloque le curseur de la souris dans la fentre. + /lock : Identique /lockmouse. + /unlockmouse : Libre le curseur de la souris de la fentre. + /unlock : Identique /unlockmouse. + /renamechar newname : Renomme la personnage et le sauvegarde. + /renamepage name : Renomme la page courante du coffre. + /setindex : La page courante devient un index. + /resetindex : Retire la page courante des index. + /insertpage : Insre une nouvelle page aprs la page courante. + /deletepage : Supprime la page courante si elle est vide. + /swap page : Echange le contenu de la page actuelle du coffre avec le contenu d'une autre "page". + /toggle page : Echanger le contenu de la page actuelle du coffre avec le contenu d'une autre "page" du coffre oppos partag/personnel (espace non obligatoire). + /dlm : Inverse le mode d'affichage: Toujours afficher les valeurs de vie et de mana. + /dml : Identique /dlm. + /dl : Inverse le mode d'affichage: Toujours afficher les valeurs de vie. + /dm : Inverse le mode d'affichage: Toujours afficher les valeurs de mana. + /listcube : (bta) Cre un fichier "cube.txt" dans le rpertoire de sauvegarde contenant toutes les formules actives du cube. -Changements apports par la v11.00 : -- PlugY fonctionne aussi la version 1.13c de LOD. -- Plein soutien en faveur d'autres langues dans le jeu. + +Changements apports par la v11.01 : +Ajout de la compatibilit avec la version 1.13d de LOD. (merci L'Autour) +Ajout de la commande /unlockmouse : Libre le curseur de la souris de la fentre. +Ajout de la commande /unlock : Identique /unlockmouse. +Ajout de la commande /renamepage name : Renomme la page courante du coffre. +Ajout de la commande /setindex : La page courante devient un index. +Ajout de la commande /resetindex : Retire la page courante des index. +Ajout de la commande /insertpage : Insre une nouvelle page aprs la page courante. +Ajout de la commande /deletepage : Supprime la page courante si elle est vide. +Ajout de la localisation en russe ainsi qu'une traduction Google pour les langue non traduite. (merci L'Autour) +Ajout d'une option dans PlugY.ini pour slectionner le coffre partag (au lieu du personnel) lors du chargement d'un persos. +Renomme la commande /rename en /renamechar. +Suppression de la commande non termin : /reload. + +Changements apports par la v11.00 : Version non officielle ajoutant le support pour LoD 1.13d + +Changements apports par la v10.01 : +- Ajout du mode fentr. +- Peut bloquer le curseur de la souris dans la fentre. (mode fentr). +- Peut supprimer les bordure de la fentre (mode fentr). +- Peut redimensionner ou maximiser la fentre (mode fentr). +- Peut mettre la fentre au-dessus de toutes les autres fentres, y compris la barre des tches (mode fentr). +- Permet de verrouiller le curseur de la souris dans les fentres au dmarrage et avec la commande "/lockmouse" ou "/lock" (mode fentr). +- Ajout de la commande "/swap page" pour changer le contenu de la page actuelle du coffre avec le contenu d'une autre "page". +- Ajout de la commande "/toggle page" pour changer le contenu de la page actuelle du coffre avec le contenu d'une autre "page" du coffre oppos (partag/personnel). +- Ajout de la commande "/rename newname" pour renommer son personnage. Cette fonctionnalit est en bta et vous devez quitter la partie pour mettre jour la page des stats. Changements apports par la v10.00 : - Dsactive l'accs Battle.net par le bouton du menu principal. - PlugY fonctionne aussi la version 1.13c de LOD. - Corrige le raccourci dans le menu dmarrer. - Changements apports par la v9.00 : - PlugY fonctionne aussi la version 1.12 de LOD. - Corrige diffrents bugs. - Ajout d'une option pour le dassignement des skill dans les mods. - Changements apports par la v8.00 : - Installation plus aise : Nouvel installeur. - Permet d'ouvrir le portail vers le Cow Level mme quand on a tuer le Cow King dans cette difficult. @@ -73,16 +116,13 @@ Changements apport - Multiplayer : Sauvegarde les fichiers du stash (avec les donnes du client comme avec les versions d'avant 5.00) quand il y a une dconnection ou une erreur apparait durant la procdure de sauvegarde. - Remove the "check load memory failed" message when D2gfx.dll was patched. - Changements apports par la v7.02 : - Corrige la perte de points de skills quand on les dsalloue dans les mods contenant des skills spciaux. - Changements apports par la v7.01b : - Corrige l'activation des mots runiques du ladder dans les versions 1.11 and 1.10 de LoD. - Corrige les caractres tranges de quelques texts. - Changements apports par la v7.01 : - Active les mots runiques du ladder en dehors des royaumes. - Corrige le bug avec l'IA de Uber Baal. @@ -91,7 +131,6 @@ Changements apport - Ajout d'un excutable pour lancer Plugy (plus aucun fichier de LoD modifi). (RAPPEL) - Traduction en espagnol et polonais. - Changements apports par la v7.00 : - PlugY fonctionne aussi la version 1.11b de LOD. - Ajout d'un excutable pour lancer Plugy (plus aucun fichier de LoD modifi). @@ -100,17 +139,14 @@ Changements apport - Corrige les fonctions qui restais active sur Battle.net. - Traduction en italien. - Changements apports par la v6.01b : - Correction d'un bug avec l'affichage du popup sur les bouttons d'assignement des points de stats. - Changements apports par la v6.01 : - Corrige le bug qui cause la disparition des items "carry1" du stash quand ils sont cubbs dans LoD 1.10 - Cls et organes des uber ne sont plus dtruit quant on essaie d'ouvrir le portail en dehors d'Harrogath. - Corrige le conflit avec D2Mod pour l'affichage de la version. - Changements apports par la v6.00 : - PlugY fonctionne aussi la version 1.11 de LOD. - Active la Uber Quest hors des Royaumes. (uniquement LoD 1.11). @@ -118,14 +154,12 @@ Changements apport - Corrige quelques bugs mineurs et ajoute des amliorations mineurs. - Ajoute la commande "/save" pour sauvegarder la partie sans quitter (uniquement LoD 1.11). - Changements apports par la v5.06 : - Ajoute des bouttons pour le partage de l'or. - Active l'or partag en multijoueur. - La commande "/DisplayLifeMana" est remplace par "/dlm". - Corrige quelques bugs. - Changements apports par la v5.05 : - Corrige les couleurs par dfauts dans l'interface des stats. - Ajoute de l'or partage via des commandes. @@ -133,30 +167,25 @@ Changements apport - Possiblit d'afficher ou non les nom des objets de set dans le popup quand ceux-ci sont dans le coffre partage. - Correction des bugs du multiplayer (rcriture de ces fonctions). - Changements apports par la v5.04 : - Corrige Stat/Skill points par levelup - Corrige des bugs en Multiplayer. - PlugY/PlugYDefault.ini complet. - Changements apports par la v5.03 : - Corrige le bug qui change quelques fois les coffres partags Hardcore et Softcore. - Ajoute de la couleur sur les nouvelles pages de stats. - Change les valeurs par dfaut des nouvelles pages de stats. - Mets EnabledTXTFilesWhenMSExcelOpenIt=1 dans le fichier PlugY.ini. - Changements apports par la v5.02 : - Corrige la correction d'un bug prcdent qui engendre la disparition d'objets. - Changements apports par la v5.01 : - Corrige les bugs importants dans la gestion du stash. - Remets ActiveLogFile=0 par dfaut dans le fichier PlugY.ini. - Corrige : Bug quand le stash partag est dsactiv. - Changements apports par la v5.00 : - PlugY fonctionne sur les mods des versions 1.09, 1.09b, 1.09d et 1.10 de LOD. - PlugY peut lancer D2Mod.dll. @@ -171,14 +200,12 @@ Changements apport - Corrige la gnration de DiabloClone au dmarrage d'une nouvelle partie. - Corrige plusieurs autres bugs. - Changements apports par la v4.04 : - Corrige le bug d'affichage quand statPerLevelUp est activ - Corrige le bug de sauvegarde quand le disque dur est plein. - Nouveau systme de configuration pour les moddeurs. - Affiche toujours les valeurs numriques de mana et de vie au-dessus des globes correspondants. - Changements apports par la v4.03 : - Corrige le bug des objets uniques carry1 (charme unique) quand on drop le cube. - Possibilit d'aller directement la premire ou dernire page du coffre (shift + clic sur prcdent/suivant). @@ -186,13 +213,11 @@ Changements apport - Ajouts d'infos sur les pages de stats supplmentaires (2 pages maintenant). - Ajoute un bouton "page prcdente" sur la principale page de stats (uniquement en 800x600). - Dplace les boutons des pages de stats supplmentaire aux mme emplacements que ceux de la page principale (uniquement en 800x600). -- Possibilit de choisir si la page affiche quand on ouvre la page des stats est la page principale ou celle slectionne prcdemment. - +- Possibilit de choisir si la page affiche quand on ouvre la page des stats est la page principale ou celle slectionne prcdemment Changements apports par la v4.02b : - Les fonctionnalits restent actives sur Battle.net ouvert. - Changements apports par la v4.02 : - Corrige le conflit avec Battle.net (BigStash dsactiv sur les royaumes) - Corrige l'oublie du "d" de "SeparateHardcoreStash=1" de PlugY.ini @@ -200,16 +225,13 @@ Changements apport - Corrige l'activation de l'affichage de l'item level pour toutes les configurations de PlugY. - Ajouts d'infos sur la 2me page de stats. - Changements apports par la v4.01 : - Corrige le bug du MSVCR70.dll non trouv. - Ajouts d'infos sur la 2me page de stats. - Changements apports par la v4.00b : - Corrige le bug du MSVCR70.dll non trouv. - Changements apports par la v4.00 : - Meilleure optimisation du code. - Ajoute des pages supplmentaires pour l'affichage de plus de statistiques du perso comme le %MF. @@ -227,20 +249,17 @@ Changements apport - Corrige : Diablo Clone ne peut pas apparatre en mode normal et cauchemar. - Corrige : Dtruit les minions(par exemple les squelettes) en trop prs la dsallocation si on a un bonus +x dans cette skill. - Changements apports par la v3.02 : - Corrige : le changement du nombre de points de Stats reus chaque gain de niveau. - Corrige : Quand le coffre partag est dsactiv vous pouvez charger vos persos. - Corrige : Vous pouvez changer les paramtres du World Event sans activer les skill reus chaque gain de niveau. - Changements apports par la v3.01 : - Change le nombre de points de Stats reus chaque gain de niveau. - Corrige les bugs qui donnent des points supplmentaires quand on dsallouent les skills. - Ajoutent les paramtres du WorldEvent dans le fichier de configuration. - Par dfaut, Le WorldEvent AFFICHE "X SOJ vendu" uniquement dans la difficult enfer. - Changements apports par la v3.00 : - World Event en Local pour le monojoueur et le multijoueur hors royaumes ! - Dsalloue les points de capacits(skills) prcdemment alloues. @@ -248,7 +267,6 @@ Changements apport - On peut changer le nom du fichier de sauvegarde. - L'affichage du numero de page pour le coffre partag est en rouge maintenant. - Changements apports par la v2.05 : - Correction importante : Le bug qui faisais que D2 ne dmarrais est dfinitivement corrig. @@ -279,10 +297,9 @@ Changements apport - PlugY.exe - PlugY.dll (in Diablo II directory) - PlugY.ini -- Plugy\PlugYLocal.dll -- Plugy\PlugYLocal.ini - PlugY\PlugYFixed.ini - PlugY\PlugYDefault.ini +- PlugY\LocalizedStrings.ini - PlugY\EmptyPage.dc6 - PlugY\SharedGoldBtns.dc6 - PlugY\StashBtns.dc6 @@ -298,19 +315,13 @@ Changements apport ******** INSTALLATION ******** -Les sites de tlchargement officiel sont : -http://djaftal.chez-alice.fr/ -http://d2mods.info/forum/viewforum.php?f=133 -http://diablo2.judgehype.com/index.php?page=telechargements - - Installation normale : - Suivre les directives de l'installeur. note : Vous pouvez choisir le rpertoire de "Diablo II" comme rpertoire d'installation. Installation dans un autre mod -- Copier PlugY.ini, PlugY.exe er PlugY folder (+son sontenu) dans le rpertoire du mod cibl. +- Copier PlugY.ini, PlugY.exe et PlugY folder (+son sontenu) dans le rpertoire du mod cibl. - Editer PlugY.ini pour configurer les options (voir section plus bas). - Lancer le jeu PlugY.exe et amusez-vous :) @@ -319,12 +330,10 @@ note : Vous pouvez d Exemple : Si vous avez install Lord of Destruction ici : C:\Jeux\Diablo II\Diablo II.exe -Et que le mod cibl se trouve l : D:\D2Mod\MyMod\ -Et que un second mod se trouve l : D:\D2Mod\MyMod2\ +Et que le mod cibl se trouve dans : D:\D2Mod\MyMod\ +Et qu'un second mod se trouve dans : D:\D2Mod\MyMod2\ Alors la configuration classique est ceci : C:\Jeux\Diablo II\PlugY.dll - D:\D2Mod\MyMod\Plugy\PlugYLocal.dll - D:\D2Mod\MyMod\Plugy\PlugYLocal.ini D:\D2Mod\MyMod\PlugY\SharedGoldBtns.dc6 D:\D2Mod\MyMod\PlugY\PlugYFixed.ini D:\D2Mod\MyMod\PlugY\PlugYDefault.ini @@ -336,6 +345,7 @@ Alors la configuration classique est ceci : D:\D2Mod\MyMod\PlugY\UnassignSkillsBtns.dc6 D:\D2Mod\MyMod\PlugY\UnassignStatsBtns.dc6 D:\D2Mod\MyMod\PlugY\statsinterface.txt + D:\D2Mod\MyMod\PlugY\LocalizedStrings.ini D:\D2Mod\MyMod\PlugY.ini D:\D2Mod\MyMod\PlugY.exe D:\D2Mod\MyMod2\PlugY\SharedGoldBtns.dc6 @@ -349,6 +359,7 @@ Alors la configuration classique est ceci : D:\D2Mod\MyMod2\PlugY\UnassignSkillsBtns.dc6 D:\D2Mod\MyMod2\PlugY\UnassignStatsBtns.dc6 D:\D2Mod\MyMod2\PlugY\statsinterface.txt + D:\D2Mod\MyMod2\PlugY\LocalizedStrings.ini D:\D2Mod\MyMod2\PlugY.ini D:\D2Mod\MyMod2\PlugY.exe @@ -450,7 +461,7 @@ Ajoute les param Les paramtres pass PlugY.exe sont aussi transmis LoD par sa ligne de commande. Par dfaut aucun paramters ne sont transmis. Les paramtres les plus courant sont (sans les guillemets) : -"-w" lance la LoD en version fentre. +"-w" lance la LoD en version fentre. (Voir la section WINDOWED la place) "-direct" utilise les fichiers du rpertoire la place des mpq. "-txt" recompile les fichiers .txt avant d'antre dans une partie. Ci-dessous, les valeurs par dfauts et entre {} des exemples avec leurs significations : @@ -486,9 +497,28 @@ Ci-dessous, les valeurs par d - DllToLoad2= {(vide): Mme chose que DlltoLoad} Active les nouvelles commandes de PlugY. -"/dlm" alterne l'tat de AlwaysDisplayLifeAndManaValues (AlwaysDisplayLifeAndManaValues>0) -"/page x" Aller la page x dans les pages de stats supplmentaires. -"/save" Sauvegarde la partie sans la quitter (uniquement LoD 1.11 et 1.11b). +/save : Sauvegarde la partie sans quitter (LoD 1.11 minimum). +/page 1 : Affiche la page des stats de base (la page des stats doit tre ouverte)(espace non obligatoire). +/page 2 :Affiche la page des stats en plus (la page des stats doit tre ouverte). +/page 3 : Show resistance stats page Affiche la page des stats de resistances (la page des stats doit tre ouverte)(espace non obligatoire). +/page 4 : (bta) Affiche la page des mots runiques actifs (la page des stats doit tre ouverte)(espace non obligatoire). +/lockmouse : Bloque le curseur de la souris dans la fentre. +/lock : Identique /lockmouse. +/unlockmouse : Libre le curseur de la souris de la fentre. +/unlock : Identique /unlockmouse. +/renamechar newname : Renomme la personnage et le sauvegarde. (Vous devez quittez la partie pour mettre jour la page des stats). +/renamepage name : Renomme la page courante du coffre (MultiStash activ). +/setindex : La page courante devient un index (Les boutons d'index vont jusqu'au prochain index s'il en existe un) (MultiStash activ). +/resetindex : Retire la page courante des index (MultiStash activ). +/insertpage : Insre une nouvelle page aprs la page courante (MultiStash activ). +/deletepage : Supprime la page courante si elle est vide (MultiStash activ). +/swap page : Echange le contenu de la page actuelle du coffre avec le contenu d'une autre "page" (espace non obligatoire) (MultiStash activ). +/toggle page : Echanger le contenu de la page actuelle du coffre avec le contenu d'une autre "page" du coffre oppos partag/personnel (espace non obligatoire) (MultiStash activ). +/dlm : Inverse le mode d'affichage: Toujours afficher les valeurs de vie et de mana. (Depuis LoD 1.13c, vous pouvez cliquer sur la partie infrieure des orbes) +/dml : Identique /dlm. +/dl : Inverse le mode d'affichage: Toujours afficher les valeurs de vie. (Depuis LoD 1.13c, vous pouvez cliquer sur la partie infrieure des orbes) +/dm : Inverse le mode d'affichage: Toujours afficher les valeurs de mana. (Depuis LoD 1.13c, vous pouvez cliquer sur la partie infrieure des orbes) +/listcube : (bta) Cre un fichier "cube.txt" dans le rpertoire de sauvegarde contenant toutes les formules actives du cube. (LoD 1.10 minimum). - ActiveCommands=0 {0:Dsactiv; 1:Activ} Quitte D2, si PlugY if PlugY choue lors de l'installation de toutes les fonctions. @@ -499,6 +529,30 @@ Active les fonctions cach - ActiveAllOthersFeatures=0 {0:Dsactiv; 1:Activ} +[WINDOWED] +Lancement en mode fentr. +- ActiveWindowed=0 {0:Dsactiv; 1:Activ} + +Supprime le cadre de la fentre en mode fentr. +- RemoveBorder=0 {0:Dsactiv; 1:Activ} + +Met la fentre au plus haut (au-dessus de la barre des tches) en mode fentr. +- WindowOnTop=0 {0:Dsactiv; 1:Activ} + +Fentre centre et maximise (ratio maintenu 4/3) en mode fentr (si SetWindowPos = 0). +- Maximized=0 {0:Dsactiv; 1:Activ} + +Dfinie la position et la taille de la fentre en mode fentr. +- SetWindowPos=0 {0:Dsactiv; 1:Activ} +- X=0 {0:Position X de la fentre} +- Y=0 {0:Position Y de la fentre} +- Width=0 {0:Largeur de la fentre} +- Height=0 {0:Hauteur de la fentre} + +Verrouiller le curseur da la souris dans la fentre en mode fentr. +- LockMouseOnStartup=0 {0:Dsactiv; 1:Activ} + + [LANGUAGE] Change la langue du jeu. Vous devez avoir les fichiers de langue choisi. @@ -554,6 +608,7 @@ Ci-dessous, les valeurs par d - NbPagesPerIndex2=100 {50: Les pages indexes (+shift) sont 1,50,100,150,...,max} - MaxPersonnalPages=0 {0:Nombre de pages personnelles illimites; 1000: Maximum de 1000 pages personnelles} - ActiveSharedStash=0 {0:Dsactiv; 1:Activ si ActiveMultiPageStash=1} +- OpenSharedStashOnLoading=0 {0:Dsactiv; 1:Slectionne le coffre partage (au lieu du personnel) au chargement du perso} - SeparateHardcoreStash=1 {0:Mme coffre partag en HC et SC; 1:utilise 2 coffres diffrents} - SharedStashFilename=SharedStashSave {xxx : Le nom du fichier sera _LOD_xxx.sss} - displaySharedSetItemNameInGreen=1 {0:Dsactiv; 1:Activ, Les noms des objets de sets dans le stash sont affichs en vert sur les autres objets de sets.} @@ -580,6 +635,7 @@ Ci-dessous, les valeurs par d [STAT ON LEVEL UP] +ATTENTION : CHEAT, NE PAS UTILISER EN PARTIE NORMAL. Change le nombre de points de Stats reus lors d'un gain de niveau. Ci-dessous, les valeurs par dfauts et entre {} des exemples avec leurs significations : - ActiveStatPerLevelUp=0 {0:Dsactiv; 1:Activ} @@ -599,6 +655,7 @@ Ci-dessous, les valeurs par d [SKILL ON LEVEL UP] +ATTENTION : CHEAT, NE PAS UTILISER EN PARTIE NORMAL. Change le nombre de points de skills reus lors d'un gain de niveau. Ci-dessous, les valeurs par dfauts et entre {} des exemples avec leurs significations : - ActiveSkillPerLevelUp=0 {0:Dsactiv; 1:Activ} @@ -695,6 +752,7 @@ PS : D - Blizzard pour avoir fait Diablo II et Lord of Destruction. - Kingpin, Afj666, Joel, SVR, Myrdinn pour leurs aides. - Pralinor pour son aide dans la convertion en 1.12. +- L'Autour pour son aide dans la convertion en 1.13d. - ChaosEnergY pour ses beta tests et sa traduction en allemand. - Char & Darque pour avoir corrig mon anglais. - Shaitane, K&V, themastercaster, raspa et onyx pour leurs tests. @@ -708,10 +766,7 @@ PS : D * Allemand : ChaosEnergy, TheMasterCaster. * Italien : ItalianPlayer * Espagnol : Acrerune - * Polonais : Serdel + https://translate.google.com - * Russian: Around. - * Portuguese: https://translate.google.com - * Japanese: https://translate.google.com - * Korean: https://translate.google.com - * Chinese: https://translate.google.com - ~~~~~~~~~~~~ \ No newline at end of file + * Polonais : Serdel + * Russe : L'Autour + +;--------------------------------------------------------------------------------------; \ No newline at end of file diff --git a/PlugYInstaller/PlugY_The_Survival_Kit_-_Readme.txt b/PlugYInstaller/PlugY_The_Survival_Kit_-_Readme.txt index 93bd86e..db26615 100644 --- a/PlugYInstaller/PlugY_The_Survival_Kit_-_Readme.txt +++ b/PlugYInstaller/PlugY_The_Survival_Kit_-_Readme.txt @@ -3,28 +3,29 @@ ; "PlugY, The Survival Kit" ; ; ; ; by Yohann Nicolas ; -; (modification by L'Autour) ; -; version 11.00 ; +; ; +; version 11.01 ; ; ; ;--------------------------------------------------------------------------------------; -Official website for version 10.00: http://plugy.free.fr +Official website : http://plugy.free.fr You can make a donation if you want. ******** WARNING ******** - This plug-in works with LoD version 1.09 to 1.13d and mods based on. -- This plug-in doesn't work on realms (Battle.net or private). +- This plug-in doesn't work on realms Battle.net. - All files may be changed since previous version, so uninstall any previous version. -- Please, use a clean D2dfx.dll before report any crash on starting LoD. - PlugY.ini has changed since previous version, use the one in this package. -- Don't forget to read the part named "COMMENTS ON THE CONFIGURATION FILE". -- Don't forget to read the PlugY forum at : http://d2mods.info/forum/viewforum.php?f=133 +- Don't forget to read the PlugY forum at : + http://d2mods.info/forum/viewforum.php?f=133 + ******** FEATURES ******** +Each features can be turn on/off via PlugY.ini (see "COMMENTS ON THE CONFIGURATION FILE") - Disable access to Battle.net. -- Infinite storage space in the stash (up to 4,294,967,296 personal pages!) -- Shared storage space in the stash (up to 4,294,967,296 shared pages too!) +- Infinite storage space in the stash. +- Shared storage space in the stash. - Enabled the ladder only runewords out of realms. - Local World Event and Uber Quest for singleplayer and multiplayer off-realm ! - Can open Cow Level Portal even when player have kill the Cow King in that difficulty. @@ -40,27 +41,69 @@ You can make a donation if you want. - Always display Mana and Life values above the globes. - D2 can load all files, even those opened with Microsoft Excel (disabled by default). - Display the stats current value (without magical bonus) like Magic/gold find or maximum resistances. -- PlugY is localized in English, French, German, Italian, Spanish, Polish, *Portuguese, Japanese, Korean, Chinese, Polish, *Russian. - (* - required informal localization of the game.) +- Can launch game in windowed mode with some options (lock mouse/resize/on top/noborder). +- Add following commands (see "COMMENTS ON THE CONFIGURATION FILE") : + /save : Save game without exit. + /page 1 : Show normal stats page (stats page must be opened). + /page 2 : Show extra stats page (stats page must be opened). + /page 3 : Show resistance stats page (stats page must be opened). + /page 4 : (beta) Show available runewords (stats page must be opened). + /lockmouse : Lock mouse cursor in the window. + /lock : Same as /lockmouse. + /unlockmouse : Unlock mouse cursor in the window. + /unlock : Same as /unlockmouse. + /renamechar newname : Rename your character and save it. + /renamepage name : Rename current page stash. + /setindex : Set current stash page as index + /resetindex : Remove index flag on the current stash page. + /insertpage : Insert a new page after the current page. + /deletepage : Delete current page if empty. + /swap page : Swap the content of current stash page with the content of another page. + /toggle page : Swap the content of current stash page with the content of another page in opposing stash shared/personal. + /dlm : Toggle always display mana and life mode. + /dml : Same as /dlm. + /dl : Toggle always display life mode. + /dm : Toggle always display mana mode. + /listcube : (beta) Create a "cube.txt" file in save directory containing all cube's receipts. -v11.00 changes : -- PlugY works for 1.13d version of LoD too. -- A complete support of all languages in game. +v11.01 changes : +Compatibily with 1.13d (thanks to L'Autour) +Add command /unlockmouse : Unlock the mouse +Add command /unlock : same as /unlockmouse +Add command /renamepage : stash page name are succefully saved. +Add command /setindex : Set the current stash page as index (prev/next index button go to an index if exists) +Add command /resetindex : Remove index flag on the current stash page (prev/next index button go to this index if exists). +Add command /insertpage : Insert a new page after the current page. +Add command /deletepage : Delete current page if empty. +Add localizion in Russian and google traduction for not translated language. (thanks to L'Autour) +Add an option in PlugY.ini to select shared stash (instead of personal one) on character loading. +Rename command /rename to /renamechar. +Remove unfinished command /reload. +v11.00 changes : Unofficial version supporting LOD 1.13d + +v10.01 changes : +- Add windowed mode. +- Can lock mouse cursor in the window (windowed mode). +- Can remove border (windowed mode). +- Can resize or maximize window (windowed mode). +- Can fix window above any others windows including taskbar (windowed mode). +- Can lock mouse cursor in the windows on startup and with command "/lockmouse" or "/lock" (windowed mode). +- Add command "/swap page" to swap the content of current stash page with the content of another page. +- Add command "/toggle page" to swap the content of current stash page with the content of another page in opposing stash shared/personal. +- Add command "/rename newname" to rename your character. This feature is still in beta and you must exit the game to update the stats page. v10.00 changes : - Disable access to Battle.net via main menu button. - PlugY works for 1.13c version of LoD too. - Fix shortcut in start menu - v9.00 changes : - PlugY works for 1.12 version of LoD too. - Fix somes bugs. - Add option for unassign skill for mods. - v8.00 changes : - Easier installation : New installer. - Can open Cow Level Portal even when player have kill the Cow King in that difficulty. @@ -71,12 +114,10 @@ v8.00 changes : - Multiplayer : Save stash files (with client's data like version before 5.00) when a deconnection or error happend during saving process. - Remove the "check load memory failed" message when D2gfx.dll was patched. - v7.01b changes : - Fix the ladder only runewords features in versions 1.11 and 1.10 of LoD. - Fix wierd characters in some text. - v7.01 changes : - Enabled the ladder only runewords out of realms. - Fixed Uber Baal AI. @@ -85,7 +126,6 @@ v7.01 changes : - Add an executable to launch PlugY (no more LoD's files modified) (RECALL) - Translation into spanish and polish. - v7.00 changes : - PlugY works for 1.11b version of LoD too. - Add an executable to launch PlugY (no more LoD's files modified) @@ -94,17 +134,14 @@ v7.00 changes : - Fix features which stayed enabled on Battle.net. - Translation into italian. - v6.01b changes : - Bug fix with the display of popup on stat assignment buttons. - v6.01 changes : - Major fix : unique carry1 items don't disappear when they are cubbed in LoD 1.10 - Keys and Uber organs aren't destroyed when we try to open a Red Porpal out of Harrogath. - Fix conflict with D2Mod for the version display. - v6.00 changes : - PlugY works for 1.11 version of LoD too ! - Enabled Uber Quest off realm (LoD 1.11 only). @@ -112,14 +149,12 @@ v6.00 changes : - Fixed some minor bugs and added some minor improvements. - Added command "/save" to save the game without exit (LoD 1.11 only). - v5.06 changes : - Added buttons for shared gold. - Enabled shared gold in multiplayer. - Command "/DisplayLifeMana" is replaced by "/dlm". - Fixed some bugs. - v5.05 changes : - Fixed bad default color in interface stats. - Added Shared gold via commands. @@ -127,30 +162,25 @@ v5.05 changes : - Display green set item name in popup when it's in the shared stash. - Fixed multiplayer bugs by redoing multiplayer procedure. - v5.04 changes : - Fixed : Stat/Skill points per level-up bug. - Fixed : Multiplayer bugs. - PlugY/PlugYDefault.ini completed. - v5.03 changes : - Fixed : Bug which sometimes swaps Hardcore and Softcore shared stash. - Added color on extra stats page. - Changed default values on extra stats page. - Set EnabledTXTFilesWhenMSExcelOpenIt=1 in PlugY.ini file. - v5.02 changes : - Fixed : Previous bug fix which caused items to disappear. - v5.01 changes : - Fixed : Major bugs in stash management. - Fixed : Set back PlugY.ini with ActiveLogFile=0 by default. - Fixed : bug when shared stash is disabled. - v5.00 changes : - PlugY works for 1.09, 1.09b, 1.09d versions of LoD, including mods based on these releases ! - PlugY can load D2Mod.dll. @@ -165,14 +195,12 @@ v5.00 changes : - Fixed : The spawn of DiabloClone at starting of a new game - Fixed : Some other small bugs. - v4.04 changes : - Fixed : Display bug when statPerLevelUp enabled. - Fixed : Bug in saving procedure when the disk is full. - New configuration system for modders. - Always display Mana and Life values above the globes. - v4.03 changes : - Fixed : "carry 1" unique item (unique charm) when we drop the cube. - Can go directly to first or last page of stash (shift + click on next/previous). @@ -182,7 +210,6 @@ v4.03 changes : - Moved buttons in extra stats pages to same place as in main stats page (only in 800x600). - Can choose whether the main (first) page or the last selected page is displayed on opening the stats page. - v4.02b changes : - Fixed : Features stay enabled in open Battle.net @@ -194,16 +221,13 @@ v4.02 changes : - Fixed : Item level display enabled correctly for all configurations of PlugY. - Added data in the extra stats page. - v4.01 changes : - Fixed : NbPlayers always set to 8 when active. - Added data in the extra stats page. - v4.00b changes : - Fixed : MSVCR70.dll not found bug. - v4.00 changes : - Better optimization of the code. - Added some pages for displaying more characters stats like %MF. @@ -221,20 +245,17 @@ v4.00 changes : - Fixed : Diablo Clone can't spawn in normal and nightmare difficulty. - Fixed : Destruction of extra minions after unassignment if you have +x bonus to the skill. - v3.02 changes : - Fixed : Change the number of stats points gained when player gains a level. - Fixed : When the shared stash is disabled, you can load a game with your character. - Fixed : You can change parameters of World Event without activating skill per level up. - v3.01 changes : - Change the number of stats points gained when player gains a level. - Fixed bugs which give extra points when skills points are unassigned. - Added parameters for the WorldEvent in configuration file. - By default, World Event only SHOWS "X SOJ Sold" in hell difficulty. - v3.00 changes : - Local World Event for singleplayer and multiplayer off-realm ! - Unassign assigned skills points. @@ -242,11 +263,9 @@ v3.00 changes : - Can change the filename of the shared savefile. - Shared stash page number display are in red now. - v2.05 changes : - major fix : bugs which cause D2 not to start are finally removed. - v2.04 changes : - Unassign stats points, skills on level up are disabled when you connect to realm (like stash). - Open a error message box instead of crash when PlugY.dll isn't found by D2. @@ -254,11 +273,9 @@ v2.04 changes : - Fixed bug display of buttons. - Fixed win95/98/Me saving. - v2.03b changes : - Show PlugY version only in main screen. - v2.03 changes : - Major fix : Correct and secure the saving procedure. - No more crash of the host game when a character is unable to enter the game. @@ -266,7 +283,6 @@ v2.03 changes : - Change version printing on main screen (change color & PlugY version in right corner) - Character without PlugY can join game host with PlugY enabled. - v2.02 changes : - PlugY doesn't use D2win.dll to launch PlugY anymore. - PlugY includes a patcher/unpatcher for editing D2gfx.dll to launch PlugY. @@ -274,12 +290,10 @@ v2.02 changes : - The infinite storage sytem is automatically disabled on a realm game. - Fixed index button bugs. - v2.01 changes : - Fixed skill per level up bug - Fixed bug display of text in the main menu - v2.00 changes : - Localized in German. - Change the number of Skills points gained when player gains a level. @@ -296,7 +310,6 @@ v2.00 changes : - Removed the bug of "carry 1" - Add other small improvements... :) - v1.03 changes : - Added French readme and ini files. - Removed bugs in D2Classic game (there is no multipage, it's not a bug) @@ -306,12 +319,10 @@ v1.03 changes : * must read : You can start any mods without moving SAVES files (you need to move dll files with classic script). - v1.02 changes : - Re-changed name files due to an IE bug with colon in zip file. - Ability to change the version text print in the main menu (see ini file). - v1.01 changes : - Localized for french version (wait for an french readme.txt) - Changed filename from "PlugY, The Survival Kit.ini" to "PlugY,The_Survival_Kit". @@ -321,7 +332,6 @@ v1.01 changes : (you can add it if you want but need to know what are you doing...) - Released in .zip file instead of .rar - v1.00 features (can all be easily enabled or disabled) : - You can change the save path directory. - You can start any mods without moving saves files. @@ -333,17 +343,16 @@ v1.00 features (can all be easily enabled or disabled) : ******** CONTENTS ******** -21 files, 1 folder : +19 files, 1 folder : - PlugY_The_Survival_Kit_-_Readme.txt - PlugY_The_Survival_Kit_-_LisezMoi.txt - PlugY_The_Survival_Kit_-_Liesmich.txt - PlugY.exe - PlugY.dll (in Diablo II directory) - PlugY.ini -- Plugy\PlugYLocal.dll -- Plugy\PlugYLocal.ini - PlugY\PlugYFixed.ini - PlugY\PlugYDefault.ini +- PlugY\LocalizedStrings.ini - PlugY\EmptyPage.dc6 - PlugY\SharedGoldBtns.dc6 - PlugY\StashBtns.dc6 @@ -359,12 +368,6 @@ v1.00 features (can all be easily enabled or disabled) : ******** INSTALLATION ******** -- The officials sites are : -http://djaftal.chez-alice.fr/ -http://d2mods.info/forum/viewforum.php?f=133 -http://diablo2.judgehype.com/index.php?page=telechargements - - Normal Installation : - Follow directive installer. @@ -383,8 +386,6 @@ And the mod to add this plug-in is here : D:\D2Mod\MyMod\ And the second mod to add this plug-in is here : D:\D2Mod\MyMod2\ So the new installation is : C:\Games\Diablo II\PlugY.dll - D:\D2Mod\MyMod\Plugy\PlugYLocal.dll - D:\D2Mod\MyMod\Plugy\PlugYLocal.ini D:\D2Mod\MyMod\PlugY\SharedGoldBtns.dc6 D:\D2Mod\MyMod\PlugY\PlugYFixed.ini D:\D2Mod\MyMod\PlugY\PlugYDefault.ini @@ -396,6 +397,7 @@ So the new installation is : D:\D2Mod\MyMod\PlugY\UnassignSkillsBtns.dc6 D:\D2Mod\MyMod\PlugY\UnassignStatsBtns.dc6 D:\D2Mod\MyMod\PlugY\statsinterface.txt + D:\D2Mod\MyMod\PlugY\LocalizedStrings.ini D:\D2Mod\MyMod\PlugY.ini D:\D2Mod\MyMod\PlugY.exe D:\D2Mod\MyMod2\PlugY\SharedGoldBtns.dc6 @@ -409,6 +411,7 @@ So the new installation is : D:\D2Mod\MyMod2\PlugY\UnassignSkillsBtns.dc6 D:\D2Mod\MyMod2\PlugY\UnassignStatsBtns.dc6 D:\D2Mod\MyMod2\PlugY\statsinterface.txt + D:\D2Mod\MyMod2\PlugY\LocalizedStrings.ini D:\D2Mod\MyMod2\PlugY.ini D:\D2Mod\MyMod2\PlugY.exe @@ -535,7 +538,7 @@ Add params to transmit to LoD on his command line. Params give to PlugY.exe are also transmitted to LoD on his command line. By default no param are trasmited. Most common switch are (without quote) : -"-w" open LoD in windowed form. +"-w" open LoD in windowed form. (See WINDOWED section instead) "-direct" use files in directory instead of those in mpq. "-txt" recompile txt files before launch a game. Following are default values, between {} are some examples values with descriptions : @@ -556,34 +559,74 @@ Following are default values, between {} are some examples values with descripti - ActivePlugin=0 {0:Don't load any features; 1:Plugin enabled} Enable or disable BattleNet Access. -Following are default values, between {} are some examples values with descriptions : - DisableBattleNet=1 {0:Battle.net access enable; 1:Battle.net access disable} Create a log file "PlugY.log" in the current directory. This feature can slow down your game. -Following are default values, between {} are some examples values with descriptions : - ActiveLogFile=0 {0:No information is written while playing; 1:Always enabled} Load dll of a specific mod for used PlugY in same time. Separate each dll file name by the character pipe (|) -Following are default values, between {} are some examples values with descriptions : - DllToLoad= {(empty): load nothing; D2extra.dll|myDll.dll: Load both D2extra.dll and myDll.dll} - DllToLoad2= {(empty): Same as DlltoLoad} -Activate a new command in PlugY. In parenthesis is the condition to be able to use the command. -"/dlm" toggle the state of AlwaysDisplayLifeAndManaValues (AlwaysDisplayLifeAndManaValues>0) -"/page x" Go to the page x in the extra stats page. -"/save" Save the game without exit (LoD 1.11 and 1.11b only). +Activate some new commands in PlugY. In parenthesis is the condition to be able to use the command. +/save : Save game without exit (LoD 1.11 minimum). +/page 1 : Show normal stats page (stats page must be opened, space not mandatory). +/page 2 : Show extra stats page (stats page must be opened, space not mandatory). +/page 3 : Show resistance stats page (stats page must be opened, space not mandatory). +/page 4 : (beta) Show available runewords (stats page must be opened, space not mandatory). +/lockmouse : Lock mouse cursor in the window. +/lock : Same as /lockmouse. +/unlockmouse : Unlock mouse cursor in the window. +/unlock : Same as /unlockmouse. +/renamechar newname : Rename your character and save it. (You must exit the game to update the stats page.) +/renamepage name : Rename current page stash (MultiStash activated). +/setindex : Set current stash page as index (prev/next index button go to an index if exists) (MultiStash activated). +/resetindex : Remove index flag on the current stash page (MultiStash activated). +/insertpage : Insert a new page after the current page (MultiStash activated). +/deletepage : Delete current page if empty (MultiStash activated). +/swap page : Swap the content of current stash page with the content of another page (space not mandatory) (MultiStash activated). +/toggle page : Swap the content of current stash page with the content of another page in opposing stash shared/personal (space not mandatory) (MultiStash activated). +/dlm : Toggle always display mana and life mode. (Since 1.13c, you can click on the bottom of each orbs) +/dml : Same as /dlm. +/dl : Toggle always display life mode. (Since 1.13c, you can click on the bottom of the orb) +/dm : Toggle always display mana mode. (Since 1.13c, you can click on the bottom of the orb) +/listcube : (beta) Create a "cube.txt" file in current directory containing all cube's receipts (LoD 1.10 minimum). - ActiveCommands=0 {0:Disabled; 1:Enabled} Quit D2, if PlugY failed to installed all features. Disable it only if you know what you do. - ActiveCheckMemory=1 -Activate hidden or not-finished feature. (don't use it) +Activate hidden or not finished feature. (don't use it) - ActiveAllOthersFeatures=0 {0:Disabled; 1:Enabled} +[WINDOWED] +Launch in windowed mode. +- ActiveWindowed=0 {0:Disabled; 1:Enabled} + +Remove border in windowed mode. +- RemoveBorder=0 {0:Disabled; 1:Enabled} + +Set window at most top (above taskbar) in windowed mode. +- WindowOnTop=0 {0:Disabled; 1:Enabled} + +Maximized and center window (keep ratio 4/3) in windowed mode (if SetWindowPos=0). +- Maximized=0 {0:Disabled; 1:Enabled} + +Set position and size of the window in windowed mode. +- SetWindowPos=0 {0:Disabled; 1:Enabled} +- X=0 {0:Window Position X} +- Y=0 {0:Window Position Y} +- Width=0 {0:Window Width} +- Height=0 {0:Window Height} + +Lock cursor mouse in the window in windowed mode. +- LockMouseOnStartup=0 {0:Disabled; 1:Enabled} + + [LANGUAGE] Change the selected language. You must have files of the selected language. @@ -640,6 +683,7 @@ Following are default values, between {} are some examples values with descripti - MaxPersonnalPages=0 {0:Infinite number of personnal pages; 1000: Maximum of 1000 shared pages} - ActiveSharedStash=0 {0:Disabled; 1:Enabled if ActiveMultiPageStash=1} - SeparateHardcoreStash=1 {0:Same shared stash for HC and SC; 1:Use 2 differents stashes} +- OpenSharedStashOnLoading=0 {0:Disabled; 1:Select shared stash (instead of personal one) on character loading} - SharedStashFilename=SharedStashSave {xxx: The filename will be "_LOD_xxx.sss"} - displaySharedSetItemNameInGreen=1 {0:Disabled; 1:Enabled, set items in stash are their name displayed in green on other sets items.} - MaxSharedPages=0 {0:Infinite number of shared pages; 5000: Maximum of 5000 shared pages} @@ -665,6 +709,7 @@ Following are default values, between {} are some examples values with descripti [STAT ON LEVEL UP] +WARNING : CHEAT, DON'T USE IN NORMAL GAME. Change the number of Stats Points you receive when your character gains a level. Following are default values, between {} are some examples values with descriptions : - ActiveStatPerLevelUp=0 {0:Disabled; 1:Enabled} @@ -684,6 +729,7 @@ Following are default values, between {} are some examples values with descripti [SKILL ON LEVEL UP] +WARNING : CHEAT, DON'T USE IN NORMAL GAME. Change the number of Skills Points you receive when your character gains a level. Following are default values, between {} are some examples values with descriptions : - ActiveSkillPerLevelUp=0 {0:Disabled; 1:Enabled} @@ -780,6 +826,7 @@ PS : Sorry for english faults ;) - Blizzard for making Diablo2 and Lord of Destruction. - Kingpin, Afj666, Joel, SVR, Myrdinn for their great help. - Pralinor fo his help in the convertion to 1.12. +- L'Autour fo his help in the convertion to 1.13d. - ChaosEnergy for testing and his translation in German. - Char & Darque in the correction of my english. - Shaitane, K&V, themastercaster, raspa and onyx for testing. @@ -789,14 +836,11 @@ PS : Sorry for english faults ;) - PhrozenKeep team for all stuff they shared for us (including mine ;) - Translation : * English : Yohann, Jurica. - * French : Yohann. + * French : Yohann * German : ChaosEnergy, TheMasterCaster. - * Italian : ItalianPlayer + * Italian : ItalianPlayer * Spanish : Acrerune - * Polish : Serdel + https://translate.google.com - * Russian: L'Autour. - * Portuguese: https://translate.google.com - * Japanese: https://translate.google.com - * Korean: https://translate.google.com - * Chinese: https://translate.google.com - ~~~~~~~~~~~~ \ No newline at end of file + * Polish : Serdel + * Russian : L'Autour + +;--------------------------------------------------------------------------------------; \ No newline at end of file diff --git a/PlugYLocal/PlugYLocal.cfg b/PlugYLocal/PlugYLocal.cfg deleted file mode 100644 index b874241..0000000 --- a/PlugYLocal/PlugYLocal.cfg +++ /dev/null @@ -1,36 +0,0 @@ --$A8 --$B- --$C+ --$D+ --$E- --$F- --$G+ --$H+ --$I+ --$J- --$K- --$L+ --$M- --$N+ --$O+ --$P+ --$Q- --$R- --$S- --$T- --$U- --$V+ --$W- --$X+ --$YD --$Z1 --cg --AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; --H+ --W+ --M --$M16384,1048576 --K$00400000 --LE"c:\program files\borland\delphi7\Projects\Bpl" --LN"c:\program files\borland\delphi7\Projects\Bpl" --DKOL_MCK diff --git a/PlugYLocal/PlugYLocal.dof b/PlugYLocal/PlugYLocal.dof deleted file mode 100644 index 0bf00cb..0000000 --- a/PlugYLocal/PlugYLocal.dof +++ /dev/null @@ -1,143 +0,0 @@ -[FileVersion] -Version=7.0 -[Compiler] -A=8 -B=0 -C=1 -D=1 -E=0 -F=0 -G=1 -H=1 -I=1 -J=0 -K=0 -L=1 -M=0 -N=1 -O=1 -P=1 -Q=0 -R=0 -S=0 -T=0 -U=0 -V=1 -W=0 -X=1 -Y=1 -Z=1 -ShowHints=1 -ShowWarnings=1 -UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -NamespacePrefix= -SymbolDeprecated=1 -SymbolLibrary=1 -SymbolPlatform=1 -UnitLibrary=1 -UnitPlatform=1 -UnitDeprecated=1 -HResultCompat=1 -HidingMember=1 -HiddenVirtual=1 -Garbage=1 -BoundsError=1 -ZeroNilCompat=1 -StringConstTruncated=1 -ForLoopVarVarPar=1 -TypedConstVarPar=1 -AsgToTypedConst=1 -CaseLabelRange=1 -ForVariable=1 -ConstructingAbstract=1 -ComparisonFalse=1 -ComparisonTrue=1 -ComparingSignedUnsigned=1 -CombiningSignedUnsigned=1 -UnsupportedConstruct=1 -FileOpen=1 -FileOpenUnitSrc=1 -BadGlobalSymbol=1 -DuplicateConstructorDestructor=1 -InvalidDirective=1 -PackageNoLink=1 -PackageThreadVar=1 -ImplicitImport=1 -HPPEMITIgnored=1 -NoRetVal=1 -UseBeforeDef=1 -ForLoopVarUndef=1 -UnitNameMismatch=1 -NoCFGFileFound=1 -MessageDirective=1 -ImplicitVariants=1 -UnicodeToLocale=1 -LocaleToUnicode=1 -ImagebaseMultiple=1 -SuspiciousTypecast=1 -PrivatePropAccessor=1 -UnsafeType=1 -UnsafeCode=1 -UnsafeCast=1 -[Linker] -MapFile=0 -OutputObjs=0 -ConsoleApp=1 -DebugInfo=0 -RemoteSymbols=0 -MinStackSize=16384 -MaxStackSize=1048576 -ImageBase=4194304 -ExeDescription= -[Directories] -OutputDir= -UnitOutputDir= -PackageDLLOutputDir= -PackageDCPOutputDir= -SearchPath= -Packages=vcl;rtl;vclx;vclactnband -Conditionals=KOL_MCK -DebugSourceDirs=D:\Games\Diablo II\PlugY -UsePackages=0 -[Parameters] -RunParams= -HostApplication=D:\Games\Diablo II\Game.exe -Launcher= -UseLauncher=0 -DebugCWD=D:\Games\Diablo II -[Version Info] -IncludeVerInfo=1 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1033 -CodePage=1252 -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename=PlugYLocal.dll -ProductName=PlugyLocal for PlugY -ProductVersion=11.0.0.0 -[HistoryLists\hlDebugSourcePath] -Count=1 -Item0=D:\Games\Diablo II\PlugY -[HistoryLists\hlConditionals] -Count=1 -Item0=KOL_MCK -[HistoryLists\hlUnitAliases] -Count=1 -Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -[HistoryLists\hlOutputDirectorry] -Count=1 -Item0=D:\Games\Diablo II\PlugY diff --git a/PlugYLocal/PlugYLocal.dpr b/PlugYLocal/PlugYLocal.dpr deleted file mode 100644 index 792e946..0000000 --- a/PlugYLocal/PlugYLocal.dpr +++ /dev/null @@ -1,823 +0,0 @@ -library PlugYLocal; -//Created by L'Autour - -{ Important note about DLL memory management: ShareMem must be the - first unit in your library's USES clause AND your project's (select - Project-View Source) USES clause if your DLL exports any procedures or - functions that pass strings as parameters or function results. This - applies to all strings passed to and from your DLL--even those that - are nested in records and classes. ShareMem is the interface unit to - the BORLNDMM.DLL shared memory manager, which must be deployed along - with your DLL. To avoid using BORLNDMM.DLL, pass string information - using PChar or ShortString parameters. } - -uses - KOL; //library from http://www.kolmck.net/ - //SysUtils, - //Classes; - -{$R *.res} - -type - TLocalStr = record - name: AnsiString; - value: WideString; - end; - - TStrType = record - k: AnsiString; - s: WideString; - case Byte of - 0: (dw: Cardinal); - 1: (c: array[0..3] of AnsiChar); - end; - -const - NamePlugyLocal = 'Plugy\PlugYLocal.ini'; - MaxStr = 52; - MaxLng = 11; - MaxType = 97; - MaxIdxType = 41; - - sLng: array[0..MaxLng] of AnsiString = - ('ENG','ESP','DEU','FRA','POR','ITA','JPN','KOR','SIN','CHI','POL','RUS'); - -var - Gender: WideString = ''; - - StrTypes: array[0..MaxType + 1] of TStrType = ( - (k: ''; s: 'Shield (Not Class Specific)'; c: ('s','h','i','e')), - (k: ''; s: 'Body Armor'; c: ('t','o','r','s')), - (k: 'Gold'; s: 'Gold'; c: ('g','o','l','d')), - (k: 'aqv'; s: 'Arrows'; c: ('b','o','w','q')), - (k: 'cqv'; s: 'Bolts'; c: ('x','b','o','q')), - (k: 'ear'; s: 'Ear'; c: ('p','l','a','y')), - (k: 'hrb'; s: 'Herb'; c: ('h','e','r','b')), - (k: ''; s: 'Potion'; c: ('p','o','t','i')), - (k: 'rin'; s: 'Ring'; c: ('r','i','n','g')), - (k: 'elx'; s: 'Elixir'; c: ('e','l','i','x')), - (k: 'amu'; s: 'Amulet'; c: ('a','m','u','l')), - (k: ''; s: 'Charm'; c: ('c','h','a','r')), - (k: 'lbt'; s: 'Boots'; c: ('b','o','o','t')), - (k: ''; s: 'Gloves'; c: ('g','l','o','v')), - (k: ''; s: 'Book'; c: ('b','o','o','k')), - (k: 'mbl'; s: 'Belt'; c: ('b','e','l','t')), - (k: ''; s: 'Gem'; c: ('g','e','m',' ')), - (k: 'tch'; s: 'Torch'; c: ('t','o','r','c')), - (k: ''; s: 'Scroll'; c: ('s','c','r','o')), - (k: 'scp'; s: 'Scepter'; c: ('s','c','e','p')), - (k: 'wnd'; s: 'Wand'; c: ('w','a','n','d')), - (k: ''; s: 'Staff'; c: ('s','t','a','f')), - (k: ''; s: 'Bow'; c: ('b','o','w',' ')), - (k: 'axe'; s: 'Axe'; c: ('a','x','e',' ')), - (k: 'clb'; s: 'Club'; c: ('c','l','u','b')), - (k: ''; s: 'Sword'; c: ('s','w','o','r')), - (k: ''; s: 'Hammer'; c: ('h','a','m','m')), - (k: ''; s: 'Knife'; c: ('k','n','i','f')), - (k: 'spr'; s: 'Spear'; c: ('s','p','e','a')), - (k: ''; s: 'Polearm'; c: ('p','o','l','e')), - (k: 'mxb'; s: 'Crossbow'; c: ('x','b','o','w')), - (k: 'mac'; s: 'Mace'; c: ('m','a','c','e')), - (k: 'hlm'; s: 'Helm'; c: ('h','e','l','m')), - (k: ''; s: 'Missile Potion'; c: ('t','p','o','t')), - (k: ''; s: 'Quest Item'; c: ('q','u','e','s')), - (k: ''; s: 'Body Part'; c: ('b','o','d','y')), - (k: 'key'; s: 'Key'; c: ('k','e','y',' ')), - (k: 'tkf'; s: 'Throwing Knife'; c: ('t','k','n','i')), - (k: 'tax'; s: 'Throwing Axe'; c: ('t','a','x','e')), - (k: 'jav'; s: 'Javelin'; c: ('j','a','v','e')), - (k: ''; s: 'Weapon'; c: ('w','e','a','p')), - (k: ''; s: 'Melee Weapon'; c: ('m','e','l','e')), - (k: ''; s: 'Missile Weapon'; c: ('m','i','s','s')), - (k: ''; s: 'Throwing Weapon'; c: ('t','h','r','o')), - (k: ''; s: 'Combo Weapon'; c: ('c','o','m','b')), - (k: ''; s: 'Armor'; c: ('a','r','m','o')), - (k: ''; s: 'Any Shield'; c: ('s','h','l','d')), - (k: ''; s: 'Miscellaneous'; c: ('m','i','s','c')), - (k: ''; s: 'Socket Filler'; c: ('s','o','c','k')), - (k: ''; s: 'Second Hand Item'; c: ('s','e','c','o')), - (k: ''; s: 'Staves And Rods'; c: ('r','o','d',' ')), - (k: ''; s: 'Missile'; c: ('m','i','s','l')), - (k: ''; s: 'Blunt'; c: ('b','l','u','n')), - (k: 'jew'; s: 'Jewel'; c: ('j','e','w','l')), - (k: ''; s: 'Class Specific'; c: ('c','l','a','s')), - (k: ''; s: 'Amazon Item'; c: ('a','m','a','z')), - (k: ''; s: 'Barbarian Item'; c: ('b','a','r','b')), - (k: ''; s: 'Necromancer Item'; c: ('n','e','c','r')), - (k: ''; s: 'Paladin Item'; c: ('p','a','l','a')), - (k: ''; s: 'Sorceress Item'; c: ('s','o','r','c')), - (k: ''; s: 'Assassin Item'; c: ('a','s','s','n')), - (k: ''; s: 'Druid Item'; c: ('d','r','u','i')), - (k: ''; s: 'Claw'; c: ('h','2','h',' ')), - (k: ''; s: 'Assassin Claw'; c: ('h','2','h','2')), - (k: ''; s: 'Orb'; c: ('o','r','b',' ')), - (k: ''; s: 'Voodoo Heads'; c: ('h','e','a','d')), - (k: ''; s: 'Paladin Shield'; c: ('a','s','h','d')), - (k: ''; s: 'Barbarian Helm'; c: ('p','h','l','m')), - (k: ''; s: 'Druid Helm'; c: ('p','e','l','t')), - (k: 'cloak'; s: 'Cloak'; c: ('c','l','o','a')), - (k: ''; s: 'Rune'; c: ('r','u','n','e')), - (k: 'circlet'; s: 'Circlet'; c: ('c','i','r','c')), - (k: 'hp3'; s: 'Healing Potion'; c: ('h','p','o','t')), - (k: 'mp3'; s: 'Mana Potion'; c: ('m','p','o','t')), - (k: 'rvs'; s: 'Rejuvenation potion'; c: ('r','p','o','t')), - (k: 'vps'; s: 'Stamina Potion'; c: ('s','p','o','t')), - (k: 'yps'; s: 'Antidote Potion'; c: ('a','p','o','t')), - (k: 'wms'; s: 'Thawing Potion'; c: ('w','p','o','t')), - (k: 'cm1'; s: 'Small Charm'; c: ('s','c','h','a')), - (k: 'cm2'; s: 'Large Charm'; c: ('m','c','h','a')), - (k: 'cm3'; s: 'Grand Charm'; c: ('l','c','h','a')), - (k: ''; s: 'Amazon Bow'; c: ('a','b','o','w')), - (k: ''; s: 'Amazon Spear'; c: ('a','s','p','e')), - (k: ''; s: 'Amazon Javelin'; c: ('a','j','a','v')), - (k: ''; s: 'Magic Arrows'; c: ('m','b','o','q')), - (k: ''; s: 'Magic Bolts'; c: ('m','x','b','q')), - (k: ''; s: 'Chipped Gem'; c: ('g','e','m','0')), - (k: ''; s: 'Flawed Gem'; c: ('g','e','m','1')), - (k: ''; s: 'Normal Gem'; c: ('g','e','m','2')), - (k: ''; s: 'Flawless Gem'; c: ('g','e','m','3')), - (k: ''; s: 'Perfect Gem'; c: ('g','e','m','4')), - (k: 'gsv'; s: 'Amethyst'; c: ('g','e','m','a')), - (k: 'gsw'; s: 'Diamond'; c: ('g','e','m','d')), - (k: 'gsg'; s: 'Emerald'; c: ('g','e','m','e')), - (k: 'gsr'; s: 'Ruby'; c: ('g','e','m','r')), - (k: 'gsb'; s: 'Sapphire'; c: ('g','e','m','s')), - (k: 'gsy'; s: 'Topaz'; c: ('g','e','m','t')), - (k: 'sku'; s: 'Skull'; c: ('g','e','m','z')), - (k: ''; s: '???'; dw: 0)); - - - LocalStrings: array[0..MaxStr + 1] of TLocalStr = ( - (name: 'STR_STATS_UNASSIGN_WITH_LIMIT'; value: '+Alt: Unassign, +Shift: by %d points'), - (name: 'STR_STATS_UNASSIGN_WITHOUT_LIMIT'; value: '+Alt: Unassign, +Shift: all remaining points'), - (name: 'STR_STATS_BASE_MIN'; value: 'Base: %d (Min: %d)'), - (name: 'STR_SKILLS_UNASSIGN'; value: 'Un-allocate all skills points'), - (name: 'STR_STASH_PREVIOUS_PAGE'; value: 'Previous Page (+shift: First Page)'), - (name: 'STR_STASH_NEXT_PAGE'; value: 'Next Page (+shift: Last not empty Page'), - (name: 'STR_TOGGLE_TO_PERSONAL'; value: 'Toggle to Personal Stash'), - (name: 'STR_TOGGLE_TO_SHARED'; value: 'Toggle to Shared Stash'), - (name: 'STR_STASH_PREVIOUS_INDEX'; value: 'Previous Index : by %d Pages (+Shift: %d)'), - (name: 'STR_STASH_NEXT_INDEX'; value: 'Next Index : by %d Pages (+shift: %d)'), - (name: 'STR_PERSONAL_PAGE_NUMBER'; value: 'Personal Page n°%u'), - (name: 'STR_SHARED_PAGE_NUMBER'; value: 'Shared Page n°%u'), - (name: 'STR_NO_SELECTED_PAGE'; value: 'No selected page'), - (name: 'STR_PUT_GOLD'; value: 'Put Gold'), - (name: 'STR_TAKE_GOLD'; value: 'Take Gold'), - (name: 'STR_SHARED_GOLD_QUANTITY'; value: 'Shared Gold : %u'), - (name: 'STR_PREVIOUS_PAGE'; value: 'Previous Page'), - (name: 'STR_NEXT_PAGE'; value: 'Next Page'), - (name: 'STR_ITEM_LEVEL'; value: 'Item Level: %u'), - (name: 'STR_COW_PORTAL'; value: 'Cow Portal'), - (name: 'STR_PANDEMONIUM_PORTAL'; value: 'Pandemonium Portal'), - (name: 'STR_PANDEMONIUM_FINAL_PORTAL'; value: 'Pandemonium Final Portal'), - (name: 'STR_FULL'; value: 'Fully '), - (name: 'STR_REPAIR'; value: 'Repair '), - (name: 'STR_AND'; value: 'and '), - (name: 'STR_RECHARGE'; value: 'Recharge '), - (name: 'STR_DESTROY_FILLERS'; value: 'Destroys Fillers '), - (name: 'STR_REMOVE_FILLERS'; value: 'Remove Fillers '), - (name: 'STR_REGENERATE'; value: 'Regenerate '), - (name: 'STR_WITH_N_SOCKETS'; value: ' with %u Sockets'), - (name: 'STR_ETHERAL'; value: 'Ethereal '), - (name: 'STR_NOT_ETHERAL'; value: 'Not Ethereal '), - (name: 'STR_NOT_RUNEWORD'; value: 'Not Runeword '), - (name: 'STR_BASIC'; value: 'Basic '), - (name: 'STR_EXCEPTIONAL'; value: 'Exceptional '), - (name: 'STR_ELITE'; value: 'Elite '), - (name: 'STR_CRACKED'; value: 'Cracked '), - (name: 'STR_NORMAL'; value: 'Normal '), - (name: 'STR_SUPERIOR'; value: 'Superior '), - (name: 'STR_MAGIC'; value: 'Magic '), - (name: 'STR_SET'; value: 'Set '), - (name: 'STR_RARE'; value: 'Rare '), - (name: 'STR_UNIQUE'; value: 'Unique '), - (name: 'STR_CRAFTED'; value: 'Crafted '), - (name: 'STR_TEMPERED'; value: 'Tempered '), - (name: 'STR_ITEM'; value: 'Item'), - (name: 'STR_ITEM_SAME_TYPE'; value: 'Item of the same type'), - (name: 'STR_OR_UPGRADED'; value: ' (or upgraded)'), - (name: 'STR_WITHOUT_SOCKET'; value: ' without Sockets'), - (name: 'STR_WITH_SOCKET'; value: ' with Sockets'), - (name: 'STR_ONLY_N_H'; value: ' (Nightmare and Hell only)'), - (name: 'STR_ONLY_HELL'; value: ' (Hell only)'), - (name: 'STR_ONLY_CLASS'; value: ' (%s only)'), - (name: ''; value: '') - ); - - IniName: AnsiString; - -//MS C++__fastcall(ecx,edx) vs Delphi register(eax,edx,ecx) - :( -function InitTranslatedString(_EAX: Integer;_EDX: Integer; iLng: Integer): Boolean; register; -var - IniFile: PIniFile; - CurLng: AnsiString; - S: UTF8String; - i: Integer; -begin - Result := False; - if not FileExists(IniName) then Exit; - - if (iLng < 0)or(iLng > MaxLng) then iLng := 0; - CurLng := sLng[iLng]; - - IniFile := OpenIniFile(IniName); - IniFile.Mode := ifmRead; - for i := 0 to MaxStr do - begin - IniFile.Section := LocalStrings[i].name; - S := IniFile.ValueString(CurLng, ''); - if S <> '' then LocalStrings[i].value := UTF8Decode(S); - end; - for i := 0 to MaxType do - begin - IniFile.Section := StrTypes[i].c; - S := IniFile.ValueString(CurLng, ''); - if S <> '' then - begin - StrTypes[i].s := UTF8Decode(S); - StrTypes[i].k := ''; - end; - end; - Result := True; -end; - -//MS C++__fastcall(ecx,edx) vs Delphi register(eax,edx,ecx) - :( -function GetTranslatedString(_EAX: Integer;_EDX: Integer; Idx: Integer): PWideChar; register; -begin - if (Idx < 0)or(Idx > MaxStr) then Idx := MaxStr + 1; - Result := @LocalStrings[Idx].Value[1]; -end; - -//MS C++__fastcall(ecx,edx) vs Delphi register(eax,edx,ecx) - :( -function GetTypeString(_EAX: Integer;out IdxStr: PAnsiChar; Code: Cardinal): PWideChar; register; -var - i: Integer; -begin - i := 0; - while i <= MaxType do - begin - if Code = StrTypes[i].dw then Break; - Inc(i); - end; - if StrTypes[i].k = '' then - IdxStr := nil - else - IdxStr := PAnsiChar(StrTypes[i].k); - Result := PWideChar(StrTypes[i].s); -end; - -function WSprintStringLastGender(buf: PWideChar; lenbuf: Integer; Idx: Integer): Integer; stdcall; -var - i, p, L: Integer; - S: WideString; -begin - S := GetTranslatedString(0,0,Idx); - - if Gender <> '' then - begin - p := Pos(Gender, S); - if p <> 0 then - begin - L := Length(S); - p := p + Length(Gender); - for i := p to L do - if S[i] = '[' then Break; - S := Copy(S, p, i - p); - end; - end; - - Result := Min(lenbuf - 1, Length(S)); - for i := 1 to Result do - buf[i-1] := S[i]; - buf[Result + 1] := #$0000; -end; - -//MS C++__fastcall(ecx,edx) vs Delphi register(eax,edx,ecx) - :( -function SetMonoString(_EAX: Integer;_EDX: Integer; InStr: PWideChar): PWideChar; register; -var - StrList: PWStrList; - i: Integer; - S: WideString; -begin - Result := InStr; - if Result = nil then Exit; - StrList := NewWStrList; - StrList.Text := InStr; - i := Strlist.Count - 1; - if i = 0 then Exit; - S := StrList.Items[i]; - while i > 0 do - begin - Dec(i); - S := S + '. ' + StrList.Items[i]; - end; - Move(S[1], InStr[0], Length(S) shl 1); -end; - -//MS C++__fastcall(ecx,edx) vs Delphi register(eax,edx,ecx) - :( -function CutStringGender(_EAX: Integer;_EDX: Integer; InStr: PWideChar): PWideChar; register; -var - i, j: Integer; -begin - Result := InStr; - Gender := ''; - if (InStr = nil)or(InStr[0] <> '[') then Exit; - i := 1; - while (InStr[i] <> #$0000) do - begin - if InStr[i] = ']' then - begin - if (i < 2)or(InStr[i+1] = #$0000) then Exit; - SetLength(Gender, i + 1); - for j := 0 to i do - Gender[j+1] := InStr[j]; - Result := @InStr[i+1]; - Exit; - end; - Inc(i); - end; -end; - -{ -const - NcColor = 14; - LenCode = 9; - -type - TTextColor = array[0..LenCode - 1] of AnsiChar; - -const - cColor: array[0..NcColor - 1] of TTextColor = ( - ('\','w','h','i','t','e',';',#00,#00), - ('\','g','r','e','y',';',#00,#00,#00), - ('\','r','e','d',';',#00,#00,#00,#00), - ('\','g','r','e','e','n',';',#00,#00), - ('\','b','l','u','e',';',#00,#00,#00), - ('\','g','o','l','d',';',#00,#00,#00), - ('\','d','g','r','e','y',';',#00,#00), - ('\','b','l','a','c','k',';',#00,#00), - ('\','t','a','n',';',#00,#00,#00,#00), - ('\','o','r','a','n','g','e',';',#00), - ('\','y','e','l','l','o','w',';',#00), - ('\','d','g','r','e','e','n',';',#00), - ('\','p','u','r','p','l','e',';',#00), - ('\','c','o','l','o','r',';',#00,#00)); - //lengths of strings in cColor table, without '\' - cColLength: array[0..NcColor-1] of Byte = (6,5,4,6,5,5,6,6,4,7,7,7,7,6); - pColor: PAnsiChar = @cColor[NcColor-1][1]; -var - SaveToTbl: Byte = 0; - -//ANSI convert ColorApi to ColorCode -//optional UCS2 convert '\n' to $0A -function ColorApi2ColorCode(Src: PAnsiChar; Dst: PAnsiChar; - SourceChars: Integer): Integer; -//EAX: Src -//EDX: Dst -//ECX: Length Src -//Result: OutLength -> EAX -asm - //backup - PUSHF - CLD //èíêðåìåíò äëÿ ñòðîêîâûõ êîìàíä - PUSH ESI - PUSH EDI - PUSH EBX - PUSH EBP - - PUSH EDX //ñîõðàíÿåì íà÷àëüíûé àäðåñ ïðèåìíèêà - MOV EDI, Dst - TEST Src, Src //ïðîâåðêà íà ïóñòóþ ñòðîêó - JZ @Exit - MOV ESI, Src -// â ECX õðàíèòñÿ êîëè÷åñòâî îñòàâøèõñÿ ñèìâîëîâ èç Src -@NextChar: - //çàãðóçêà î÷åðåäíîãî ñèìâîëà â EAX - XOR EAX, EAX - LODSB //MOV AL, [ESI]+ - //ïðîâåðêà íà íóëåâîé ñèìâîë (êîíåö ñòðîêè) - TEST AL, AL - JZ @Exit - //ïðîâåðêà íà ñèìâîë '\' - CMP AL, '\' - JE @Slash - -@CopyChar: - //normal chars - STOSB //MOV [EDI]+, AL - -//óìåíüøåíèå ñ÷åò÷èêà íåîáðàáîòàííûõ áàéòîâ è ïåðåä â íà÷àëî öèêëà -@Loop: - LOOP @NextChar - -@Exit: - MOV BYTE PTR [EDI], $00 //íóëåâîé ñèìâîë â êîíöå âûõîäíîé ñòðîêè - POP EAX //âîññòàíàâëèâàåì íà÷àëüíûé àäðåñ ïðèåìíèêà - XCHG EAX, EDI - //get length of Dst - SUB EAX, EDI - //restore - POP EBP - POP EBX - POP EDI - POP ESI - POPF - RET - -@Slash: - //ïðîâåðêà íà íàëè÷èå ñëåäóþùåãî ñèìâîëà - CMP ECX, 1 - JB @CopyChar // if ECX < 1 - //çàãðóçêà ñëåäóþùåãî ñèìâîëà - LODSB //MOV AL, [ESI]+ - //ïðîâåðêà ñèìâîëà íà êîä ïåðåâîäà ñòðîêè - CMP AL, 'n' - JNZ @TestColor - //ïîïðàâêà ECX - DEC ECX - - //test Save2Tbl - CMP SaveToTbl, 0 - JNZ @UnixReturn - //save '\n' - MOV AL, '\' - STOSB //MOV [EDI]+, AL - MOV AL, 'n' - JMP @CopyChar - -@UnixReturn: - //save UnixNewLine - MOV AL, $0A - JMP @CopyChar - -//ïðîâåðêà íà ñòðîêè óñòàíîâêè öâåòà øðèôòà: -@TestColor: - //ïðîâåðêà íà èñïîëüçîâàíèå ìàêðî îïðåäåëåíèé öâåòà øðèôòà - //CMP MacroColorView, $00 - //JE @StoreSlash - - //backup - PUSH ECX - PUSH EDI - //âîññòàíîâëåíèå ESI - DEC ESI - //ñîõðàíåíèå èñòî÷íêà - MOV EBX, ESI - //çàãðóçêà êîëè÷åñòâà ñðàâíèâàåìûõ ñòðîê - MOV EAX, NcColor - //çàãðóçêà àäðåñà ïîñëåäíåé ñòðîêè èç ìàññèâà ñòðîê - //óñòàíîâêè öâåòà øðèôòà (áåç '') - MOV EBP, pColor - //çàãðóçêà àäðåñà ìàññèâà äëèí ñòðîê áåç '\' è - //(-1, ò.ê. áóäåò ïðèáàâëÿòñÿ EAX) - LEA EDX, [cColLength - 1] - -@CmpStr: - //çàãðóçêà àäðåñà ñòðîêè ïðèåìíèêà - MOV EDI, EBP - //çàãðóçêà ñ÷åò÷èêà ñèìâîëîâ ñòðîêè - MOVZX ECX, BYTE PTR [EDX + EAX] - //ñðàâíåíèå ñòðîê - //(ïðåðûâàíèå, åñëè íå ðàâíû, ò.å. äëèíó Src ìîæíî íå ïðîâåðÿòü) - REPE CMPSB - //ïðîâåðêà ðåçóëüòàòà ñðàâíåíèÿ ñòðîê - JZ @ColorCode - //âîññòàíîâëåíèå àäðåñà ñòðîêè èñòî÷íèêà - MOV ESI, EBX - //ñäâèã àäðåñà ñòðîêè ïðèåìíèêà íà ñëåäóþùóþ ñòðîêó - SUB EBP, LenCode - //äåêðåìåíò ñ÷åò÷èêà ñòðîê - DEC EAX - //ïðîâåðêà íà ïîâòîð öèêëà ñðàâíåíèÿ ñòðîê - JA @CmpStr //if EAX > 0 -//ñèìâîë '\' áûë ïðîñòî ñèìâîëîì - //restore - POP EDI - POP ECX -@StoreSlash: - //çàïèñü êîäà ñèìâîëà '\' - MOV AL, '\' - JMP @CopyChar - -//çàïèñü êîäà ñìåíû èçâåñòíîãî öâåòà øðèôòà -//â AL íîìåð ñòðîêè èç cColor -@ColorCode: - //restore - POP EDI - //äîáàâêà êîäà öâåòà ê ColorCode - MOVZX EDX, BYTE PTR [EDX + EAX]//çàãðóçêà ñ÷åò÷èêà ñèìâîëîâ ñòðîêè - ADD AL, $2E //1..14 + $2E = $2F..$3C - //backup EAX - MOV ECX, EAX - //save ColorCode - MOV AX, $63FF - STOSW //MOVD [EDI]+, AX - //restore EAX - MOV EAX, ECX - //test \color; - CMP AL, $3C - JE @FullColorCode - //add number to ColorCode - STOSB //MOVD [EDI]+, AL - -@FullColorCode: - //restore ECX - POP ECX - SUB ECX, EDX //êîððåêöèÿ ECX íà äëèíó ñòðîêè - JZ @Exit //êîíåö ñòðîêè èñòî÷íèêà - //ESI ïîñëå ñðàâíåíèÿ óæå óêàçûâàåò íà ñëåäóþùèé ñèìâîë - JMP @NextChar //ECX >= 1 -end; - -//MS C++__fastcall(ecx,edx) vs Delphi register(eax,edx,ecx) - :( -procedure ReplaceColorCode(_EAX: Integer;_EDX: Integer; Str: PAnsiChar); register; -var - i, L, n: Integer; -begin - L := Length(Str); - n := ColorApi2ColorCode(Str, Str, L); - Dec(L); - for i := n to L do - begin - //Str[i] := ' '; - end; - //MsgOK(Str); -end; -} - -//Decode string from UCS2 to UTF8 -//WideCharToMultiByte not support CP_UTF8 in Windows 95 -function UCS2ToUTF8(Dest: PAnsiChar; MaxDestBytes: Integer; - Source: PWideChar; SourceChars: Integer): Integer; -//EAX: @Dest -//EDX: MaxDestBytes -//ECX: @Source -//(ESP): SourceChars; -//Result: DestChars of @Dest -> EAX -asm - //backup - PUSHF - CLD //set (ESI)+ - PUSH EBX - PUSH ESI - PUSH EDI - - PUSH Dest //backup @Dst - MOV EDI, Dest - TEST Source, Source //test NULL string - JZ @Exit - MOV ESI, Source - MOV ECX, SourceChars - -@NextChar: - //test length of Dst - DEC EDX - JLE @Exit - //get next char to EAX - XOR EAX, EAX - LODSW //MOV AX, [ESI]+ - //test NULL char (end of string) - TEST EAX, EAX - JZ @Exit -//decode UCS2 to UTF8 -@Ucs2ToUtf8: - //test UCS2-char in $0000..$007F - CMP AX, $007F - JA @11xxxxxx //if AX > $7F -//UTF8-char: 0xxxxxxx - //AH = 00000000; AL = 0xxxxxxx -@0xxxxxxx: - //save UTF8-char - STOSB //MOVB [EDI]+, AL -//end Loop -@Loop: - LOOP @NextChar - JMP @Exit - -@11xxxxxx: - //test length of Dst - DEC EDX - JLE @Exit - //test UCS2-char in $0080..$07FF - CMP AX, $07FF - JA @1110xxxx //if AX > $07FF -//UTF8-char: 110xxxxx 10xxxxxx - //AH = 00000xxx; AL = xxxxxxxx - //get first byte UTF8-char to AL - ROR AX, 6 //AH = xxxxxx00; AL = 000xxxxx - //get second byte UTF8-char to AH - SHR AH, 2 //AH = 00xxxxxx - OR AX, $80C0 //AH = 10xxxxxx; AL = 110xxxxx - //save UTF8-char - STOSW //MOVW [EDI]+, AX - JMP @Loop - -//UTF8-char: 1110xxxx 10xxxxxx 10xxxxxx -@1110xxxx: - //test length of Dst - DEC EDX - JLE @Exit - //save lobyte of UCS2-char - MOV BL, AL - //AH = xxxxxxxx; AL = xxxxxxxx - //get first byte UTF8-char UTF8 to AL - ROL AX, 4 //AL = ????xxxx; AH = xxxxxx?? - AND AL, $0F //AL = 0000xxxx - //get second byte UTF8-char to AH - SHR AH, 2 //AH = 00xxxxxx - OR AX, $80E0 //AH = 10xxxxxx; AL = 1110xxxx - //save first bytes UTF8-char - STOSW //MOVW [EDI]+, AX - //get second byte UTF8-char to AL - XCHG EAX, EBX //??xxxxxx - AND AL, $3F //00xxxxxx - OR AL, $80 //10xxxxxx - //save third byte UTF8-char - JMP @0xxxxxxx - -@Exit: - MOV BYTE PTR [EDI], $00 //set end-char of Dst - POP EAX //restore @Dst - XCHG EAX, EDI - //get length of Dst to Result - SUB EAX, EDI - //restore - POP EDI - POP ESI - POP EBX - POPF -end; - -function _UCS2ToUTF8(Dest: PAnsiChar; MaxDestBytes: Integer; - Source: PWideChar; SourceChars: Integer): Integer; stdcall; -begin - Result := UCS2ToUTF8(Dest, MaxDestBytes, Source, SourceChars); -end; - -//Decode string from UTF8 to UCS2 -function UTF8ToUCS2(Dest: PWideChar; MaxDestBytes: Integer; - Source: PAnsiChar; SourceChars: Integer): Integer; -//EAX: @Dest -//EDX: MaxDestBytes -//ECX: @Source -//(ESP): SourceChars; -//Result: DestChars of @Dest -> EAX -//if errors then -//Result: -(DestChars of @Dest) -> EAX -asm - //backup - PUSHF - CLD //set (ESI)+ - PUSH EBX - PUSH ESI - PUSH EDI - - PUSH Dest //backup @Dst - MOV EDI, Dest - TEST Source, Source //test NULL string - JZ @Exit - MOV ESI, Source - MOV ECX, SourceChars - -@NextChar: - //test length of Dst - SUB EDX, 2 - JLE @Exit - //get next char to EAX - XOR EAX, EAX - LODSB //MOV AL, [ESI]+ - //test NULL char (end of string) - TEST AL, AL - JZ @Exit -//decode UTF8 to UCS2 -@Utf8ToUcs2: - //test first byte UTF8 = 0xxxxxxx - TEST AL, $80 - JNZ @1xxxxxxx -//UTF8: 0xxxxxxx (AH = 0) -@SaveU16: - STOSW //MOVW [EDI]+, EAX -@Loop: - LOOP @NextChar - JMP @Exit - -@1xxxxxxx: - //test first byte UTF8 = 10xxxxxx - TEST AL, $40 //01000000 - JZ @Exit //Error UTF8: 10xxxxxx - //test first byte UTF8 = 1111xxxx - CMP AL, $F0 //11110000 - JAE @Exit //Error UTF8 to UCS2: 1111xxxx ( if AL >= $F0) - //test exist second byte UTF8 - JECXZ @Exit // DEC ECX; if ECX = 0 - //backup first byte UTF8 - MOV AH, AL //11xxxxxx - //load second byte UTF8 - LODSB //MOV AL, [ESI]+ - //test second byte UTF8 = 10xxxxxx - TEST AL, $40 //01000000 - JNE @Exit //Error UTF8: 10xxxxxx - //test second byte UTF8 = 110xxxxx - TEST AH, $20 //00100000 - JNZ @1110xxxx //third byte UTF8 -//UTF8: 110xxxxx 10xxxxxx - //backup first byte UTF8 - MOV BL, AH //110xxxxx - //get high byte UCS2 - SHR AH, 2 //00110xxx - AND AX, $073F //AH: 00000xxx; AL: 00xxxxxx - //get low byte USC2 - SHL BL, 6 //xx000000 - OR AL, BL //xxxxxxxx - //AX: 00000xxx:xxxxxxxx - JMP @SaveU16 - -@1110xxxx: - //test exist third byte UTF8 - JeCXZ @Exit // DEC ECX; if ECX = 0 - //backup second byte UTF8 - MOV BL, AL //10xxxxxx - //load third byte UTF8 - LODSB //MOV AL, [ESI]+ - //test third byte UTF8 = 10xxxxxx - CMP AL, $C0 //11000000 - JAE @Exit //Error UTF8: 11xxxxxx ( if AL >= $C0) -//UTF8: 1110xxxx 10xxxxxx 10xxxxxx - //get bytes UCS2 íà: xx00000:0000xxxx - AND BX, $003F //DX := 00000000:00xxxxxx - ROR BX, 2 //BL := 0000xxxx; BH := xx000000 - //get low byte UTF8 - AND AL, $3F //00xxxxxx - OR AL, BH //xxxxxxxx - //get high byte UCS2 - SHL AH, 4 //xxxx0000 - OR AH, BL //xxxxxxxx - JMP @SaveU16 - -@Exit: - XOR EAX, EAX - MOV [EDI],AX //set end-char of Dst - POP EAX //restore @Dst - XCHG EAX, EDI - //get length of Dst to Result - SUB EAX, EDI - SHR EAX, 1 - //restore - POP EDI - POP ESI - POP EBX - POPF -end ; //asm - - -function _UTF8ToUCS2(Dest: PWideChar; MaxDestBytes: Integer; - Source: PAnsiChar; SourceChars: Integer): Integer; stdcall; -begin - Result := UTF8ToUCS2(Dest, MaxDestBytes, Source, SourceChars); -end; - -exports - _UCS2ToUTF8 name '__stdcall UCS2toUTF8', - _UTF8ToUCS2 name '__stdcall UTF8toUCS2', - //ReplaceColorCode name 'replaceColorCode', - SetMonoString name '__fastcall setMonoString', - WSprintStringLastGender name '__stdcall wSprintStringLastGender', - CutStringGender name '__fastcall cutStringGender', - GetTypeString name '__fastcall getTypeString', - GetTranslatedString name '__fastcall getTranslatedString', - InitTranslatedString name '__fastcall initTranslatedString'; - -var - i, j: Integer; - S: UTF8String; - b: Boolean; -begin - IniName := GetStartDir + NamePlugyLocal; - if FileExists(IniName) then Exit; - S := #$EF#$BB#$BF';UTF8'; - for i := 0 to MaxStr do - begin - S := S + #$0D#$0A'[' + LocalStrings[i].name + ']'#$0D#$0A + sLng[0] + '="' - + LocalStrings[i].value + '"'#$0D#$0A; - for j := 1 to MaxLng do - S := S + sLng[j] + '='#$0D#$0A; - end; - for i := 0 to MaxType do - begin - S := S + #$0D#$0A; - b := (StrTypes[i].k <> ''); - if b then - S := S + ';'; - S := S + '[' + StrTypes[i].c + ']'#$0D#$0A; - - if b then - S := S + ';'; - S := S + sLng[0] + '="' + StrTypes[i].s + '"'#$0D#$0A; - if not b then - begin - for j := 1 to MaxLng do - S := S + sLng[j] + '='#$0D#$0A; - end; - end; - StrSaveToFile(IniName, S); -end. diff --git a/PlugYLocal/PlugYLocal.ini b/PlugYLocal/PlugYLocal.ini deleted file mode 100644 index a2ab67c..0000000 --- a/PlugYLocal/PlugYLocal.ini +++ /dev/null @@ -1,1657 +0,0 @@ -;UTF8 -;Sorry for https:;translate.google.com -[STR_STATS_UNASSIGN_WITH_LIMIT] -ENG="+Alt: Unassign, +Shift: by %d points" -ESP="+Alt: Désallocation, +Shift: par %d points" -DEU="+Alt: Zurücksetzen, +Shift: um %d Punkte" -FRA="+Alt: Rimuovi, +Shift: Assegna %d punti" -POR="+Alt: Quita, +Shift: por %d puntos" -ITA="+Alt: Odejmij, +Shift: %d punktów" -JPN="+Alt: 取消加点, +Shift: %d 点数" -KOR="+Alt: 할당, +Shift: %d 포인트로" -SIN= -CHI="+Alt: 取消加點, +Shift: %d 點數" -POL="+Alt: Przypisywanie, +Shift: o %d punkty" -RUS="+Alt: Вычесть, +Shift: по %d очка" - -[STR_STATS_UNASSIGN_WITHOUT_LIMIT] -ENG="+Alt: Unassign, +Shift: all remaining points" -ESP="+Alt: Désallocation, +Shift: Tous les points restants" -DEU="+Alt: Zurücksetzen, +Shift: Alle verbleibenden Punkte" -FRA="+Alt: Rimuovi, +Shift: Assegna tutti i punti rimanenti" -POR="+Alt: Quita, +Shift: Todos los puntos restantes" -ITA="+Alt: Odejmij, +Shift: wszystkie pozostale punkty" -JPN="+Alt: 取消加点, +Shift: 所有" -KOR="+Alt: 할당, +Shift: 남아있는 모든 포인트를" -SIN= -CHI="+Alt:取消加點, +Shift: 所有加點" -POL="+Alt: Przypisywanie, +Shift: wszystkie pozostałe punkty" -RUS="+Alt: Вычесть, +Shift: все оставшиеся очки" - -[STR_STATS_BASE_MIN] -ENG="Base: %d (Min: %d)" -ESP="Base: %d (Min: %d)" -DEU="Basiswert: %d (Min: %d)" -FRA="Base: %d (Min: %d)" -POR="Base: %d (Min: %d)" -ITA="Bazowo: %d (Minimum: %d)" -JPN="基础: %d (最小: %d)" -KOR="기본: %d (최소: %d)" -SIN= -CHI="基礎: %d (最小: %d)" -POL="Podstawowe %d Min.: %d)" -RUS="Базовое: %d (Мин.: %d)" - -[STR_SKILLS_UNASSIGN] -ENG="Un-allocate all skills points" -ESP="Désalloue tous les points d'aptitudes" -DEU="Alle Fertigkeitspunkte zurücksetzen" -FRA="Rimuovi tutte le abilità" -POR="Quita todos los puntos de habilidades" -ITA="Rozdaj od nowa wszystkie punkty umiejetnosci" -JPN="取消所有技能加点" -KOR="모든 스킬 포인트를 해제 할당" -SIN= -CHI="取消所有分配的技能點" -POL="Un przydzielić wszystkie punkty umiejętności" -RUS="Сбросить все навыки" - -[STR_STASH_PREVIOUS_PAGE] -ENG="Previous Page (+Shift: First Page)" -ESP="Page précédente (+Shift: Première page)" -DEU="Vorherige Seite (+Shift: Erste Seite)" -FRA="Pagina Precedente (+Shift: Prima Pagina)" -POR="Pagina anterior (+Shift: Primera Pagina)" -ITA="Poprzednia Strona (+Shift: Pierwsza Strona)" -JPN="上一页 (+Shift: 首页)" -KOR="이전 페이지 (+Shift: 첫 페이지)" -SIN= -CHI="上一頁 (+Shift: 第一頁)" -POL="Poprzednia strona (+Shift: pierwsza strona)" -RUS="Предыдущая страница (+Shift: первая страница)" - -[STR_STASH_NEXT_PAGE] -ENG="Next Page (+Shift: Last not empty Page)" -ESP="Page suivante (+Shift: Dernière page non vide)" -DEU="Nächste Seite (+Shift: Letzte nicht leere Seite )" -FRA="Pagina Successiva (+Shift: Ultima Pagina non vuota)" -POR="Pagina Siguiente (+Shift: Ultima pagina non vacia)" -ITA="Nastepna Strona (+Shift: Ostatnia nie pusta Strona)" -JPN="下一页 (+Shift: 最后非空页)" -KOR="다음 페이지 (+Shift: 마지막 비어 있지 않은 페이지)" -SIN= -CHI="下一頁 (+Shift: 最後非空頁)" -POL="Następna strona (+Shift: Ostatnio nie pusta strona)" -RUS="Последняя страница (+Shift: последняя непустая страница)" - -[STR_TOGGLE_TO_PERSONAL] -ENG="Toggle to Personal Stash" -ESP="Voir coffre personnel" -DEU="Wechselt zum persönlichen Goldschatz" -FRA="Vai all'Inventario Personale" -POR="Ver el cofre personal" -ITA="Przejdz do Skrzyni Osobistej" -JPN="切换到个人储物箱" -KOR="개인 은닉로 전환" -SIN= -CHI="切換到個人儲物箱" -POL="Przełącz do osobistego pierś" -RUS="Переключить на личный сундук" - -[STR_TOGGLE_TO_SHARED] -ENG="Toggle to Shared Stash" -ESP="Voir coffre partagé" -DEU="Wechselt zum gemeinsamen Goldschatz" -FRA="Vai all'Inventario Condiviso" -POR="Ver el cofre compartido" -ITA="Przejdz do Skrzyni Wspólnej" -JPN="切换到共享储物箱" -KOR="공유 은닉로 전환" -SIN= -CHI="切換到共享儲物箱" -POL="Przełącz się na wspólnym pierś" -RUS="Переключить на общий сундук" - -[STR_STASH_PREVIOUS_INDEX] -ENG="Previous Index : by %d Pages (+Shift: %d)" -ESP="Index précédent : par %d pages (+shift: %d)" -DEU="Vorheriger Index: in %d Seiten (+shift: %d)" -FRA="Schermata Precedente : Indietro di %d Pagine (+Shift: %d)" -POR="Indice anterior : por %d paginas (+shift: %d)" -ITA="Poprzednia Strona : po %d Stron (+Shift: %d)" -JPN="向前索引 : %d 页 (+Shift: %d)" -KOR="이전 색인 : %d 페이지로 (+Shift: %d)" -SIN= -CHI="向前索引 : %d 頁 (+Shift: %d)" -POL="Poprzednie Index : przez %d Pages (+Shift: %d)" -RUS="Переход назад на %d страниц (+Shift: %d)" - -[STR_STASH_NEXT_INDEX] -ENG="Next Index : by %d Pages (+shift: %d)" -ESP="Index suivant : par %d pages (+shift: %d)" -DEU="Nächster Index: in %d Seiten (+shift: %d)" -FRA="Schermata Successiva : Avanti di %d Pagine (+shift: %d)" -POR="Indice siguiente : por %d paginas (+shift: %d)" -ITA="Nastepna Strona : po %d Stron (+shift: %d)" -JPN="向后索引 : %d 页 (+shift: %d)" -KOR="다음 인덱스 : %d 페이지로 (+shift: %d)" -SIN= -CHI="向後索引 : %d 個頁面 (+shift: %d)" -POL="Następny Index : przez d% Strony (+shift: %d)" -RUS="Переход вперед : на %d страниц (+shift: %d)" - -[STR_PUT_GOLD] -ENG="Put Gold" -ESP="Poser de l'Or" -DEU="Gib Gold" -FRA="Immetti Oro" -POR="Poner oro" -ITA="Zdeponuj Zloto" -JPN="放入金币" -KOR="골드 넣어" -SIN= -CHI="放入金幣" -POL="Put złoto" -RUS="Добавить золото" - -[STR_TAKE_GOLD] -ENG="Take Gold" -ESP="Prendre de l'Or" -DEU="Nehme Gold" -FRA="Ritira Oro" -POR="Tomar oro" -ITA="Wyplac zloto" -JPN="取出金币" -KOR="금을" -SIN= -CHI="取出金幣" -POL="Weź złoto" -RUS="Забрать золото" - -[STR_PERSONAL_PAGE_NUMBER] -ENG="Personal Page n°%u" -ESP="Page perso n°%u" -DEU="Persönliche Seite n°%u" -FRA="Pagina Personale n°%u" -POR="Pagina personal n°%u" -ITA="Strona Osobista n°%u" -JPN="个人储物箱 n°%u" -KOR="개인 페이지 n°%u" -SIN= -CHI="個人儲物箱 n°%u" -POL="Strona osobista n°%u" -RUS="Личная страница n°%u" - -[STR_SHARED_PAGE_NUMBER] -ENG="Shared Page n°%u" -ESP="Page partagée n°%u" -DEU="Gemeinsame Seite n°%u" -FRA="Pagina Condivisa n°%u" -POR="Pagina personal n°%u" -ITA="Strona Wspólna n°%u" -JPN="共享储物箱 n°%u" -KOR="공유 페이지 n°%u" -SIN= -CHI="共享儲物箱 n°%u" -POL="Wspólna strona n°%u" -RUS="Общая страница N°%u" - -[STR_NO_SELECTED_PAGE] -ENG="No selected page" -ESP="Aucune page sélectionnée" -DEU="Keine ausgewählte Seite" -FRA="Nessuna pagina selezionata" -POR="Ninguna pagina seleccionada" -ITA="Nie zaznaczono strony" -JPN="未使用页" -KOR="없음 선택한 페이지가 없습니다" -SIN= -CHI="未使用頁" -POL="Nie wybrano stronę" -RUS="Нет указанной страницы" - -[STR_SHARED_GOLD_QUANTITY] -ENG="Shared Gold : %u" -ESP="Or partagé : %u" -DEU="Gemeinsamen Gold : %u" -FRA="Oro Condiviso : %u" -POR="Oro compartido : %u" -ITA="Wspólne Zloto : %u" -JPN="共享金币 : %u" -KOR="공유 골드 : %u" -SIN= -CHI="共享金幣 : %u" -POL="Wspólna Złoto : %u" -RUS="Общее золото : %u" - -[STR_PREVIOUS_PAGE] -ENG="Previous Page" -ESP="Page précédente" -DEU="Vorherige Seite" -FRA="Pagina Precedente" -POR="Pagina anterior" -ITA="Poprzednia Strona" -JPN="上一页" -KOR="이전 페이지" -SIN= -CHI="上一頁" -POL="Poprzednia strona" -RUS="Предыдущая страница" - -[STR_NEXT_PAGE] -ENG="Next Page" -ESP="Page suivante" -DEU="Nächste Seite" -FRA="Pagina Successiva" -POR="Pagina siguiente" -ITA="Nastepna Strona" -JPN="下一页" -KOR="다음 페이지" -SIN= -CHI="下一頁" -POL="Następna strona" -RUS="Следующая страница" - -[STR_ITEM_LEVEL] -ENG="Item Level: %u" -ESP="Nivel de objeto: %u" -DEU="Gegenstandsstufe: %u" -FRA="Niveau d'objet: %u" -POR="Nível do item: %u" -ITA="Livello oggetto" -JPN="アイテムレベル: %u" -KOR="아이템 레벨: %u" -SIN= -CHI="物品等級: %u" -POL="Poziom przedmiotu: %u" -RUS="Уровень предмета: %u" - -;strings for "/listcube" command -;who should - add translation -[STR_COW_PORTAL] -ENG="Cow Portal" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Коровий портал" - -[STR_PANDEMONIUM_PORTAL] -ENG="Pandemonium Portal" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Адский Портал" - -[STR_PANDEMONIUM_FINAL_PORTAL] -ENG="Pandemonium Final Portal" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Финальный Адский Портал" - -[STR_FULL] -ENG="Fully " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Полностью " - -[STR_REPAIR] -ENG="Repair " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Починенный [fs]Починенная [ns]Починенное [pl]Починенные " - -[STR_AND] -ENG="and " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="и " - -[STR_RECHARGE] -ENG="Recharge " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Перезаряженный [fs]Перезаряженная [ns]Перезаряженное [pl]Перезаряженные " - -[STR_DESTROY_FILLERS] -ENG="Destroys Fillers " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Без ячеек " - -[STR_REMOVE_FILLERS] -ENG="Remove Fillers " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="С пустыми ячейками в " - -[STR_REGENERATE] -ENG="Regenerate " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Восстановленный [fs]Восстановленная [ns]Восстановленное [pl]Восстановленные " - -[STR_WITH_N_SOCKETS] -ENG="with %u Sockets " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="c %u ячейками " - -[STR_ETHERAL] -ENG="Ethereal " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Эфирный [fs]Эфирная [ns]Эфирное [pl]Эфирные " - -[STR_NOT_ETHERAL] -ENG="Not Ethereal " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Не эфирный [fs]Не эфирная [ns]Не эфирное [pl]Не эфирные " - -[STR_NOT_RUNEWORD] -ENG="Not Runeword " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Без рунного слова " - -[STR_BASIC] -ENG="Basic " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Простой [fs]Простая [ns]Простое [pl]Простые " - -[STR_EXCEPTIONAL] -ENG="Exceptional " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Исключительный [fs]Исключительная [ns]Исключительное [pl]Исключительные " - -[STR_ELITE] -ENG="Elite " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Элитный [fs]Элитная [ns]Элитное [pl]Элитные " - -[STR_CRACKED] -ENG="Cracked " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Сломанный [fs]Сломанная [ns]Сломанное [pl]Сломанные " - -[STR_NORMAL] -ENG="Normal " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Нормальный [fs]Нормальная [ns]Нормальное [pl]Нормальные " - -[STR_SUPERIOR] -ENG="Superior " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Превосходный [fs]Превосходная [ns]Превосходное [pl]Превосходные " - -[STR_MAGIC] -ENG="Magic " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Магический [fs]Магическая [ns]Магическое [pl]Магические " - -[STR_SET] -ENG="Set " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Наборный [fs]Наборная [ns]Наборное [pl]Наборные " - -[STR_RARE] -ENG="Rare " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Редкий [fs]Редкая [ns]Редкое [pl]Редкие " - -[STR_UNIQUE] -ENG="Unique " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Уникальный [fs]Уникальная [ns]Уникальное [pl]Уникальные " - -[STR_CRAFTED] -ENG="Crafted " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Создаваемый [fs]Создаваемая [ns]Создаваемое [pl]Создаваемые " - -[STR_TEMPERED] -ENG="Tempered " -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Закаленный [fs]Закаленная [ns]Закаленное [pl]Закаленные " - -[STR_ITEM] -ENG="Item" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Предмет" - -[STR_ITEM_SAME_TYPE] -ENG="Item of the same type" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Предмет того же типа" - -[STR_OR_UPGRADED] -ENG=" (or upgraded)" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS=" (или выше уровнем)" - -[STR_WITHOUT_SOCKET] -ENG=" without Socket" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS=" без ячеек" - -[STR_WITH_SOCKET] -ENG=" with Sockets" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS=" с ячейками" - - -[STR_ONLY_N_H] -ENG=" (Nightmare and Hell only)" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS=" (только на уровнях Кошмар и Ад)" - -[STR_ONLY_HELL] -ENG=" (Hell only)" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS=" (только на уровне Ад)" - -[STR_ONLY_CLASS] -ENG=" (%s only)" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS=" (только %s)" - -[shie] -ENG="Shield (Not Class Specific)" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Щит (без привязки к классу)" - -[tors] -ENG="Body Armor" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[fs]Нательная броня" - -;it is commented out - the text from game which can be redefined -;[gold] -;ENG="Gold" - -;[bowq] -;ENG="Arrows" - -;[xboq] -;ENG="Bolts" - -;[play] -;ENG="Ear" - -;[herb] -;ENG="Herb" - -[poti] -ENG="Potion" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Зелье" - -;[ring] -;ENG="Ring" - -;[elix] -;ENG="Elixir" - -;[amul] -;ENG="Amulet" - -[char] -ENG="Charm" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[msы]Талисман" - -;[boot] -;ENG="Boots" - -[glov] -ENG="Gloves" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[pl]Перчатки" - -[book] -ENG="Book" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Книга" - -;[belt] -;ENG="Belt" - -[gem ] -ENG="Gem" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Драгоценный камень" - -;[torc] -;ENG="Torch" - -[scro] -ENG="Scroll" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Свиток" - -;[scep] -;ENG="Scepter" - -;[wand] -;ENG="Wand" - -[staf] -ENG="Staff" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Посох" - -[bow ] -ENG="Bow" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Лук" - -;[axe ] -;ENG="Axe" - -;[club] -;ENG="Club" - -[swor] -ENG="Sword" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Меч" - -[hamm] -ENG="Hammer" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Молот" - -[knif] -ENG="Knife" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Нож" - -;[spea] -;ENG="Spear" - -[pole] -ENG="Polearm" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[fs]Алебарада" - -;[xbow] -;ENG="Crossbow" - -;[mace] -;ENG="Mace" - -;[helm] -;ENG="Helm" - -[tpot] -ENG="Missile Potion" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Зелье стрельбы" - -[ques] -ENG="Quest Item" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Квестовая вещь" - -[body] -ENG="Body Part" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Часть тела" - -;[key ] -;ENG="Key" - -;[tkni] -;ENG="Throwing Knife" - -;[taxe] -;ENG="Throwing Axe" - -;[jave] -;ENG="Javelin" - -[weap] -ENG="Weapon" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ns]Оружие" - -[mele] -ENG="Melee Weapon" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ns]Оружие ближнего боя" - -[miss] -ENG="Missile Weapon" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ns]Стреляющее оружие" - -[thro] -ENG="Throwing Weapon" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ns]Метательное оружие" - -[comb] -ENG="Combo Weapon" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ns]Комбинированное оружие" - -[armo] -ENG="Armor" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[fs]Броня" - -[shld] -ENG="Any Shield" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Любой щит" - -[misc] -ENG="Miscellaneous" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Любой предмет" - -[sock] -ENG="Socket Filler" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS= - -[seco] -ENG="Second Hand Item" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Предмет для второй руки" - -[rod ] -ENG="Staves And Rods" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[pl]Посохи и Жезлы" - -[misl] -ENG="Missile" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Снаряд" - -[blun] -ENG="Blunt" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Тупое оружие" - -;[jewl] -;ENG="Jewel" - -[clas] -ENG="Class Specific" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS= - -[amaz] -ENG="Amazon Item" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Предмет для амазонки" - -[barb] -ENG="Barbarian Item" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Предмет для варвара" - -[necr] -ENG="Necromancer Item" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Предмет для некроманта" - -[pala] -ENG="Paladin Item" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Предмет для паладина" - -[sorc] -ENG="Sorceress Item" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Предмет для волшебницы" - -[assn] -ENG="Assassin Item" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Предмет для ассасины" - -[drui] -ENG="Druid Item" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Предмет для друида" - -[h2h ] -ENG="Claw" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Коготь" - -[h2h2] -ENG="Assassin Claw" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Коготь ассасин" - -[orb ] -ENG="Orb" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[fs]Сфера" - -[head] -ENG="Voodoo Heads" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[fs]Голова Вуду" - -[ashd] -ENG="Paladin Shield" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Щит паладина" - -[phlm] -ENG="Barbarian Helm" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Шлем варвара" - -[pelt] -ENG="Druid Helm" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Шлем друида" - -;[cloa] -;ENG="Cloak" - -[rune] -ENG="Rune" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Руна" - -;[circ] -;ENG="Circlet" - -;[hpot] -;ENG="Healing Potion" - -;[mpot] -;ENG="Mana Potion" - -;[rpot] -;ENG="Rejuvenation potion" - -;[spot] -;ENG="Stamina Potion" - -;[apot] -;ENG="Antidote Potion" - -;[wpot] -;ENG="Thawing Potion" - -;[scha] -;ENG="Small Charm" - -;[mcha] -;ENG="Large Charm" - -;[lcha] -;ENG="Grand Charm" - -[abow] -ENG="Amazon Bow" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Лук амазонки" - -[aspe] -ENG="Amazon Spear" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ns]Копье амазонки" - -[ajav] -ENG="Amazon Javelin" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="[ms]Дротик амазонки" - -[mboq] -ENG="Magic Arrows" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Магические стрелы" - -[mxbq] -ENG="Magic Bolts" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Магические арбалетные стрелы" - -[gem0] -ENG="Chipped Gem" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Надколотый драгоценный камень" - -[gem1] -ENG="Flawed Gem" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Мутный драгоценный камень" - -[gem2] -ENG="Normal Gem" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Нормальный драгоценный камень" - -[gem3] -ENG="Flawless Gem" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Безупречный драгоценный камень" - -[gem4] -ENG="Perfect Gem" -ESP= -DEU= -FRA= -POR= -ITA= -JPN= -KOR= -SIN= -CHI= -POL= -RUS="Идеальный драгоценный камень" - -;[gema] -;ENG="Amethyst" - -;[gemd] -;ENG="Diamond" - -;[geme] -;ENG="Emerald" - -;[gemr] -;ENG="Ruby" - -;[gems] -;ENG="Sapphire" - -;[gemt] -;ENG="Topaz" - -;[gemz] -;ENG="Skull" diff --git a/PlugYLocal/PlugYLocal.res b/PlugYLocal/PlugYLocal.res deleted file mode 100644 index d817fad..0000000 Binary files a/PlugYLocal/PlugYLocal.res and /dev/null differ diff --git a/PlugYRun/PlugY32.ico b/PlugYRun/PlugY32.ico deleted file mode 100644 index 4ca5f13..0000000 Binary files a/PlugYRun/PlugY32.ico and /dev/null differ diff --git a/PlugYRun/PlugY48.bmp b/PlugYRun/PlugY48.bmp deleted file mode 100644 index 0d7b8f2..0000000 Binary files a/PlugYRun/PlugY48.bmp and /dev/null differ diff --git a/PlugYRun/PlugY64.bmp b/PlugYRun/PlugY64.bmp deleted file mode 100644 index 76c4553..0000000 Binary files a/PlugYRun/PlugY64.bmp and /dev/null differ diff --git a/PlugYRun/PlugYRun.aps b/PlugYRun/PlugYRun.aps deleted file mode 100644 index d861253..0000000 Binary files a/PlugYRun/PlugYRun.aps and /dev/null differ diff --git a/PlugYRun/PlugYRun.cpp b/PlugYRun/PlugYRun.cpp index 9175dec..6dec6a7 100644 --- a/PlugYRun/PlugYRun.cpp +++ b/PlugYRun/PlugYRun.cpp @@ -1,18 +1,17 @@ -/* +/*================================================================= File created by Yohann NICOLAS. Add support 1.13d by L'Autour. -*/ + + PlugY launcher. + +=================================================================*/ +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include +#include #include -#include + #include "../Commons/VersionInfo.h" -//#using -//#using -//using namespace EnvDTE; -//using namespace System; -//using namespace System::Diagnostics; -//using namespace System::ComponentModel; -//using namespace System.Diagnostics; +#include "PlugYRun.h" /* 0012C458 00000000 |ModuleFileName = NULL 0012C45C 0012C908 |CommandLine = ""C:\Jeux\Diablo II\Game.exe"" @@ -24,331 +23,290 @@ 0012C474 0012DF94 |CurrentDir = "C:\Jeux\Diablo II\" 0012C478 0012C6BC |pStartupInfo = 0012C6BC 0012C47C 0012C5CC \pProcessInfo = 0012C5CC -$ ==> >44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 D............... -$+10 >1A 13 03 00 08 00 00 00 14 13 04 00 00 00 00 00 ......... -$+20 >01 00 00 00 0C C7 12 00 34 87 D1 77 81 00 00 00 .....4w... -$+30 >0A 00 00 00 00 00 00 00 00 00 00 00 89 F6 D4 77 ............w -$+40 >CD AB BA DC 00 00 00 00 ͫ.... - -//0xE9,0x1C,0xD1,0xA8,0x6F */ +#define MAX_LOADSTRING 100 #define SUBKEY "Software\\Blizzard Entertainment\\Diablo II" -#define GAMEFILE "\\Game.exe" -#define INIFILE "\\PlugY.ini" +#define GAMEFILE "Game.exe" +#define INIFILE "PlugY.ini" #define LAUNCHING "LAUNCHING" #define LOD_VERSION "LodVersionFolder" #define PARAM "Param" +#define WINDOWED "Windowed" +#define ACTIVE_WINDOWED "ActiveWindowed" #define LIBRARY_NAME "Library" - -BYTE loadDll[]={ -0xFF,0x74,0x24,0x04, //PUSH DWORD PTR SS:[ESP+4] -0xFF,0x15,0x40,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.LoadLibraryA>] ; kernel32.LoadLibraryA -0x50, //PUSH EAX -0x68,0x80,0xBE,0xA7,0x6F, //PUSH d2gfx.6FA7BE80 ; ASCII "PlugY.dll" -0xFF,0x15,0x40,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.LoadLibraryA>] ; kernel32.LoadLibraryA -0xA3,0xFC,0xEF,0xA8,0x6F, //MOV DWORD PTR DS:[6FA8EFFC],EAX -0x85,0xC0, //TEST EAX,EAX -0x74,0x2F, //JE SHORT d2gfx.6FA7BE37 -0x50, //PUSH EAX -0x68,0x90,0xBE,0xA7,0x6F, //PUSH d2gfx.6FA7BE10 ;Init String -0x50, //PUSH EAX -0xFF,0x15,0x3C,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.GetProcAddress>] ; kernel32.GetProcAddress -0x85,0xC0, //TEST EAX,EAX -0x74,0x04, //JE SHORT d2gfx.6FA7BDC1 -0x6A,0x00, //PUSH 0 -0xEB,0x13, //JMP SHORT d2gfx.6FA7BDC1 -0x68,0x10,0x27,0x00,0x00, //PUSH 2710 ;Init Ordinal(10000) -0xFF,0x74,0x24,0x04, //PUSH DWORD PTR SS:[ESP+4] -0xFF,0x15,0x3C,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.GetProcAddress>] ; kernel32.GetProcAddress -0x85,0xC0, //TEST EAX,EAX -0x74,0x02, //JE SHORT d2gfx.6FA7BDC1 -0xFF,0xD0, //CALL EAX -0x58, //POP EAX -0x58, //POP EAX -0xC2,0x04,0x00, //RETN 4 -0x59, //POP ECX -0xB9,0x80,0xBE,0xA7,0x6F, //MOV ECX,d2gfx.6FA7BE80 ; ASCII "PlugY.dll" -0x83,0x04,0x24,0x10, //ADD DWORD PTR SS:[ESP],10 -0xC2,0x04,0x00, //RETN 4 -0x00,0x00,0x00,0x00}; //HANDLE var; +BYTE loadDll[] = { + 0xFF,0x74,0x24,0x04, //PUSH DWORD PTR SS:[ESP+4] + 0xFF,0x15,0x40,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.LoadLibraryA>] ; kernel32.LoadLibraryA + 0x50, //PUSH EAX + 0x68,0x80,0xBE,0xA7,0x6F, //PUSH d2gfx.6FA7BE80 ; ASCII "PlugY.dll" + 0xFF,0x15,0x40,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.LoadLibraryA>] ; kernel32.LoadLibraryA + 0xA3,0xFC,0xEF,0xA8,0x6F, //MOV DWORD PTR DS:[6FA8EFFC],EAX + 0x85,0xC0, //TEST EAX,EAX + 0x74,0x2F, //JE SHORT d2gfx.6FA7BE37 + 0x50, //PUSH EAX + 0x68,0x90,0xBE,0xA7,0x6F, //PUSH d2gfx.6FA7BE10 ;Init String + 0x50, //PUSH EAX + 0xFF,0x15,0x3C,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.GetProcAddress>] ; kernel32.GetProcAddress + 0x85,0xC0, //TEST EAX,EAX + 0x74,0x04, //JE SHORT d2gfx.6FA7BDC1 + 0x6A,0x00, //PUSH 0 + 0xEB,0x13, //JMP SHORT d2gfx.6FA7BDC1 + 0x68,0x10,0x27,0x00,0x00, //PUSH 2710 ;Init Ordinal(10000) + 0xFF,0x74,0x24,0x04, //PUSH DWORD PTR SS:[ESP+4] + 0xFF,0x15,0x3C,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.GetProcAddress>] ; kernel32.GetProcAddress + 0x85,0xC0, //TEST EAX,EAX + 0x74,0x02, //JE SHORT d2gfx.6FA7BDC1 + 0xFF,0xD0, //CALL EAX + 0x58, //POP EAX + 0x58, //POP EAX + 0xC2,0x04,0x00, //RETN 4 + 0x59, //POP ECX + 0xB9,0x80,0xBE,0xA7,0x6F, //MOV ECX,d2gfx.6FA7BE80 ; ASCII "PlugY.dll" + 0x83,0x04,0x24,0x10, //ADD DWORD PTR SS:[ESP],10 + 0xC2,0x04,0x00, //RETN 4 + 0x00,0x00,0x00,0x00 }; //HANDLE var; -BYTE freeDll[]={ -0xFF,0x74,0x24,0x04, //PUSH DWORD PTR SS:[ESP+4] -0xFF,0x15,0x48,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>] ; kernel32.FreeLibrary -0x50, //PUSH EAX -0xA1,0xFC,0xEF,0xA8,0x6F, //MOV EAX,DWORD PTR DS:[6FA8EFFC] -0x85,0xC0, //TEST EAX,EAX -0x74,0x2D, //JE SHORT d2gfx.6FA7BE74 -0x50, //PUSH EAX -0x68,0xA0,0xBE,0xA7,0x6F, //PUSH d2gfx.6FA7BE20 ;Release String -0x50, //PUSH EAX -//0x33,0xC0, //XOR EAX,EAX -//0xA3,0xFC,0xEF,0xA8,0x6F, //MOV DWORD PTR DS:[6FA8EFFC],EAX -0xFF,0x15,0x3C,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.GetProcAdd>; kernel32.GetProcAddress -0x85,0xC0, //TEST EAX,EAX -0x75,0x13, //JNZ SHORT d2gfx.6FA7BDEF -0x68,0x11,0x27,0x00,0x00, //PUSH 2711 ;Release Ordinal(10001) -0xFF,0x74,0x24,0x04, //PUSH DWORD PTR SS:[ESP+4] -0xFF,0x15,0x3C,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.GetProcAdd>; kernel32.GetProcAddress -0x85,0xC0, //TEST EAX,EAX -0x74,0x02, //JE SHORT d2gfx.6FA7BDEF -0xFF,0xD0, //CALL EAX -0xFF,0x15,0x48,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.FreeLibrar>; kernel32.FreeLibrary -0x58, //POP EAX -0xC2,0x04,0x00}; //RETN 4 +BYTE freeDll[] = { + 0xFF,0x74,0x24,0x04, //PUSH DWORD PTR SS:[ESP+4] + 0xFF,0x15,0x48,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.FreeLibrary>] ; kernel32.FreeLibrary + 0x50, //PUSH EAX + 0xA1,0xFC,0xEF,0xA8,0x6F, //MOV EAX,DWORD PTR DS:[6FA8EFFC] + 0x85,0xC0, //TEST EAX,EAX + 0x74,0x2D, //JE SHORT d2gfx.6FA7BE74 + 0x50, //PUSH EAX + 0x68,0xA0,0xBE,0xA7,0x6F, //PUSH d2gfx.6FA7BE20 ;Release String + 0x50, //PUSH EAX + //0x33,0xC0, //XOR EAX,EAX + //0xA3,0xFC,0xEF,0xA8,0x6F, //MOV DWORD PTR DS:[6FA8EFFC],EAX + 0xFF,0x15,0x3C,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.GetProcAdd>; kernel32.GetProcAddress + 0x85,0xC0, //TEST EAX,EAX + 0x75,0x13, //JNZ SHORT d2gfx.6FA7BDEF + 0x68,0x11,0x27,0x00,0x00, //PUSH 2711 ;Release Ordinal(10001) + 0xFF,0x74,0x24,0x04, //PUSH DWORD PTR SS:[ESP+4] + 0xFF,0x15,0x3C,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.GetProcAdd>; kernel32.GetProcAddress + 0x85,0xC0, //TEST EAX,EAX + 0x74,0x02, //JE SHORT d2gfx.6FA7BDEF + 0xFF,0xD0, //CALL EAX + 0xFF,0x15,0x48,0xC0,0xA7,0x6F, //CALL DWORD PTR DS:[<&KERNEL32.FreeLibrar>; kernel32.FreeLibrary + 0x58, //POP EAX + 0xC2,0x04,0x00 }; //RETN 4 -//LPCSTR dllName = "PlugY.dll"; + //LPCSTR dllName = "PlugY.dll"; LPCSTR initFctName = "_Init@4"; LPCSTR releaseFctName = "_Release@0"; - static bool versionXP; -typedef int (__stdcall* tDebugActiveProcessStop)(DWORD); +typedef int(__stdcall* tDebugActiveProcessStop)(DWORD); tDebugActiveProcessStop debugActiveProcessStop; -void assertion(LPCSTR msg) +void assertion(const char* pFormat, ...) { - MessageBox(0, msg, "PlugYRun", MB_OK|MB_ICONASTERISK); + char msg[200]; + va_list lArgs; + va_start(lArgs, pFormat); + + vsprintf(&msg[0], pFormat, lArgs); + + va_end(lArgs); + MessageBox(0, msg, "PlugY", MB_OK | MB_ICONASTERISK); exit(1); } -bool installPlugY(HANDLE h, DWORD addr, char* libraryName, int isAdd, int ver) +bool installPlugY(HANDLE h, LPBYTE addr, char* libraryName, eGameVersion version) { - BYTE buf[200]; - DWORD pos=0; - SIZE_T nb=0; - SIZE_T nb2=0; - //DWORD version; - int res; - - - // Get Version and needed addresses. -/* res = ReadProcessMemory(h,(LPVOID)(addr+0x110),&version,4,&nb);//0x80 - if (!res || (nb!=4)) assertion("Read to get current d2gfx version in memory failed"); -*/ - DWORD loadCallerAddr = addr; - DWORD freeCallerAddr = addr; - DWORD loadLibraryAddr = addr; - DWORD freeLibraryAddr = addr; - DWORD getProcAddressAddr = addr; -// GET_VERSION(D2gfx, 110, 000054EB, 00001000, 0000C000, 42E6C22A, 43028B19);//110 -/* + LPBYTE loadCallerAddr = addr; + LPBYTE freeCallerAddr = addr; + LPBYTE loadLibraryAddr = addr; + LPBYTE freeLibraryAddr = addr; + LPBYTE getProcAddressAddr = addr; switch (version) { - case 0x000054EB://1.09b 0x00949FA8: - case 0x00001000://1.09d 0x018866A8: + case V107: + case V108: + //TODO + return false; + case V109: + case V109b: + case V109d: loadCallerAddr += 0x389B; freeCallerAddr += 0x3A8C; loadLibraryAddr += 0xC03C; freeLibraryAddr += 0xC044; getProcAddressAddr += 0xC038; break; - case 0x0000C000://1.10 0x401526B2 + case V110: loadCallerAddr += 0x3870; freeCallerAddr += 0x3A6D; loadLibraryAddr += 0xC040; freeLibraryAddr += 0xC048; getProcAddressAddr += 0xC03C; break; - case 0x42E6C22A://1.11 0x575C8A5E + case V111: loadCallerAddr += 0x8B23; freeCallerAddr += 0x8ACA; loadLibraryAddr += 0xD11C; freeLibraryAddr += 0xD12C; getProcAddressAddr += 0xD120; break; - case 0x43028B19://1.11b + case V111b: loadCallerAddr += 0xB423; freeCallerAddr += 0xB3CA; loadLibraryAddr += 0xD11C; freeLibraryAddr += 0xD12C; getProcAddressAddr += 0xD120; break; - case 0x0A07010B://1.12a + case V112: loadCallerAddr += 0x8F63; freeCallerAddr += 0x8F0A; loadLibraryAddr += 0xD11C; freeLibraryAddr += 0xD12C; getProcAddressAddr += 0xD120; break; - case 0x00000000://1.13 + case V113c: loadCallerAddr += 0xB423; freeCallerAddr += 0xB3CA; loadLibraryAddr += 0xD11C; freeLibraryAddr += 0xD12C; getProcAddressAddr += 0xD120; break; - default: - assertion("Wrong version of the library D2gfx.dll"); - }*/ - - switch (ver) - { - case v109b: - case v109d: - loadCallerAddr += 0x389B; - freeCallerAddr += 0x3A8C; - loadLibraryAddr += 0xC03C; - freeLibraryAddr += 0xC044; - getProcAddressAddr += 0xC038; - break; - case v110: - loadCallerAddr += 0x3870; - freeCallerAddr += 0x3A6D; - loadLibraryAddr += 0xC040; - freeLibraryAddr += 0xC048; - getProcAddressAddr += 0xC03C; - break; - case v111: - loadCallerAddr += 0x8B23; - freeCallerAddr += 0x8ACA; - loadLibraryAddr += 0xD11C; - freeLibraryAddr += 0xD12C; - getProcAddressAddr += 0xD120; - break; - case v111b: - loadCallerAddr += 0xB423; - freeCallerAddr += 0xB3CA; - loadLibraryAddr += 0xD11C; - freeLibraryAddr += 0xD12C; - getProcAddressAddr += 0xD120; - break; - case v112: - loadCallerAddr += 0x8F63; - freeCallerAddr += 0x8F0A; - loadLibraryAddr += 0xD11C; - freeLibraryAddr += 0xD12C; - getProcAddressAddr += 0xD120; - break; - case v113c: - loadCallerAddr += 0xB423; - freeCallerAddr += 0xB3CA; - loadLibraryAddr += 0xD11C; - freeLibraryAddr += 0xD12C; - getProcAddressAddr += 0xD120; - break; - case v113d: + case V113d: loadCallerAddr += 0xAA03; freeCallerAddr += 0xA9AA; loadLibraryAddr += 0xD11C; freeLibraryAddr += 0xD124; getProcAddressAddr += 0xD120; - break; + break; + case V114a: + case V114b: + case V114c: + case V114d: + //TODO + return false; default: - return false;//assertion("Wrong version of the Game.exe"); + return false; } -//const char sD2Ver[8][7] = {{"v1.09b"},{"v1.09d"},{"v1.10 "},{"v1.11 "},{"v1.11b"},{"v1.12 "},{"v1.13c"},{"v1.13d"}}; -//assertion(sD2Ver[version]); + BYTE buf[200]; + DWORD pos = 0; + SIZE_T nb = 0; + int res; - //Verify if memory are ok. + // Verify if memory are ok. bool alreadyInstalled = false; - res = ReadProcessMemory(h,(LPVOID)loadCallerAddr,buf,6,&nb); - if (!res || nb<6 ) assertion("Read memory failed for checking."); - if (buf[0]!=0xFF || buf[1]!=0x15 || *(DWORD*)(buf+2) != loadLibraryAddr) - if (buf[0]!=0xE8 /*|| buf[1]!=0xD8 || buf[2]!=0x19*/ || buf[3]!=0x00 || buf[4]!=0x00 || buf[5]!=0x90) - assertion("Checking library memory check failed."); + res = ReadProcessMemory(h, (LPVOID)loadCallerAddr, buf, 6, &nb); + if (!res || nb<6) assertion("PlugY: Read process memory failed."); + if (buf[0] != 0xFF || buf[1] != 0x15 || *(LPBYTE*)(buf + 2) != loadLibraryAddr) + if (buf[0] != 0xE8 /*|| buf[1]!=0xD8 || buf[2]!=0x19*/ || buf[3] != 0x00 || buf[4] != 0x00 || buf[5] != 0x90) + assertion("PlugY: Read process memory failed."); else alreadyInstalled = true; - res = ReadProcessMemory(h,(LPVOID)freeCallerAddr,buf,6,&nb); - if (!res || nb<6 ) assertion("Read memory failed for checking."); - if (buf[0]!=0xFF || buf[1]!=0x15 || *(DWORD*)(buf+2) != freeLibraryAddr) - if (buf[0]!=0xE8 /*|| buf[1]!=0x75 || buf[2]!=0x1A*/ || buf[3]!=0x00 || buf[4]!=0x00 || buf[5]!=0x90) + res = ReadProcessMemory(h, (LPVOID)freeCallerAddr, buf, 6, &nb); + if (!res || nb<6) assertion("PlugY: Read process memory failed."); + if (buf[0] != 0xFF || buf[1] != 0x15 || *(LPBYTE*)(buf + 2) != freeLibraryAddr) + if (buf[0] != 0xE8 /*|| buf[1]!=0x75 || buf[2]!=0x1A*/ || buf[3] != 0x00 || buf[4] != 0x00 || buf[5] != 0x90) if (!alreadyInstalled) - assertion("Checking library memory failed."); + assertion("PlugY: Read process memory failed."); if (alreadyInstalled) return true; - //Alloc custom memory data. - DWORD memory = (DWORD)VirtualAllocEx(h,NULL,200,MEM_COMMIT,PAGE_EXECUTE_READWRITE); - DWORD oldProtect=-1; + // Alloc custom memory data. + LPBYTE memory = (LPBYTE)VirtualAllocEx(h, NULL, 200, MEM_COMMIT, PAGE_EXECUTE_READWRITE); + DWORD oldProtect = -1; if (!memory) { -// MessageBox(0, "no memory", "RunPlugY.\n", MB_OK|MB_ICONASTERISK); - memory = addr + 0xBE00 + isAdd*0x1000; - if( !VirtualProtectEx(h,(LPVOID)memory, 200, PAGE_EXECUTE_READWRITE, &oldProtect) ) - assertion("Failed to get memory pool for PlugY loading."); + res = ReadProcessMemory(h, addr, buf, 0x40, &nb); + if (!res || nb < 0x40) assertion("PlugY: Read process memory failed."); + DWORD offsetPESignature = *(WORD*)(buf + 0x3C); + + res = ReadProcessMemory(h, addr + offsetPESignature, buf, 0x30, &nb); + if (!res || nb < 0x30) assertion("PlugY: Read process memory failed."); + DWORD sizeOfCode = *(DWORD*)(buf + 0x1C); + DWORD baseOfCode = *(DWORD*)(buf + 0x2C); + + //MessageBox(0, "no memory", "RunPlugY.\n", MB_OK|MB_ICONASTERISK); + //memory = addr + 0xBE00 + isAdd * 0x1000; + memory = addr + baseOfCode + sizeOfCode - 200; + if (!VirtualProtectEx(h, memory, 200, PAGE_EXECUTE_READWRITE, &oldProtect)) + assertion("PlugY : Failed to get memory pool in game thread"); } - //Make memory data + // Make memory data int len; - pos=0; + pos = 0; - //Dll name - DWORD dllNameAddr = memory+pos; - len = strlen(libraryName)+1; - res = WriteProcessMemory(h,(LPVOID)dllNameAddr,libraryName,len,&nb); - if (!res || (nb!=len)) assertion("Write custom data in memory failed"); - pos += pos%16 ? len + 16 - pos%16 : len; + // Dll name + LPBYTE dllNameAddr = memory + pos; + len = strlen(libraryName) + 1; + res = WriteProcessMemory(h, dllNameAddr, libraryName, len, &nb); + if (!res || (nb != len)) assertion("PlugY: Write custom data in memory failed"); + pos += pos % 16 ? len + 16 - pos % 16 : len; - //init name - DWORD initNameAddr = memory+pos; - len = strlen(initFctName)+1; - res = WriteProcessMemory(h,(LPVOID)initNameAddr,initFctName,len,&nb); - if (!res || (nb!=len)) assertion("Write custom data in memory failed"); - pos += pos%16 ? len + 16 - pos%16 : len; + // Init name + LPBYTE initNameAddr = memory + pos; + len = strlen(initFctName) + 1; + res = WriteProcessMemory(h, initNameAddr, initFctName, len, &nb); + if (!res || (nb != len)) assertion("PlugY: Write custom data in memory failed"); + pos += pos % 16 ? len + 16 - pos % 16 : len; - //release name - DWORD releaseNameAddr = memory+pos; - len = strlen(releaseFctName)+1; - res = WriteProcessMemory(h,(LPVOID)releaseNameAddr,releaseFctName,len,&nb); - if (!res || (nb!=len)) assertion("Write custom data in memory failed"); - pos += pos%16 ? len + 16 - pos%16 : len; + // Release name + LPBYTE releaseNameAddr = memory + pos; + len = strlen(releaseFctName) + 1; + res = WriteProcessMemory(h, releaseNameAddr, releaseFctName, len, &nb); + if (!res || (nb != len)) assertion("PlugY: Write custom data in memory failed"); + pos += pos % 16 ? len + 16 - pos % 16 : len; - //load fct - DWORD loadDllAddr = memory+pos; - DWORD handleAddr = loadDllAddr + sizeof(loadDll) - 4; - *(DWORD*)&loadDll[6] = loadLibraryAddr; - *(DWORD*)&loadDll[12] = dllNameAddr; - *(DWORD*)&loadDll[18] = loadLibraryAddr; - *(DWORD*)&loadDll[23] = handleAddr; - *(DWORD*)&loadDll[33] = initNameAddr; - *(DWORD*)&loadDll[40] = getProcAddressAddr; - *(DWORD*)&loadDll[63] = getProcAddressAddr; - *(DWORD*)&loadDll[80] = dllNameAddr; + // Load fct + LPBYTE loadDllAddr = memory + pos; + LPBYTE handleAddr = loadDllAddr + sizeof(loadDll) - 4; + *(LPBYTE*)&loadDll[6] = loadLibraryAddr; + *(LPBYTE*)&loadDll[12] = dllNameAddr; + *(LPBYTE*)&loadDll[18] = loadLibraryAddr; + *(LPBYTE*)&loadDll[23] = handleAddr; + *(LPBYTE*)&loadDll[33] = initNameAddr; + *(LPBYTE*)&loadDll[40] = getProcAddressAddr; + *(LPBYTE*)&loadDll[63] = getProcAddressAddr; + *(LPBYTE*)&loadDll[80] = dllNameAddr; len = sizeof(loadDll); - res = WriteProcessMemory(h,(LPVOID)loadDllAddr,loadDll,len,&nb); - if (!res || (nb!=len)) assertion("Write custom data in memory failed"); - pos += pos%16 ? len + 16 - pos%16 : len; + res = WriteProcessMemory(h, loadDllAddr, loadDll, len, &nb); + if (!res || (nb != len)) assertion("PlugY: Write custom data in memory failed"); + pos += pos % 16 ? len + 16 - pos % 16 : len; - //free fct - DWORD freeDllAddr = memory+pos; - *(DWORD*)&freeDll[6] = freeLibraryAddr; - *(DWORD*)&freeDll[12] = handleAddr; - *(DWORD*)&freeDll[22] = releaseNameAddr; -// *(DWORD*)&freeDll[30] = handleAddr; - *(DWORD*)&freeDll[36-7] = getProcAddressAddr; - *(DWORD*)&freeDll[55-7] = getProcAddressAddr; - *(DWORD*)&freeDll[67-7] = freeLibraryAddr; + // Free fct + LPBYTE freeDllAddr = memory + pos; + *(LPBYTE*)&freeDll[6] = freeLibraryAddr; + *(LPBYTE*)&freeDll[12] = handleAddr; + *(LPBYTE*)&freeDll[22] = releaseNameAddr; + // *(LPBYTE*)&freeDll[30] = handleAddr; + *(LPBYTE*)&freeDll[36 - 7] = getProcAddressAddr; + *(LPBYTE*)&freeDll[55 - 7] = getProcAddressAddr; + *(LPBYTE*)&freeDll[67 - 7] = freeLibraryAddr; len = sizeof(freeDll); - res = WriteProcessMemory(h,(LPVOID)freeDllAddr,freeDll,len,&nb); - if (!res || (nb!=len)) assertion("Write custom data in memory failed"); - pos += pos%16 ? len + 16 - pos%16 : len; + res = WriteProcessMemory(h, freeDllAddr, freeDll, len, &nb); + if (!res || (nb != len)) assertion("PlugY: Write custom data in memory failed"); + pos += pos % 16 ? len + 16 - pos % 16 : len; - //Patch load library - buf[0]=0x90; - buf[1]=0xE8; - *(DWORD*)(buf+2) = (DWORD)loadDllAddr - (DWORD)loadCallerAddr-6; + // Patch load library + buf[0] = 0x90; + buf[1] = 0xE8; + *(DWORD*)(buf + 2) = (DWORD)loadDllAddr - (DWORD)loadCallerAddr - 6; len = 6; - res = WriteProcessMemory(h,(LPVOID)loadCallerAddr,buf,len,&nb); - if (!res || (nb!=len)) assertion("Write load library in memory failed"); + res = WriteProcessMemory(h, loadCallerAddr, buf, len, &nb); + if (!res || (nb != len)) assertion("PlugY: Write load library in memory failed"); - //Patch free library - *(DWORD*)(buf+2) = (DWORD)freeDllAddr - (DWORD)freeCallerAddr-6; - res = WriteProcessMemory(h,(LPVOID)freeCallerAddr,buf,len,&nb); - if (!res || (nb!=len)) assertion("Write free library in memory failed"); + // Patch free library + *(DWORD*)(buf + 2) = (DWORD)freeDllAddr - (DWORD)freeCallerAddr - 6; + res = WriteProcessMemory(h, freeCallerAddr, buf, len, &nb); + if (!res || (nb != len)) assertion("PlugY: Write free library in memory failed"); -// sprintf(tmp,"mem = %08X (read = %d)",buf[0],nbRead); -// MessageBox(0, tmp, "RunPlugY.\n", MB_OK|MB_ICONASTERISK); -// if (oldProtect != -1) -// VirtualProtectEx(h,(LPVOID)memory, 200, oldProtect, &oldProtect); + // if (oldProtect != -1) + // VirtualProtectEx(h,(LPVOID)memory, 200, oldProtect, &oldProtect); return true; } @@ -360,21 +318,21 @@ bool installPlugY(HANDLE h, DWORD addr, char* libraryName, int isAdd, int ver) /*bool copyLodVersionFiles() { - BYTE folder[MAX_PATH]; - if (!GetPrivateProfileString(LAUNCHING,LOD_VERSION,"",folder,MAX_PATH,INI_FILE)) - return true; - strcat(folder,"\\*"); - WIN32_FIND_DATA FindFileData; - HANDLE hFind = FindFirstFile(folder,&FindFileData); - if (hFind==INVALID_HANDLE_VALUE) - return true; +BYTE folder[MAX_PATH]; +if (!GetPrivateProfileString(LAUNCHING,LOD_VERSION,"",folder,MAX_PATH,INI_FILE)) +return true; +strcat(folder,"\\*"); +WIN32_FIND_DATA FindFileData; +HANDLE hFind = FindFirstFile(folder,&FindFileData); +if (hFind==INVALID_HANDLE_VALUE) +return true; - do { +do { // CopyFile(); - } while (FindNextFile(hFind,&FindFileData); +} while (FindNextFile(hFind,&FindFileData); - FindClose(hFind); - return true; +FindClose(hFind); +return true; }*/ @@ -383,347 +341,271 @@ bool isD2gfx(HANDLE hProcess, LPVOID dllAdr) { SIZE_T nbRead; BYTE buf[BUF_SIZE]; - ReadProcessMemory(hProcess,dllAdr,buf,BUF_SIZE, &nbRead); + ReadProcessMemory(hProcess, dllAdr, buf, BUF_SIZE, &nbRead); if (nbRead < 0x40) return false; - int offsetPESignature = *(DWORD*)(buf+0x3C); - if (offsetPESignature+38 >= BUF_SIZE) return false; - DWORD baseOfCode = *(DWORD*)(buf+offsetPESignature + 0x34); - if ( ( baseOfCode != 0x6FA80000) && (baseOfCode != 0x6FA70000)) return false; + int offsetPESignature = *(DWORD*)(buf + 0x3C); + if (offsetPESignature + 38 >= BUF_SIZE) return false; + DWORD baseOfCode = *(DWORD*)(buf + offsetPESignature + 0x34); + if ((baseOfCode != 0x6FA80000) && (baseOfCode != 0x6FA70000)) return false; return true; } -bool getWinReg(char* buf, DWORD bufsize) +bool isGameLoaded(HANDLE hProcess, LPVOID baseAdr) +{ + SIZE_T nbRead; + BYTE buf[BUF_SIZE]; + ReadProcessMemory(hProcess, baseAdr, buf, BUF_SIZE, &nbRead); + if (nbRead < 0x40) return false; + int offsetPESignature = *(DWORD*)(buf + 0x3C); + if (offsetPESignature + 0x5C >= BUF_SIZE) return false; + DWORD baseOfCode = *(DWORD*)(buf + offsetPESignature + 0x34); + DWORD SizeOfImage = *(DWORD*)(buf + offsetPESignature + 0x50); + DWORD CheckSum = *(DWORD*)(buf + offsetPESignature + 0x58); + if ((baseOfCode==0x00400000) && (SizeOfImage == 0x005A5000) && (CheckSum == 0x00374101)) return true;//1.14c + + return false; +} + +bool getRegistryD2Directory(LPSTR buf, DWORD bufsize) { HKEY hKey; DWORD type; int res; - if (RegOpenKeyEx(HKEY_CURRENT_USER, SUBKEY, 0, KEY_READ, &hKey) == ERROR_SUCCESS) { - res = RegQueryValueEx(hKey,"InstallPath",NULL,&type,(LPBYTE)buf,&bufsize); + DWORD len = bufsize - 1; + if (RegOpenKeyEx(HKEY_CURRENT_USER, SUBKEY, 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + res = RegQueryValueEx(hKey, "InstallPath", NULL, &type, (LPBYTE)buf, &len); RegCloseKey(hKey); - if (res!=ERROR_SUCCESS) return false; - } else if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, SUBKEY, 0, KEY_READ, &hKey) == ERROR_SUCCESS) { - res = RegQueryValueEx(hKey,"InstallPath",NULL,&type,(LPBYTE)buf,&bufsize); - RegCloseKey(hKey); - if (res!=ERROR_SUCCESS) return false; - } else { - return false; + if (res != ERROR_SUCCESS) return false; } - strcat(buf, GAMEFILE); - if (GetFileAttributes(buf) == INVALID_FILE_ATTRIBUTES) + else if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, SUBKEY, 0, KEY_READ, &hKey) == ERROR_SUCCESS) + { + res = RegQueryValueEx(hKey, "InstallPath", NULL, &type, (LPBYTE)buf, &len); + RegCloseKey(hKey); + if (res != ERROR_SUCCESS) return false; + } + else return false; + + if (len <= 1) + return false; + if (buf[len - 1] != NULL) + buf[len] = NULL; + else + len--; + if (buf[len - 1] != '\\') + { + buf[len++] = '\\'; + buf[len] = NULL; + } return true; } -bool launchNormal(char* command, char* currentDirectory) +bool launchNormal(LPSTR commandLine, LPSTR currentDirectory) { STARTUPINFO si; PROCESS_INFORMATION pi; - ZeroMemory( &si, sizeof(si) ); + ZeroMemory(&si, sizeof(si)); si.cb = sizeof(si); - ZeroMemory( &pi, sizeof(pi) ); - BOOL success = CreateProcess(0, command, 0, 0, false, 0, 0, currentDirectory, &si, &pi);//DEBUG_ONLY_THIS_PROCESS - return success?true:false; + ZeroMemory(&pi, sizeof(pi)); + BOOL success = CreateProcess(NULL, commandLine, NULL, NULL, false, 0, NULL, currentDirectory, &si, &pi);//DEBUG_ONLY_THIS_PROCESS + return success ? true : false; } -bool launchGame98(char* command, char* currentDirectory, char* libraryName, int ver) +bool launchGame98(LPSTR commandLine, LPSTR currentDirectory, LPSTR libraryName, eGameVersion version) { -// MessageBox(0, "LAUNCH 98", "PlugYRun", MB_OK|MB_ICONASTERISK); STARTUPINFO si; PROCESS_INFORMATION pi; - ZeroMemory( &si, sizeof(si) ); + ZeroMemory(&si, sizeof(si)); si.cb = sizeof(si); - ZeroMemory( &pi, sizeof(pi) ); - BOOL success = CreateProcess(0, command, 0, 0, false, 0, 0, currentDirectory, &si, &pi);//DEBUG_ONLY_THIS_PROCESS + ZeroMemory(&pi, sizeof(pi)); + BOOL success = CreateProcess(0, commandLine, 0, 0, false, 0, 0, currentDirectory, &si, &pi);//DEBUG_ONLY_THIS_PROCESS if (!success) return false; DWORD ret; -// MessageBox(0, "LAUNCH 98 while", "PlugYRun", MB_OK|MB_ICONASTERISK); + Sleep(10); while (true) { - SuspendThread(pi.hThread);// == (DWORD)-1) - //MessageBox(0, "Thread not suspended", "PlugYRun", MB_OK|MB_ICONASTERISK); + SuspendThread(pi.hThread); - if (!GetExitCodeProcess(pi.hProcess,&ret) || (ret != STILL_ACTIVE)) + if (!GetExitCodeProcess(pi.hProcess, &ret) || (ret != STILL_ACTIVE)) exit(0); - if (isD2gfx(pi.hProcess,(LPVOID)0x6FA80000)) + if (isD2gfx(pi.hProcess, (LPVOID)0x6FA80000)) { -// MessageBox(0, "INSTALL 98", "PlugYRun", MB_OK|MB_ICONASTERISK); - installPlugY(pi.hProcess, 0x6FA80000, libraryName, 1, ver); + installPlugY(pi.hProcess, (LPBYTE)0x6FA80000, libraryName, version); ResumeThread(pi.hThread); return true; } - if (isD2gfx(pi.hProcess,(LPVOID)0x6FA70000)) + if (isD2gfx(pi.hProcess, (LPVOID)0x6FA70000)) { -// MessageBox(0, "INSTALL 98", "PlugYRun", MB_OK|MB_ICONASTERISK); - installPlugY(pi.hProcess, 0x6FA70000, libraryName, 0, ver); + installPlugY(pi.hProcess, (LPBYTE)0x6FA70000, libraryName, version); ResumeThread(pi.hThread); return true; } ResumeThread(pi.hThread); -// Sleep(10); + // Sleep(10); } - return true; + return false; } - -bool launchGameXP(char* command, char* currentDirectory, char* libraryName, int ver) +bool launchGameXP(LPSTR commandLine, LPSTR currentDirectory, LPSTR libraryName, eGameVersion version) { -// MessageBox(0, "LAUNCH XP", "PlugYRun", MB_OK|MB_ICONASTERISK); STARTUPINFO si; PROCESS_INFORMATION pi; - ZeroMemory( &si, sizeof(si) ); + ZeroMemory(&si, sizeof(si)); si.cb = sizeof(si); - ZeroMemory( &pi, sizeof(pi) ); - BOOL success = CreateProcess(0, command, 0, 0, false, DEBUG_PROCESS, 0, currentDirectory, &si, &pi);//DEBUG_ONLY_THIS_PROCESS + ZeroMemory(&pi, sizeof(pi)); + BOOL success = CreateProcess(0, commandLine, 0, 0, false, DEBUG_PROCESS, 0, currentDirectory, &si, &pi);//DEBUG_ONLY_THIS_PROCESS if (!success) return false; DEBUG_EVENT DebugEvent; DWORD status; -// MessageBox(0, "START WAITING", "PlugYRun", MB_OK|MB_ICONASTERISK); - while (WaitForDebugEvent(&DebugEvent,INFINITE)) + while (WaitForDebugEvent(&DebugEvent, INFINITE)) { status = DBG_CONTINUE; - switch(DebugEvent.dwDebugEventCode) + switch (DebugEvent.dwDebugEventCode) { case CREATE_THREAD_DEBUG_EVENT: CloseHandle(DebugEvent.u.CreateThread.hThread); break; case CREATE_PROCESS_DEBUG_EVENT: + if (version >= V114a && isGameLoaded(pi.hProcess, DebugEvent.u.CreateProcessInfo.lpBaseOfImage)) + { + //installPlugYOnGame(pi.hProcess, (DWORD)DebugEvent.u.CreateProcessInfo.lpBaseOfImage, libraryName, (DWORD)DebugEvent.u.LoadDll.lpBaseOfDll == 0x6FA8000, version); + CloseHandle(DebugEvent.u.CreateProcessInfo.hFile); + CloseHandle(pi.hProcess); + CloseHandle(pi.hThread); + debugActiveProcessStop(DebugEvent.dwProcessId); + return true; + } break; case EXIT_PROCESS_DEBUG_EVENT: -// MessageBox(0, "EXIT", "PlugY", MB_OK|MB_ICONASTERISK); exit(0); case EXCEPTION_DEBUG_EVENT: if (DebugEvent.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_ACCESS_VIOLATION) - MessageBox(0, "EXCEPTION_ACCESS_VIOLATION", "PlugY", MB_OK|MB_ICONASTERISK); -// status = DBG_EXCEPTION_NOT_HANDLED; + MessageBox(0, "EXCEPTION_ACCESS_VIOLATION", "PlugY", MB_OK | MB_ICONASTERISK); break; case LOAD_DLL_DEBUG_EVENT: -// if (!GetModuleBaseName(pi.hProcess,(HMODULE)DebugEvent.u.LoadDll.lpBaseOfDll,buf,100)) -// MessageBox(0, "ERROR", "PlugYRun", MB_OK|MB_ICONASTERISK); -// sprintf(buf,"%08X : %d",DebugEvent.u.LoadDll.lpBaseOfDll,GetLastError()); -// MessageBox(0, buf, "PlugYRun", MB_OK|MB_ICONASTERISK); -// if (!strcmp(buf,"d2gfx.dll")) -// if ((LPVOID)GetModuleHandle("D2gfx.dll") == DebugEvent.u.LoadDll.lpBaseOfDll)//pi.hProcess,,buf,bufSize); - if(isD2gfx(pi.hProcess, DebugEvent.u.LoadDll.lpBaseOfDll)) + if (version <= V113d && isD2gfx(pi.hProcess, DebugEvent.u.LoadDll.lpBaseOfDll)) { -// MessageBox(0, "INSTALL XP", "PlugYRun", MB_OK|MB_ICONASTERISK); - installPlugY(pi.hProcess, (DWORD)DebugEvent.u.LoadDll.lpBaseOfDll, libraryName, (DWORD)DebugEvent.u.LoadDll.lpBaseOfDll == 0x6FA8000, ver); + installPlugY(pi.hProcess, (LPBYTE)DebugEvent.u.LoadDll.lpBaseOfDll, libraryName, version); CloseHandle(DebugEvent.u.LoadDll.hFile); CloseHandle(pi.hProcess); CloseHandle(pi.hThread); debugActiveProcessStop(DebugEvent.dwProcessId); -// MessageBox(0, "INSTALL XP end", "PlugYRun", MB_OK|MB_ICONASTERISK); return true; - } else + } + else CloseHandle(DebugEvent.u.LoadDll.hFile); break; } - ContinueDebugEvent(DebugEvent.dwProcessId,DebugEvent.dwThreadId,status); + ContinueDebugEvent(DebugEvent.dwProcessId, DebugEvent.dwThreadId, status); } - MessageBox(0, "ERROR : PlugY isn't installed", "PlugYRun", MB_OK|MB_ICONASTERISK); - return true; + MessageBox(0, "ERROR : PlugY isn't installed", "PlugYRun", MB_OK | MB_ICONASTERISK); + CloseHandle(pi.hProcess); + CloseHandle(pi.hThread); + return false; } - -int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) +int APIENTRY WinMain ( + __in HINSTANCE hInstance, + __in_opt HINSTANCE hPrevInstance, + __in_opt LPSTR lpCmdLine, + __in int nShowCmd + ) { - char currrentDirectory[MAX_PATH]; - char iniFileName[MAX_PATH]; - char command[MAX_PATH+50]; - int ver; + GetD2Version(); -// MessageBox(NULL,"START","PlugYRun",MB_OK); - //Get Current Directory. - if (!GetCurrentDirectory(MAX_PATH-1,currrentDirectory)) + char currrentDirectory[MAX_PATH]; + char iniFileName[MAX_PATH + sizeof(INIFILE) - 1]; + char command[MAX_PATH + sizeof(GAMEFILE) + 200]; + eGameVersion version; + + // Get Current Directory. + if (!GetCurrentDirectory(MAX_PATH - 1, currrentDirectory)) assertion("Current directory not found"); int len = strlen(currrentDirectory); - if (len && currrentDirectory[len-1] != '\\') + if (len == 0) + assertion("Current directory not found"); + + if (currrentDirectory[len - 1] != '\\') { - currrentDirectory[len+1]=NULL; - currrentDirectory[len]='\\'; + currrentDirectory[len++] = '\\'; + currrentDirectory[len] = NULL; } - //Get ini full path name. - strcpy(iniFileName,currrentDirectory); - strcat(iniFileName,INIFILE); + // Get ini full path name. + strcpy(iniFileName, currrentDirectory); + strcat(iniFileName, INIFILE); + + // Get game.exe path. + strcpy(command, currrentDirectory); + strcat(command, GAMEFILE); - //Get current directory. - strcpy(command,currrentDirectory); - strcat(command,GAMEFILE); if (GetFileAttributes(command) == INVALID_FILE_ATTRIBUTES) - if (!getWinReg(command, MAX_PATH+50)) - return 1; + { + if (!getRegistryD2Directory(command, MAX_PATH - sizeof(GAMEFILE))) + { + assertion("D2 install path not found."); + return 1; + } + strcat(command, GAMEFILE); + if (GetFileAttributes(command) == INVALID_FILE_ATTRIBUTES) + { + assertion("Game.exe not found."); + return 1; + } + } - ver = GetD2Version(command); - if (ver == -1) assertion("Wrong version of the Game.exe"); - strcat(command, " "); + // Get Game.exe version. + version = GetD2Version(command); - //Add params. - strcat(command,lpCmdLine); + // Add params. len = strlen(command); - GetPrivateProfileString(LAUNCHING,PARAM,"",&command[len],MAX_PATH-len,iniFileName); + int windowed = GetPrivateProfileInt(WINDOWED, ACTIVE_WINDOWED, 0, iniFileName); + if (windowed) + { + len += 3; + if (len > sizeof(command)) + assertion("Command too long"); + strcat(command, " -w"); + } + int paramLen = strlen(lpCmdLine); + if (paramLen > 0) + { + len += 1 + paramLen; + if (len > sizeof(command)) + assertion("Command too long"); + strcat(command, " "); + strcat(command, lpCmdLine); + } + len++; + if (len >= sizeof(command)) + assertion("Command too long"); + strcat(command, " "); + GetPrivateProfileString(LAUNCHING, PARAM, NULL, command + len, sizeof(command) - len, iniFileName); - //copyLodVersionFiles(); - - char libraryName[50]; - if (!GetPrivateProfileString(LAUNCHING,LIBRARY_NAME,"",libraryName,50,iniFileName) || !libraryName[0]) + // Check if PlugY must be started. + char libraryName[50]; + if (!GetPrivateProfileString(LAUNCHING, LIBRARY_NAME, "", libraryName, 50, iniFileName) || !libraryName[0]) return !launchNormal(command, currrentDirectory); -// MessageBox(NULL,command,"PlugYRun",MB_OK); + // Check version + if (version == UNKNOW) + assertion("This LoD version isn't supported by PlugY."); + else if (version < V109 || version > V113d) + assertion("The %s version of LoD isn't supported by PlugY.", GetVersionString(version)); + + // Launch LoD and install PlugY HMODULE module = GetModuleHandle("Kernel32.dll"); if (module) { - debugActiveProcessStop = (tDebugActiveProcessStop) GetProcAddress(module,"DebugActiveProcessStop"); + debugActiveProcessStop = (tDebugActiveProcessStop)GetProcAddress(module, "DebugActiveProcessStop"); if (debugActiveProcessStop) - return !launchGameXP(command, currrentDirectory, libraryName, ver); + return !launchGameXP(command, currrentDirectory, libraryName, version); } - return !launchGame98(command, currrentDirectory, libraryName, ver); + return !launchGame98(command, currrentDirectory, libraryName, version); } - -/* else if (GetVersion() & 0x80000000) - { - versionXP=false; - } else { - versionXP=true; - }*/ -//HINSTANCE -// CreateProcessInternalA -// HMODULE HPlugY = LoadLibrary("C:\\Jeux\\Diablo II\\PlugY.dll"); -// if (!HPlugY) return 0; -// DuplicateHandle -// GetCurrentProcess(); -/* typedef void* (__stdcall* Tinit)(LPSTR IniName); - Tinit init = (Tinit)GetProcAddress(HPlugY,"_Init@4"); - if (!init) return 0; - init(0);*/ -/* -6FC2BD50 /$ 81EC 08010000 SUB ESP,108 -6FC2BD56 |. 53 PUSH EBX -6FC2BD57 |. 8A9C24 1801000>MOV BL,BYTE PTR SS:[ESP+118] -6FC2BD5E |. F6C3 10 TEST BL,10 -6FC2BD61 |. 55 PUSH EBP -6FC2BD62 |. 56 PUSH ESI -6FC2BD63 |. C707 00000000 MOV DWORD PTR DS:[EDI],0 -6FC2BD69 |. C74424 0C 0000>MOV DWORD PTR SS:[ESP+C],0 -6FC2BD71 |. BE F3030000 MOV ESI,3F3 -6FC2BD76 |. C64424 10 00 MOV BYTE PTR SS:[ESP+10],0 -6FC2BD7B |. 75 25 JNZ SHORT storm.6FC2BDA2 -6FC2BD7D |. F6C3 02 TEST BL,2 -6FC2BD80 |. 68 04010000 PUSH 104 -6FC2BD85 |. 74 0C JE SHORT storm.6FC2BD93 -6FC2BD87 |. 68 146AC36F PUSH storm.6FC36A14 ; ASCII "Software\Battle.net\" -6FC2BD8C |. 8D4424 18 LEA EAX,DWORD PTR SS:[ESP+18] -6FC2BD90 |. 50 PUSH EAX -6FC2BD91 |. EB 0A JMP SHORT storm.6FC2BD9D -6FC2BD93 |> 68 F069C36F PUSH storm.6FC369F0 ; ASCII "Software\Blizzard Entertainment\" -6FC2BD98 |. 8D4C24 18 LEA ECX,DWORD PTR SS:[ESP+18] -6FC2BD9C |. 51 PUSH ECX -6FC2BD9D |> E8 EE07FEFF CALL storm.#501 -6FC2BDA2 |> 8B9424 1801000>MOV EDX,DWORD PTR SS:[ESP+118] -6FC2BDA9 |. 68 04010000 PUSH 104 -6FC2BDAE |. 52 PUSH EDX -6FC2BDAF |. 8D4424 18 LEA EAX,DWORD PTR SS:[ESP+18] -6FC2BDB3 |. 50 PUSH EAX -6FC2BDB4 |. E8 6705FEFF CALL storm.#503 -6FC2BDB9 |. F6C3 04 TEST BL,4 -6FC2BDBC |. 8B2D 1030C36F MOV EBP,DWORD PTR DS:[<&ADVAPI32.RegQuer>; advapi32.RegQueryValueExA -6FC2BDC2 |. 75 5D JNZ SHORT storm.6FC2BE21 -6FC2BDC4 |. 8D4C24 0C LEA ECX,DWORD PTR SS:[ESP+C] -6FC2BDC8 |. 51 PUSH ECX ; /pHandle -6FC2BDC9 |. 68 19000200 PUSH 20019 ; |Access = KEY_READ -6FC2BDCE |. 6A 00 PUSH 0 ; |Reserved = 0 -6FC2BDD0 |. 8D5424 1C LEA EDX,DWORD PTR SS:[ESP+1C] ; | -6FC2BDD4 |. 52 PUSH EDX ; |Subkey -6FC2BDD5 |. 68 01000080 PUSH 80000001 ; |hKey = HKEY_CURRENT_USER -6FC2BDDA |. FF15 0830C36F CALL DWORD PTR DS:[<&ADVAPI32.RegOpenKey>; \RegOpenKeyExA -002281A4 80000001 |hKey = HKEY_CURRENT_USER -002281A8 002281C8 |Subkey = "Software\Blizzard Entertainment\Diablo II" -002281AC 00000000 |Reserved = 0 -002281B0 00020019 |Access = KEY_READ -002281B4 002281C4 \pHandle = 002281C4 - - -6FC2BDE0 |. 8BF0 MOV ESI,EAX -6FC2BDE2 |. 85F6 TEST ESI,ESI -6FC2BDE4 |. 75 3B JNZ SHORT storm.6FC2BE21 -6FC2BDE6 |. 8B8C24 2801000>MOV ECX,DWORD PTR SS:[ESP+128] -6FC2BDED |. 8B9424 2401000>MOV EDX,DWORD PTR SS:[ESP+124] -6FC2BDF4 |. 8B8424 2C01000>MOV EAX,DWORD PTR SS:[ESP+12C] -6FC2BDFB |. 57 PUSH EDI ; /pBufSize -6FC2BDFC |. 51 PUSH ECX ; |Buffer -6FC2BDFD |. 8B4C24 14 MOV ECX,DWORD PTR SS:[ESP+14] ; | -6FC2BE01 |. 52 PUSH EDX ; |pValueType -6FC2BE02 |. 8907 MOV DWORD PTR DS:[EDI],EAX ; | -6FC2BE04 |. 8B8424 2801000>MOV EAX,DWORD PTR SS:[ESP+128] ; | -6FC2BE0B |. 56 PUSH ESI ; |Reserved -6FC2BE0C |. 50 PUSH EAX ; |ValueName -6FC2BE0D |. 51 PUSH ECX ; |hKey -6FC2BE0E |. FFD5 CALL EBP ; \RegQueryValueExA -002281A0 00000124 |hKey = 124 -002281A4 6FF77B88 |ValueName = "InstallPath" -002281A8 00000000 |Reserved = NULL -002281AC 002282FC |pValueType = 002282FC -002281B0 00228320 |Buffer = 00228320 -002281B4 00228300 \pBufSize = 00228300 - - -6FC2BE10 |. 8B5424 0C MOV EDX,DWORD PTR SS:[ESP+C] -6FC2BE14 |. 52 PUSH EDX ; /hKey -6FC2BE15 |. 8BF0 MOV ESI,EAX ; | -6FC2BE17 |. FF15 1830C36F CALL DWORD PTR DS:[<&ADVAPI32.RegCloseKe>; \RegCloseKey -002281B4 00000124 \hKey = 00000124 (window) - -6FC2BE1D |. 85F6 TEST ESI,ESI -6FC2BE1F |. 74 62 JE SHORT storm.6FC2BE83 -6FC2BE21 |> F6C3 01 TEST BL,1 -6FC2BE24 |. 75 59 JNZ SHORT storm.6FC2BE7F -6FC2BE26 |. 8D4424 0C LEA EAX,DWORD PTR SS:[ESP+C] -6FC2BE2A |. 50 PUSH EAX ; /pHandle -6FC2BE2B |. 68 19000200 PUSH 20019 ; |Access = KEY_READ -6FC2BE30 |. 6A 00 PUSH 0 ; |Reserved = 0 -6FC2BE32 |. 8D4C24 1C LEA ECX,DWORD PTR SS:[ESP+1C] ; | -6FC2BE36 |. 51 PUSH ECX ; |Subkey -6FC2BE37 |. 68 02000080 PUSH 80000002 ; |hKey = HKEY_LOCAL_MACHINE -6FC2BE3C |. FF15 0830C36F CALL DWORD PTR DS:[<&ADVAPI32.RegOpenKey>; \RegOpenKeyExA -6FC2BE42 |. 8BF0 MOV ESI,EAX -6FC2BE44 |. 85F6 TEST ESI,ESI -6FC2BE46 |. 75 4C JNZ SHORT storm.6FC2BE94 -6FC2BE48 |. 8B8424 2801000>MOV EAX,DWORD PTR SS:[ESP+128] -6FC2BE4F |. 8B8C24 2401000>MOV ECX,DWORD PTR SS:[ESP+124] -6FC2BE56 |. 8B9424 2C01000>MOV EDX,DWORD PTR SS:[ESP+12C] -6FC2BE5D |. 57 PUSH EDI -6FC2BE5E |. 50 PUSH EAX -6FC2BE5F |. 8B4424 14 MOV EAX,DWORD PTR SS:[ESP+14] -6FC2BE63 |. 51 PUSH ECX -6FC2BE64 |. 8917 MOV DWORD PTR DS:[EDI],EDX -6FC2BE66 |. 8B9424 2801000>MOV EDX,DWORD PTR SS:[ESP+128] -6FC2BE6D |. 56 PUSH ESI -6FC2BE6E |. 52 PUSH EDX -6FC2BE6F |. 50 PUSH EAX -6FC2BE70 |. FFD5 CALL EBP -6FC2BE72 |. 8B4C24 0C MOV ECX,DWORD PTR SS:[ESP+C] -6FC2BE76 |. 51 PUSH ECX ; /hKey -6FC2BE77 |. 8BF0 MOV ESI,EAX ; | -6FC2BE79 |. FF15 1830C36F CALL DWORD PTR DS:[<&ADVAPI32.RegCloseKe>; \RegCloseKey -6FC2BE7F |> 85F6 TEST ESI,ESI -6FC2BE81 |. 75 11 JNZ SHORT storm.6FC2BE94 -6FC2BE83 |> 5E POP ESI -6FC2BE84 |. 5D POP EBP -6FC2BE85 |. B8 01000000 MOV EAX,1 -6FC2BE8A |. 5B POP EBX -6FC2BE8B |. 81C4 08010000 ADD ESP,108 -6FC2BE91 |. C2 1800 RETN 18 -6FC2BE94 |> 56 PUSH ESI ; /Error -6FC2BE95 |. FF15 2832C36F CALL DWORD PTR DS:[<&KERNEL32.SetLastErr>; \SetLastError -6FC2BE9B |. 5E POP ESI -6FC2BE9C |. 5D POP EBP -6FC2BE9D |. 33C0 XOR EAX,EAX -6FC2BE9F |. 5B POP EBX -6FC2BEA0 |. 81C4 08010000 ADD ESP,108 -6FC2BEA6 \. C2 1800 RETN 18 -*/ - ///////////////////////// END OF FILE /////////////////////// \ No newline at end of file diff --git a/PlugYRun/PlugYRun.h b/PlugYRun/PlugYRun.h new file mode 100644 index 0000000..e60f2eb --- /dev/null +++ b/PlugYRun/PlugYRun.h @@ -0,0 +1,3 @@ +#pragma once + +#include "resource.h" diff --git a/PlugYRun/PlugYRun.rc b/PlugYRun/PlugYRun.rc index d5bcbde..b8b53a1 100644 Binary files a/PlugYRun/PlugYRun.rc and b/PlugYRun/PlugYRun.rc differ diff --git a/PlugYRun/PlugYRun.sln b/PlugYRun/PlugYRun.sln index b97d16b..68fa1d9 100644 --- a/PlugYRun/PlugYRun.sln +++ b/PlugYRun/PlugYRun.sln @@ -1,6 +1,7 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PlugYRun", "PlugYRun.vcproj", "{119E844E-4DF8-409D-8B12-DC5CDDB5E37C}" + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual C++ Express 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PlugYRun", "PlugYRun.vcproj", "{1DF62C54-02A0-4E13-A5DC-F975DFBE03FC}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -8,10 +9,10 @@ Global Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {119E844E-4DF8-409D-8B12-DC5CDDB5E37C}.Debug|Win32.ActiveCfg = Debug|Win32 - {119E844E-4DF8-409D-8B12-DC5CDDB5E37C}.Debug|Win32.Build.0 = Debug|Win32 - {119E844E-4DF8-409D-8B12-DC5CDDB5E37C}.Release|Win32.ActiveCfg = Release|Win32 - {119E844E-4DF8-409D-8B12-DC5CDDB5E37C}.Release|Win32.Build.0 = Release|Win32 + {1DF62C54-02A0-4E13-A5DC-F975DFBE03FC}.Debug|Win32.ActiveCfg = Debug|Win32 + {1DF62C54-02A0-4E13-A5DC-F975DFBE03FC}.Debug|Win32.Build.0 = Debug|Win32 + {1DF62C54-02A0-4E13-A5DC-F975DFBE03FC}.Release|Win32.ActiveCfg = Release|Win32 + {1DF62C54-02A0-4E13-A5DC-F975DFBE03FC}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/PlugYRun/PlugYRun.suo b/PlugYRun/PlugYRun.suo index cca6eed..1a776e3 100644 Binary files a/PlugYRun/PlugYRun.suo and b/PlugYRun/PlugYRun.suo differ diff --git a/PlugYRun/PlugYRun.vcproj b/PlugYRun/PlugYRun.vcproj index ffaa739..866a1de 100644 --- a/PlugYRun/PlugYRun.vcproj +++ b/PlugYRun/PlugYRun.vcproj @@ -1,11 +1,12 @@ @@ -87,21 +83,17 @@ - - @@ -182,11 +168,12 @@ + + + + diff --git a/PlugYRun/PlugYRun.vcproj.ATHLON64.Yohann.user b/PlugYRun/PlugYRun.vcproj.ATHLON64.Yohann.user deleted file mode 100644 index 19f0309..0000000 --- a/PlugYRun/PlugYRun.vcproj.ATHLON64.Yohann.user +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - diff --git a/PlugYRun/resource.h b/PlugYRun/resource.h index 44fcdf1..d01bdf3 100644 --- a/PlugYRun/resource.h +++ b/PlugYRun/resource.h @@ -2,15 +2,21 @@ // Microsoft Visual C++ generated include file. // Used by PlugYRun.rc // -#define IDI_ICON1 107 -// Next default values for new objects -// +#define IDI_PLUGYRUN 107 +#define IDC_PLUGYRUN 109 +#define IDC_MYICON 2 +#ifndef IDC_STATIC +#define IDC_STATIC -1 +#endif + #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 108 -#define _APS_NEXT_COMMAND_VALUE 40003 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 + +#define _APS_NO_MFC 130 +#define _APS_NEXT_RESOURCE_VALUE 129 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 110 #endif #endif diff --git a/PlugYRun/targetver.h b/PlugYRun/targetver.h new file mode 100644 index 0000000..e5b6cb5 --- /dev/null +++ b/PlugYRun/targetver.h @@ -0,0 +1,24 @@ +#pragma once + +// Les macros suivantes dfinissent la plateforme minimale requise. La plateforme minimale requise +// est la version de Windows, Internet Explorer etc. qui dispose des fonctionnalits ncessaires pour excuter +// votre application. Les macros fonctionnent en activant toutes les fonctionnalits disponibles sur les versions de la plateforme jusqu' la +// version spcifie. + +// Modifiez les dfinitions suivantes si vous devez cibler une plateforme avant celles spcifies ci-dessous. +// Reportez-vous MSDN pour obtenir les dernires informations sur les valeurs correspondantes pour les diffrentes plateformes. +#ifndef WINVER // Spcifie que la plateforme minimale requise est Windows Vista. +#define WINVER 0x0600 // Attribuez la valeur approprie cet lment pour cibler d'autres versions de Windows. +#endif + +#ifndef _WIN32_WINNT // Spcifie que la plateforme minimale requise est Windows Vista. +#define _WIN32_WINNT 0x0600 // Attribuez la valeur approprie cet lment pour cibler d'autres versions de Windows. +#endif + +#ifndef _WIN32_WINDOWS // Spcifie que la plateforme minimale requise est Windows98. +#define _WIN32_WINDOWS 0x0410 // Attribuez la valeur approprie cet lment pour cibler WindowsMe ou version ultrieure. +#endif + +#ifndef _WIN32_IE // Spcifie que la plateforme minimale requise est Internet Explorer 7.0. +#define _WIN32_IE 0x0700 // Attribuez la valeur approprie cet lment pour cibler d'autres versions d'Internet Explorer. +#endif