From 16f6a0019cde4407044622f4fc30a872cb816e51 Mon Sep 17 00:00:00 2001 From: BenDol Date: Tue, 30 Dec 2014 17:27:53 +1300 Subject: [PATCH] Fix dat loading issue with 10.00 & minor outfit window fix. --- .../game_combatcontrols/combatcontrols.lua | 3 ++- .../game_market/ui/general/marketbuttons.otui | 5 ----- modules/game_outfit/outfit.lua | 20 +++++++++---------- src/client/thingtype.cpp | 4 ++-- 4 files changed, 13 insertions(+), 19 deletions(-) diff --git a/modules/game_combatcontrols/combatcontrols.lua b/modules/game_combatcontrols/combatcontrols.lua index 85b4d02f..3e5b952c 100644 --- a/modules/game_combatcontrols/combatcontrols.lua +++ b/modules/game_combatcontrols/combatcontrols.lua @@ -15,7 +15,8 @@ fightModeRadioGroup = nil pvpModeRadioGroup = nil function init() - combatControlsButton = modules.client_topmenu.addRightGameToggleButton('combatControlsButton', tr('Combat Controls'), '/images/topbuttons/combatcontrols', toggle) + combatControlsButton = modules.client_topmenu.addRightGameToggleButton('combatControlsButton', + tr('Combat Controls'), '/images/topbuttons/combatcontrols', toggle) combatControlsButton:setOn(true) combatControlsWindow = g_ui.loadUI('combatcontrols', modules.game_interface.getRightPanel()) combatControlsWindow:disableResize() diff --git a/modules/game_market/ui/general/marketbuttons.otui b/modules/game_market/ui/general/marketbuttons.otui index 042269bc..ae61cadb 100644 --- a/modules/game_market/ui/general/marketbuttons.otui +++ b/modules/game_market/ui/general/marketbuttons.otui @@ -4,14 +4,9 @@ MarketButtonBox < ButtonBoxRounded size: 106 22 text-offset: 0 2 text-align: center - image-clip: 0 0 20 20 image-border: 2 - $hover !disabled: - image-clip: 0 20 20 20 - $checked: - image-clip: 0 40 20 20 color: white $disabled: diff --git a/modules/game_outfit/outfit.lua b/modules/game_outfit/outfit.lua index b9eab509..caaf642a 100644 --- a/modules/game_outfit/outfit.lua +++ b/modules/game_outfit/outfit.lua @@ -25,13 +25,17 @@ mountCreature = nil currentMount = 1 function init() - connect(g_game, { onOpenOutfitWindow = create, - onGameEnd = destroy }) + connect(g_game, { + onOpenOutfitWindow = create, + onGameEnd = destroy + }) end function terminate() - disconnect(g_game, { onOpenOutfitWindow = create, - onGameEnd = destroy }) + disconnect(g_game, { + onOpenOutfitWindow = create, + onGameEnd = destroy + }) destroy() end @@ -300,17 +304,11 @@ function updateOutfit() addon.widget:setChecked(false) addon.widget:setEnabled(false) end + outfit.addons = 0 if availableAddons > 0 then for _, i in pairs(ADDON_SETS[availableAddons]) do addons[i].widget:setEnabled(true) - end - end - - outfit.addons = 0 - for i = 1, #prevAddons do - local addon = prevAddons[i] - if addon and addons[i].widget:isEnabled() then addons[i].widget:setChecked(true) end end diff --git a/src/client/thingtype.cpp b/src/client/thingtype.cpp index b0524e74..b19e50d3 100644 --- a/src/client/thingtype.cpp +++ b/src/client/thingtype.cpp @@ -58,7 +58,7 @@ void ThingType::serialize(const FileStreamPtr& fin) attr = ThingAttrWritable; else if(attr >= ThingAttrWritable) attr += 1; - } else if(g_game.getClientVersion() >= 1010) { + } else if(g_game.getClientVersion() >= 1000) { if(attr == ThingAttrNoMoveAnimation) attr = 16; else if(attr >= ThingAttrPickupable) @@ -153,7 +153,7 @@ void ThingType::unserialize(uint16 clientId, ThingCategory category, const FileS break; } - if(g_game.getClientVersion() >= 1010) { + if(g_game.getClientVersion() >= 1000) { /* In 10.10+ all attributes from 16 and up were * incremented by 1 to make space for 16 as * "No Movement Animation" flag.