AsYetUntitled / Framework

Altis Life RPG mission framework for Arma 3 originally made by @TAWTonic.
Other
245 stars 308 forks source link

fn_weaponShopBuySell saveGear #320

Closed Alex715 closed 7 years ago

Alex715 commented 7 years ago

Expected behaviour

<What should have happened?> if the server crash or client crash the player should return with his purchased weapon.

Actual behaviour

call life_fnc_saveGear don't work so if the client or server crash after purchased weapon the player return without his weapon.

Steps to reproduce the behaviour

purchase weapon close gui altf4 or close server.

RPT and/or extDB3 logs (if applicable)

No Errors in client/server

Mission version: 4.4r4

Game version: 1.66.139586

JordanBCX commented 7 years ago

Currently when a player buys something from the weapon store their cash is sent to the server for update and the players gear array is updated for their next sync with the server (https://github.com/AsYetUntitled/Framework/blob/33213795c08f082fecd048ced786f06e3580f3c4/Altis_Life.Altis/core/shops/fn_weaponShopBuySell.sqf#L73).

In fn_virt_buy.sqf the script syncs the players gear on item purchase (https://github.com/AsYetUntitled/Framework/blob/33213795c08f082fecd048ced786f06e3580f3c4/Altis_Life.Altis/core/shops/fn_virt_buy.sqf#L65), this would be the correct way to sync the weapon data in fn_weaponShopBuySell.sqf, simply replacing line 74 with "[3] call SOCK_fnc_updatePartial;".

Alex715 commented 7 years ago

@jordanlee833 Already tested cash is send to db but not gear.

JordanBCX commented 7 years ago

@mur202 If you tested the issue you would have found it is a problem in default files but there is a PR to fix it.