… | |
… | |
284 | } |
284 | } |
285 | |
285 | |
286 | void |
286 | void |
287 | player::disconnect () |
287 | player::disconnect () |
288 | { |
288 | { |
|
|
289 | if (ob) |
|
|
290 | { |
|
|
291 | ob->close_container (); //TODO: client-specific |
|
|
292 | ob->drop_unpaid_items (); |
|
|
293 | } |
|
|
294 | |
289 | if (ns) |
295 | if (ns) |
290 | { |
296 | { |
291 | if (active) |
297 | if (active) |
292 | INVOKE_PLAYER (LOGOUT, this, ARG_INT (0)); |
298 | INVOKE_PLAYER (LOGOUT, this, ARG_INT (0)); |
293 | |
299 | |
294 | INVOKE_PLAYER (DISCONNECT, this); |
300 | INVOKE_PLAYER (DISCONNECT, this); |
295 | |
301 | |
296 | ns->reset_stats (); |
302 | ns->reset_stats (); |
297 | ns->pl = 0; |
303 | ns->pl = 0; |
298 | ns = 0; |
304 | ns = 0; |
299 | } |
|
|
300 | |
|
|
301 | if (ob) |
|
|
302 | { |
|
|
303 | ob->close_container (); //TODO: client-specific |
|
|
304 | ob->drop_unpaid_items (); |
|
|
305 | } |
305 | } |
306 | |
306 | |
307 | observe = ob; |
307 | observe = ob; |
308 | |
308 | |
309 | deactivate (); |
309 | deactivate (); |