mehah / otclient

An alternative tibia client for otserv written in C++20 and Lua, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to customize
Other
242 stars 177 forks source link

fix: forge skills #779

Closed luanluciano93 closed 1 month ago

luanluciano93 commented 1 month ago

ERROR: Lua exception: /game_skills/skills.lua:104: attempt to index local 'skill' (a nil value) stack traceback: [C]: in function 'index' /game_skills/skills.lua:104: in function 'setSkillBase' /game_skills/skills.lua:512: in function </game_skills/skills.lua:511> ERROR: protected lua call failed: LUA ERROR: /game_skills/skills.lua:104: attempt to index local 'skill' (a nil value) stack traceback: [C]: in function 'index' /game_skills/skills.lua:104: in function 'setSkillBase' /game_skills/skills.lua:512: in function </game_skills/skills.lua:511>



- removed redundancy in onBaseSkillChange's refresh() function
![image](https://github.com/mehah/otclient/assets/6209529/16674d60-b8ad-47df-97f1-04b59cde8d16)
![image](https://github.com/mehah/otclient/assets/6209529/33838997-9547-4315-b113-24dbae7690a2)

- readjustment for forge skills only appear when they are greater than 0

https://github.com/mehah/otclient/assets/6209529/ce08716c-eea0-46d6-b895-930491991d69
kojimhojo commented 1 month ago

image

this is displayed on older servers (8.6) , there should be an if of x version @luanluciano93

luanluciano93 commented 1 month ago

this is displayed on older servers (8.6) , there should be an if of x version @luanluciano93

test plx https://github.com/mehah/otclient/pull/784/files