Skip to content

Commit

Permalink
Fixed bug causing armory to show wrong costume pieces and weapons ont…
Browse files Browse the repository at this point in the history
…o characters when closing toolbox
  • Loading branch information
3vcloud committed Sep 20, 2024
1 parent 700e856 commit e059427
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions GWToolboxdll/Windows/ArmoryWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ namespace GWArmory {
EquipmentSlotAction_pt UndrawAgentEquipment_Ret = nullptr;

bool gwarmory_setitem = false;
bool pending_reset_equipment = false;
bool pending_reset_equipment = true;

bool Reset();

Expand Down Expand Up @@ -594,6 +594,10 @@ namespace GWArmory {
if (equip != player_equip) {
return;
}
if (GetPlayerProfession() != current_profession) {
memset(original_armor_pieces, 0, sizeof(original_armor_pieces));
pending_reset_equipment = true;
}

drawn_pieces[equipment_slot] = equip->items[equipment_slot];
gwarmory_window_pieces[equipment_slot] = drawn_pieces[equipment_slot];
Expand Down Expand Up @@ -904,10 +908,6 @@ void ArmoryWindow::Draw(IDirect3DDevice9*)
if (!visible) {
return;
}
if (GetPlayerProfession() != current_profession) {
pending_reset_equipment = true;
}

if (pending_reset_equipment && Reset()) {
pending_reset_equipment = false;
}
Expand Down

0 comments on commit e059427

Please sign in to comment.