diff --git a/build/Debug/D2tweaks.ilk b/build/Debug/D2tweaks.ilk index 161f944..d9598e8 100644 Binary files a/build/Debug/D2tweaks.ilk and b/build/Debug/D2tweaks.ilk differ diff --git a/build/Debug/D2tweaks.log b/build/Debug/D2tweaks.log index 80bf905..7158d17 100644 --- a/build/Debug/D2tweaks.log +++ b/build/Debug/D2tweaks.log @@ -1,2 +1,2 @@ - ui_manager.cpp + loot_filter_settings_menu.cpp D2tweaks.vcxproj -> D:\Diablo II\MODS\ironman-dev\D2tweaks.dll diff --git a/build/Debug/D2tweaks.tlog/CL.command.1.tlog b/build/Debug/D2tweaks.tlog/CL.command.1.tlog index a3c2d44..6062a06 100644 Binary files a/build/Debug/D2tweaks.tlog/CL.command.1.tlog and b/build/Debug/D2tweaks.tlog/CL.command.1.tlog differ diff --git a/build/Debug/D2tweaks.tlog/CL.read.1.tlog b/build/Debug/D2tweaks.tlog/CL.read.1.tlog index f27937e..66b6c19 100644 Binary files a/build/Debug/D2tweaks.tlog/CL.read.1.tlog and b/build/Debug/D2tweaks.tlog/CL.read.1.tlog differ diff --git a/build/Debug/D2tweaks.tlog/CL.write.1.tlog b/build/Debug/D2tweaks.tlog/CL.write.1.tlog index 6bfc0be..e352890 100644 Binary files a/build/Debug/D2tweaks.tlog/CL.write.1.tlog and b/build/Debug/D2tweaks.tlog/CL.write.1.tlog differ diff --git a/build/Debug/D2tweaks.tlog/link.read.1.tlog b/build/Debug/D2tweaks.tlog/link.read.1.tlog index 23975a3..5597e98 100644 Binary files a/build/Debug/D2tweaks.tlog/link.read.1.tlog and b/build/Debug/D2tweaks.tlog/link.read.1.tlog differ diff --git a/build/Debug/src/common/asm_code.obj b/build/Debug/src/common/asm_code.obj index 799eb18..eeb70ce 100644 Binary files a/build/Debug/src/common/asm_code.obj and b/build/Debug/src/common/asm_code.obj differ diff --git a/build/Debug/src/common/config.obj b/build/Debug/src/common/config.obj index 0bdd168..ee81ccc 100644 Binary files a/build/Debug/src/common/config.obj and b/build/Debug/src/common/config.obj differ diff --git a/build/Debug/src/common/hooking.obj b/build/Debug/src/common/hooking.obj index c92c7e2..730550d 100644 Binary files a/build/Debug/src/common/hooking.obj and b/build/Debug/src/common/hooking.obj differ diff --git a/build/Debug/src/common/ini.obj b/build/Debug/src/common/ini.obj index bcdf91b..d300f2b 100644 Binary files a/build/Debug/src/common/ini.obj and b/build/Debug/src/common/ini.obj differ diff --git a/build/Debug/src/common/string_utils.obj b/build/Debug/src/common/string_utils.obj index aa38da3..38c7a9d 100644 Binary files a/build/Debug/src/common/string_utils.obj and b/build/Debug/src/common/string_utils.obj differ diff --git a/build/Debug/src/d2tweaks/client/client.obj b/build/Debug/src/d2tweaks/client/client.obj index f073a6b..fd2f133 100644 Binary files a/build/Debug/src/d2tweaks/client/client.obj and b/build/Debug/src/d2tweaks/client/client.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/auto_gold_pickup/auto_gold_pickup_client.obj b/build/Debug/src/d2tweaks/client/modules/auto_gold_pickup/auto_gold_pickup_client.obj index 63511c6..a14152d 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/auto_gold_pickup/auto_gold_pickup_client.obj and b/build/Debug/src/d2tweaks/client/modules/auto_gold_pickup/auto_gold_pickup_client.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/auto_item_pickup/auto_item_pickup_client.obj b/build/Debug/src/d2tweaks/client/modules/auto_item_pickup/auto_item_pickup_client.obj index c1f1dd1..232cf8e 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/auto_item_pickup/auto_item_pickup_client.obj and b/build/Debug/src/d2tweaks/client/modules/auto_item_pickup/auto_item_pickup_client.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/autosort/autosort_client.obj b/build/Debug/src/d2tweaks/client/modules/autosort/autosort_client.obj index 5de6405..fbc2f9b 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/autosort/autosort_client.obj and b/build/Debug/src/d2tweaks/client/modules/autosort/autosort_client.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/client_module.obj b/build/Debug/src/d2tweaks/client/modules/client_module.obj index 9c4bd3a..200268f 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/client_module.obj and b/build/Debug/src/d2tweaks/client/modules/client_module.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/damage_display/damage_display_client.obj b/build/Debug/src/d2tweaks/client/modules/damage_display/damage_display_client.obj index 5755354..5c09a40 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/damage_display/damage_display_client.obj and b/build/Debug/src/d2tweaks/client/modules/damage_display/damage_display_client.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/item_drop_message/item_drop_message_client.obj b/build/Debug/src/d2tweaks/client/modules/item_drop_message/item_drop_message_client.obj index 971d65e..41efecc 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/item_drop_message/item_drop_message_client.obj and b/build/Debug/src/d2tweaks/client/modules/item_drop_message/item_drop_message_client.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/item_move/item_move_client.obj b/build/Debug/src/d2tweaks/client/modules/item_move/item_move_client.obj index 12a6176..fa33dd1 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/item_move/item_move_client.obj and b/build/Debug/src/d2tweaks/client/modules/item_move/item_move_client.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter.obj b/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter.obj index 400695b..a16db03 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter.obj and b/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter_settings.obj b/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter_settings.obj index 36cfc7e..2f7e82a 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter_settings.obj and b/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter_settings.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter_settings_menu.obj b/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter_settings_menu.obj index e6040e3..78a57a9 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter_settings_menu.obj and b/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter_settings_menu.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter_settings_toggle_menu.obj b/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter_settings_toggle_menu.obj index 3b04eb2..44db999 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter_settings_toggle_menu.obj and b/build/Debug/src/d2tweaks/client/modules/loot_filter/loot_filter_settings_toggle_menu.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/small_patches/small_patches.obj b/build/Debug/src/d2tweaks/client/modules/small_patches/small_patches.obj index cc0680a..edc434c 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/small_patches/small_patches.obj and b/build/Debug/src/d2tweaks/client/modules/small_patches/small_patches.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/test/test.obj b/build/Debug/src/d2tweaks/client/modules/test/test.obj index 2b1220b..3343b39 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/test/test.obj and b/build/Debug/src/d2tweaks/client/modules/test/test.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/trader_update/trader_update_client.obj b/build/Debug/src/d2tweaks/client/modules/trader_update/trader_update_client.obj index 3cb104c..d1a1062 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/trader_update/trader_update_client.obj and b/build/Debug/src/d2tweaks/client/modules/trader_update/trader_update_client.obj differ diff --git a/build/Debug/src/d2tweaks/client/modules/transmute/transmute_client.obj b/build/Debug/src/d2tweaks/client/modules/transmute/transmute_client.obj index fb1958d..439d4c0 100644 Binary files a/build/Debug/src/d2tweaks/client/modules/transmute/transmute_client.obj and b/build/Debug/src/d2tweaks/client/modules/transmute/transmute_client.obj differ diff --git a/build/Debug/src/d2tweaks/common/asset_manager.obj b/build/Debug/src/d2tweaks/common/asset_manager.obj index 1fe3b36..a0114f3 100644 Binary files a/build/Debug/src/d2tweaks/common/asset_manager.obj and b/build/Debug/src/d2tweaks/common/asset_manager.obj differ diff --git a/build/Debug/src/d2tweaks/common/common.obj b/build/Debug/src/d2tweaks/common/common.obj index 1d098bf..6a209da 100644 Binary files a/build/Debug/src/d2tweaks/common/common.obj and b/build/Debug/src/d2tweaks/common/common.obj differ diff --git a/build/Debug/src/d2tweaks/server/modules/auto_gold_pickup/auto_gold_pickup_server.obj b/build/Debug/src/d2tweaks/server/modules/auto_gold_pickup/auto_gold_pickup_server.obj index 3e66845..d98ad44 100644 Binary files a/build/Debug/src/d2tweaks/server/modules/auto_gold_pickup/auto_gold_pickup_server.obj and b/build/Debug/src/d2tweaks/server/modules/auto_gold_pickup/auto_gold_pickup_server.obj differ diff --git a/build/Debug/src/d2tweaks/server/modules/auto_item_pickup/auto_item_pickup_server.obj b/build/Debug/src/d2tweaks/server/modules/auto_item_pickup/auto_item_pickup_server.obj index 62875cf..7965289 100644 Binary files a/build/Debug/src/d2tweaks/server/modules/auto_item_pickup/auto_item_pickup_server.obj and b/build/Debug/src/d2tweaks/server/modules/auto_item_pickup/auto_item_pickup_server.obj differ diff --git a/build/Debug/src/d2tweaks/server/modules/autosort/autosort_server.obj b/build/Debug/src/d2tweaks/server/modules/autosort/autosort_server.obj index 0fba90f..7e9a663 100644 Binary files a/build/Debug/src/d2tweaks/server/modules/autosort/autosort_server.obj and b/build/Debug/src/d2tweaks/server/modules/autosort/autosort_server.obj differ diff --git a/build/Debug/src/d2tweaks/server/modules/damage_display/damage_display_server.obj b/build/Debug/src/d2tweaks/server/modules/damage_display/damage_display_server.obj index b2e8dab..15fb21e 100644 Binary files a/build/Debug/src/d2tweaks/server/modules/damage_display/damage_display_server.obj and b/build/Debug/src/d2tweaks/server/modules/damage_display/damage_display_server.obj differ diff --git a/build/Debug/src/d2tweaks/server/modules/identify_on_pickup/identify_on_pickup_server.obj b/build/Debug/src/d2tweaks/server/modules/identify_on_pickup/identify_on_pickup_server.obj index 9a1d8fd..a1beb82 100644 Binary files a/build/Debug/src/d2tweaks/server/modules/identify_on_pickup/identify_on_pickup_server.obj and b/build/Debug/src/d2tweaks/server/modules/identify_on_pickup/identify_on_pickup_server.obj differ diff --git a/build/Debug/src/d2tweaks/server/modules/item_drop_message/item_drop_message_server.obj b/build/Debug/src/d2tweaks/server/modules/item_drop_message/item_drop_message_server.obj index ae0c6f3..921c54c 100644 Binary files a/build/Debug/src/d2tweaks/server/modules/item_drop_message/item_drop_message_server.obj and b/build/Debug/src/d2tweaks/server/modules/item_drop_message/item_drop_message_server.obj differ diff --git a/build/Debug/src/d2tweaks/server/modules/item_move/item_move_server.obj b/build/Debug/src/d2tweaks/server/modules/item_move/item_move_server.obj index 01c8688..6a7fc46 100644 Binary files a/build/Debug/src/d2tweaks/server/modules/item_move/item_move_server.obj and b/build/Debug/src/d2tweaks/server/modules/item_move/item_move_server.obj differ diff --git a/build/Debug/src/d2tweaks/server/modules/server_module.obj b/build/Debug/src/d2tweaks/server/modules/server_module.obj index 309bf70..e312798 100644 Binary files a/build/Debug/src/d2tweaks/server/modules/server_module.obj and b/build/Debug/src/d2tweaks/server/modules/server_module.obj differ diff --git a/build/Debug/src/d2tweaks/server/modules/test/test.obj b/build/Debug/src/d2tweaks/server/modules/test/test.obj index fc943fe..34ca8f5 100644 Binary files a/build/Debug/src/d2tweaks/server/modules/test/test.obj and b/build/Debug/src/d2tweaks/server/modules/test/test.obj differ diff --git a/build/Debug/src/d2tweaks/server/modules/trader_update/trader_update_server.obj b/build/Debug/src/d2tweaks/server/modules/trader_update/trader_update_server.obj index 3f3c3e4..fe77707 100644 Binary files a/build/Debug/src/d2tweaks/server/modules/trader_update/trader_update_server.obj and b/build/Debug/src/d2tweaks/server/modules/trader_update/trader_update_server.obj differ diff --git a/build/Debug/src/d2tweaks/server/modules/transmute/transmute_server.obj b/build/Debug/src/d2tweaks/server/modules/transmute/transmute_server.obj index 3db4bbe..3af8479 100644 Binary files a/build/Debug/src/d2tweaks/server/modules/transmute/transmute_server.obj and b/build/Debug/src/d2tweaks/server/modules/transmute/transmute_server.obj differ diff --git a/build/Debug/src/d2tweaks/server/server.obj b/build/Debug/src/d2tweaks/server/server.obj index 526b943..9d31ce4 100644 Binary files a/build/Debug/src/d2tweaks/server/server.obj and b/build/Debug/src/d2tweaks/server/server.obj differ diff --git a/build/Debug/src/d2tweaks/ui/controls/button.obj b/build/Debug/src/d2tweaks/ui/controls/button.obj index 5151384..70d7f42 100644 Binary files a/build/Debug/src/d2tweaks/ui/controls/button.obj and b/build/Debug/src/d2tweaks/ui/controls/button.obj differ diff --git a/build/Debug/src/d2tweaks/ui/controls/checkbox.obj b/build/Debug/src/d2tweaks/ui/controls/checkbox.obj index d9fcdd5..0bb928d 100644 Binary files a/build/Debug/src/d2tweaks/ui/controls/checkbox.obj and b/build/Debug/src/d2tweaks/ui/controls/checkbox.obj differ diff --git a/build/Debug/src/d2tweaks/ui/controls/group.obj b/build/Debug/src/d2tweaks/ui/controls/group.obj index eb803ee..b85e3df 100644 Binary files a/build/Debug/src/d2tweaks/ui/controls/group.obj and b/build/Debug/src/d2tweaks/ui/controls/group.obj differ diff --git a/build/Debug/src/d2tweaks/ui/controls/image.obj b/build/Debug/src/d2tweaks/ui/controls/image.obj index 88f9f13..0fcee8d 100644 Binary files a/build/Debug/src/d2tweaks/ui/controls/image.obj and b/build/Debug/src/d2tweaks/ui/controls/image.obj differ diff --git a/build/Debug/src/d2tweaks/ui/controls/label.obj b/build/Debug/src/d2tweaks/ui/controls/label.obj index 64ae32c..e7dc75c 100644 Binary files a/build/Debug/src/d2tweaks/ui/controls/label.obj and b/build/Debug/src/d2tweaks/ui/controls/label.obj differ diff --git a/build/Debug/src/d2tweaks/ui/menu.obj b/build/Debug/src/d2tweaks/ui/menu.obj index 965923a..1233858 100644 Binary files a/build/Debug/src/d2tweaks/ui/menu.obj and b/build/Debug/src/d2tweaks/ui/menu.obj differ diff --git a/build/Debug/src/d2tweaks/ui/ui_manager.obj b/build/Debug/src/d2tweaks/ui/ui_manager.obj index 1103bc0..c670d71 100644 Binary files a/build/Debug/src/d2tweaks/ui/ui_manager.obj and b/build/Debug/src/d2tweaks/ui/ui_manager.obj differ diff --git a/build/Debug/src/diablo2/d2client.obj b/build/Debug/src/diablo2/d2client.obj index 514206d..ffb3e67 100644 Binary files a/build/Debug/src/diablo2/d2client.obj and b/build/Debug/src/diablo2/d2client.obj differ diff --git a/build/Debug/src/diablo2/d2cmp.obj b/build/Debug/src/diablo2/d2cmp.obj index 94236a8..d1fac89 100644 Binary files a/build/Debug/src/diablo2/d2cmp.obj and b/build/Debug/src/diablo2/d2cmp.obj differ diff --git a/build/Debug/src/diablo2/d2common.obj b/build/Debug/src/diablo2/d2common.obj index dc8330a..90b7fe3 100644 Binary files a/build/Debug/src/diablo2/d2common.obj and b/build/Debug/src/diablo2/d2common.obj differ diff --git a/build/Debug/src/diablo2/d2game.obj b/build/Debug/src/diablo2/d2game.obj index dd07b84..0d201b8 100644 Binary files a/build/Debug/src/diablo2/d2game.obj and b/build/Debug/src/diablo2/d2game.obj differ diff --git a/build/Debug/src/diablo2/d2gfx.obj b/build/Debug/src/diablo2/d2gfx.obj index c977401..56348a8 100644 Binary files a/build/Debug/src/diablo2/d2gfx.obj and b/build/Debug/src/diablo2/d2gfx.obj differ diff --git a/build/Debug/src/diablo2/d2lang.obj b/build/Debug/src/diablo2/d2lang.obj index 38bd9ca..170a7be 100644 Binary files a/build/Debug/src/diablo2/d2lang.obj and b/build/Debug/src/diablo2/d2lang.obj differ diff --git a/build/Debug/src/diablo2/d2launch.obj b/build/Debug/src/diablo2/d2launch.obj index 46832cd..6049b44 100644 Binary files a/build/Debug/src/diablo2/d2launch.obj and b/build/Debug/src/diablo2/d2launch.obj differ diff --git a/build/Debug/src/diablo2/d2net.obj b/build/Debug/src/diablo2/d2net.obj index 4044dab..960fff9 100644 Binary files a/build/Debug/src/diablo2/d2net.obj and b/build/Debug/src/diablo2/d2net.obj differ diff --git a/build/Debug/src/diablo2/d2win.obj b/build/Debug/src/diablo2/d2win.obj index 60c116f..55da256 100644 Binary files a/build/Debug/src/diablo2/d2win.obj and b/build/Debug/src/diablo2/d2win.obj differ diff --git a/build/Debug/src/diablo2/fog.obj b/build/Debug/src/diablo2/fog.obj index e2c2461..96c8505 100644 Binary files a/build/Debug/src/diablo2/fog.obj and b/build/Debug/src/diablo2/fog.obj differ diff --git a/build/Debug/src/diablo2/storm.obj b/build/Debug/src/diablo2/storm.obj index 3551764..7603dcf 100644 Binary files a/build/Debug/src/diablo2/storm.obj and b/build/Debug/src/diablo2/storm.obj differ diff --git a/build/Debug/src/diablo2/utils/mpq_ifstream.obj b/build/Debug/src/diablo2/utils/mpq_ifstream.obj index c3df778..76440d1 100644 Binary files a/build/Debug/src/diablo2/utils/mpq_ifstream.obj and b/build/Debug/src/diablo2/utils/mpq_ifstream.obj differ diff --git a/build/Debug/src/diablo2/utils/screen.obj b/build/Debug/src/diablo2/utils/screen.obj index 5547358..939a2d5 100644 Binary files a/build/Debug/src/diablo2/utils/screen.obj and b/build/Debug/src/diablo2/utils/screen.obj differ diff --git a/build/Debug/src/main.obj b/build/Debug/src/main.obj index 209dfa0..db90ef4 100644 Binary files a/build/Debug/src/main.obj and b/build/Debug/src/main.obj differ diff --git a/build/Debug/vc143.pdb b/build/Debug/vc143.pdb index 872201f..ab639a0 100644 Binary files a/build/Debug/vc143.pdb and b/build/Debug/vc143.pdb differ diff --git a/build/Debug/vendor/D2Template/D2Template.obj b/build/Debug/vendor/D2Template/D2Template.obj index 6ec04ed..95ed565 100644 Binary files a/build/Debug/vendor/D2Template/D2Template.obj and b/build/Debug/vendor/D2Template/D2Template.obj differ diff --git a/build/Debug/vendor/DllNotify/DllNotify.obj b/build/Debug/vendor/DllNotify/DllNotify.obj index 2a9e947..ebbe0ac 100644 Binary files a/build/Debug/vendor/DllNotify/DllNotify.obj and b/build/Debug/vendor/DllNotify/DllNotify.obj differ diff --git a/build/Debug/vendor/minhook/src/buffer.obj b/build/Debug/vendor/minhook/src/buffer.obj index fcc2e1d..49895b8 100644 Binary files a/build/Debug/vendor/minhook/src/buffer.obj and b/build/Debug/vendor/minhook/src/buffer.obj differ diff --git a/build/Debug/vendor/minhook/src/hde/hde32.obj b/build/Debug/vendor/minhook/src/hde/hde32.obj index c23e436..a5b6f65 100644 Binary files a/build/Debug/vendor/minhook/src/hde/hde32.obj and b/build/Debug/vendor/minhook/src/hde/hde32.obj differ diff --git a/build/Debug/vendor/minhook/src/hde/hde64.obj b/build/Debug/vendor/minhook/src/hde/hde64.obj index 2fbc0c9..609606a 100644 Binary files a/build/Debug/vendor/minhook/src/hde/hde64.obj and b/build/Debug/vendor/minhook/src/hde/hde64.obj differ diff --git a/build/Debug/vendor/minhook/src/hook.obj b/build/Debug/vendor/minhook/src/hook.obj index dc9309b..4b575ab 100644 Binary files a/build/Debug/vendor/minhook/src/hook.obj and b/build/Debug/vendor/minhook/src/hook.obj differ diff --git a/build/Debug/vendor/minhook/src/trampoline.obj b/build/Debug/vendor/minhook/src/trampoline.obj index 743903a..9a54b6b 100644 Binary files a/build/Debug/vendor/minhook/src/trampoline.obj and b/build/Debug/vendor/minhook/src/trampoline.obj differ diff --git a/src/d2tweaks/client/modules/loot_filter/loot_filter_settings_menu.cpp b/src/d2tweaks/client/modules/loot_filter/loot_filter_settings_menu.cpp index f1f7890..331e04e 100644 --- a/src/d2tweaks/client/modules/loot_filter/loot_filter_settings_menu.cpp +++ b/src/d2tweaks/client/modules/loot_filter/loot_filter_settings_menu.cpp @@ -77,116 +77,139 @@ #include d2_tweaks::client::modules::loot_filter_settings_menu::loot_filter_settings_menu(token) { - menu::set_enabled(false); - menu::set_visible(false); + menu::set_enabled(false); + menu::set_visible(false); - //load_xml("d2tweaks\\interfaces\\loot_filter_settings_menu.xml"); - if (DLLBASE_D2EXPRES != 0) - load_xml("d2tweaks\\interface_d2expres\\loot_filter_settings_menu.xml"); - if (DLLBASE_SGD2FREERES != 0) - load_xml("d2tweaks\\interface_sgd2freeres\\loot_filter_settings_menu.xml"); - if (DLLBASE_SGD2FREERES == 0 && DLLBASE_D2EXPRES == 0) - load_xml("d2tweaks\\interface_vanilla\\loot_filter_settings_menu.xml"); + //load_xml("d2tweaks\\interfaces\\loot_filter_settings_menu.xml"); + if (DLLBASE_D2EXPRES != 0) + load_xml("d2tweaks\\interface_d2expres\\loot_filter_settings_menu.xml"); + if (DLLBASE_SGD2FREERES != 0) + load_xml("d2tweaks\\interface_sgd2freeres\\loot_filter_settings_menu.xml"); + if (DLLBASE_SGD2FREERES == 0 && DLLBASE_D2EXPRES == 0) + load_xml("d2tweaks\\interface_vanilla\\loot_filter_settings_menu.xml"); - register_misc_checkboxes(); - register_quality_checkboxes(); + register_misc_checkboxes(); + register_quality_checkboxes(); - setup_hooks(); + setup_hooks(); } void d2_tweaks::client::modules::loot_filter_settings_menu::reload_settings() { - register_misc_checkboxes(); - register_quality_checkboxes(); + register_misc_checkboxes(); + register_quality_checkboxes(); } void d2_tweaks::client::modules::loot_filter_settings_menu::draw() { - if (diablo2::d2_client::get_ui_window_state(diablo2::UI_WINDOW_MAINMENU)) - return; + if (diablo2::d2_client::get_ui_window_state(diablo2::UI_WINDOW_MAINMENU)) + return; - menu::draw(); + menu::draw(); } // Define a structure named GemType struct GemType { - // Comment: The number of chipped gems of this type - int chippedCount; + // Comment: The number of chipped gems of this type + int chippedCount; - // Comment: The row number in properties.txt minus 3, representing the type of gem - int rowID; + // Comment: The row number in properties.txt minus 3, representing the type of gem + int rowID; }; static std::unordered_map gemTypes = { - {"gcv", {-1, 382}}, // Chipped Amethyst - {"gcw", {-1, 383}}, // Chipped Diamond - {"gcg", {-1, 384}}, // Chipped Emerald - {"gcr", {-1, 381}}, // Chipped Ruby - {"gcb", {-1, 385}}, // Chipped Sapphire - {"skc", {-1, 387}}, // Chipped Skull - {"gcy", {-1, 386}}, // Chipped Topaz - {"gfv", {-3, 382}}, // Flawed Amethyst - {"gfw", {-3, 383}}, // Flawed Diamond - {"gfg", {-3, 384}}, // Flawed Emerald - {"gfr", {-3, 381}}, // Flawed Ruby - {"gfb", {-3, 385}}, // Flawed Sapphire - {"skf", {-3, 387}}, // Flawed Skull - {"gfy", {-3, 386}}, // Flawed Topaz - {"gsv", {-9, 382}}, // Amethyst - {"gsw", {-9, 383}}, // Diamond - {"gsg", {-9, 384}}, // Emerald - {"gsr", {-9, 381}}, // Ruby - {"gsb", {-9, 385}}, // Sapphire - {"sku", {-9, 387}}, // Skull - {"gsy", {-9, 386}}, // Topaz - {"gzv", {-27, 382}}, // Flawless Amethyst - {"glw", {-27, 383}}, // Flawless Diamond - {"glg", {-27, 384}}, // Flawless Emerald - {"glr", {-27, 381}}, // Flawless Ruby - {"glb", {-27, 385}}, // Flawless Sapphire - {"skl", {-27, 387}}, // Flawless Skull - {"gly", {-27, 386}}, // Flawless Topaz - {"gpv", {-81, 382}}, // Perfect Amethyst - {"gpw", {-81, 383}}, // Perfect Diamond - {"gpg", {-81, 384}}, // Perfect Emerald - {"gpr", {-81, 381}}, // Perfect Ruby - {"gpb", {-81, 385}}, // Perfect Sapphire - {"skz", {-81, 387}}, // Perfect Skull - {"gpy", {-81, 386}}, // Perfect Topaz - {"r01", {-1, 388}}, // El Rune - {"r02", {-3, 388}}, // Eld Rune - {"r03", {-9, 388}}, // Tir Rune - {"r04", {-27, 388}}, // Nef Rune - {"r05", {-81, 388}}, // Eth Rune - {"r06", {-243, 388}}, // Ith Rune - {"r07", {-1, 389}}, // Tal Rune - {"r08", {-3, 389}}, // Ral Rune - {"r09", {-9, 389}}, // Ort Rune - {"r10", {-27, 389}}, // Thul Rune - {"r11", {-81, 389}}, // Amn Rune - {"r12", {-243, 389}}, // Sol Rune - {"r13", {-1, 390}}, // Shael Rune - {"r14", {-3, 390}}, // Dol Rune - {"r15", {-9, 390}}, // Hel Rune - {"r16", {-27, 390}}, // Io Rune - {"r17", {-81, 390}}, // Lum Rune - {"r18", {-243, 390}}, // Ko Rune - {"r19", {-1, 391}}, // Fal Rune - {"r20", {-3, 391}}, // Lem Rune - {"r21", {-9, 391}}, // Pul Rune - {"r22", {-27, 391}}, // Um Rune - {"r23", {-81, 3901}}, // Mal Rune - {"r24", {-243, 391}}, // Ist Rune - {"r25", {-1, 392}}, // Gul Rune - {"r26", {-3, 392}}, // Vex Rune - {"r27", {-9, 392}}, // Ohm Rune - {"r28", {-27, 392}}, // Lo Rune - {"r29", {-81, 392}}, // Sur Rune - {"r30", {-243, 392}}, // Ber Rune - {"r31", {-1, 393}}, // Jah Rune - {"r32", {-2, 393}}, // Cham Rune - {"r33", {-4, 393}} // Zod Rune + {"gcv", {-1, 382}}, // Chipped Amethyst + {"gcw", {-1, 383}}, // Chipped Diamond + {"gcg", {-1, 384}}, // Chipped Emerald + {"gcr", {-1, 381}}, // Chipped Ruby + {"gcb", {-1, 385}}, // Chipped Sapphire + {"skc", {-1, 387}}, // Chipped Skull + {"gcy", {-1, 386}}, // Chipped Topaz + {"gfv", {-3, 382}}, // Flawed Amethyst + {"gfw", {-3, 383}}, // Flawed Diamond + {"gfg", {-3, 384}}, // Flawed Emerald + {"gfr", {-3, 381}}, // Flawed Ruby + {"gfb", {-3, 385}}, // Flawed Sapphire + {"skf", {-3, 387}}, // Flawed Skull + {"gfy", {-3, 386}}, // Flawed Topaz + {"gsv", {-9, 382}}, // Amethyst + {"gsw", {-9, 383}}, // Diamond + {"gsg", {-9, 384}}, // Emerald + {"gsr", {-9, 381}}, // Ruby + {"gsb", {-9, 385}}, // Sapphire + {"sku", {-9, 387}}, // Skull + {"gsy", {-9, 386}}, // Topaz + {"gzv", {-27, 382}}, // Flawless Amethyst + {"glw", {-27, 383}}, // Flawless Diamond + {"glg", {-27, 384}}, // Flawless Emerald + {"glr", {-27, 381}}, // Flawless Ruby + {"glb", {-27, 385}}, // Flawless Sapphire + {"skl", {-27, 387}}, // Flawless Skull + {"gly", {-27, 386}}, // Flawless Topaz + {"gpv", {-81, 382}}, // Perfect Amethyst + {"gpw", {-81, 383}}, // Perfect Diamond + {"gpg", {-81, 384}}, // Perfect Emerald + {"gpr", {-81, 381}}, // Perfect Ruby + {"gpb", {-81, 385}}, // Perfect Sapphire + {"skz", {-81, 387}}, // Perfect Skull + {"gpy", {-81, 386}}, // Perfect Topaz + {"r01", {-1, 388}}, // El Rune + {"r02", {-3, 388}}, // Eld Rune + {"r03", {-9, 388}}, // Tir Rune + {"r04", {-27, 388}}, // Nef Rune + {"r05", {-81, 388}}, // Eth Rune + {"r06", {-243, 388}}, // Ith Rune + {"r07", {-1, 389}}, // Tal Rune + {"r08", {-3, 389}}, // Ral Rune + {"r09", {-9, 389}}, // Ort Rune + {"r10", {-27, 389}}, // Thul Rune + {"r11", {-81, 389}}, // Amn Rune + {"r12", {-243, 389}}, // Sol Rune + {"r13", {-1, 390}}, // Shael Rune + {"r14", {-3, 390}}, // Dol Rune + {"r15", {-9, 390}}, // Hel Rune + {"r16", {-27, 390}}, // Io Rune + {"r17", {-81, 390}}, // Lum Rune + {"r18", {-243, 390}}, // Ko Rune + {"r19", {-1, 391}}, // Fal Rune + {"r20", {-3, 391}}, // Lem Rune + {"r21", {-9, 391}}, // Pul Rune + {"r22", {-27, 391}}, // Um Rune + {"r23", {-81, 3901}}, // Mal Rune + {"r24", {-243, 391}}, // Ist Rune + {"r25", {-1, 392}}, // Gul Rune + {"r26", {-3, 392}}, // Vex Rune + {"r27", {-9, 392}}, // Ohm Rune + {"r28", {-27, 392}}, // Lo Rune + {"r29", {-81, 392}}, // Sur Rune + {"r30", {-243, 392}}, // Ber Rune + {"r31", {-1, 393}}, // Jah Rune + {"r32", {-2, 393}}, // Cham Rune + {"r33", {-4, 393}} // Zod Rune }; void d2_tweaks::client::modules::loot_filter_settings_menu::gem_checkbox_clicked(const std::string& gem) { + // Set the state of the clicked checkbox to true + if (m_show_amethyst && gem == "amethyst") { + m_show_amethyst->set_state(true); + } + else if (m_show_ruby && gem == "ruby") { + m_show_ruby->set_state(true); + } + else if (m_show_sapphire && gem == "sapphire") { + m_show_sapphire->set_state(true); + } + else if (m_show_emerald && gem == "emerald") { + m_show_emerald->set_state(true); + } + else if (m_show_diamond && gem == "diamond") { + m_show_diamond->set_state(true); + } + else if (m_show_topaz && gem == "topaz") { + m_show_topaz->set_state(true); + } + else if (m_show_skull && gem == "skull") { + m_show_skull->set_state(true); + } + // Uncheck all other gem checkboxes if (m_show_amethyst && gem != "amethyst") { m_show_amethyst->set_state(false); @@ -212,108 +235,94 @@ void d2_tweaks::client::modules::loot_filter_settings_menu::gem_checkbox_clicked // Update the selected gem m_selected_gem = gem; + + // display m_selected_gem in a messagebox + //MessageBoxA(NULL, m_selected_gem.c_str(), "Selected Gem", MB_OK); } + + void d2_tweaks::client::modules::loot_filter_settings_menu::register_misc_checkboxes() { - m_altonly = get_control("m_altonly"); - m_show_gold = get_control("m_show_gold"); - m_show_runes = get_control("m_show_runes"); - m_show_gems = get_control("m_show_gems"); + m_altonly = get_control("m_altonly"); + m_show_gold = get_control("m_show_gold"); + m_show_runes = get_control("m_show_runes"); + m_show_gems = get_control("m_show_gems"); - m_show_amethyst = get_control("m_show_amethyst"); - m_show_diamond = get_control("m_show_diamond"); - m_show_emerald = get_control("m_show_emerald"); - m_show_ruby = get_control("m_show_ruby"); - m_show_sapphire = get_control("m_show_sapphire"); - m_show_skull = get_control("m_show_skull"); - m_show_topaz = get_control("m_show_topaz"); + m_show_amethyst = get_control("m_show_amethyst"); + m_show_diamond = get_control("m_show_diamond"); + m_show_emerald = get_control("m_show_emerald"); + m_show_ruby = get_control("m_show_ruby"); + m_show_sapphire = get_control("m_show_sapphire"); + m_show_skull = get_control("m_show_skull"); + m_show_topaz = get_control("m_show_topaz"); - m_show_r01 = get_control("m_show_r01"); - m_show_r02 = get_control("m_show_r02"); - m_show_r03 = get_control("m_show_r03"); - m_show_r04 = get_control("m_show_r04"); - m_show_r05 = get_control("m_show_r05"); - m_show_r06 = get_control("m_show_r06"); - m_show_r07 = get_control("m_show_r07"); - m_show_r08 = get_control("m_show_r08"); - m_show_r09 = get_control("m_show_r09"); - m_show_r10 = get_control("m_show_r10"); - m_show_r11 = get_control("m_show_r11"); - m_show_r12 = get_control("m_show_r12"); - m_show_r13 = get_control("m_show_r13"); - m_show_r14 = get_control("m_show_r14"); - m_show_r15 = get_control("m_show_r15"); - m_show_r16 = get_control("m_show_r16"); - m_show_r17 = get_control("m_show_r17"); - m_show_r18 = get_control("m_show_r18"); - m_show_r19 = get_control("m_show_r19"); - m_show_r20 = get_control("m_show_r20"); - m_show_r21 = get_control("m_show_r21"); - m_show_r22 = get_control("m_show_r22"); - m_show_r23 = get_control("m_show_r23"); - m_show_r24 = get_control("m_show_r24"); - m_show_r25 = get_control("m_show_r25"); - m_show_r26 = get_control("m_show_r26"); - m_show_r27 = get_control("m_show_r27"); - m_show_r28 = get_control("m_show_r28"); - m_show_r29 = get_control("m_show_r29"); - m_show_r30 = get_control("m_show_r30"); - m_show_r31 = get_control("m_show_r31"); - m_show_r32 = get_control("m_show_r32"); - m_show_r33 = get_control("m_show_r33"); + m_show_r01 = get_control("m_show_r01"); + m_show_r02 = get_control("m_show_r02"); + m_show_r03 = get_control("m_show_r03"); + m_show_r04 = get_control("m_show_r04"); + m_show_r05 = get_control("m_show_r05"); + m_show_r06 = get_control("m_show_r06"); + m_show_r07 = get_control("m_show_r07"); + m_show_r08 = get_control("m_show_r08"); + m_show_r09 = get_control("m_show_r09"); + m_show_r10 = get_control("m_show_r10"); + m_show_r11 = get_control("m_show_r11"); + m_show_r12 = get_control("m_show_r12"); + m_show_r13 = get_control("m_show_r13"); + m_show_r14 = get_control("m_show_r14"); + m_show_r15 = get_control("m_show_r15"); + m_show_r16 = get_control("m_show_r16"); + m_show_r17 = get_control("m_show_r17"); + m_show_r18 = get_control("m_show_r18"); + m_show_r19 = get_control("m_show_r19"); + m_show_r20 = get_control("m_show_r20"); + m_show_r21 = get_control("m_show_r21"); + m_show_r22 = get_control("m_show_r22"); + m_show_r23 = get_control("m_show_r23"); + m_show_r24 = get_control("m_show_r24"); + m_show_r25 = get_control("m_show_r25"); + m_show_r26 = get_control("m_show_r26"); + m_show_r27 = get_control("m_show_r27"); + m_show_r28 = get_control("m_show_r28"); + m_show_r29 = get_control("m_show_r29"); + m_show_r30 = get_control("m_show_r30"); + m_show_r31 = get_control("m_show_r31"); + m_show_r32 = get_control("m_show_r32"); + m_show_r33 = get_control("m_show_r33"); - m_show_chipped = get_control("m_show_chipped"); - m_show_flawed = get_control("m_show_flawed"); - m_show_normal = get_control("m_show_normal"); - m_show_flawless = get_control("m_show_flawless"); - m_show_perfect = get_control("m_show_perfect"); + m_show_chipped = get_control("m_show_chipped"); + m_show_flawed = get_control("m_show_flawed"); + m_show_normal = get_control("m_show_normal"); + m_show_flawless = get_control("m_show_flawless"); + m_show_perfect = get_control("m_show_perfect"); // gems { if (m_show_amethyst) { - m_show_amethyst->set_state(loot_filter_settings::get().m_show_amethyst); - m_show_amethyst->set_on_click(std::bind(&loot_filter_settings_menu::extract_amethyst, - this, std::placeholders::_1)); + m_show_amethyst->set_on_click(std::bind(&loot_filter_settings_menu::gem_checkbox_clicked, this, "amethyst")); } - - if (m_show_diamond) { - m_show_diamond->set_state(loot_filter_settings::get().m_show_diamond); - m_show_diamond->set_on_click(std::bind(&loot_filter_settings_menu::extract_diamond, - this, std::placeholders::_1)); - } - - if (m_show_emerald) { - m_show_emerald->set_state(loot_filter_settings::get().m_show_emerald); - m_show_emerald->set_on_click(std::bind(&loot_filter_settings_menu::extract_emerald, - this, std::placeholders::_1)); - } - if (m_show_ruby) { - m_show_ruby->set_state(loot_filter_settings::get().m_show_ruby); - m_show_ruby->set_on_click(std::bind(&loot_filter_settings_menu::extract_ruby, - this, std::placeholders::_1)); + m_show_ruby->set_on_click(std::bind(&loot_filter_settings_menu::gem_checkbox_clicked, this, "ruby")); } - if (m_show_sapphire) { - m_show_sapphire->set_state(loot_filter_settings::get().m_show_sapphire); - m_show_sapphire->set_on_click(std::bind(&loot_filter_settings_menu::extract_sapphire, - this, std::placeholders::_1)); + m_show_sapphire->set_on_click(std::bind(&loot_filter_settings_menu::gem_checkbox_clicked, this, "sapphire")); } - - if (m_show_skull) { - m_show_skull->set_state(loot_filter_settings::get().m_show_skull); - m_show_skull->set_on_click(std::bind(&loot_filter_settings_menu::extract_skull, - this, std::placeholders::_1)); + if (m_show_emerald) { + m_show_emerald->set_on_click(std::bind(&loot_filter_settings_menu::gem_checkbox_clicked, this, "emerald")); + } + if (m_show_diamond) { + m_show_diamond->set_on_click(std::bind(&loot_filter_settings_menu::gem_checkbox_clicked, this, "diamond")); } - if (m_show_topaz) { - m_show_topaz->set_state(loot_filter_settings::get().m_show_topaz); - m_show_topaz->set_on_click(std::bind(&loot_filter_settings_menu::extract_topaz, - this, std::placeholders::_1)); + m_show_topaz->set_on_click(std::bind(&loot_filter_settings_menu::gem_checkbox_clicked, this, "topaz")); } + if (m_show_skull) { + m_show_skull->set_on_click(std::bind(&loot_filter_settings_menu::gem_checkbox_clicked, this, "skull")); + } + } @@ -349,7 +358,7 @@ void d2_tweaks::client::modules::loot_filter_settings_menu::register_misc_checkb this, std::placeholders::_1)); } - + } // runes @@ -557,48 +566,48 @@ void d2_tweaks::client::modules::loot_filter_settings_menu::register_misc_checkb - if (m_altonly) { - m_altonly->set_state(loot_filter_settings::get().alt_only); - m_altonly->set_on_click(std::bind(&loot_filter_settings_menu::update_alt_only, - this, std::placeholders::_1)); - } + if (m_altonly) { + m_altonly->set_state(loot_filter_settings::get().alt_only); + m_altonly->set_on_click(std::bind(&loot_filter_settings_menu::update_alt_only, + this, std::placeholders::_1)); + } - if (m_show_gold) { - m_show_gold->set_state(loot_filter_settings::get().show_gold); - m_show_gold->set_on_click(std::bind(&loot_filter_settings_menu::update_show_gold, - this, std::placeholders::_1)); - } + if (m_show_gold) { + m_show_gold->set_state(loot_filter_settings::get().show_gold); + m_show_gold->set_on_click(std::bind(&loot_filter_settings_menu::update_show_gold, + this, std::placeholders::_1)); + } - if (m_show_runes) { - m_show_runes->set_state(loot_filter_settings::get().show_runes); - m_show_runes->set_on_click(std::bind(&loot_filter_settings_menu::update_show_runes, - this, std::placeholders::_1)); - } + if (m_show_runes) { + m_show_runes->set_state(loot_filter_settings::get().show_runes); + m_show_runes->set_on_click(std::bind(&loot_filter_settings_menu::update_show_runes, + this, std::placeholders::_1)); + } - if (m_show_gems) { - m_show_gems->set_state(loot_filter_settings::get().show_gems); - m_show_gems->set_on_click(std::bind(&loot_filter_settings_menu::update_show_gems, - this, std::placeholders::_1)); - } + if (m_show_gems) { + m_show_gems->set_state(loot_filter_settings::get().show_gems); + m_show_gems->set_on_click(std::bind(&loot_filter_settings_menu::update_show_gems, + this, std::placeholders::_1)); + } } void d2_tweaks::client::modules::loot_filter_settings_menu::register_quality_checkboxes() { - using namespace diablo2::structures; + using namespace diablo2::structures; - register_quality_checkbox("m_inferior", item_quality_t::ITEM_QUALITY_INFERIOR); - register_quality_checkbox("m_normal", item_quality_t::ITEM_QUALITY_NORMAL); - register_quality_checkbox("m_superior", item_quality_t::ITEM_QUALITY_SUPERIOR); - register_quality_checkbox("m_magic", item_quality_t::ITEM_QUALITY_MAGIC); - register_quality_checkbox("m_set", item_quality_t::ITEM_QUALITY_SET); - register_quality_checkbox("m_rare", item_quality_t::ITEM_QUALITY_RARE); - register_quality_checkbox("m_unique", item_quality_t::ITEM_QUALITY_UNIQUE); - register_quality_checkbox("m_crafted", item_quality_t::ITEM_QUALITY_CRAFTED); - register_quality_checkbox("m_tempered", item_quality_t::ITEM_QUALITY_TEMPERED); + register_quality_checkbox("m_inferior", item_quality_t::ITEM_QUALITY_INFERIOR); + register_quality_checkbox("m_normal", item_quality_t::ITEM_QUALITY_NORMAL); + register_quality_checkbox("m_superior", item_quality_t::ITEM_QUALITY_SUPERIOR); + register_quality_checkbox("m_magic", item_quality_t::ITEM_QUALITY_MAGIC); + register_quality_checkbox("m_set", item_quality_t::ITEM_QUALITY_SET); + register_quality_checkbox("m_rare", item_quality_t::ITEM_QUALITY_RARE); + register_quality_checkbox("m_unique", item_quality_t::ITEM_QUALITY_UNIQUE); + register_quality_checkbox("m_crafted", item_quality_t::ITEM_QUALITY_CRAFTED); + register_quality_checkbox("m_tempered", item_quality_t::ITEM_QUALITY_TEMPERED); } void d2_tweaks::client::modules::loot_filter_settings_menu::update_alt_only(bool value) { - loot_filter_settings::get().alt_only = value; - loot_filter_settings::get().save(diablo2::d2_client::get_local_player_name()); + loot_filter_settings::get().alt_only = value; + loot_filter_settings::get().save(diablo2::d2_client::get_local_player_name()); } @@ -628,33 +637,413 @@ void d2_tweaks::client::modules::loot_filter_settings_menu::extract_topaz(bool v // qualities extraction functions void d2_tweaks::client::modules::loot_filter_settings_menu::extract_chipped(bool value) { - if (value) { - // Checkbox is checked - // Perform actions when the checkbox is checked + uint32_t gemCode; + int gemPropRowID; + diablo2::unit_stats_t stat; + + if (m_selected_gem == "amethyst") { + gemCode = 'gcv '; + gemPropRowID = 382; + stat = diablo2::UNIT_STAT_gembag_Amethyst; - MessageBoxA(NULL, value ? "Checked" : "Unchecked", "Checkbox value true", MB_OK); } - else { - // Checkbox is unchecked - // Perform actions when the checkbox is unchecked - MessageBoxA(NULL, value ? "Checked" : "Unchecked", "Checkbox value false", MB_OK); + else if (m_selected_gem == "ruby") { + gemCode = 'gcr '; + gemPropRowID = 381; + stat = diablo2::UNIT_STAT_gembag_Ruby; } + else if (m_selected_gem == "sapphire") { + gemCode = 'gcb '; + gemPropRowID = 385; + stat = diablo2::UNIT_STAT_gembag_Sapphire; + } + else if (m_selected_gem == "emerald") { + gemCode = 'gcg '; + gemPropRowID = 384; + stat = diablo2::UNIT_STAT_gembag_Emerald; + } + else if (m_selected_gem == "diamond") { + gemCode = 'gcw '; + gemPropRowID = 383; + stat = diablo2::UNIT_STAT_gembag_Diamond; + } + else if (m_selected_gem == "topaz") { + gemCode = 'gcy '; + gemPropRowID = 386; + stat = diablo2::UNIT_STAT_gembag_Topaz; + } + else if (m_selected_gem == "skull") { + gemCode = 'skc '; + gemPropRowID = 387; + stat = diablo2::UNIT_STAT_gembag_Skull; + } + + loot_filter_settings::get().m_show_chipped = value; + auto player = diablo2::d2_client::get_local_player(); + auto inventory = player->inventory; + diablo2::structures::unit* bag; + uint32_t bagGuid; + uint32_t statValue; + for (auto item = inventory->first_item; item != nullptr; item = item->item_data->pt_next_item) { + const auto record = diablo2::d2_common::get_item_record(item->data_record_index); + auto recordType = diablo2::d2_common::get_item_type_record(record->type); + char* normCode1 = record->string_code; + if (strncmp(normCode1, "ib1", 3) == 0) { + bag = item; + bagGuid = item->guid; + // get item stat + statValue = diablo2::d2_common::get_stat(item, stat, NULL); + } + } + + + // dump out gemPropRowID in a messagebox + std::string gemPropRowIDStr = std::to_string(gemPropRowID); + MessageBoxA(NULL, gemPropRowIDStr.c_str(), "gemPropRowID Client side", MB_OK); + + if (statValue > 1) { + // Create the packet + static d2_tweaks::common::item_move_cs packet; + packet.item_guid = bagGuid; + packet.bag_guid = bagGuid; + packet.target_page = 0; + packet.extract = 1; + packet.val = 1; + packet.prop = gemPropRowID - 3; + packet.iCode = gemCode; + diablo2::d2_client::send_to_server(&packet, sizeof packet); + D2PropertyStrc itemProperty = {}; + itemProperty.nProperty = gemPropRowID - 3; // Adjust the property ID + itemProperty.nLayer = 0; + itemProperty.nMin = -1; + itemProperty.nMax = -1; + diablo2::d2_common::add_property(bag, &itemProperty, 0); + } + + + } void d2_tweaks::client::modules::loot_filter_settings_menu::extract_flawed(bool value) { - // Implementation goes here + uint32_t gemCode; + int gemPropRowID; + diablo2::unit_stats_t stat; + + if (m_selected_gem == "amethyst") { + gemCode = 'gfv '; + gemPropRowID = 382; + stat = diablo2::UNIT_STAT_gembag_Amethyst; + + } + else if (m_selected_gem == "ruby") { + gemCode = 'gfr '; + gemPropRowID = 381; + stat = diablo2::UNIT_STAT_gembag_Ruby; + } + else if (m_selected_gem == "sapphire") { + gemCode = 'gfb '; + gemPropRowID = 385; + stat = diablo2::UNIT_STAT_gembag_Sapphire; + } + else if (m_selected_gem == "emerald") { + gemCode = 'gfg '; + gemPropRowID = 384; + stat = diablo2::UNIT_STAT_gembag_Emerald; + } + else if (m_selected_gem == "diamond") { + gemCode = 'gfw '; + gemPropRowID = 383; + stat = diablo2::UNIT_STAT_gembag_Diamond; + } + else if (m_selected_gem == "topaz") { + gemCode = 'gfy '; + gemPropRowID = 386; + stat = diablo2::UNIT_STAT_gembag_Topaz; + } + else if (m_selected_gem == "skull") { + gemCode = 'skf '; + gemPropRowID = 387; + stat = diablo2::UNIT_STAT_gembag_Skull; + } + + loot_filter_settings::get().m_show_chipped = value; + auto player = diablo2::d2_client::get_local_player(); + auto inventory = player->inventory; + diablo2::structures::unit* bag; + uint32_t bagGuid; + uint32_t statValue; + for (auto item = inventory->first_item; item != nullptr; item = item->item_data->pt_next_item) { + const auto record = diablo2::d2_common::get_item_record(item->data_record_index); + auto recordType = diablo2::d2_common::get_item_type_record(record->type); + char* normCode1 = record->string_code; + if (strncmp(normCode1, "ib1", 3) == 0) { + bag = item; + bagGuid = item->guid; + // get item stat + statValue = diablo2::d2_common::get_stat(item, stat, NULL); + } + } + + // dump out gemPropRowID in a messagebox + std::string gemPropRowIDStr = std::to_string(gemPropRowID); + MessageBoxA(NULL, gemPropRowIDStr.c_str(), "gemPropRowID Client side", MB_OK); + + if (statValue > 3) { + // Create the packet + static d2_tweaks::common::item_move_cs packet; + packet.item_guid = bagGuid; + packet.bag_guid = bagGuid; + packet.target_page = 0; + packet.extract = 1; + packet.prop = gemPropRowID - 3; + packet.val = 3; + packet.iCode = gemCode; + diablo2::d2_client::send_to_server(&packet, sizeof packet); + D2PropertyStrc itemProperty = {}; + itemProperty.nProperty = gemPropRowID - 3; // Adjust the property ID + itemProperty.nLayer = 0; + itemProperty.nMin = -3; + itemProperty.nMax = -3; + diablo2::d2_common::add_property(bag, &itemProperty, 0); + } + } void d2_tweaks::client::modules::loot_filter_settings_menu::extract_normal(bool value) { - // Implementation goes here + uint32_t gemCode; + int gemPropRowID; + diablo2::unit_stats_t stat; + + if (m_selected_gem == "amethyst") { + gemCode = 'gsv '; + gemPropRowID = 382; + stat = diablo2::UNIT_STAT_gembag_Amethyst; + + } + else if (m_selected_gem == "ruby") { + gemCode = 'gsr '; + gemPropRowID = 381; + stat = diablo2::UNIT_STAT_gembag_Ruby; + } + else if (m_selected_gem == "sapphire") { + gemCode = 'gsb '; + gemPropRowID = 385; + stat = diablo2::UNIT_STAT_gembag_Sapphire; + } + else if (m_selected_gem == "emerald") { + gemCode = 'gsg '; + gemPropRowID = 384; + stat = diablo2::UNIT_STAT_gembag_Emerald; + } + else if (m_selected_gem == "diamond") { + gemCode = 'gsw '; + gemPropRowID = 383; + stat = diablo2::UNIT_STAT_gembag_Diamond; + } + else if (m_selected_gem == "topaz") { + gemCode = 'gsy '; + gemPropRowID = 386; + stat = diablo2::UNIT_STAT_gembag_Topaz; + } + else if (m_selected_gem == "skull") { + gemCode = 'sku '; + gemPropRowID = 387; + stat = diablo2::UNIT_STAT_gembag_Skull; + } + + loot_filter_settings::get().m_show_chipped = value; + auto player = diablo2::d2_client::get_local_player(); + auto inventory = player->inventory; + diablo2::structures::unit* bag; + uint32_t bagGuid; + uint32_t statValue; + for (auto item = inventory->first_item; item != nullptr; item = item->item_data->pt_next_item) { + const auto record = diablo2::d2_common::get_item_record(item->data_record_index); + auto recordType = diablo2::d2_common::get_item_type_record(record->type); + char* normCode1 = record->string_code; + if (strncmp(normCode1, "ib1", 3) == 0) { + bag = item; + bagGuid = item->guid; + // get item stat + statValue = diablo2::d2_common::get_stat(item, stat, NULL); + } + } + if (statValue > 9) { + // Create the packet + static d2_tweaks::common::item_move_cs packet; + packet.item_guid = bagGuid; + packet.bag_guid = bagGuid; + packet.target_page = 0; + packet.extract = 1; + packet.val = 9; + packet.prop = gemPropRowID - 3; + packet.iCode = gemCode; + diablo2::d2_client::send_to_server(&packet, sizeof packet); + D2PropertyStrc itemProperty = {}; + itemProperty.nProperty = gemPropRowID - 3; // Adjust the property ID + itemProperty.nLayer = 0; + itemProperty.nMin = -9; + itemProperty.nMax = -9; + diablo2::d2_common::add_property(bag, &itemProperty, 0); + } } void d2_tweaks::client::modules::loot_filter_settings_menu::extract_flawless(bool value) { - // Implementation goes here + uint32_t gemCode; + int gemPropRowID; + diablo2::unit_stats_t stat; + + if (m_selected_gem == "amethyst") { + gemCode = 'gzv '; + gemPropRowID = 382; + stat = diablo2::UNIT_STAT_gembag_Amethyst; + + } + else if (m_selected_gem == "ruby") { + gemCode = 'glr '; + gemPropRowID = 381; + stat = diablo2::UNIT_STAT_gembag_Ruby; + } + else if (m_selected_gem == "sapphire") { + gemCode = 'glb '; + gemPropRowID = 385; + stat = diablo2::UNIT_STAT_gembag_Sapphire; + } + else if (m_selected_gem == "emerald") { + gemCode = 'glg '; + gemPropRowID = 384; + stat = diablo2::UNIT_STAT_gembag_Emerald; + } + else if (m_selected_gem == "diamond") { + gemCode = 'glw '; + gemPropRowID = 383; + stat = diablo2::UNIT_STAT_gembag_Diamond; + } + else if (m_selected_gem == "topaz") { + gemCode = 'gly '; + gemPropRowID = 386; + stat = diablo2::UNIT_STAT_gembag_Topaz; + } + else if (m_selected_gem == "skull") { + gemCode = 'skl '; + gemPropRowID = 387; + stat = diablo2::UNIT_STAT_gembag_Skull; + } + + loot_filter_settings::get().m_show_chipped = value; + auto player = diablo2::d2_client::get_local_player(); + auto inventory = player->inventory; + diablo2::structures::unit* bag; + uint32_t bagGuid; + uint32_t statValue; + for (auto item = inventory->first_item; item != nullptr; item = item->item_data->pt_next_item) { + const auto record = diablo2::d2_common::get_item_record(item->data_record_index); + auto recordType = diablo2::d2_common::get_item_type_record(record->type); + char* normCode1 = record->string_code; + if (strncmp(normCode1, "ib1", 3) == 0) { + bag = item; + bagGuid = item->guid; + // get item stat + statValue = diablo2::d2_common::get_stat(item, stat, NULL); + } + } + if (statValue > 27) { + // Create the packet + static d2_tweaks::common::item_move_cs packet; + packet.item_guid = bagGuid; + packet.bag_guid = bagGuid; + packet.target_page = 0; + packet.extract = 1; + packet.val = 27; + packet.prop = gemPropRowID - 3; + packet.iCode = gemCode; + diablo2::d2_client::send_to_server(&packet, sizeof packet); + D2PropertyStrc itemProperty = {}; + itemProperty.nProperty = gemPropRowID - 3; // Adjust the property ID + itemProperty.nLayer = 0; + itemProperty.nMin = -27; + itemProperty.nMax = -27; + diablo2::d2_common::add_property(bag, &itemProperty, 0); + } } void d2_tweaks::client::modules::loot_filter_settings_menu::extract_perfect(bool value) { - // Implementation goes here + uint32_t gemCode; + int gemPropRowID; + diablo2::unit_stats_t stat; + + if (m_selected_gem == "amethyst") { + gemCode = 'gpv '; + gemPropRowID = 382; + stat = diablo2::UNIT_STAT_gembag_Amethyst; + + } + else if (m_selected_gem == "ruby") { + gemCode = 'gpr '; + gemPropRowID = 381; + stat = diablo2::UNIT_STAT_gembag_Ruby; + } + else if (m_selected_gem == "sapphire") { + gemCode = 'gpb '; + gemPropRowID = 385; + stat = diablo2::UNIT_STAT_gembag_Sapphire; + } + else if (m_selected_gem == "emerald") { + gemCode = 'gpg '; + gemPropRowID = 384; + stat = diablo2::UNIT_STAT_gembag_Emerald; + } + else if (m_selected_gem == "diamond") { + gemCode = 'gpw '; + gemPropRowID = 383; + stat = diablo2::UNIT_STAT_gembag_Diamond; + } + else if (m_selected_gem == "topaz") { + gemCode = 'gpy '; + gemPropRowID = 386; + stat = diablo2::UNIT_STAT_gembag_Topaz; + } + else if (m_selected_gem == "skull") { + gemCode = 'skz '; + gemPropRowID = 387; + stat = diablo2::UNIT_STAT_gembag_Skull; + } + + loot_filter_settings::get().m_show_chipped = value; + auto player = diablo2::d2_client::get_local_player(); + auto inventory = player->inventory; + diablo2::structures::unit* bag; + uint32_t bagGuid; + uint32_t statValue; + for (auto item = inventory->first_item; item != nullptr; item = item->item_data->pt_next_item) { + const auto record = diablo2::d2_common::get_item_record(item->data_record_index); + auto recordType = diablo2::d2_common::get_item_type_record(record->type); + char* normCode1 = record->string_code; + if (strncmp(normCode1, "ib1", 3) == 0) { + bag = item; + bagGuid = item->guid; + // get item stat + statValue = diablo2::d2_common::get_stat(item, stat, NULL); + } + } + if (statValue > 81) { + // Create the packet + static d2_tweaks::common::item_move_cs packet; + packet.item_guid = bagGuid; + packet.bag_guid = bagGuid; + packet.target_page = 0; + packet.extract = 1; + packet.val = 81; + packet.prop = gemPropRowID - 3; + packet.iCode = gemCode; + diablo2::d2_client::send_to_server(&packet, sizeof packet); + D2PropertyStrc itemProperty = {}; + itemProperty.nProperty = gemPropRowID - 3; // Adjust the property ID + itemProperty.nLayer = 0; + itemProperty.nMin = -81; + itemProperty.nMax = -81; + diablo2::d2_common::add_property(bag, &itemProperty, 0); + } } @@ -1855,250 +2244,250 @@ void d2_tweaks::client::modules::loot_filter_settings_menu::extract_r33(bool val void d2_tweaks::client::modules::loot_filter_settings_menu::update_show_gold(bool value) { - loot_filter_settings::get().show_gold = value; - loot_filter_settings::get().save(diablo2::d2_client::get_local_player_name()); + loot_filter_settings::get().show_gold = value; + loot_filter_settings::get().save(diablo2::d2_client::get_local_player_name()); } void d2_tweaks::client::modules::loot_filter_settings_menu::update_show_runes(bool value) { - loot_filter_settings::get().show_runes = value; - loot_filter_settings::get().save(diablo2::d2_client::get_local_player_name()); + loot_filter_settings::get().show_runes = value; + loot_filter_settings::get().save(diablo2::d2_client::get_local_player_name()); } void d2_tweaks::client::modules::loot_filter_settings_menu::update_show_gems(bool value) { - loot_filter_settings::get().show_gems = value; - loot_filter_settings::get().save(diablo2::d2_client::get_local_player_name()); + loot_filter_settings::get().show_gems = value; + loot_filter_settings::get().save(diablo2::d2_client::get_local_player_name()); } void d2_tweaks::client::modules::loot_filter_settings_menu::update_quality_allowance(bool value, - diablo2::structures::item_quality_t quality) { - loot_filter_settings::get().quality_settings[static_cast(quality)] = value; - loot_filter_settings::get().save(diablo2::d2_client::get_local_player_name()); + diablo2::structures::item_quality_t quality) { + loot_filter_settings::get().quality_settings[static_cast(quality)] = value; + loot_filter_settings::get().save(diablo2::d2_client::get_local_player_name()); } void d2_tweaks::client::modules::loot_filter_settings_menu::register_quality_checkbox(const std::string& name, - diablo2::structures::item_quality_t quality) { - auto control = get_control(name); + diablo2::structures::item_quality_t quality) { + auto control = get_control(name); - if (!control) - return; + if (!control) + return; - control->set_state(loot_filter_settings::get().quality_settings[static_cast(quality)]); - control->set_on_click(std::bind(&loot_filter_settings_menu::update_quality_allowance, - this, std::placeholders::_1, quality)); + control->set_state(loot_filter_settings::get().quality_settings[static_cast(quality)]); + control->set_on_click(std::bind(&loot_filter_settings_menu::update_quality_allowance, + this, std::placeholders::_1, quality)); } void d2_tweaks::client::modules::loot_filter_settings_menu::setup_hooks() { - m_handle_dropped_items_original = - static_cast(hooking::get_call( - diablo2::d2_client::get_base() + 0x1641B)); - m_draw_dropped_items_names_original = - static_cast(hooking::get_call( - diablo2::d2_client::get_base() + 0x81BF5)); + m_handle_dropped_items_original = + static_cast(hooking::get_call( + diablo2::d2_client::get_base() + 0x1641B)); + m_draw_dropped_items_names_original = + static_cast(hooking::get_call( + diablo2::d2_client::get_base() + 0x81BF5)); - hooking::set_call(diablo2::d2_client::get_base() + 0x81BF5, draw_dropped_items_names); - hooking::set_call(diablo2::d2_client::get_base() + 0x1641B, handle_dropped_items); + hooking::set_call(diablo2::d2_client::get_base() + 0x81BF5, draw_dropped_items_names); + hooking::set_call(diablo2::d2_client::get_base() + 0x1641B, handle_dropped_items); - setup_alt_hook(); + setup_alt_hook(); } void d2_tweaks::client::modules::loot_filter_settings_menu::setup_alt_hook() const { - asm_code asmCode; - asmCode.add({ 0x83, 0x7D, 0x00, 0x04 }); //cmp dword ptr [ebp+0], 4 - asmCode.add({ 0x0F, 0x85 }, - new asm_address_relative(2, 6, diablo2::d2_client::get_base() + 0x6A399)); //jnz D2Client.dll+6A399 + asm_code asmCode; + asmCode.add({ 0x83, 0x7D, 0x00, 0x04 }); //cmp dword ptr [ebp+0], 4 + asmCode.add({ 0x0F, 0x85 }, + new asm_address_relative(2, 6, diablo2::d2_client::get_base() + 0x6A399)); //jnz D2Client.dll+6A399 - asmCode.add({ 0x56 }); //push esi - asmCode.add({ 0xB8 }, new asm_address_static(1, check_alt_item)); //mov eax, check_alt_item - asmCode.add({ 0x8B, 0xCD }); //mov ecx, ebp - asmCode.add({ 0xFF, 0xD0 }); //call eax - asmCode.add({ 0x5E }); //pop esi + asmCode.add({ 0x56 }); //push esi + asmCode.add({ 0xB8 }, new asm_address_static(1, check_alt_item)); //mov eax, check_alt_item + asmCode.add({ 0x8B, 0xCD }); //mov ecx, ebp + asmCode.add({ 0xFF, 0xD0 }); //call eax + asmCode.add({ 0x5E }); //pop esi - asmCode.add({ 0x84, 0xC0 }); //test al, al - asmCode.add({ 0x0F, 0x84 }, - new asm_address_relative(2, 6, diablo2::d2_client::get_base() + 0x6A399)); //je D2Client.dll+6A399 - asmCode.add({ 0xE9 }, - new asm_address_relative(1, 5, diablo2::d2_client::get_base() + 0x6A027)); //jmp D2Client.dll+6A027 + asmCode.add({ 0x84, 0xC0 }); //test al, al + asmCode.add({ 0x0F, 0x84 }, + new asm_address_relative(2, 6, diablo2::d2_client::get_base() + 0x6A399)); //je D2Client.dll+6A399 + asmCode.add({ 0xE9 }, + new asm_address_relative(1, 5, diablo2::d2_client::get_base() + 0x6A027)); //jmp D2Client.dll+6A027 - auto addr = diablo2::d2_client::get_base() + 0x6A022; + auto addr = diablo2::d2_client::get_base() + 0x6A022; - DWORD old_protect; - VirtualProtect(addr, 5, PAGE_EXECUTE_READWRITE, &old_protect); + DWORD old_protect; + VirtualProtect(addr, 5, PAGE_EXECUTE_READWRITE, &old_protect); - memset(addr, 0x90, 10); - *reinterpret_cast(addr) = 0xE9; - *reinterpret_cast(static_cast(addr) + 1) = - reinterpret_cast(asmCode.get_code()) - reinterpret_cast(addr) - 5; + memset(addr, 0x90, 10); + *reinterpret_cast(addr) = 0xE9; + *reinterpret_cast(static_cast(addr) + 1) = + reinterpret_cast(asmCode.get_code()) - reinterpret_cast(addr) - 5; - VirtualProtect(addr, 5, old_protect, &old_protect); + VirtualProtect(addr, 5, old_protect, &old_protect); } bool d2_tweaks::client::modules::loot_filter_settings_menu::is_gold(diablo2::structures::unit* item) { - static auto goldRecordIndex = -1; + static auto goldRecordIndex = -1; - if (item == nullptr) - return false; + if (item == nullptr) + return false; - if (item->type != diablo2::structures::unit_type_t::UNIT_TYPE_ITEM) - return false; + if (item->type != diablo2::structures::unit_type_t::UNIT_TYPE_ITEM) + return false; - if (item->item_data == nullptr) - return false; + if (item->item_data == nullptr) + return false; - if (goldRecordIndex == -1) { - auto record = diablo2::d2_common::get_item_record(item->data_record_index); + if (goldRecordIndex == -1) { + auto record = diablo2::d2_common::get_item_record(item->data_record_index); - if (record->string_code[0] == 'g' && - record->string_code[1] == 'l' && - record->string_code[2] == 'd') { //Gold pile - goldRecordIndex = item->data_record_index; - } - } + if (record->string_code[0] == 'g' && + record->string_code[1] == 'l' && + record->string_code[2] == 'd') { //Gold pile + goldRecordIndex = item->data_record_index; + } + } - return item->data_record_index == goldRecordIndex; + return item->data_record_index == goldRecordIndex; } bool d2_tweaks::client::modules::loot_filter_settings_menu::is_rune(diablo2::structures::unit* item) { - static auto runeTypeId = -1; + static auto runeTypeId = -1; - if (item == nullptr) - return false; + if (item == nullptr) + return false; - if (item->type != diablo2::structures::unit_type_t::UNIT_TYPE_ITEM) - return false; + if (item->type != diablo2::structures::unit_type_t::UNIT_TYPE_ITEM) + return false; - if (item->item_data == nullptr) - return false; + if (item->item_data == nullptr) + return false; - const auto record = diablo2::d2_common::get_item_record(item->data_record_index); + const auto record = diablo2::d2_common::get_item_record(item->data_record_index); - if (runeTypeId == -1) { - const auto itemTypeRecord = diablo2::d2_common::get_item_type_record(record->type); + if (runeTypeId == -1) { + const auto itemTypeRecord = diablo2::d2_common::get_item_type_record(record->type); - const auto code = itemTypeRecord->code; + const auto code = itemTypeRecord->code; - if (code[0] == 'r' && - code[1] == 'u' && - code[2] == 'n' && - code[3] == 'e') { - runeTypeId = record->type; - } - } + if (code[0] == 'r' && + code[1] == 'u' && + code[2] == 'n' && + code[3] == 'e') { + runeTypeId = record->type; + } + } - return record->type == runeTypeId; + return record->type == runeTypeId; } bool d2_tweaks::client::modules::loot_filter_settings_menu::is_gem(diablo2::structures::unit* item) { - static auto gemTypeId = -1; + static auto gemTypeId = -1; - if (item == nullptr) - return false; + if (item == nullptr) + return false; - if (item->type != diablo2::structures::unit_type_t::UNIT_TYPE_ITEM) - return false; + if (item->type != diablo2::structures::unit_type_t::UNIT_TYPE_ITEM) + return false; - if (item->item_data == nullptr) - return false; + if (item->item_data == nullptr) + return false; - const auto record = diablo2::d2_common::get_item_record(item->data_record_index); + const auto record = diablo2::d2_common::get_item_record(item->data_record_index); - if (gemTypeId == -1) { - const auto itemTypeRecord = diablo2::d2_common::get_item_type_record(record->type); + if (gemTypeId == -1) { + const auto itemTypeRecord = diablo2::d2_common::get_item_type_record(record->type); - const auto code = itemTypeRecord->code; + const auto code = itemTypeRecord->code; - if (code[0] == 'g' && - code[1] == 'e' && - code[2] == 'm') { - gemTypeId = record->type; - } - } + if (code[0] == 'g' && + code[1] == 'e' && + code[2] == 'm') { + gemTypeId = record->type; + } + } - return record->type == gemTypeId; + return record->type == gemTypeId; } bool d2_tweaks::client::modules::loot_filter_settings_menu::check_alt_item(diablo2::structures::unit* unit) { - static auto& instance = singleton::instance(); + static auto& instance = singleton::instance(); - if (!unit || unit->type != diablo2::structures::unit_type_t::UNIT_TYPE_ITEM) { - return true; - } + if (!unit || unit->type != diablo2::structures::unit_type_t::UNIT_TYPE_ITEM) { + return true; + } - if (unit->item_data == nullptr) { - return true; - } + if (unit->item_data == nullptr) { + return true; + } - if (is_gold(unit)) - return instance.m_show_gold && instance.m_show_gold->get_state(); + if (is_gold(unit)) + return instance.m_show_gold && instance.m_show_gold->get_state(); - if (is_rune(unit)) - return instance.m_show_runes && instance.m_show_runes->get_state(); + if (is_rune(unit)) + return instance.m_show_runes && instance.m_show_runes->get_state(); - if (is_gem(unit)) - return instance.m_show_gems && instance.m_show_gems->get_state(); + if (is_gem(unit)) + return instance.m_show_gems && instance.m_show_gems->get_state(); - return loot_filter_settings::get().quality_settings[static_cast(unit->item_data->quality)]; + return loot_filter_settings::get().quality_settings[static_cast(unit->item_data->quality)]; } void d2_tweaks::client::modules::loot_filter_settings_menu::draw_dropped_items_names(diablo2::structures::unit* unit, - void* edx) { - static auto& instance = singleton::instance(); + void* edx) { + static auto& instance = singleton::instance(); - if (!unit || unit->type != diablo2::structures::unit_type_t::UNIT_TYPE_ITEM) { - instance.m_draw_dropped_items_names_original(unit, edx); - return; - } + if (!unit || unit->type != diablo2::structures::unit_type_t::UNIT_TYPE_ITEM) { + instance.m_draw_dropped_items_names_original(unit, edx); + return; + } - if (unit->item_data == nullptr) { - instance.m_draw_dropped_items_names_original(unit, edx); - return; - } + if (unit->item_data == nullptr) { + instance.m_draw_dropped_items_names_original(unit, edx); + return; + } - if (instance.m_altonly && instance.m_altonly->get_state()) - return; + if (instance.m_altonly && instance.m_altonly->get_state()) + return; - if (is_gold(unit) && instance.m_show_gold && !instance.m_show_gold->get_state()) - return; + if (is_gold(unit) && instance.m_show_gold && !instance.m_show_gold->get_state()) + return; - if (is_rune(unit) && instance.m_show_runes && !instance.m_show_runes->get_state()) - return; + if (is_rune(unit) && instance.m_show_runes && !instance.m_show_runes->get_state()) + return; - if (is_gem(unit) && instance.m_show_gems && !instance.m_show_gems->get_state()) - return; + if (is_gem(unit) && instance.m_show_gems && !instance.m_show_gems->get_state()) + return; - if (!loot_filter_settings::get().quality_settings[static_cast(unit->item_data->quality)]) - return; + if (!loot_filter_settings::get().quality_settings[static_cast(unit->item_data->quality)]) + return; - instance.m_draw_dropped_items_names_original(unit, edx); + instance.m_draw_dropped_items_names_original(unit, edx); } void d2_tweaks::client::modules::loot_filter_settings_menu::handle_dropped_items(diablo2::structures::unit* unit, - void* edx) { - static auto& instance = singleton::instance(); + void* edx) { + static auto& instance = singleton::instance(); - if (!unit || unit->type != diablo2::structures::unit_type_t::UNIT_TYPE_ITEM) { - instance.m_handle_dropped_items_original(unit, edx); - return; - } + if (!unit || unit->type != diablo2::structures::unit_type_t::UNIT_TYPE_ITEM) { + instance.m_handle_dropped_items_original(unit, edx); + return; + } - if (unit->item_data == nullptr) { - instance.m_handle_dropped_items_original(unit, edx); - return; - } + if (unit->item_data == nullptr) { + instance.m_handle_dropped_items_original(unit, edx); + return; + } - if (instance.m_altonly && instance.m_altonly->get_state()) - return; + if (instance.m_altonly && instance.m_altonly->get_state()) + return; - if (is_gold(unit) && instance.m_show_gold && !instance.m_show_gold->get_state()) - return; + if (is_gold(unit) && instance.m_show_gold && !instance.m_show_gold->get_state()) + return; - if (is_rune(unit) && instance.m_show_runes && !instance.m_show_runes->get_state()) - return; + if (is_rune(unit) && instance.m_show_runes && !instance.m_show_runes->get_state()) + return; - if (is_gem(unit) && instance.m_show_gems && !instance.m_show_gems->get_state()) - return; + if (is_gem(unit) && instance.m_show_gems && !instance.m_show_gems->get_state()) + return; - if (!loot_filter_settings::get().quality_settings[static_cast(unit->item_data->quality)]) - return; + if (!loot_filter_settings::get().quality_settings[static_cast(unit->item_data->quality)]) + return; - instance.m_handle_dropped_items_original(unit, edx); + instance.m_handle_dropped_items_original(unit, edx); } \ No newline at end of file diff --git a/src/d2tweaks/server/modules/item_move/item_move_server.cpp b/src/d2tweaks/server/modules/item_move/item_move_server.cpp index a7f492f..39abd41 100644 --- a/src/d2tweaks/server/modules/item_move/item_move_server.cpp +++ b/src/d2tweaks/server/modules/item_move/item_move_server.cpp @@ -80,10 +80,10 @@ bool d2_tweaks::server::modules::item_move::handle_packet(diablo2::structures::g //MessageBox(NULL, bag_guid.c_str(), "Bag GUID", MB_OK | MB_ICONINFORMATION); D2PropertyStrc itemProperty = {}; - itemProperty.nProperty = 388 - 3; // Adjust the property ID + itemProperty.nProperty = itemMove->prop - 3; // Adjust the property ID itemProperty.nLayer = 0; - itemProperty.nMin = -1; - itemProperty.nMax = -1; + itemProperty.nMin = itemMove->val; + itemProperty.nMax = itemMove->val; // Add the gem property to the gem bag diablo2::d2_common::add_property(bag, &itemProperty, 0); @@ -91,56 +91,56 @@ bool d2_tweaks::server::modules::item_move::handle_packet(diablo2::structures::g diablo2::d2_game::QUESTS_CreateItem(game, player, reverseDWORD(itemMove->iCode), 1, diablo2::structures::ITEMQUAL_NORMAL, true); return true; } - else + else if (itemMove->tmog == 1) { - // here we need to add item to inventory + // here we need to add item to inventory - const auto item = instance.get_server_unit(game, itemMove->item_guid, diablo2::structures::unit_type_t::UNIT_TYPE_ITEM); //0x4 = item + const auto item = instance.get_server_unit(game, itemMove->item_guid, diablo2::structures::unit_type_t::UNIT_TYPE_ITEM); //0x4 = item - diablo2::d2_game::D2GAME_Transmogrify_6FC4A660(game, player, item); + diablo2::d2_game::D2GAME_Transmogrify_6FC4A660(game, player, item); - diablo2::d2_game::QUESTS_CreateItem(game, player, reverseDWORD('gfv '), 1, diablo2::structures::ITEMQUAL_NORMAL, true); + diablo2::d2_game::QUESTS_CreateItem(game, player, reverseDWORD('gfv '), 1, diablo2::structures::ITEMQUAL_NORMAL, true); - } - else { - D2PropertyStrc itemProperty = {}; - itemProperty.nProperty = itemMove->prop; - itemProperty.nLayer = 0; - itemProperty.nMin = itemMove->val; - itemProperty.nMax = itemMove->val; - diablo2::d2_common::add_property(bag, &itemProperty, 1); + } + else { + D2PropertyStrc itemProperty = {}; + itemProperty.nProperty = itemMove->prop; + itemProperty.nLayer = 0; + itemProperty.nMin = itemMove->val; + itemProperty.nMax = itemMove->val; + diablo2::d2_common::add_property(bag, &itemProperty, 1); - if (item == nullptr) - return true; //block further packet processing + if (item == nullptr) + return true; //block further packet processing - const auto inventoryIndex = diablo2::d2_common::get_inventory_index(player, itemMove->target_page, game->item_format == 101); + const auto inventoryIndex = diablo2::d2_common::get_inventory_index(player, itemMove->target_page, game->item_format == 101); - uint32_t tx, ty; + uint32_t tx, ty; - if (!find_free_space(player->inventory, item, inventoryIndex, itemMove->target_page, tx, ty)) - return true; //block further packet processing + if (!find_free_space(player->inventory, item, inventoryIndex, itemMove->target_page, tx, ty)) + return true; //block further packet processing - //diablo2::d2_common::set_unit_mode(item, 0); // mode 4 - ïðåäìåò íåëüçÿ âçÿòü ìûøêîé èç èíâåíòàðÿ, mode 0 - îáû÷íûé ðåæèì + //diablo2::d2_common::set_unit_mode(item, 0); // mode 4 - ïðåäìåò íåëüçÿ âçÿòü ìûøêîé èç èíâåíòàðÿ, mode 0 - îáû÷íûé ðåæèì - item->item_data->page = itemMove->target_page; + item->item_data->page = itemMove->target_page; - diablo2::d2_common::inv_add_item(player->inventory, item, tx, ty, inventoryIndex, false, item->item_data->page); - diablo2::d2_common::inv_update_item(player->inventory, item, false); + diablo2::d2_common::inv_add_item(player->inventory, item, tx, ty, inventoryIndex, false, item->item_data->page); + diablo2::d2_common::inv_update_item(player->inventory, item, false); - diablo2::d2_game::update_inventory_items(game, player); + diablo2::d2_game::update_inventory_items(game, player); - //send update packet - resp.item_guid = itemMove->item_guid; - resp.target_page = itemMove->target_page; - resp.tx = tx; - resp.ty = ty; + //send update packet + resp.item_guid = itemMove->item_guid; + resp.target_page = itemMove->target_page; + resp.tx = tx; + resp.ty = ty; - const auto client = player->player_data->net_client; + const auto client = player->player_data->net_client; - diablo2::d2_net::send_to_client(1, client->client_id, &resp, sizeof resp); + diablo2::d2_net::send_to_client(1, client->client_id, &resp, sizeof resp); - return true; - } + return true; + } } bool d2_tweaks::server::modules::item_move::find_free_space(diablo2::structures::inventory* inv,