Crossfire Server, Trunk
savebed.cpp File Reference
#include "global.h"
#include <string.h>
#include "ob_methods.h"
#include "ob_types.h"
#include "sounds.h"
#include "sproto.h"
+ Include dependency graph for savebed.cpp:

Go to the source code of this file.

Functions

static void apply_savebed (object *pl)
 
void init_type_savebed (void)
 
static method_ret savebed_type_apply (object *op, object *applier, int aflags)
 

Detailed Description

Implement beds that are applied to save a player to disk.

Definition in file savebed.cpp.

Function Documentation

◆ apply_savebed()

static void apply_savebed ( object pl)
static

Apply a bed to reality.

Parameters
plplayer who is applying the bed.

Definition at line 60 of file savebed.cpp.

References draw_ext_info_format(), EVENT_LOGOUT, events_execute_global_event(), hiscore_check(), MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_LOADSAVE, MSG_TYPE_ADMIN_PLAYER, NDI_ALL, NDI_DK_ORANGE, NDI_RED, NDI_UNIQUE, object_remove(), object_update_speed(), party_leave(), pets_terminate_all(), altar_valkyrie::pl, play_again(), safe_strncpy, and save_player().

Referenced by savebed_type_apply().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init_type_savebed()

void init_type_savebed ( void  )

Initializer for the SAVEBED object type.

Definition at line 34 of file savebed.cpp.

References register_apply(), SAVEBED, and savebed_type_apply().

Referenced by register_all_ob_types().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ savebed_type_apply()

static method_ret savebed_type_apply ( object op,
object applier,
int  aflags 
)
static

Attempts to apply a savebed.

Parameters
opThe savebed to apply
applierThe object attempting to apply the savebed. Ignore if not a player
aflagsSpecial flags (always apply/unapply)
Returns
The return value is always METHOD_OK

Definition at line 46 of file savebed.cpp.

References apply_savebed(), METHOD_OK, give::op, PLAYER, object::type, and nlohmann::detail::void().

Referenced by init_type_savebed().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: