• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

C++ [1.3] critical doesn't update until relog

Cornwallis

Member
Joined
Jan 3, 2010
Messages
480
Reaction score
16
hello, I'm trying to use a storage value to add extra crit chance but it's not updating until relog. can i get around this?
is there a function i can send in LUA after i set a new storage value?
protocolgame.cpp
Code:
    int32_t storage = player->getStorageValue(15504, value);
    msg.add<uint16_t>(std::round(player->varSpecialSkills[SPECIALSKILL_CRITICALHITCHANCE] + (storage / 100)));
    msg.add<uint16_t>(0);
 
You need to do player->sendSkills(); after updating the skills if you want it to show in client as well.
 
Solution
You need to do player->sendSkills(); after updating the skills if you want it to show in client as well.
i set the storage value in LUA, am i able to add player:sendSkills() in luascript.cpp? maybe just return player->sendSkills()
i'm having horrible trouble calling functions between files in c++ lol

Edit: i made an lua function with player->sendSkills(); and put that in the LUA script, thank you.
 
Last edited:
Back
Top