delaford / game

⚔️ An online JavaScript 2D Medieval RPG.
https://play.delaford.com/?useGuestAccount
MIT License
1.32k stars 846 forks source link

Fix Bug Trading/Banking on NPC while ON TOP causes delay #157

Closed LuizeraSD closed 2 years ago

LuizeraSD commented 2 years ago

Description

I made the action be immediate (not queueable) if the player click himself on the center of the viewport

I add some validation on action pane (bank, furnace, anvil, smelt and trade) cause data.playerIndex is not send as a parameter when the action is not queueable.

Related Issue

119

Motivation and Context

This fixes the bug when you are on top of an NPC and want to trade/shop/bank with them and the popup screen will not popup UNTIL you move and FINISH its progress.

How Has This Been Tested?

Q&A (manual testing)

Screenshots (if appropriate):

Types of change

naknode commented 2 years ago

Thank you! I'll take a look at this soon.

LuizeraSD commented 2 years ago

Thank you! I'll take a look at this soon.

Hello @naknode, this is my first PR on an open-source project, I hope it can help.

naknode commented 2 years ago

@LuizeraSD Good job on this PR. Looks like this was indeed the fix .Thank you.