I am making a skill system that works client side so it doesnt lag for the caster. I already have some safety checks for hit detection on server, but I want to see if this skill cost strat is the right way to go for:
Client plays animation and checks clientside for mana and spends. This creates the skill hitbox on the client and gives it an id;
Server will get that id from that player, check if none of it exists on server, check mana again and if shot ia coherent with cast location etc. If it is, it validates the server version.
When client hits someone, it signals the server to check if there is a validated clone of the skill on the server. If it does, damage and effects applies. Else, it doesnt do anything and increase player suspiciousness for a later kick.