mirror of
https://gitlab.com/hashborgir/d2tweaks-rnd2k.git
synced 2024-12-02 13:45:58 +00:00
Cleanup and fix itemtypes checks
This commit is contained in:
parent
aec114d05c
commit
69965f77d1
@ -152,7 +152,6 @@ namespace diablo2 {
|
|||||||
uint16_t pad0x13E; //0x13E
|
uint16_t pad0x13E; //0x13E
|
||||||
uint32_t dwStuff; //0x140
|
uint32_t dwStuff; //0x140
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enum unit_stats_t {
|
enum unit_stats_t {
|
||||||
@ -1038,7 +1037,7 @@ namespace diablo2 {
|
|||||||
|
|
||||||
static void diablo2::d2_common::add_property(structures::unit* item, D2PropertyStrc* pProperty, int nUnused);
|
static void diablo2::d2_common::add_property(structures::unit* item, D2PropertyStrc* pProperty, int nUnused);
|
||||||
static void diablo2::d2_common::ITEMS_SetItemFlag(structures::unit* item, uint32_t dwFlag, BOOL bSet);
|
static void diablo2::d2_common::ITEMS_SetItemFlag(structures::unit* item, uint32_t dwFlag, BOOL bSet);
|
||||||
|
|
||||||
//D2Common.0x6FDA42B0
|
//D2Common.0x6FDA42B0
|
||||||
// D2ItemStatCostTxt* __fastcall ITEMS_GetItemStatCostTxtRecord(int nStatId)
|
// D2ItemStatCostTxt* __fastcall ITEMS_GetItemStatCostTxtRecord(int nStatId)
|
||||||
// Write a function signature for this function
|
// Write a function signature for this function
|
||||||
@ -1047,8 +1046,5 @@ namespace diablo2 {
|
|||||||
//D2Common.0x6FD57720 (#10602)
|
//D2Common.0x6FD57720 (#10602)
|
||||||
//int __stdcall DATATBLS_GetItemIdFromItemCode(uint32_t dwCode)
|
//int __stdcall DATATBLS_GetItemIdFromItemCode(uint32_t dwCode)
|
||||||
static int get_item_id_from_item_code(uint32_t dwCode);
|
static int get_item_id_from_item_code(uint32_t dwCode);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -392,7 +392,6 @@ public:
|
|||||||
int pbarWidth = GetPrivateProfileIntA("Options", "pbarWidth", 200, "./d2tweaks.ini");
|
int pbarWidth = GetPrivateProfileIntA("Options", "pbarWidth", 200, "./d2tweaks.ini");
|
||||||
int pbarHeight = GetPrivateProfileIntA("Options", "pbarHeight", 16, "./d2tweaks.ini");
|
int pbarHeight = GetPrivateProfileIntA("Options", "pbarHeight", 16, "./d2tweaks.ini");
|
||||||
|
|
||||||
|
|
||||||
// Define the coordinates for the bars
|
// Define the coordinates for the bars
|
||||||
int barX = 245; // Left coordinate of the bars
|
int barX = 245; // Left coordinate of the bars
|
||||||
int barY_HP = 728; // Top coordinate of the HP bar
|
int barY_HP = 728; // Top coordinate of the HP bar
|
||||||
@ -422,8 +421,6 @@ public:
|
|||||||
int player_bars_X_mana = GetPrivateProfileIntA("Options", "player_bars_mana_X", barX, "./d2tweaks.ini");
|
int player_bars_X_mana = GetPrivateProfileIntA("Options", "player_bars_mana_X", barX, "./d2tweaks.ini");
|
||||||
int player_bars_Y_mana = GetPrivateProfileIntA("Options", "player_bars_mana_Y", barY_Mana, "./d2tweaks.ini");
|
int player_bars_Y_mana = GetPrivateProfileIntA("Options", "player_bars_mana_Y", barY_Mana, "./d2tweaks.ini");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (player_bars_enabled_hp == 1) {
|
if (player_bars_enabled_hp == 1) {
|
||||||
// Draw the filled HP bar
|
// Draw the filled HP bar
|
||||||
diablo2::d2_gfx::draw_filled_rect(player_bars_X_hp, player_bars_Y_hp, barX + filledHPWidth, barY_HP + pbarHeight, barColor, 255);
|
diablo2::d2_gfx::draw_filled_rect(player_bars_X_hp, player_bars_Y_hp, barX + filledHPWidth, barY_HP + pbarHeight, barColor, 255);
|
||||||
|
@ -767,9 +767,28 @@ LRESULT d2_tweaks::ui::ui_manager::wnd_proc(HWND hWnd, UINT msg, WPARAM wParam,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isArmorOrWeaponCode(normCode) ||
|
if (isArmorOrWeaponCode(normCode)
|
||||||
(record->type >= 109 && record->type <= 125) ||
|
|| record->type == 109
|
||||||
(record->type >= 1 && record->type <= 50)) {
|
|| record->type == 111
|
||||||
|
|| record->type == 112
|
||||||
|
|| record->type == 113
|
||||||
|
|| record->type == 120
|
||||||
|
|| record->type == 113
|
||||||
|
|| record->type == 122
|
||||||
|
|| record->type == 123
|
||||||
|
|| record->type == 125
|
||||||
|
|| record->type == 4 - 3
|
||||||
|
|| record->type == 5 - 3
|
||||||
|
|| record->type == 17 - 3
|
||||||
|
|| record->type == 18 - 3
|
||||||
|
|| record->type == 21 - 3
|
||||||
|
|| record->type == 26 - 3
|
||||||
|
|| record->type == 27 - 3
|
||||||
|
|| record->type == 28 - 3
|
||||||
|
|| record->type == 29 - 3
|
||||||
|
|| record->type == 30 - 3
|
||||||
|
|| record->type == 31 - 3
|
||||||
|
|| record->type == 32 - 3) {
|
||||||
// Create a packet to move an item
|
// Create a packet to move an item
|
||||||
static d2_tweaks::common::item_move_cs packet;
|
static d2_tweaks::common::item_move_cs packet;
|
||||||
|
|
||||||
@ -911,16 +930,28 @@ LRESULT d2_tweaks::ui::ui_manager::wnd_proc(HWND hWnd, UINT msg, WPARAM wParam,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isArmorOrWeaponCode(normCode) ||
|
if (isArmorOrWeaponCode(normCode)
|
||||||
record->type == 109 ||
|
|| record->type == 109
|
||||||
record->type == 111 ||
|
|| record->type == 111
|
||||||
record->type == 112 ||
|
|| record->type == 112
|
||||||
record->type == 113 ||
|
|| record->type == 113
|
||||||
record->type == 120 ||
|
|| record->type == 120
|
||||||
record->type == 122 ||
|
|| record->type == 113
|
||||||
record->type == 123 ||
|
|| record->type == 122
|
||||||
record->type == 125 ||
|
|| record->type == 123
|
||||||
(record->type >= (1) && record->type <= (50))) {
|
|| record->type == 125
|
||||||
|
|| record->type == 4 - 3
|
||||||
|
|| record->type == 5 - 3
|
||||||
|
|| record->type == 17 - 3
|
||||||
|
|| record->type == 18 - 3
|
||||||
|
|| record->type == 21 - 3
|
||||||
|
|| record->type == 26 - 3
|
||||||
|
|| record->type == 27 - 3
|
||||||
|
|| record->type == 28 - 3
|
||||||
|
|| record->type == 29 - 3
|
||||||
|
|| record->type == 30 - 3
|
||||||
|
|| record->type == 31 - 3
|
||||||
|
|| record->type == 32 - 3) {
|
||||||
char currentPage;
|
char currentPage;
|
||||||
|
|
||||||
// open the cube
|
// open the cube
|
||||||
|
Loading…
Reference in New Issue
Block a user