mirror of
https://gitlab.com/hashborgir/plugy.git
synced 2025-10-13 16:34:23 -05:00
updated from 10.00 to 10.01 by Yohann
This commit is contained in:
@@ -23,11 +23,18 @@ bool active_savegame=false;
|
||||
#define MAX_CMD_SIZE 200
|
||||
|
||||
const char * CMD_RENAME="/rename";
|
||||
|
||||
const char * CMD_PAGENAME = "/pagename";
|
||||
const char * CMD_LISTCUBEFORMULA="/listcube";
|
||||
const char * CMD_SELECTPAGE="/page";
|
||||
const char * CMD_SWAP = "/swap";
|
||||
const char * CMD_TOGGLE = "/toggle";
|
||||
|
||||
const char * CMD_RELOAD="/reload";
|
||||
|
||||
const char * CMD_LOCK_MOUSE = "/lockmouse";
|
||||
const char * CMD_LOCK_MOUSE2 = "/lock";
|
||||
|
||||
const char * CMD_STARTSAVE="/save";
|
||||
|
||||
const char * CMD_MAXGOLD="/maxgold";
|
||||
@@ -145,18 +152,89 @@ int STDCALL commands (char* ptText)
|
||||
char command[MAX_CMD_SIZE];
|
||||
ZeroMemory(command,MAX_CMD_SIZE);
|
||||
strncpy(command,ptText,MAX_CMD_SIZE-1);
|
||||
strlwr(command);
|
||||
_strlwr(command);
|
||||
|
||||
if (!strncmp(command,CMD_RENAME,strlen(CMD_RENAME)))
|
||||
if (!strncmp(command, CMD_RENAME, strlen(CMD_RENAME)) && ptClientNameChar != NULL)
|
||||
{
|
||||
char* param = &command[strlen(CMD_RENAME)];
|
||||
int len = strlen(param);
|
||||
if (param[0] != ' ')
|
||||
return 1;
|
||||
param++;
|
||||
len--;
|
||||
if (len < 2 || len > 15)
|
||||
return 0;
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
char c = param[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, param);
|
||||
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 + (param[i] << 8));
|
||||
}
|
||||
|
||||
// Update client
|
||||
log_msg("Rename on Client : %s -> %s\n", ptChar->ptPlayerData->name, param);
|
||||
strcpy(ptChar->ptPlayerData->name, param);
|
||||
strcpy(ptClientNameChar, param);
|
||||
updateServer(US_SAVE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!strncmp(command, CMD_PAGENAME,strlen(CMD_PAGENAME)))
|
||||
{
|
||||
if (!active_multiPageStash) return 1;
|
||||
char* param = &command[strlen(CMD_RENAME)];
|
||||
char* param = &command[strlen(CMD_PAGENAME)];
|
||||
DWORD len = strlen(param);
|
||||
if (len && (param[0] != ' ')) return 1;
|
||||
|
||||
Stash* ptStash = PCPY->currentStash;
|
||||
if (!ptStash) return 0;
|
||||
if (len>1)
|
||||
if (len>1 && param[0] == ' ')
|
||||
{
|
||||
D2FogMemDeAlloc(ptStash->name,__FILE__,__LINE__,0);
|
||||
ptStash->name = (char *)malloc(len);//D2FogMemAlloc(len,__FILE__,__LINE__,0);
|
||||
@@ -182,6 +260,32 @@ int STDCALL commands (char* ptText)
|
||||
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;
|
||||
}
|
||||
|
||||
if (!strncmp(command, CMD_SWAP, strlen(CMD_SWAP)))
|
||||
{
|
||||
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 (!strcmp(command,CMD_RELOAD))
|
||||
{
|
||||
if (onRealm) return 1;
|
||||
@@ -189,10 +293,17 @@ int STDCALL commands (char* ptText)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!strcmp(command, CMD_LOCK_MOUSE) || !strcmp(command, CMD_LOCK_MOUSE2))
|
||||
{
|
||||
if (onRealm) return 1;
|
||||
lockMouseCursor();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!strcmp(command,CMD_STARTSAVE))
|
||||
{
|
||||
if (onRealm) return 1;
|
||||
updateServer(US_STARTSAVE);
|
||||
updateServer(US_SAVE);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -470,7 +470,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)
|
||||
|
@@ -10,10 +10,11 @@
|
||||
#include "d2functions.h"
|
||||
#include <stdio.h>
|
||||
|
||||
int active_RunLODs = false;
|
||||
int active_alwaysRegenMapInSP = false;
|
||||
DWORD nbPlayersCommandByDefault = 1;
|
||||
int active_Windowed = true;
|
||||
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;
|
||||
@@ -22,6 +23,90 @@ int active_EnabledCowPortalWhenCowKingWasKill = false;
|
||||
|
||||
/****************************************************************************************************/
|
||||
|
||||
int setWindowedOptionsDone = false;
|
||||
int active_RemoveBorder = true;
|
||||
int active_WindowOnTop = true;
|
||||
int active_Maximized = true;
|
||||
int active_SetWindowPos = true;
|
||||
int windowedX = 240;
|
||||
int windowedY = 0;
|
||||
int windowedWidth = 1440;
|
||||
int windowedHeight = 1080;
|
||||
int active_LockMouseOnStartup = true;
|
||||
|
||||
void lockMouseCursor(int width, int height)
|
||||
{
|
||||
RECT clientRect;
|
||||
RECT rect;
|
||||
HWND hwnd = GetActiveWindow();
|
||||
GetClientRect(hwnd, &clientRect);
|
||||
GetWindowRect(hwnd, &rect);
|
||||
int shiftX = (rect.right - rect.left - clientRect.right) / 2;
|
||||
int shiftY = rect.bottom - rect.top - clientRect.bottom - shiftX;
|
||||
log_msg("Windows size : %i, %i, %i, %i\n", rect.left, rect.top, rect.right, rect.bottom);
|
||||
rect.left += shiftX;
|
||||
rect.right = rect.left + width;
|
||||
rect.top += shiftY;
|
||||
rect.bottom = rect.top + height;
|
||||
//no resize : 560, 231, 1360, 831
|
||||
//resized : 240, 0, 1040, 600
|
||||
log_msg("Lock Mouse Cursor : %i, %i, %i, %i\n", rect.left, rect.top, rect.right, rect.bottom);
|
||||
ClipCursor(&rect);
|
||||
}
|
||||
|
||||
void lockMouseCursor() { lockMouseCursor(ResolutionX, ResolutionY); }
|
||||
|
||||
void SetWindowedOptions()
|
||||
{
|
||||
if (setWindowedOptionsDone)
|
||||
return;
|
||||
HWND hwnd = GetActiveWindow();
|
||||
RECT clientRect;
|
||||
GetClientRect(hwnd, &clientRect);
|
||||
|
||||
if (active_RemoveBorder)
|
||||
{
|
||||
LONG lStyle = GetWindowLong(hwnd, GWL_STYLE);
|
||||
lStyle &= ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZE | WS_MAXIMIZE | WS_SYSMENU);
|
||||
SetWindowLong(hwnd, GWL_STYLE, lStyle);
|
||||
SetWindowPos(hwnd, NULL, 0, 0, clientRect.right, clientRect.bottom, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOZORDER | SWP_NOOWNERZORDER);
|
||||
}
|
||||
|
||||
if (active_Maximized && !active_SetWindowPos)
|
||||
{
|
||||
RECT screen;
|
||||
GetWindowRect(GetDesktopWindow(), &screen);
|
||||
log_msg("Screen size : %i, %i, %i, %i\n", screen.left, screen.top, screen.right, screen.bottom);
|
||||
int w = screen.bottom * clientRect.right / clientRect.bottom;
|
||||
int h = w * clientRect.bottom / clientRect.right;
|
||||
if (screen.right < w)
|
||||
{
|
||||
h = screen.right * clientRect.bottom / clientRect.right;
|
||||
w = h * clientRect.right / clientRect.bottom;
|
||||
}
|
||||
windowedX = (screen.right - w) / 2;
|
||||
windowedY = (screen.bottom - h) / 2;
|
||||
windowedWidth = w;
|
||||
windowedHeight = h;
|
||||
}
|
||||
|
||||
if (active_SetWindowPos || active_Maximized)
|
||||
{
|
||||
if (active_WindowOnTop)
|
||||
SetWindowPos(hwnd, HWND_TOPMOST, windowedX, windowedY, windowedWidth, windowedHeight, SWP_FRAMECHANGED);
|
||||
else
|
||||
SetWindowPos(hwnd, NULL, windowedX, windowedY, windowedWidth, windowedHeight, SWP_FRAMECHANGED | SWP_NOZORDER | SWP_NOOWNERZORDER);
|
||||
} else if (active_WindowOnTop)
|
||||
SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, clientRect.right, clientRect.bottom, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE);
|
||||
|
||||
if (active_LockMouseOnStartup)
|
||||
lockMouseCursor(clientRect.right, clientRect.bottom);
|
||||
|
||||
setWindowedOptionsDone = true;
|
||||
}
|
||||
|
||||
/****************************************************************************************************/
|
||||
|
||||
void STDCALL displayItemlevel(LPWSTR popup, Unit* ptItem)
|
||||
{
|
||||
if (onRealm && (selectModParam==MOD_NO)) return;
|
||||
@@ -135,7 +220,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
|
||||
@@ -393,7 +478,6 @@ void Install_AlwaysDisplayLifeMana()
|
||||
//6FAD7659 |. A1 4CBCB86F MOV EAX,DWORD PTR DS:[6FB8BC4C]
|
||||
|
||||
//6FAD7667 |. 0F8C A4000000 JL D2Client.6FAD7711
|
||||
|
||||
} else {
|
||||
// Always display life.
|
||||
mem_seek R7(D2Client, 58B32, 58B32, 5F102, 2D713, B5DF3, 81733, 0000);
|
||||
|
@@ -37,7 +37,7 @@ static char *strstri(char *text, char *string)
|
||||
{
|
||||
while(*text)
|
||||
{
|
||||
if(strnicmp(string, text, len) == 0)
|
||||
if(_strnicmp(string, text, len) == 0)
|
||||
{
|
||||
found = text;
|
||||
break;
|
||||
@@ -280,7 +280,7 @@ int INIFile::GetPrivateProfileString(const char *section, const char *key, const
|
||||
|
||||
if((m_cache) && (section && key && dest && size))
|
||||
{
|
||||
if(stricmp(section, m_currentSection) != 0)
|
||||
if(_stricmp(section, m_currentSection) != 0)
|
||||
{
|
||||
strncpy(m_currentSection, section, MAX_SECTIONNAME_LENGTH);
|
||||
|
||||
@@ -343,7 +343,7 @@ BOOL INIFile::WritePrivateProfileString(char *section, char *key, char *string)
|
||||
{
|
||||
if(!section || !key || !string) return false;
|
||||
|
||||
if(stricmp(section, m_currentSection) != 0)
|
||||
if(_stricmp(section, m_currentSection) != 0)
|
||||
{
|
||||
if(m_cacheWritePos == 0)
|
||||
m_cacheWritePos += sprintf((m_cache + m_cacheWritePos), "[%s]\r\n", section);
|
||||
|
@@ -26,7 +26,7 @@ bool separateHardSoftStash = false;
|
||||
bool active_sharedGold=false;
|
||||
char* sharedStashFilename = NULL;
|
||||
|
||||
typedef int (*TchangeToSelectedStash)(Unit* ptChar, Stash* newStash, DWORD bIsClient);
|
||||
typedef int (*TchangeToSelectedStash)(Unit* ptChar, Stash* newStash, DWORD bOnlyItems, DWORD bIsClient);
|
||||
|
||||
Unit* firstClassicStashItem(Unit* ptChar)
|
||||
{
|
||||
@@ -130,11 +130,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;
|
||||
@@ -175,7 +175,6 @@ int changeToSelectedStash_9(Unit* ptChar, Stash* newStash, DWORD bIsClient)
|
||||
}
|
||||
|
||||
// add items of new stash
|
||||
PCPY->currentStash = newStash;
|
||||
ptItem = newStash->ptListItem;
|
||||
while (ptItem)
|
||||
{
|
||||
@@ -183,16 +182,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;
|
||||
@@ -220,14 +223,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;
|
||||
}
|
||||
@@ -277,12 +283,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);
|
||||
@@ -295,7 +301,7 @@ DWORD loadStashList(Unit* ptChar, BYTE data[], DWORD maxSize, DWORD* curSize, bo
|
||||
if (!PCPY->currentStash)
|
||||
PCPY->currentStash = newStash;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -383,20 +389,20 @@ void updateSelectedStashClient(Unit* ptChar)//WORKS
|
||||
|
||||
void setSelectedStashClient(DWORD stashId, DWORD stashFlags, DWORD flags)//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);
|
||||
changeToSelectedStash(ptChar, newStash, (stashFlags & 2) == 2, 1);
|
||||
PCPY->flags = flags;
|
||||
}
|
||||
|
||||
|
||||
void selectStash(Unit* ptChar, Stash* newStash)//WORKS
|
||||
{
|
||||
changeToSelectedStash(ptChar, newStash, 0);
|
||||
changeToSelectedStash(ptChar, newStash, 0, 0);
|
||||
updateSelectedStashClient(ptChar);
|
||||
}
|
||||
|
||||
@@ -423,6 +429,35 @@ 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 | 2, 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 selectPreviousStash(Unit* ptChar)
|
||||
{
|
||||
|
@@ -8,6 +8,7 @@
|
||||
#include "common.h"
|
||||
#include "error.h"
|
||||
#include "d2functions.h"
|
||||
#include "extraOptions.h"
|
||||
#include <stdio.h>
|
||||
|
||||
char* versionText = "";
|
||||
@@ -20,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 )
|
||||
|
@@ -60,6 +60,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";
|
||||
@@ -210,7 +222,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 +254,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 +308,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 +338,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 +359,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)
|
||||
{
|
||||
@@ -783,6 +840,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);
|
||||
|
BIN
PlugY/PlugY.aps
BIN
PlugY/PlugY.aps
Binary file not shown.
@@ -1,22 +1,6 @@
|
||||
/*=================================================================
|
||||
File created by Yohann NICOLAS.
|
||||
// PlugY.cpp : Defines the exported functions for the DLL application.
|
||||
//
|
||||
|
||||
Main file of this DLL
|
||||
#include "stdafx.h"
|
||||
|
||||
=================================================================*/
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
BOOL WINAPI DllMain(HANDLE /*hModule*/, DWORD dwReason, LPVOID /*lpReserved*/)
|
||||
{
|
||||
switch(dwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/*================================= END OF FILE =================================*/
|
BIN
PlugY/PlugY.rc
BIN
PlugY/PlugY.rc
Binary file not shown.
@@ -1,17 +1,26 @@
|
||||
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 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PlugY", "PlugY.vcxproj", "{5059AE94-61B0-4D07-A970-B670BBCB142C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
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
|
||||
{5059AE94-61B0-4D07-A970-B670BBCB142C}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{5059AE94-61B0-4D07-A970-B670BBCB142C}.Debug|x64.Build.0 = Debug|x64
|
||||
{5059AE94-61B0-4D07-A970-B670BBCB142C}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{5059AE94-61B0-4D07-A970-B670BBCB142C}.Debug|x86.Build.0 = Debug|Win32
|
||||
{5059AE94-61B0-4D07-A970-B670BBCB142C}.Release|x64.ActiveCfg = Release|x64
|
||||
{5059AE94-61B0-4D07-A970-B670BBCB142C}.Release|x64.Build.0 = Release|x64
|
||||
{5059AE94-61B0-4D07-A970-B670BBCB142C}.Release|x86.ActiveCfg = Release|Win32
|
||||
{5059AE94-61B0-4D07-A970-B670BBCB142C}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
267
PlugY/PlugY.vcxproj
Normal file
267
PlugY/PlugY.vcxproj
Normal file
@@ -0,0 +1,267 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{5059AE94-61B0-4D07-A970-B670BBCB142C}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>PlugY</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PLUGY_EXPORTS;_CRT_NON_CONFORMING_SWPRINTFS;_CRT_SECURE_NO_WARNINGS;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;PLUGY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PLUGY_EXPORTS;_CRT_NON_CONFORMING_SWPRINTFS;_CRT_SECURE_NO_WARNINGS;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>copy "$(TargetPath)" "..\PlugYInstaller\PlugY.dll"</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;PLUGY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Commons\d2BinFile.h" />
|
||||
<ClInclude Include="..\Commons\d2constants.h" />
|
||||
<ClInclude Include="..\Commons\D2Funcs.h" />
|
||||
<ClInclude Include="..\Commons\d2StringTblStruct.h" />
|
||||
<ClInclude Include="..\Commons\d2Struct.h" />
|
||||
<ClInclude Include="..\Commons\D2UnitStruct.h" />
|
||||
<ClInclude Include="..\Commons\updatingConst.h" />
|
||||
<ClInclude Include="bigStash.h" />
|
||||
<ClInclude Include="clientSaveFile.h" />
|
||||
<ClInclude Include="commands.h" />
|
||||
<ClInclude Include="common.h" />
|
||||
<ClInclude Include="customData.h" />
|
||||
<ClInclude Include="customLibraries.h" />
|
||||
<ClInclude Include="d2functions.h" />
|
||||
<ClInclude Include="error.h" />
|
||||
<ClInclude Include="extendedSaveFile.h" />
|
||||
<ClInclude Include="extraOptions.h" />
|
||||
<ClInclude Include="globalVariable.h" />
|
||||
<ClInclude Include="infinityStash.h" />
|
||||
<ClInclude Include="INIfile.h" />
|
||||
<ClInclude Include="interface_Skills.h" />
|
||||
<ClInclude Include="interface_Stash.h" />
|
||||
<ClInclude Include="interface_Stats.h" />
|
||||
<ClInclude Include="language.h" />
|
||||
<ClInclude Include="loadPlayerData.h" />
|
||||
<ClInclude Include="mainScreen.h" />
|
||||
<ClInclude Include="modifMemory.h" />
|
||||
<ClInclude Include="newInterfaces.h" />
|
||||
<ClInclude Include="newInterface_CubeListing.h" />
|
||||
<ClInclude Include="newInterface_Runewords.h" />
|
||||
<ClInclude Include="newInterface_Stats.h" />
|
||||
<ClInclude Include="newInterface_StatsPageTwo.h" />
|
||||
<ClInclude Include="othersFeatures.h" />
|
||||
<ClInclude Include="parameters.h" />
|
||||
<ClInclude Include="playerCustomData.h" />
|
||||
<ClInclude Include="plugYFiles.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="savePath.h" />
|
||||
<ClInclude Include="savePlayerData.h" />
|
||||
<ClInclude Include="sharedSaveFile.h" />
|
||||
<ClInclude Include="skillPerLevelUp.h" />
|
||||
<ClInclude Include="skillsPoints.h" />
|
||||
<ClInclude Include="statPerLevelUp.h" />
|
||||
<ClInclude Include="statsPoints.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="targetver.h" />
|
||||
<ClInclude Include="uberQuest.h" />
|
||||
<ClInclude Include="updateClient.h" />
|
||||
<ClInclude Include="updateServer.h" />
|
||||
<ClInclude Include="worldEvent.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="BigStash.cpp" />
|
||||
<ClCompile Include="ClientSaveFile.cpp" />
|
||||
<ClCompile Include="Commands.cpp" />
|
||||
<ClCompile Include="Common.cpp" />
|
||||
<ClCompile Include="CustomLibraries.cpp" />
|
||||
<ClCompile Include="D2functions.cpp" />
|
||||
<ClCompile Include="D2wrapper.cpp" />
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
</PrecompiledHeader>
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsManaged>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
</PrecompiledHeader>
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
</PrecompiledHeader>
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</CompileAsManaged>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Error.cpp" />
|
||||
<ClCompile Include="ExtendedSaveFile.cpp" />
|
||||
<ClCompile Include="ExtraOptions.cpp" />
|
||||
<ClCompile Include="GlobalVariable.cpp" />
|
||||
<ClCompile Include="InfinityStash.cpp" />
|
||||
<ClCompile Include="INIfile.cpp" />
|
||||
<ClCompile Include="Interface_Skills.cpp" />
|
||||
<ClCompile Include="Interface_Stash.cpp" />
|
||||
<ClCompile Include="Interface_Stats.cpp" />
|
||||
<ClCompile Include="Language.cpp" />
|
||||
<ClCompile Include="LoadPlayerData.cpp" />
|
||||
<ClCompile Include="MainScreen.cpp" />
|
||||
<ClCompile Include="ModifMemory.cpp" />
|
||||
<ClCompile Include="NewInterfaces.cpp" />
|
||||
<ClCompile Include="NewInterface_CubeListing.cpp" />
|
||||
<ClCompile Include="NewInterface_Runewords.cpp" />
|
||||
<ClCompile Include="NewInterface_Stats.cpp" />
|
||||
<ClCompile Include="NewInterface_StatsPageTwo.cpp" />
|
||||
<ClCompile Include="OthersFeatures.cpp" />
|
||||
<ClCompile Include="Parameters.cpp" />
|
||||
<ClCompile Include="PlayerCustomData.cpp" />
|
||||
<ClCompile Include="PlugY.cpp" />
|
||||
<ClCompile Include="PlugYFiles.cpp" />
|
||||
<ClCompile Include="SavePath.cpp" />
|
||||
<ClCompile Include="SavePlayerData.cpp" />
|
||||
<ClCompile Include="SharedSaveFile.cpp" />
|
||||
<ClCompile Include="SkillPerLevelUp.cpp" />
|
||||
<ClCompile Include="SkillsPoints.cpp" />
|
||||
<ClCompile Include="StatPerLevelUp.cpp" />
|
||||
<ClCompile Include="StatsPoints.cpp" />
|
||||
<ClCompile Include="stdafx.cpp" />
|
||||
<ClCompile Include="UberQuest.cpp" />
|
||||
<ClCompile Include="UpdateClient.cpp" />
|
||||
<ClCompile Include="UpdateServer.cpp" />
|
||||
<ClCompile Include="WorldEvent.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="PlugY.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
308
PlugY/PlugY.vcxproj.filters
Normal file
308
PlugY/PlugY.vcxproj.filters
Normal file
@@ -0,0 +1,308 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\Commons">
|
||||
<UniqueIdentifier>{f21d23d6-3719-4624-84e8-f488328334b7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="targetver.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="savePath.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="savePlayerData.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="sharedSaveFile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="skillPerLevelUp.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="skillsPoints.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="statPerLevelUp.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="statsPoints.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="uberQuest.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="updateClient.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="updateServer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="worldEvent.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="bigStash.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="clientSaveFile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="commands.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="common.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="customData.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="customLibraries.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="d2functions.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="error.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="extendedSaveFile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="extraOptions.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="globalVariable.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="infinityStash.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="INIfile.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="interface_Skills.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="interface_Stash.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="interface_Stats.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="language.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="loadPlayerData.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="mainScreen.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="modifMemory.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="newInterface_CubeListing.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="newInterface_Runewords.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="newInterface_Stats.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="newInterface_StatsPageTwo.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="newInterfaces.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="othersFeatures.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="parameters.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="playerCustomData.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="plugYFiles.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Commons\d2BinFile.h">
|
||||
<Filter>Header Files\Commons</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Commons\d2constants.h">
|
||||
<Filter>Header Files\Commons</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Commons\D2Funcs.h">
|
||||
<Filter>Header Files\Commons</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Commons\d2StringTblStruct.h">
|
||||
<Filter>Header Files\Commons</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Commons\d2Struct.h">
|
||||
<Filter>Header Files\Commons</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Commons\D2UnitStruct.h">
|
||||
<Filter>Header Files\Commons</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Commons\updatingConst.h">
|
||||
<Filter>Header Files\Commons</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PlugY.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SavePlayerData.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SharedSaveFile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SkillPerLevelUp.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SkillsPoints.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="StatPerLevelUp.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="StatsPoints.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="UberQuest.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="UpdateClient.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="UpdateServer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="WorldEvent.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="BigStash.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ClientSaveFile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Commands.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Common.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="CustomLibraries.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="D2functions.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="D2wrapper.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Error.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ExtendedSaveFile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ExtraOptions.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GlobalVariable.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="InfinityStash.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="INIfile.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Interface_Skills.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Interface_Stash.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Interface_Stats.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Language.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="LoadPlayerData.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="MainScreen.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ModifMemory.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="NewInterface_CubeListing.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="NewInterface_Runewords.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="NewInterface_Stats.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="NewInterface_StatsPageTwo.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="NewInterfaces.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="OthersFeatures.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Parameters.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PlayerCustomData.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PlugYFiles.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SavePath.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="PlugY.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
@@ -35,7 +35,6 @@ void updateClient(Unit* ptChar, DWORD mFunc, DWORD p1, DWORD p2, DWORD p3)
|
||||
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);
|
||||
|
@@ -15,11 +15,16 @@
|
||||
#include "infinityStash.h"
|
||||
#include "commands.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;
|
||||
@@ -42,17 +47,36 @@ int STDCALL handleServerUpdate(Unit* ptChar, WORD param)
|
||||
case US_SELECT_PREVIOUS_INDEX2: selectPreviousIndex2Stash( ptChar ); return 1;
|
||||
case US_SELECT_NEXT_INDEX2 : selectNextIndex2Stash( 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;
|
||||
default :
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
FCT_ASM( caller_handleServerUpdate)
|
||||
PUSH EAX
|
||||
PUSH ESI
|
||||
PUSH EBX
|
||||
CALL handleServerUpdate
|
||||
TEST EAX,EAX
|
||||
|
19
PlugY/dllmain.cpp
Normal file
19
PlugY/dllmain.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
// dllmain.cpp : Defines the entry point for the DLL application.
|
||||
#include "stdafx.h"
|
||||
|
||||
BOOL APIENTRY DllMain( HMODULE hModule,
|
||||
DWORD ul_reason_for_call,
|
||||
LPVOID lpReserved
|
||||
)
|
||||
{
|
||||
switch (ul_reason_for_call)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
case DLL_THREAD_ATTACH:
|
||||
case DLL_THREAD_DETACH:
|
||||
case DLL_PROCESS_DETACH:
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
@@ -8,24 +8,38 @@
|
||||
#ifndef __EXTRAOPTIONS_H__INCLUDED
|
||||
#define __EXTRAOPTIONS_H__INCLUDED
|
||||
|
||||
extern int active_RunLODs;
|
||||
extern int active_alwaysRegenMapInSP;
|
||||
extern DWORD nbPlayersCommandByDefault;
|
||||
extern int active_Windowed;
|
||||
extern int active_LockMouseCursor;
|
||||
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();
|
||||
extern int active_RemoveBorder;
|
||||
extern int active_WindowOnTop;
|
||||
extern int active_Maximized;
|
||||
extern int active_SetWindowPos;
|
||||
extern int windowedX;
|
||||
extern int windowedY;
|
||||
extern int windowedWidth;
|
||||
extern int windowedHeight;
|
||||
extern int active_LockMouseOnStartup;
|
||||
|
||||
void Install_DisplayItemLevel();
|
||||
void Install_SendPlayersCommand();
|
||||
void Install_AlwaysRegenMapInSP();
|
||||
void Install_RunLODs();
|
||||
void Install_AlwaysDisplayLifeMana();
|
||||
void Install_EnabledTXTFilesWithMSExcel();
|
||||
void Install_DisplayBaseStatsValue();
|
||||
void Install_LadderRunewords();
|
||||
void Install_EnabledCowPortalWhenCowKingWasKill();
|
||||
|
||||
void SetWindowedOptions();
|
||||
void lockMouseCursor();
|
||||
#endif
|
@@ -33,6 +33,7 @@ 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 selectStash(Unit* ptChar, Stash* newStash);
|
||||
void setSelectedStashClient(DWORD stashId, DWORD stashFlags, DWORD flags);
|
||||
|
@@ -7,7 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define PLUGY_VERSION "10.00"
|
||||
#define PLUGY_VERSION "10.01"
|
||||
|
||||
#define LOG_FILE "PlugY.log"
|
||||
|
||||
|
@@ -1,13 +1,12 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by PlugY.rc
|
||||
//
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 106
|
||||
#define _APS_NEXT_RESOURCE_VALUE 101
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
|
8
PlugY/stdafx.cpp
Normal file
8
PlugY/stdafx.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// PlugY.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: reference any additional headers you need in STDAFX.H
|
||||
// and not in this file
|
16
PlugY/stdafx.h
Normal file
16
PlugY/stdafx.h
Normal file
@@ -0,0 +1,16 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "targetver.h"
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
// Windows Header Files:
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
|
||||
// TODO: reference additional headers your program requires here
|
8
PlugY/targetver.h
Normal file
8
PlugY/targetver.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
// Including SDKDDKVer.h defines the highest available Windows platform.
|
||||
|
||||
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
|
||||
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
|
||||
|
||||
#include <SDKDDKVer.h>
|
Reference in New Issue
Block a user