iw2d / kinoko

mushroom game server emulator for v95
16 stars 19 forks source link

Update Party Mesos Shared #16

Closed leevccc closed 2 days ago

iw2d commented 2 days ago

implemented in 6759b93e08730ac269bf90b6c94e7394a7f09552, as there were a couple of issues with your implementation

leevccc commented 2 days ago

thanks for your reply

i'm confused, what the exclrequest mean is? my code is refer from handleUserDropMoneyRequest , and there, exclrequest you set true.

user.sendPacket(WvsContext.statChanged(Stat.MONEY, im.getMoney(), true));

what time i should use exclrequest? @iw2d

iw2d commented 2 days ago

The exclRequest parameter is for resetting the bExclRequestSent flag in the client, which blocks specific user actions until a response is received from the server.

For the DropPickUpRequest and UserDropMoneyRequest packets, the client sets this flag before sending these packets, so we need to reset this flag for the client in our response, else the client will require "disposing" before they can perform actions again.

However, if we are just resetting this flag in any request carelessly, we might run into unwanted side effects from enabling the users' actions when they should be locked until they receive the response they are waiting on.

So for the party members passively gaining money, we should not reset the bExclRequestSent flag since it wasn't even invoked from the members' client.

leevccc commented 2 days ago

its very useful!!! thanks again!!!