Latest fixes

This commit is contained in:
Hash Borgir 2024-05-10 00:19:14 -06:00
parent 058db50095
commit 4d21c90f5a
4 changed files with 17 additions and 8 deletions

View File

@ -158,9 +158,9 @@ void displayStat() {
// get the value of x , y, and z from the d2tweaks.ini file using getprofileint
int x = GetPrivateProfileInt("Options", "bagStatsx", 360, "d2tweaks.ini");
int y = GetPrivateProfileInt("Options", "bagStatsy", 25, "d2tweaks.ini");
int z = GetPrivateProfileInt("Options", "bagStatsz", 140, "d2tweaks.ini");
int x = GetPrivateProfileInt("BagStats", "x", 0, "./d2tweaks.ini");
int y = GetPrivateProfileInt("BagStats", "y", 0, "./d2tweaks.ini");
int z = GetPrivateProfileInt("BagStats", "spacer", 0, "./d2tweaks.ini");
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);
@ -304,10 +304,10 @@ void displayStat() {
diablo2::d2_win::draw_text(const_cast<wchar_t*>((std::to_wstring(gembag_Stones_TigerEye)).c_str()), x + z, y + 319 + textOffset, diablo2::UI_COLOR_YELLOW, 0);
diablo2::d2_win::set_current_font(diablo2::UI_FONT_24);
diablo2::d2_win::set_current_font(diablo2::UI_FONT_16);
// print a string using draw_text
diablo2::d2_win::draw_text(const_cast<wchar_t*>((L"Gem/Rune/Stone/Potion storage & extraction menu")), 10, 25, diablo2::UI_COLOR_YELLOW, 0);
// diablo2::d2_win::draw_text(const_cast<wchar_t*>((L"Gem/Rune/Stone/Potion Extract Menu")), 10, 25, diablo2::UI_COLOR_YELLOW, 0);
diablo2::d2_win::set_current_font(diablo2::UI_FONT_16);

View File

@ -253,7 +253,14 @@ void d2_tweaks::client::modules::loot_filter_settings_toggle_menu::draw() {
bool d2_tweaks::client::modules::loot_filter_settings_toggle_menu::key_event(uint32_t key, bool up) {
if (key == 'E' && up) {
// Read the key from the ./d2tweaks.ini file from [ExPanel] section, key: key
char keyBuffer[3];
GetPrivateProfileStringA("ExPanel", "key", "", keyBuffer, sizeof(keyBuffer), "./d2tweaks.ini");
// Convert the key character to uppercase for case-insensitive comparison
char configKey = toupper(keyBuffer[0]);
if (key == configKey && up) {
m_show = !m_show;
m_stats_enabled = !m_stats_enabled;
@ -262,9 +269,12 @@ bool d2_tweaks::client::modules::loot_filter_settings_toggle_menu::key_event(uin
m_btn_toggle_stats->set_enabled(true);
m_btn_toggle_stats->set_visible(true);
return true; // Block the key stroke
}
if (key == VK_ESCAPE && m_show) {
m_show = false;

View File

@ -96,7 +96,6 @@ bool d2_tweaks::server::modules::item_move::handle_packet(diablo2::structures::g
else if (itemMove->tmog == 1) {
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::QUESTS_CreateItem(game, player, reverseDWORD('gfv '), 1, diablo2::structures::ITEMQUAL_NORMAL, true);
}
else if (itemMove->updateBag == 1) {
D2PropertyStrc itemProperty = {};

View File

@ -150,7 +150,7 @@ const char* ITEMS_armor_and_weapons[] = {
"pa8", "pa9", "paa", "ne6", "ne7", "ne8", "ne9", "nea", "drb", "drc",
"drd", "dre", "drf", "bab", "bac", "bad", "bae", "baf", "pab", "pac",
"pad", "pae", "paf", "neb", "neg", "ned", "nee", "nef", "tor", "ooc",
"eaq", "ebq", "ib1", "ib3",
"eaq", "ebq", "ib1", "ib3", "aqv", "cqv"
// demon keys/chests
"dkr1", "dkr2", "dkr3", "dkr4", "dkr5", "da1", "db1", "dc1"