3 Commits

Author SHA1 Message Date
ChaosMarc
e9fe6cb433 v14.02 by Yohann 2021-04-24 13:13:48 +02:00
ChaosMarc
a1e3cac784 Readme Translation 2021-01-04 21:32:06 +01:00
ChaosMarc
b6e0436944 v14.01 by Yohann 2021-01-04 21:29:37 +01:00
20 changed files with 62 additions and 38 deletions

View File

@@ -92,7 +92,7 @@ Stash* addStash(Unit* ptChar, bool isShared, bool autoSetIndex, Stash* previous)
previous = getLastStash(previous ? previous : isShared ? PCPY->sharedStash : PCPY->selfStash); previous = getLastStash(previous ? previous : isShared ? PCPY->sharedStash : PCPY->selfStash);
if (previous) if (previous)
isShared = previous->isShared; isShared = previous->isShared;
Stash* stash = newStash(isShared ? PCPY->nbSharedPages++ : PCPY->nbSelfPages++); Stash* stash = newStash(isShared ? PCPY->nbSharedPages++ : PCPY->nbSelfPages++);
stash->isShared = isShared; stash->isShared = isShared;
stash->previousStash = previous; stash->previousStash = previous;
@@ -100,8 +100,11 @@ Stash* addStash(Unit* ptChar, bool isShared, bool autoSetIndex, Stash* previous)
if (previous) if (previous)
{ {
previous->nextStash = stash; previous->nextStash = stash;
stash->isIndex = ((stash->id + 1) % nbPagesPerIndex) == 0; if (autoSetIndex)
stash->isMainIndex = ((stash->id + 1) % nbPagesPerIndex2) == 0; {
stash->isIndex = ((stash->id + 1) % nbPagesPerIndex) == 0;
stash->isMainIndex = ((stash->id + 1) % nbPagesPerIndex2) == 0;
}
} }
else if (isShared) else if (isShared)
{ {
@@ -286,19 +289,21 @@ DWORD loadStash(Unit* ptChar, Stash* ptStash, BYTE data[], DWORD startSize, DWOR
return ret; return ret;
} }
void autoSetIndex(Stash* fistStash) void autoSetIndex(Stash* firstStash)
{ {
if (!fistStash) if (!firstStash)
return; return;
Stash* stash = fistStash; log_msg("autoSetIndex\n");
Stash* stash = firstStash;
while (stash) while (stash)
{ {
if (stash->isIndex || stash->isMainIndex) if (stash->isIndex || stash->isMainIndex)
return; return;
stash = stash->nextStash; stash = stash->nextStash;
} }
stash = fistStash; stash = firstStash;
stash->isIndex = 1; stash->isIndex = 1;
stash->isMainIndex = 1;
stash = stash->nextStash; stash = stash->nextStash;
while (stash) while (stash)
{ {
@@ -326,11 +331,6 @@ DWORD loadStashList(Unit* ptChar, BYTE* data, DWORD maxSize, DWORD* curSize, boo
if (ret) return ret; if (ret) return ret;
curStash++; curStash++;
} }
if (nbStash <2)
{
newStash = addStash(ptChar, isShared, false, newStash);
changeToSelectedStash(ptChar, newStash, 0, false);
}
if (!isShared) if (!isShared)
{ {
@@ -355,6 +355,12 @@ DWORD loadStashList(Unit* ptChar, BYTE* data, DWORD maxSize, DWORD* curSize, boo
} }
} }
if (nbStash == 1)
{
newStash = addStash(ptChar, isShared, true, newStash);
changeToSelectedStash(ptChar, newStash, 0, false);
}
return 0; return 0;
} }
@@ -452,7 +458,7 @@ void setSelectedStashClient(DWORD stashId, DWORD stashFlags, DWORD flags, bool b
Unit* ptChar = D2GetClientPlayer(); Unit* ptChar = D2GetClientPlayer();
Stash* newStash = getStash(ptChar, (stashFlags & 1) == 1, stashId); Stash* newStash = getStash(ptChar, (stashFlags & 1) == 1, stashId);
if (!newStash) do if (!newStash) do
newStash = addStash(ptChar, (stashFlags & 1) == 1, true, newStash); newStash = addStash(ptChar, (stashFlags & 1) == 1, false, newStash);
while (newStash->id < stashId); while (newStash->id < stashId);
newStash->flags = stashFlags; newStash->flags = stashFlags;
changeToSelectedStash(ptChar, newStash, bOnlyItems, 1); changeToSelectedStash(ptChar, newStash, bOnlyItems, 1);
@@ -466,7 +472,7 @@ void selectStash(Unit* ptChar, Stash* newStash, bool forceUpdate)
return; return;
if (!forceUpdate && newStash == PCPY->currentStash) if (!forceUpdate && newStash == PCPY->currentStash)
return; return;
log_msg("selectStash ID:%d\tshared:%d\tonlyItems:%d\tclient:%d\n", newStash->id, newStash->isShared, 0, 0); log_msg("selectStash ID:%d\tshared:%d\tforceUpdate:%d\n", newStash->id, newStash->isShared, forceUpdate);
changeToSelectedStash(ptChar, newStash, 0, 0); changeToSelectedStash(ptChar, newStash, 0, 0);
updateSelectedStashClient(ptChar); updateSelectedStashClient(ptChar);
} }
@@ -522,7 +528,7 @@ void swapStash(Unit* ptChar, DWORD page, bool toggle)
{ {
log_msg("swap stash : %i\n", i); log_msg("swap stash : %i\n", i);
if (swpStash->nextStash == NULL) if (swpStash->nextStash == NULL)
addStash(ptChar, swpStash->isShared, true, swpStash); addStash(ptChar, swpStash->isShared, false, swpStash);
swpStash = swpStash->nextStash; swpStash = swpStash->nextStash;
} }
swapStash(ptChar, curStash, swpStash); swapStash(ptChar, curStash, swpStash);
@@ -1154,7 +1160,8 @@ FCT_ASM ( caller_carry1OutOfStash_114 )
CALL D2ItemGetPage CALL D2ItemGetPage
CMP AL,4 CMP AL,4
JNZ continue_carry1OutOfStash JNZ continue_carry1OutOfStash
SUB DWORD PTR SS:[ESP],0xC //SUB DWORD PTR SS:[ESP],0xC
ADD DWORD PTR SS:[ESP],0x17D
RETN RETN
continue_carry1OutOfStash: continue_carry1OutOfStash:
MOV EDI,DWORD PTR SS:[EBP-4] MOV EDI,DWORD PTR SS:[EBP-4]

