You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In client/js/game.js, the click() function, as it says, "Processes game logic when the user triggers a click/touch event during the game."
This includes calling makePlayerAttack() if the target location of the click contains an entity of type Mob.
makePlayerAttack() notifies the server by sending an ATTACK message and then calling createAttackLink() which calls engage().
engage (defined in client/js/character.js) sets attackingMode to be true, sets the target in the player object, and assigns the attacking player to follow the target if it moves. That's about it on the client side.
On the server side, the ATTACK message invokes a callback onEntityAttack (in server/js/worldserver.js)
... (more server)