Minor fix for recent skill changes.

This commit is contained in:
BeniS 2012-08-19 20:08:20 +12:00
parent 4ce9c921c1
commit 367955615e
2 changed files with 6 additions and 12 deletions

View File

@ -61,6 +61,9 @@ function terminate()
end end
function setSkillBase(id, value, baseValue) function setSkillBase(id, value, baseValue)
if baseValue < 1 or value < 1 then
return
end
local skill = skillsWindow:recursiveGetChildById(id) local skill = skillsWindow:recursiveGetChildById(id)
local widget = skill:getChildById('value') local widget = skill:getChildById('value')
@ -236,9 +239,6 @@ function onSpeedChange(localPlayer, speed)
end end
function onBaseSpeedChange(localPlayer, baseSpeed) function onBaseSpeedChange(localPlayer, baseSpeed)
if baseSpeed < 1 then
return
end
local speed = localPlayer:getSpeed() local speed = localPlayer:getSpeed()
onSpeedChange(localPlayer, baseSpeed) onSpeedChange(localPlayer, baseSpeed)
@ -253,9 +253,6 @@ function onMagicLevelChange(localPlayer, magiclevel, percent)
end end
function onBaseMagicLevelChange(localPlayer, baseMagicLevel) function onBaseMagicLevelChange(localPlayer, baseMagicLevel)
if baseMagicLevel < 1 then
return
end
local magiclevel = localPlayer:getMagicLevel() local magiclevel = localPlayer:getMagicLevel()
onMagicLevelChange(localPlayer, magiclevel, localPlayer:getMagicLevelPercent()) onMagicLevelChange(localPlayer, magiclevel, localPlayer:getMagicLevelPercent())
@ -270,9 +267,6 @@ function onSkillChange(localPlayer, id, level, percent)
end end
function onBaseSkillChange(localPlayer, id, baseLevel) function onBaseSkillChange(localPlayer, id, baseLevel)
if baseLevel < 1 then
return
end
local level = localPlayer:getSkillLevel(id) local level = localPlayer:getSkillLevel(id)
onSkillChange(localPlayer, id, level, localPlayer:getSkillLevelPercent(id)) onSkillChange(localPlayer, id, level, localPlayer:getSkillLevelPercent(id))

View File

@ -65,8 +65,8 @@ namespace Otc
DrawAnimations = 2048, DrawAnimations = 2048,
DrawWalls = DrawOnBottom | DrawOnTop, DrawWalls = DrawOnBottom | DrawOnTop,
DrawEverything = DrawGround | DrawGroundBorders | DrawWalls | DrawItems | DrawEverything = DrawGround | DrawGroundBorders | DrawWalls | DrawItems |
DrawCreatures | DrawEffects | DrawMissiles | DrawCreatures | DrawEffects | DrawMissiles | DrawCreaturesInformation |
DrawCreaturesInformation | DrawStaticTexts | DrawAnimatedTexts | DrawAnimations DrawStaticTexts | DrawAnimatedTexts | DrawAnimations
}; };
enum DatOpts { enum DatOpts {
@ -307,7 +307,7 @@ namespace Otc
MessageRVRAnswer = 47, MessageRVRAnswer = 47,
MessageRVRContinue = 48, MessageRVRContinue = 48,
LastMessage = 49, LastMessage = 49,
MessageInvalid = 255, MessageInvalid = 255
}; };
enum GameFeature { enum GameFeature {