DWORD STDCALL mouseRunewordsPageLeftUp(sWinMessage* msg) { if (!D2isLODGame() || !D2GetResolution()) return -1; if (!isOnStatsPage(msg->x,msg->y)) return 1; if (isOnCloseBtn(msg->x,msg->y)) { log_msg("push up left button close\n"); if (isDownBtn.close) D2TogglePage(2,1,0); } else if (isOnNextPageBtn(msg->x,msg->y)) { log_msg("push up left button next page\n"); if (isDownBtn.nextPage) { GoStatPage(GetCurrentPage()+1); log_msg("next page press\n"); } } else if (isOnPrevRunesBtn(msg->x,msg->y)) { log_msg("push up left button prev runes\n"); if (isDownBtn.prevRunes) { if (curRunesPage) curRunesPage--; } } else if (isOnNextRunesBtn(msg->x,msg->y)) { log_msg("push up left button next runes\n"); if (isDownBtn.nextRunes) { if (curRunesPage < maxRunesPage) curRunesPage++; } } D2CleanStatMouseUp(); freeMessage(msg); isDownBtn.all=0; return 0; }
int STDCALL commands (char* ptText) { //return 0; 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))) { if (!active_multiPageStash) return 1; char* param = &command[strlen(CMD_RENAME)]; DWORD len = strlen(param); if (len && (param[0] != ' ')) return 1; Stash* ptStash = PCPY->currentStash; if (!ptStash) return 0; if (len>1) { 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; } return 0; } if (!strcmp(command,CMD_LISTCUBEFORMULA)) { if (!active_listAllCubeFormula) return 1; listAllCubeFormula(); 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_RELOAD)) { if (onRealm) return 1; gambleReload(ptChar); return 0; } if (!strcmp(command,CMD_STARTSAVE)) { if (onRealm) return 1; updateServer(US_STARTSAVE); return 0; } if (!strcmp(command,CMD_MAXGOLD)) { if (onRealm) return 1; updateServer(US_MAXGOLD); return 0; } if (!strcmp(command,CMD_DISPLAY_LIFE)) { active_AlwaysDisplayLifeMana = !active_AlwaysDisplayLifeMana; return 0; } if (!strcmp(command,CMD_DISPLAY_MANA)) { active_AlwaysDisplayLifeMana = !active_AlwaysDisplayLifeMana; return 0; } if (!strcmp(command,CMD_DISPLAY_LIFE_MANA) || !strcmp(command,CMD_DISPLAY_MANA_LIFE)) { active_AlwaysDisplayLifeMana = !active_AlwaysDisplayLifeMana; return 0; } return 1; }