… | |
… | |
255 | enter_map (); |
255 | enter_map (); |
256 | |
256 | |
257 | send_rules (ob); |
257 | send_rules (ob); |
258 | send_news (ob); |
258 | send_news (ob); |
259 | display_motd (ob); |
259 | display_motd (ob); |
|
|
260 | |
|
|
261 | INVOKE_PLAYER (CONNECT, this); |
260 | INVOKE_PLAYER (LOGIN, this); |
262 | INVOKE_PLAYER (LOGIN, this); |
261 | } |
263 | } |
262 | |
264 | |
263 | void |
265 | void |
264 | player::disconnect () |
266 | player::disconnect () |
… | |
… | |
268 | |
270 | |
269 | //TODO: don't be so harsh and destroy :) |
271 | //TODO: don't be so harsh and destroy :) |
270 | if (ns) |
272 | if (ns) |
271 | { |
273 | { |
272 | if (enable_save) |
274 | if (enable_save) |
|
|
275 | { |
273 | INVOKE_PLAYER (LOGOUT, this, ARG_INT (0)); |
276 | INVOKE_PLAYER (LOGOUT, this, ARG_INT (0)); |
|
|
277 | save (1); |
|
|
278 | } |
|
|
279 | |
|
|
280 | INVOKE_PLAYER (DISCONNECT, this); |
274 | |
281 | |
275 | client *ns = this->ns; |
282 | client *ns = this->ns; |
276 | ns->send_packet ("goodbye"); |
283 | ns->send_packet ("goodbye"); |
277 | ns->flush (); |
284 | ns->flush (); |
278 | ns->pl = 0; |
285 | ns->pl = 0; |