Fix dat loading issue with 10.00 & minor outfit window fix.

This commit is contained in:
BenDol 2014-12-30 17:27:53 +13:00
parent 7f3f18f991
commit 16f6a0019c
4 changed files with 13 additions and 19 deletions

View File

@ -15,7 +15,8 @@ fightModeRadioGroup = nil
pvpModeRadioGroup = nil pvpModeRadioGroup = nil
function init() 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) combatControlsButton:setOn(true)
combatControlsWindow = g_ui.loadUI('combatcontrols', modules.game_interface.getRightPanel()) combatControlsWindow = g_ui.loadUI('combatcontrols', modules.game_interface.getRightPanel())
combatControlsWindow:disableResize() combatControlsWindow:disableResize()

View File

@ -4,14 +4,9 @@ MarketButtonBox < ButtonBoxRounded
size: 106 22 size: 106 22
text-offset: 0 2 text-offset: 0 2
text-align: center text-align: center
image-clip: 0 0 20 20
image-border: 2 image-border: 2
$hover !disabled:
image-clip: 0 20 20 20
$checked: $checked:
image-clip: 0 40 20 20
color: white color: white
$disabled: $disabled:

View File

@ -25,13 +25,17 @@ mountCreature = nil
currentMount = 1 currentMount = 1
function init() function init()
connect(g_game, { onOpenOutfitWindow = create, connect(g_game, {
onGameEnd = destroy }) onOpenOutfitWindow = create,
onGameEnd = destroy
})
end end
function terminate() function terminate()
disconnect(g_game, { onOpenOutfitWindow = create, disconnect(g_game, {
onGameEnd = destroy }) onOpenOutfitWindow = create,
onGameEnd = destroy
})
destroy() destroy()
end end
@ -300,17 +304,11 @@ function updateOutfit()
addon.widget:setChecked(false) addon.widget:setChecked(false)
addon.widget:setEnabled(false) addon.widget:setEnabled(false)
end end
outfit.addons = 0
if availableAddons > 0 then if availableAddons > 0 then
for _, i in pairs(ADDON_SETS[availableAddons]) do for _, i in pairs(ADDON_SETS[availableAddons]) do
addons[i].widget:setEnabled(true) 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) addons[i].widget:setChecked(true)
end end
end end

View File

@ -58,7 +58,7 @@ void ThingType::serialize(const FileStreamPtr& fin)
attr = ThingAttrWritable; attr = ThingAttrWritable;
else if(attr >= ThingAttrWritable) else if(attr >= ThingAttrWritable)
attr += 1; attr += 1;
} else if(g_game.getClientVersion() >= 1010) { } else if(g_game.getClientVersion() >= 1000) {
if(attr == ThingAttrNoMoveAnimation) if(attr == ThingAttrNoMoveAnimation)
attr = 16; attr = 16;
else if(attr >= ThingAttrPickupable) else if(attr >= ThingAttrPickupable)
@ -153,7 +153,7 @@ void ThingType::unserialize(uint16 clientId, ThingCategory category, const FileS
break; break;
} }
if(g_game.getClientVersion() >= 1010) { if(g_game.getClientVersion() >= 1000) {
/* In 10.10+ all attributes from 16 and up were /* In 10.10+ all attributes from 16 and up were
* incremented by 1 to make space for 16 as * incremented by 1 to make space for 16 as
* "No Movement Animation" flag. * "No Movement Animation" flag.