Stanos
Veteran OT User
Hiho
So got an weird issue and have no idea where is the problem. I will try to explain everything.
So we got this:
23:57 You advanced in speed [1123854
23:57 You advanced in speed [1223854
23:57 You advanced in speed [1323854
23:57 You advanced in speed [1423854
23:57 You advanced in speed [1523854
As you can see it has weird 23854 numbers and im not sure how to remove them and even what is that.
This is my player.cpp addSkillAdvance with prints
Console which is on skill advance and everything looks just fine
Then we have player.lua
So got an weird issue and have no idea where is the problem. I will try to explain everything.
So we got this:
23:57 You advanced in speed [1123854
23:57 You advanced in speed [1223854
23:57 You advanced in speed [1323854
23:57 You advanced in speed [1423854
23:57 You advanced in speed [1523854
As you can see it has weird 23854 numbers and im not sure how to remove them and even what is that.
This is my player.cpp addSkillAdvance with prints
void Player::addSkillAdvance(skills_t skill, uint64_t count){ uint64_t cu - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
pastebin.com
Console which is on skill advance and everything looks just fine
Then we have player.lua
Lua:
function Player:addSkillLevel(skillId)
local curSkill = self:getSkillLevel(skillId)
local curTries = self:getSkillTries(skillId)
local voc = self:getVocation()
local nextTries = voc:getRequiredSkillTries(skillId, curSkill + 1)
self:addSkillTries(skillId, nextTries - curTries + curTries / nextTries * voc:getRequiredSkillTries(skillId, curSkill + 2))
end
Lua:
function Player:addSkillLevels(skill, count)
count = math.max(1, count or 1)
if isInArray({SKILL_FIST, SKILL_CLUB, SKILL_SWORD, SKILL_AXE, SKILL_DISTANCE, SKILL_SHIELD, SKILL_FISHING}, skill) then
for i = 1, count do
self:addSkillTries(skill, self:getVocation():getRequiredSkillTries(skill, self:getSkillLevel(skill) + 1) - self:getSkillTries(skill))
end
return true
end
if skill == SKILL_MAGLEVEL then
for i = 1, count do
local xp = math.ceil(self:getVocation():getRequiredManaSpent(self:getBaseMagicLevel() + 1) / configManager.getNumber(configKeys.RATE_MAGIC))
self:addManaSpent(xp)
end
return true
end
return false
end