View File

@@ -500,7 +500,7 @@ void init_SavePath(INIFile* iniFile, INIFile* iniFixedFile, INIFile* iniDefaultF
active_AutoBackup = atoi(buffer) != 0; active_AutoBackup = atoi(buffer) != 0;
log_msg("active_autoBackup\t\t= %u\n", active_AutoBackup); log_msg("active_autoBackup\t\t= %u\n", active_AutoBackup);
GET_PRIVATE_PROFILE_STRING3(S_SAVEPATH, S_maxBackupPerCharacter, "5"); GET_PRIVATE_PROFILE_STRING3(S_SAVEPATH, S_maxBackupPerCharacter, "20");
maxBackupPerCharacter = atoi(buffer); maxBackupPerCharacter = atoi(buffer);
log_msg("maxBackupPerCharacter\t\t= %u\n", maxBackupPerCharacter); log_msg("maxBackupPerCharacter\t\t= %u\n", maxBackupPerCharacter);

View File

@@ -64,7 +64,7 @@ Unit* FASTCALL updateItem(Game* ptGame, DWORD type, DWORD itemNum, Unit* ptChar)
{ {
Stash* ptStash = getStashFromItem(ptChar, ptItem); Stash* ptStash = getStashFromItem(ptChar, ptItem);
if (!ptStash) return NULL; if (!ptStash) return NULL;
selectStash(ptChar, ptStash); selectStash(ptChar, ptStash, ptStash->id == 0);
} }
return ptItem; return ptItem;
} }
@@ -75,7 +75,7 @@ void FASTCALL updateItem_111(Unit* ptItem, Unit* ptChar)
{ {
Stash* ptStash = getStashFromItem(ptChar, ptItem); Stash* ptStash = getStashFromItem(ptChar, ptItem);
if (ptStash) if (ptStash)
selectStash(ptChar, ptStash); selectStash(ptChar, ptStash, ptStash->id == 0);
} }
} }

