… | |
… | |
272 | if (ns) |
272 | if (ns) |
273 | { |
273 | { |
274 | if (enable_save) |
274 | if (enable_save) |
275 | { |
275 | { |
276 | INVOKE_PLAYER (LOGOUT, this, ARG_INT (0)); |
276 | INVOKE_PLAYER (LOGOUT, this, ARG_INT (0)); |
277 | save (1); |
277 | save (true); |
278 | } |
278 | } |
279 | |
279 | |
280 | INVOKE_PLAYER (DISCONNECT, this); |
280 | INVOKE_PLAYER (DISCONNECT, this); |
281 | |
281 | |
282 | client *ns = this->ns; |
282 | client *ns = this->ns; |
… | |
… | |
307 | ob->roll_stats (); |
307 | ob->roll_stats (); |
308 | } |
308 | } |
309 | |
309 | |
310 | player::player () |
310 | player::player () |
311 | { |
311 | { |
312 | /* There are some elements we want initialized to non zero value - |
312 | /* There are some elements we want initialised to non zero value - |
313 | * we deal with that below this point. |
313 | * we deal with that below this point. |
314 | */ |
314 | */ |
315 | outputs_sync = 16; /* Every 2 seconds */ |
315 | outputs_sync = 16; /* Every 2 seconds */ |
316 | outputs_count = 8; /* Keeps present behaviour */ |
316 | outputs_count = 8; /* Keeps present behaviour */ |
317 | unapply = unapply_nochoice; |
317 | unapply = unapply_nochoice; |
… | |
… | |
3469 | if (trlist == NULL || who->type != PLAYER) |
3469 | if (trlist == NULL || who->type != PLAYER) |
3470 | return; |
3470 | return; |
3471 | |
3471 | |
3472 | for (i = 0, tr = trlist->items; tr != NULL && i < level - 1; tr = tr->next, i++); |
3472 | for (i = 0, tr = trlist->items; tr != NULL && i < level - 1; tr = tr->next, i++); |
3473 | |
3473 | |
3474 | if (tr == NULL || tr->item == NULL) |
3474 | if (!tr || !tr->item) |
3475 | { |
3475 | { |
3476 | /* LOG(llevDebug, "-> no more treasure for %s\n", change_resist_msg[atnr]); */ |
3476 | /* LOG(llevDebug, "-> no more treasure for %s\n", change_resist_msg[atnr]); */ |
3477 | return; |
3477 | return; |
3478 | } |
3478 | } |
3479 | |
3479 | |