This looks like some custom code. i don't see the same code on rAthena master branch.
for the 1st error you can try removing const_cast<int>, for the 2nd error remove & from the line.
I cannot tell if my suggestion will work, because i don't have the full info. Provide more information i.e. the source code of the modified functions you added if you still need help.
but imo you'd get quicker result asking Chatgpt