Binary file not shown.

Binary file not shown.

View File

@@ -14,7 +14,7 @@
#include "common.h" #include "common.h"
bool active_AutoBackup = false; bool active_AutoBackup = false;
int maxBackupPerCharacter = 5; int maxBackupPerCharacter = 20;
/*backup /*backup
Save SP : Save SP :

View File

@@ -6,7 +6,7 @@
=================================================================*/ =================================================================*/
#pragma once #pragma once
#define PLUGY_VERSION "14.00" #define PLUGY_VERSION "14.02"
enum TargetMod enum TargetMod
{ {

View File

@@ -50,7 +50,7 @@ BEGIN
VALUE "LegalCopyright", "Copyright (C) 2017" VALUE "LegalCopyright", "Copyright (C) 2017"
VALUE "OriginalFilename", "PlugYInstall.exe" VALUE "OriginalFilename", "PlugYInstall.exe"
VALUE "ProductName", "PlugY, The Survival Kit" VALUE "ProductName", "PlugY, The Survival Kit"
VALUE "ProductVersion", "14.00" VALUE "ProductVersion", "14.02"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

Binary file not shown.

View File

@@ -5,7 +5,7 @@
; ; ; ;
; by Yohann Nicolas ; ; by Yohann Nicolas ;
; ; ; ;
; version 14.00 ; ; version 14.02 ;
; ; ; ;
;--------------------------------------------------------------------------------------; ;--------------------------------------------------------------------------------------;
@@ -38,7 +38,7 @@ X=0
Y=0 Y=0
Width=0 Width=0
Height=0 Height=0
LockMouseOnStartup=1 LockMouseOnStartup=0
[LANGUAGE] [LANGUAGE]
@@ -52,7 +52,7 @@ ActiveSavePathChange=0
SavePath=Mod PlugY SavePath=Mod PlugY
ActiveAutoBackup=1 ActiveAutoBackup=1
MaxBackupPerCharacter=5 MaxBackupPerCharacter=20
[MAIN SCREEN] [MAIN SCREEN]

View File

@@ -3,7 +3,7 @@ Unicode True
!include "MUI2.nsh" !include "MUI2.nsh"
!define VERSION "v14.00" !define VERSION "v14.02"
!define D2FILES "." !define D2FILES "."
!define NAME "PlugY, The Survival Kit" !define NAME "PlugY, The Survival Kit"
!define MOD_DIR "Mod PlugY" !define MOD_DIR "Mod PlugY"

View File

@@ -6,7 +6,7 @@
; ; ; ;
; by Yohann Nicolas ; ; by Yohann Nicolas ;
; ; ; ;
; version 14.00 ; ; version 14.02 ;
; ; ; ;
;--------------------------------------------------------------------------------------; ;--------------------------------------------------------------------------------------;
@@ -58,7 +58,7 @@ ActiveSavePathChange=0
SavePath= SavePath=
ActiveAutoBackup=0 ActiveAutoBackup=0
MaxBackupPerCharacter=5 MaxBackupPerCharacter=20
[MAIN SCREEN] [MAIN SCREEN]

View File

@@ -6,7 +6,7 @@
; ; ; ;
; by Yohann Nicolas ; ; by Yohann Nicolas ;
; ; ; ;
; version 14.00 ; ; version 14.02 ;
; ; ; ;
;--------------------------------------------------------------------------------------; ;--------------------------------------------------------------------------------------;

View File

@@ -4,7 +4,7 @@
; ; ; ;
; von Yohann Nicolas ; ; von Yohann Nicolas ;
; ; ; ;
; version 14.00 ; ; version 14.02 ;
; ; ; ;
;--------------------------------------------------------------------------------------; ;--------------------------------------------------------------------------------------;
@@ -75,6 +75,11 @@ Jedes Feature kann via PlugY.ini an/ausgeschaltet werden (siehe "Kommentare aus
/listcube: (Beta) Erstellt eine "cube.txt" Datei im Savegame-Verzeichnis mit allen Würfelrezepten. /listcube: (Beta) Erstellt eine "cube.txt" Datei im Savegame-Verzeichnis mit allen Würfelrezepten.
/renamechar newname: (Beta) Speichert und benennt den Char um. /renamechar newname: (Beta) Speichert und benennt den Char um.
v14.02 Änderungen :
- Behebt Fehler, durch den mehrere identische, einzigartige Charms im Inventar gespeichert werden können.
v14.01 Änderungen :
- Fehler behoben, der das Löschen von Truhen-Items hervorgerufen hat, wenn der Character zum ersten Mal geladen wurde.
v14.00 Änderungen : v14.00 Änderungen :
- Kompatibilität mit 1.14d (Vielen Dank an Haxifix) - Kompatibilität mit 1.14d (Vielen Dank an Haxifix)
@@ -697,7 +702,7 @@ Beispiele:
Active autobackup save file just before the save. Active autobackup save file just before the save.
The backup will be store in a folder name "backup" in the save folder. The backup will be store in a folder name "backup" in the save folder.
- ActiveAutoBackup=0 {0:Disabled; 1:Enabled} - ActiveAutoBackup=0 {0:Disabled; 1:Enabled}
- MaxBackupPerCharacter=5 {5: Number of backup to keep before delete; 0:No backup purge} - MaxBackupPerCharacter=20 {20: Number of backup to keep before delete; 0:No backup purge}
[MAIN SCREEN] [MAIN SCREEN]

View File

@@ -4,7 +4,7 @@
; ; ; ;
; par Yohann Nicolas ; ; par Yohann Nicolas ;
; ; ; ;
; version 14.00 ; ; version 14.02 ;
; ; ; ;
;--------------------------------------------------------------------------------------; ;--------------------------------------------------------------------------------------;
@@ -75,9 +75,14 @@ Toutes ces fonctions peuvent être activé/désactivé via PlugY.ini (voir "COMM
/listcube : (beta) Crée un fichier "cube.txt" dans le répertoire de sauvegarde contenant toutes les formules du cube. /listcube : (beta) Crée un fichier "cube.txt" dans le répertoire de sauvegarde contenant toutes les formules du cube.
/renamechar newname : (beta) Renomme la personnage et le sauvegarde. /renamechar newname : (beta) Renomme la personnage et le sauvegarde.
Changements apportés par la v14.02 :
- Corrige un bug permettant d'avoir plusieurs charmes uniques identiques dans l'inventaire.
Changements apportés par la v14.01 :
- Corrige la perte des objets du coffre lors du chargement d'un personnage pour la première fois.
Changements apportés par la v14.00: Changements apportés par la v14.00:
- Ajout de la compatibilité avec la version 1.13d de LOD. (merci à Haxifix) - Ajout de la compatibilité avec la version 1.14d de LOD. (merci à Haxifix)
- Crée un backup des fichiers de sauvegardes avant de sauvegarder. - Crée un backup des fichiers de sauvegardes avant de sauvegarder.
- Empéche la fermeture du portail de Nihlathak. - Empéche la fermeture du portail de Nihlathak.
- Déplace Deckar Cain à coté du portail d'Harrogath. - Déplace Deckar Cain à coté du portail d'Harrogath.
@@ -603,7 +608,7 @@ Ci-dessous, les valeurs par défauts et entre {} des exemples avec leurs signifi
ACtive le backup des fichiers de sauvegardes avant la sauvegarde. ACtive le backup des fichiers de sauvegardes avant la sauvegarde.
Les fichiers de backup sont sauvegardé dans un répertoire nommé "backup" dans le répertoire de sauvegarde. Les fichiers de backup sont sauvegardé dans un répertoire nommé "backup" dans le répertoire de sauvegarde.
- ActiveAutoBackup=0 {0:Désactivé; 1:Activé} - ActiveAutoBackup=0 {0:Désactivé; 1:Activé}
- MaxBackupPerCharacter=5 {5: Nombre de backup à conserver avant suppression; 0:Pas de purge des backups} - MaxBackupPerCharacter=20 {20: Nombre de backup à conserver avant suppression; 0:Pas de purge des backups}
[MAIN SCREEN] [MAIN SCREEN]
@@ -831,6 +836,7 @@ Déplace Deckar Cain à coté du portail d'Harrogath.
* Espagnol : Acrerune * Espagnol : Acrerune
* Polonais : Serdel * Polonais : Serdel
* Russe : L'Autour * Russe : L'Autour
* Chinois: Nagahaku * Chinois (Traditionnel): Nagahaku
* Japanase : CaiMiao
;--------------------------------------------------------------------------------------; ;--------------------------------------------------------------------------------------;

View File

@@ -4,7 +4,7 @@
; ; ; ;
; by Yohann Nicolas ; ; by Yohann Nicolas ;
; ; ; ;
; version 14.00 ; ; version 14.02 ;
; ; ; ;
;--------------------------------------------------------------------------------------; ;--------------------------------------------------------------------------------------;
@@ -75,6 +75,11 @@ Each features can be turn on/off via PlugY.ini (see "COMMENTS ON THE CONFIGURATI
/listcube : (beta) Create a "cube.txt" file in save directory containing all cube's receipts. /listcube : (beta) Create a "cube.txt" file in save directory containing all cube's receipts.
/renamechar newname : (beta) Rename your character and save it. /renamechar newname : (beta) Rename your character and save it.
v14.02 changes :
- Fix a bug allowing multiple identical unique charms to be in inventory.
v14.01 changes :
- Fix stash items lost on loading a character for the first time.
v14.00 changes : v14.00 changes :
- Add compatibility with LOD 1.14d. (Thanks to Haxifix) - Add compatibility with LOD 1.14d. (Thanks to Haxifix)
@@ -674,7 +679,7 @@ Following are default values, between {} are some examples values with descripti
Active autobackup save file just before the save. Active autobackup save file just before the save.
The backup will be store in a folder name "backup" in the save folder. The backup will be store in a folder name "backup" in the save folder.
- ActiveAutoBackup=0 {0:Disabled; 1:Enabled} - ActiveAutoBackup=0 {0:Disabled; 1:Enabled}
- MaxBackupPerCharacter=5 {5: Number of backup to keep before delete; 0:No backup purge} - MaxBackupPerCharacter=20 {20: Number of backup to keep before delete; 0:No backup purge}
[MAIN SCREEN] [MAIN SCREEN]
@@ -917,6 +922,7 @@ Move Cain near Harrogath waypoint.
* Spanish: Acrerune * Spanish: Acrerune
* Polish: Serdel * Polish: Serdel
* Russian: L'Autour * Russian: L'Autour
* Chinese: Nagahaku * Chinese (Traditional): Nagahaku
* Japanase : CaiMiao
;--------------------------------------------------------------------------------------; ;--------------------------------------------------------------------------------------;

Binary file not shown.

Binary file not shown.