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

View File

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