GMCP Adjustments

master
icecool 6 years ago
parent fa38b8e02f
commit c187e2c76f

@ -163,14 +163,23 @@ function Character.New()
return player return player
end end
function Character:Level() function Character:Level()
if not checkGMCPValue("char.status.level") then
Send_GMCP_Packet("request char")
end
dnote(("%s Character:Level() returns: %d"):format(Prepend, tonumber(checkGMCPValue("char.status.level")))) dnote(("%s Character:Level() returns: %d"):format(Prepend, tonumber(checkGMCPValue("char.status.level"))))
return tonumber(checkGMCPValue("char.status.level")) return tonumber(checkGMCPValue("char.status.level"))
end end
function Character:TierLevel() function Character:TierLevel()
if not checkGMCPValue("char.base.tier") then
Send_GMCP_Packet("request char")
end
dnote(("%s Character:TierLevel() returns: %d"):format(Prepend, (tonumber(checkGMCPValue("char.base.tier"))*10))) dnote(("%s Character:TierLevel() returns: %d"):format(Prepend, (tonumber(checkGMCPValue("char.base.tier"))*10)))
return (tonumber(checkGMCPValue("char.base.tier"))*10) return (tonumber(checkGMCPValue("char.base.tier"))*10)
end end
function Character:EffectiveLevel() function Character:EffectiveLevel()
if not checkGMCPValue("char") then
Send_GMCP_Packet("request char")
end
dnote(("%s Character:EffectiveLevel() returns: %d"):format(Prepend, (self:Level()+self:TierLevel()))) dnote(("%s Character:EffectiveLevel() returns: %d"):format(Prepend, (self:Level()+self:TierLevel())))
return (self:Level() + self:TierLevel()) return (self:Level() + self:TierLevel())
end end

Loading…
Cancel
Save