Crossfire Server, Trunk
c_wiz.cpp File Reference
#include "global.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include "sproto.h"
#include "spells.h"
#include "treasure.h"
#include "skills.h"
#include "assets.h"
#include "AssetsManager.h"
+ Include dependency graph for c_wiz.cpp:

Go to the source code of this file.

Macros

#define STACK_SIZE   50
 

Enumerations

enum  { STACK_FROM_NONE = 0, STACK_FROM_TOP = 1, STACK_FROM_STACK = 2, STACK_FROM_NUMBER = 3 }
 

Functions

bool can_follow (object *op, player *other)
 
static int checkdm (object *op, const char *pl_name, const char *pl_passwd, const char *pl_host)
 
void command_abil (object *op, const char *params)
 
void command_accountpasswd (object *op, const char *params)
 
void command_addexp (object *op, const char *params)
 
void command_arrest (object *op, const char *params)
 
void command_banish (object *op, const char *params)
 
void command_create (object *op, const char *params)
 
void command_diff (object *op, const char *params)
 
void command_dm (object *op, const char *params)
 
void command_dmhide (object *op, const char *params)
 
void command_dump (object *op, const char *params)
 
void command_dumpabove (object *op, const char *params)
 
void command_dumpbelow (object *op, const char *params)
 
void command_follow (object *op, const char *params)
 
void command_forget_spell (object *op, const char *params)
 
void command_free (object *op, const char *params)
 
void command_freeze (object *op, const char *params)
 
void command_goto (object *op, const char *params)
 
void command_hide (object *op, const char *params)
 
void command_insert_into (object *op, const char *params)
 
void command_inventory (object *op, const char *params)
 
void command_invisible (object *op, const char *params)
 
void command_kick (object *op, const char *params)
 
static void command_kick2 (object *op, const char *params)
 
void command_learn_special_prayer (object *op, const char *params)
 
void command_learn_spell (object *op, const char *params)
 
static void command_learn_spell_or_prayer (object *op, const char *params, int special_prayer)
 
void command_listplugins (object *op, const char *params)
 
void command_loadplugin (object *op, const char *params)
 
void command_loadtest (object *op, const char *params)
 
void command_mon_aggr (object *op, const char *params)
 
void command_nowiz (object *op, const char *params)
 
void command_overlay_reset (object *op, const char *params)
 
void command_overlay_save (object *op, const char *params)
 
void command_patch (object *op, const char *params)
 
void command_possess (object *op, const char *params)
 
void command_purge_quest (object *op, const char *param)
 
void command_purge_quest_definitions (object *op, const char *param)
 
void command_recollect (object *op, const char *params)
 
void command_remove (object *op, const char *params)
 
void command_reset (object *op, const char *params)
 
void command_setgod (object *op, const char *params)
 
void command_settings (object *op, const char *ignored)
 
void command_shutdown (object *op, const char *params)
 
void command_skills (object *op, const char *params)
 
void command_speed (object *op, const char *params)
 
void command_stack_clear (object *op, const char *params)
 
void command_stack_list (object *op, const char *params)
 
void command_stack_pop (object *op, const char *params)
 
void command_stack_push (object *op, const char *params)
 
void command_stats (object *op, const char *params)
 
void command_style_map_info (object *op, const char *params)
 
void command_summon (object *op, const char *params)
 
void command_swap (object *op, const char *params)
 
void command_teleport (object *op, const char *params)
 
void command_toggle_shout (object *op, const char *params)
 
void command_unloadplugin (object *op, const char *params)
 
static objectdm_stack_peek (player *pl)
 
static void dm_stack_pop (player *pl)
 
static void dm_stack_push (player *pl, tag_t item)
 
void do_dump (object *who, object *what)
 
static int do_wizard_dm (object *op, const char *params, int silent)
 
static void do_wizard_hide (object *op, int silent_dm)
 
static objectfind_object_both (const char *params)
 
static objectget_dm_object (player *pl, const char **params, int *from)
 
static playerget_other_player_from_name (object *op, const char *name)
 
static objectget_spell_by_name (object *op, const char *spell_name)
 
int player_arrest (object *who)
 
static void reset_faces_sent (struct socket_struct *socket)
 
static void unhide (object *op)
 

Variables

struct shutdown_s shutdown_state
 

Detailed Description

Those functions are used by DMs.

Todo:
explain item stack, item specifier for commands.

Definition in file c_wiz.cpp.

Macro Definition Documentation

◆ STACK_SIZE

#define STACK_SIZE   50

Stack size, static

Definition at line 35 of file c_wiz.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Values for 'from' field of get_dm_object()

Enumerator
STACK_FROM_NONE 

Item was not found

STACK_FROM_TOP 

Item is stack top

STACK_FROM_STACK 

Item is somewhere in stack

STACK_FROM_NUMBER 

Item is a number (may be top)

Definition at line 37 of file c_wiz.cpp.

Function Documentation

◆ can_follow()

bool can_follow ( object op,
player other 
)

Definition at line 2796 of file c_wiz.cpp.

References object::contr, player::ob, give::op, and player::party.

Referenced by command_follow(), and do_follow().

+ Here is the caller graph for this function:

◆ checkdm()

static int checkdm ( object op,
const char *  pl_name,
const char *  pl_passwd,
const char *  pl_host 
)
static

object *op is trying to become dm. pl_name is name supplied by player. Restrictive DM will make it harder for socket users to become DM - in that case, it will check for the players character name.

Parameters
opplayer wishing to become DM.
pl_nameplayer's name.
pl_passwdentered password.
pl_hostplayer's host.
Return values
0invalid credentials.
1op can become DM.
Todo:
can't name/host be found from op? What is RESTRICTIVE_DM?

Definition at line 2117 of file c_wiz.cpp.

References buf, Settings::confdir, DMFILE, llevDebug, llevError, LOG(), MAX_BUF, give::name, give::op, settings, and nlohmann::detail::void().

Referenced by do_wizard_dm().

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

◆ command_abil()

void command_abil ( object op,
const char *  params 
)

Changes an object's statistics.

Parameters
opwizard.
paramsparameters, should be "player statistic new_value".
Todo:
use get_other_player_from_name(). Isn't this useless with the command_patch()?

Definition at line 1819 of file c_wiz.cpp.

References draw_ext_info(), draw_ext_info_format(), FALSE, first_player, fix_object(), FLAG_WAS_WIZ, Settings::max_stat, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, give::op, roll-o-matic::params, altar_valkyrie::pl, Settings::real_wiz, SET_FLAG, and settings.

Referenced by commands_init().

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

◆ command_accountpasswd()

void command_accountpasswd ( object op,
const char *  params 
)

Definition at line 1638 of file c_wiz.cpp.

References account_change_password(), draw_ext_info(), MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_addexp()

void command_addexp ( object op,
const char *  params 
)

This adds exp to a player. We now allow adding to a specific skill.

Parameters
opwizard.
paramsshould be "player quantity [skill]".

Definition at line 1676 of file c_wiz.cpp.

References buf, calc_perm_exp(), check_exp_adjust(), draw_ext_info(), draw_ext_info_format(), living::exp, FALSE, find_skill_by_name(), first_player, FLAG_WAS_WIZ, MAX_BUF, MAX_NAME, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, give::op, roll-o-matic::params, altar_valkyrie::pl, player_lvl_adj(), item::q, Settings::real_wiz, SET_FLAG, settings, and object::stats.

Referenced by commands_init().

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

◆ command_arrest()

void command_arrest ( object op,
const char *  params 
)

Wizard jails player.

Parameters
opwizard.
paramsplayer to jail.

Definition at line 821 of file c_wiz.cpp.

References draw_ext_info(), draw_ext_info_format(), get_other_player_from_name(), llevInfo, LOG(), MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, give::op, roll-o-matic::params, altar_valkyrie::pl, and player_arrest().

Referenced by commands_init().

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

◆ command_banish()

void command_banish ( object op,
const char *  params 
)

Add player's IP to ban_file and kick them off the server.

I know most people have dynamic IPs but this is more of a short term solution if they have to get a new IP to play maybe they'll calm down. This uses the banish_file in the local directory *not *the ban_file The action is logged with a ! for easy searching. -tm

Parameters
opDM banishing.
paramsplayer to banish. Must be a complete name match.
Returns
1.

Definition at line 502 of file c_wiz.cpp.

References BANISHFILE, buf, command_kick2(), draw_ext_info(), draw_ext_info_format(), get_other_player_from_name(), llevDebug, Settings::localdir, LOG(), MAX_BUF, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, MSG_TYPE_COMMAND_ERROR, NDI_ALL, NDI_RED, NDI_UNIQUE, give::op, roll-o-matic::params, altar_valkyrie::pl, and settings.

Referenced by commands_init().

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

◆ command_create()

void command_create ( object op,
const char *  params 
)

Wizard wants to create an object.

This function is a real mess, because we're stucking getting the entire item description in one block of text, so we just can't simply parse it - we need to look for double quotes for example. This could actually get much simpler with just a little help from the client - if we could get line breaks, it makes parsing much easier, eg, something like:

  • arch dragon
  • name big nasty creature
  • hp 5
  • sp 30

which is much easier to parse than dragon name "big nasty creature" hp 5 sp 30 for example.

Parameters
opwizard.
paramsobject description.
Todo:
enable line breaks in command.

Definition at line 999 of file c_wiz.cpp.

References arch_to_object(), bigchest::check, archetype::clone, create_treasure(), dm_stack_pop(), dm_stack_push(), draw_ext_info(), draw_ext_info_format(), FALSE, find_archetype_by_object_name(), find_artifactlist(), FLAG_ALIVE, FLAG_IDENTIFIED, FLAG_MONSTER, FLAG_WAS_WIZ, FREE_OBJ_NO_DESTROY_CALLBACK, give_artifact_abilities(), is_identifiable_type(), artifact::item, artifactlist::items, llevDebug, LOG(), MAX, MAX_BUF, monster_check_apply_all(), object::more, archetype::more, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, object::nrof, object_copy(), object_create_arch(), object_free(), object_give_identified_properties(), object_insert_in_map_at(), object_insert_in_ob(), give::op, object::other_arch, out_of_map(), roll-o-matic::params, POTION, QUERY_FLAG, object::randomitems, Settings::real_wiz, ROD, safe_strncpy, SCROLL, set_abs_magic(), SET_FLAG, set_magic(), set_variable(), settings, banquet::size_x, banquet::size_y, SPELL, SPELLBOOK, Ice::tmp, try_find_archetype(), object::type, and WAND.

Referenced by commands_init().

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

◆ command_diff()

void command_diff ( object op,
const char *  params 
)

Get a diff of specified items. Second item is compared to first, and differences displayed.

Note
get_ob_diff() works the opposite way (first compared to 2nd), but it's easier with stack functions to do it this way, so you can do:
  • stack_push <base>
  • stack_push <object to be compared>
  • diff
  • patch xxx <-— applies to object compared to base, easier :)

Ryo, august 2004

Parameters
opwizard.
paramsobject specifier.

Definition at line 2622 of file c_wiz.cpp.

References dm_stack_pop(), draw_ext_info(), get_dm_object(), get_ob_diff(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, object_find_by_tag_global(), give::op, roll-o-matic::params, STACK_FROM_NUMBER, STACK_FROM_TOP, stringbuffer_finish(), and stringbuffer_new().

Referenced by commands_init().

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

◆ command_dm()

void command_dm ( object op,
const char *  params 
)

Actual command to perhaps become dm. Changed around a bit in version 0.92.2 to allow people on sockets to become dm, and allow better dm file

Parameters
opplayer wishing to become wizard.
paramspassword.
Returns
0 unless op isn't a player.

Definition at line 2214 of file c_wiz.cpp.

References do_wizard_dm(), give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_dmhide()

void command_dmhide ( object op,
const char *  params 
)

A players wants to become DM and hide. Let's see if that's authorized. Make sure to not tell anything to anyone.

Parameters
opwizard.
paramspassword.

Definition at line 2519 of file c_wiz.cpp.

References do_wizard_dm(), do_wizard_hide(), give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_dump()

void command_dump ( object op,
const char *  params 
)

Dumps the difference between an object and its archetype.

Parameters
opwiard.
paramsobject to dump.

Definition at line 1377 of file c_wiz.cpp.

References draw_ext_info(), FLAG_OBJ_ORIGINAL, get_dm_object(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, NDI_UNIQUE, object_dump(), give::op, roll-o-matic::params, QUERY_FLAG, stringbuffer_finish(), stringbuffer_new(), and Ice::tmp.

Referenced by commands_init().

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

◆ command_dumpabove()

void command_dumpabove ( object op,
const char *  params 
)

Player wants to dump object above her.

Parameters
opplayer asking for information.
paramsunused.

Definition at line 2902 of file c_wiz.cpp.

References do_dump(), give::op, roll-o-matic::params, and nlohmann::detail::void().

Referenced by commands_init().

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

◆ command_dumpbelow()

void command_dumpbelow ( object op,
const char *  params 
)

Player wants to dump object below her.

Parameters
opplayer asking for information.
paramsunused.

Definition at line 2887 of file c_wiz.cpp.

References do_dump(), give::op, roll-o-matic::params, and nlohmann::detail::void().

Referenced by commands_init().

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

◆ command_follow()

void command_follow ( object op,
const char *  params 
)

Follow a player, or stop following a player.

Parameters
opPlayer follower
paramsplayer to follow. If NULL, stop following player.

Definition at line 2809 of file c_wiz.cpp.

References add_string(), can_follow(), rv_vector::distance, draw_ext_info(), draw_ext_info_format(), find_player_partial_name(), FLAG_WIZ, FREE_AND_CLEAR_STR, get_rangevector(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_FAILURE, MSG_TYPE_COMMAND_SUCCESS, MSG_TYPE_COMMUNICATION, MSG_TYPE_COMMUNICATION_PARTY, object::name, NDI_UNIQUE, player::ob, give::op, roll-o-matic::params, and QUERY_FLAG.

Referenced by commands_init().

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

◆ command_forget_spell()

void command_forget_spell ( object op,
const char *  params 
)

Command for players to forget a spell. This command used to be available only to DMs.

Parameters
opplayer
paramsspell name to forget.

Definition at line 2415 of file c_wiz.cpp.

References do_forget_spell(), draw_ext_info(), draw_ext_info_format(), lookup_spell_by_name(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, object::name, NDI_UNIQUE, give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_free()

void command_free ( object op,
const char *  params 
)

Totally free an object.

Parameters
opwizard.
paramsobject to free.

Definition at line 1612 of file c_wiz.cpp.

References dm_stack_pop(), draw_ext_info(), FLAG_REMOVED, get_dm_object(), HEAD, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, object_free_drop_inventory(), object_remove(), give::op, roll-o-matic::params, QUERY_FLAG, STACK_FROM_STACK, and Ice::tmp.

Referenced by commands_init().

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

◆ command_freeze()

void command_freeze ( object op,
const char *  params 
)

Freezes a player for a specified tick count, 100 by default.

Parameters
opwizard freezing the player.
paramsoptional tick count, followed by player name.

Definition at line 745 of file c_wiz.cpp.

References draw_ext_info(), draw_ext_info_format(), get_other_player_from_name(), MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, MSG_TYPE_COMMAND_ERROR, NDI_RED, NDI_UNIQUE, give::op, roll-o-matic::params, and altar_valkyrie::pl.

Referenced by commands_init().

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

◆ command_goto()

void command_goto ( object op,
const char *  params 
)

Wizard teleports to a map.

Parameters
opwizard teleporting.
paramsmap to teleport to. Can be absolute or relative path.

Definition at line 724 of file c_wiz.cpp.

References do_goto(), draw_ext_info(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, give::op, and roll-o-matic::params.

Referenced by command_loadtest(), and commands_init().

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

◆ command_hide()

void command_hide ( object op,
const char *  params 
)

Wizard 'hide' command.

Parameters
opDM wanting to hide.
paramsignored.

Definition at line 389 of file c_wiz.cpp.

References do_wizard_hide(), give::op, roll-o-matic::params, and nlohmann::detail::void().

Referenced by commands_init().

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

◆ command_insert_into()

void command_insert_into ( object op,
const char *  params 
)

Puts an object into another.

Parameters
opwizard.
paramsobject specifier.

Definition at line 2686 of file c_wiz.cpp.

References dm_stack_pop(), draw_ext_info(), draw_ext_info_format(), esrv_update_item(), FLAG_REMOVED, get_dm_object(), MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, object_find_by_tag_global(), object_insert_in_ob(), object_remove(), give::op, roll-o-matic::params, PLAYER, QUERY_FLAG, query_name(), STACK_FROM_NUMBER, STACK_FROM_TOP, object::type, UPD_NAME, UPD_NROF, UPD_WEIGHT, and python_pickup::where.

Referenced by commands_init().

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

◆ command_inventory()

void command_inventory ( object op,
const char *  params 
)

Shows the inventory or some item.

Parameters
opplayer.
paramsobject count to get the inventory of. If NULL then defaults to op.

Definition at line 1335 of file c_wiz.cpp.

References draw_ext_info(), inventory(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, object_find_by_tag_global(), give::op, roll-o-matic::params, and Ice::tmp.

Referenced by commands_init().

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

◆ command_invisible()

void command_invisible ( object op,
const char *  params 
)

Wizard wants to become invisible.

Parameters
opwizard.
paramsignored.

Definition at line 2226 of file c_wiz.cpp.

References draw_ext_info(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, NDI_UNIQUE, object_update(), give::op, roll-o-matic::params, UP_OBJ_FACE, and nlohmann::detail::void().

Referenced by commands_init().

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

◆ command_kick()

void command_kick ( object op,
const char *  params 
)

Kicks a player from the server.

Parameters
opDM kicking.
paramsplayer to kick. Must be a full name match.

Definition at line 556 of file c_wiz.cpp.

References command_kick2(), give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_kick2()

static void command_kick2 ( object op,
const char *  params 
)
static

Kicks a player from the server.

Parameters
opDM kicking.
paramsplayer to kick. Must be a full name match.

Definition at line 468 of file c_wiz.cpp.

References draw_ext_info_format(), EVENT_KICK, events_execute_global_event(), first_player, FLAG_REMOVED, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, NDI_ALL, NDI_RED, NDI_UNIQUE, Ns_Dead, give::op, roll-o-matic::params, altar_valkyrie::pl, and QUERY_FLAG.

Referenced by command_banish(), and command_kick().

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

◆ command_learn_special_prayer()

void command_learn_special_prayer ( object op,
const char *  params 
)

Wizard wants to learn a god-given spell.

Parameters
opwizard.
paramsspell name.

Definition at line 2402 of file c_wiz.cpp.

References command_learn_spell_or_prayer(), give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_learn_spell()

void command_learn_spell ( object op,
const char *  params 
)

Wizard wants to learn a regular spell.

Parameters
opwizard.
paramsspell name.

Definition at line 2390 of file c_wiz.cpp.

References command_learn_spell_or_prayer(), give::op, and roll-o-matic::params.

Referenced by commands_init().

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

◆ command_learn_spell_or_prayer()

static void command_learn_spell_or_prayer ( object op,
const char *  params,
int  special_prayer 
)
static

Wizards wants to learn a spell.

Parameters
opwizard.
paramsspell name to learn.
special_prayerif set, special (god-given) prayer.

Definition at line 2357 of file c_wiz.cpp.

References check_spell_known(), do_learn_spell(), draw_ext_info(), draw_ext_info_format(), FREE_OBJ_NO_DESTROY_CALLBACK, get_spell_by_name(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, object_free(), give::op, roll-o-matic::params, and Ice::tmp.

Referenced by command_learn_special_prayer(), and command_learn_spell().

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

◆ command_listplugins()

void command_listplugins ( object op,
const char *  params 
)

Lists all plugins currently loaded with their IDs and full names.

Parameters
opwizard.
paramsignored.

Definition at line 2443 of file c_wiz.cpp.

References give::op, roll-o-matic::params, plugins_display_list(), and nlohmann::detail::void().

Referenced by commands_init().

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

◆ command_loadplugin()

void command_loadplugin ( object op,
const char *  params 
)

Loads the given plugin. The DM specifies the name of the library to load (no pathname is needed). Do not ever attempt to load the same plugin more than once at a time, or bad things could happen.

Parameters
opDM loading a plugin.
paramsshould be the plugin's name, eg cfpython.so

Definition at line 2458 of file c_wiz.cpp.

References buf, draw_ext_info(), draw_ext_info_format(), llevDebug, llevInfo, LOG(), MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, give::op, roll-o-matic::params, and plugins_init_plugin().

Referenced by commands_init().

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

◆ command_loadtest()

void command_loadtest ( object op,
const char *  params 
)

This command will stress server.

It will basically load all world maps (so 900 maps).

Parameters
opDM wanting to test the server.
paramsoption, must be "TRUE" for the test to happen.

Definition at line 306 of file c_wiz.cpp.

References buf, command_goto(), draw_ext_info(), draw_ext_info_format(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DEBUG, NDI_UNIQUE, give::op, roll-o-matic::params, settings, Settings::worldmapstartx, Settings::worldmapstarty, Settings::worldmaptilesx, Settings::worldmaptilesy, diamondslots::x, and diamondslots::y.

Referenced by commands_init().

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

◆ command_mon_aggr()

void command_mon_aggr ( object op,
const char *  params 
)

When DM is possessing a monster, flip aggression on and off, to allow better motion.

Parameters
opwiard.
paramsignored.

Definition at line 1405 of file c_wiz.cpp.

References CLEAR_FLAG, draw_ext_info(), FLAG_FRIENDLY, FLAG_UNAGGRESSIVE, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, NDI_UNIQUE, object_set_enemy(), give::op, roll-o-matic::params, QUERY_FLAG, SET_FLAG, and nlohmann::detail::void().

Referenced by commands_init().

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

◆ command_nowiz()

void command_nowiz ( object op,
const char *  params 
)

Steps down from wizard mode.

Parameters
opwizard.
paramsignored.

Definition at line 2080 of file c_wiz.cpp.

References CLEAR_FLAG, draw_ext_info(), FLAG_WAS_WIZ, FLAG_WIZ, FLAG_WIZCAST, FLAG_WIZPASS, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, NDI_ALL, NDI_LT_GREEN, NDI_UNIQUE, give::op, roll-o-matic::params, Settings::real_wiz, settings, TRUE, unhide(), update_los(), and nlohmann::detail::void().

Referenced by commands_init().

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

◆ command_overlay_reset()

void command_overlay_reset ( object op,
const char *  params 
)

Removes the overlay for op's current map.

Parameters
opDM acting.
paramsignored.

Definition at line 589 of file c_wiz.cpp.

References create_overlay_pathname(), draw_ext_info(), npc_dialog::filename, MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, NDI_UNIQUE, give::op, roll-o-matic::params, and nlohmann::detail::void().

Referenced by commands_init().

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

◆ command_overlay_save()

void command_overlay_save ( object op,
const char *  params 
)

Saves the op's map as an overlay - objects are persisted.

Parameters
opDM wanting to save.
paramsignored.

Definition at line 568 of file c_wiz.cpp.

References draw_ext_info(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_SUCCESS, NDI_UNIQUE, give::op, roll-o-matic::params, save_map(), SAVE_MODE_OVERLAY, and nlohmann::detail::void().

Referenced by commands_init().

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

◆ command_patch()

void command_patch ( object op,
const char *  params 
)

Wizard wants to altar an object.

Parameters
opwizard.
paramsobject and what to patch.

Definition at line 1493 of file c_wiz.cpp.

References draw_ext_info(), draw_ext_info_format(), FALSE, FLAG_WAS_WIZ, get_dm_object(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, give::op, roll-o-matic::params, Settings::real_wiz, SET_FLAG, set_variable(), settings, and Ice::tmp.

Referenced by commands_init().

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

◆ command_possess()

void command_possess ( object op,
const char *  params 
)

DM can possess a monster. Basically, this tricks the client into thinking a given monster, is actually the player it controls. This allows a DM to inhabit a monster's body, and run around the game with it. This function is severely broken - it has tons of hardcoded values,

Parameters
opwizard wanting to possess something.
paramsmonster to possess.
Todo:
fix and reactivate the function, or totally trash.

Definition at line 1432 of file c_wiz.cpp.

References buf, do_some_living(), draw_ext_info(), esrv_new_player(), esrv_send_inventory(), fix_object(), FLAG_WIZ, MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, NUM_BODY_LOCATIONS, object_find_by_name_global(), object_find_by_tag_global(), give::op, roll-o-matic::params, altar_valkyrie::pl, PLAYER, SET_FLAG, and sword_of_souls::victim.

+ Here is the call graph for this function:

◆ command_purge_quest()

void command_purge_quest ( object op,
const char *  param 
)

Definition at line 2853 of file c_wiz.cpp.

References draw_ext_info(), free_quest(), MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, NDI_UNIQUE, give::op, and nlohmann::detail::void().

Referenced by commands_init().

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

◆ command_purge_quest_definitions()

void command_purge_quest_definitions ( object op,
const char *  param 
)

Definition at line 2859 of file c_wiz.cpp.

References assets_collect(), ASSETS_QUESTS, Settings::datadir, draw_ext_info(), MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, NDI_UNIQUE, give::op, settings, and nlohmann::detail::void().

Referenced by commands_init().

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

◆ command_recollect()

void command_recollect ( object op,
const char *  params 
)

Definition at line 1531 of file c_wiz.cpp.

References Socket_Info::allocated_sockets, assets_finish_archetypes_for_play(), first_player, load_assets(), give::next, give::op, roll-o-matic::params, altar_valkyrie::pl, reset_faces_sent(), socket_info, and nlohmann::detail::void().

Referenced by commands_init().

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

◆ command_remove()

void command_remove ( object op,
const char *  params 
)

Remove an object from its position.

Parameters
opwizard.
paramsobject to remove.

Definition at line 1565 of file c_wiz.cpp.

References dm_stack_pop(), draw_ext_info(), draw_ext_info_format(), FLAG_REMOVED, get_dm_object(), HEAD, MAX_BUF, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, give::name, NDI_UNIQUE, object_remove(), object_update_speed(), give::op, roll-o-matic::params, PLAYER, QUERY_FLAG, query_name(), STACK_FROM_STACK, and Ice::tmp.

Referenced by commands_init().

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

◆ command_reset()

◆ command_setgod()

void command_setgod ( object op,
const char *  params 
)

Sets the god for some objects.

Parameters
opDM wanting to change an object.
paramscommand options. Should contain two values, first the object to change, followed by the god to change it to.

Definition at line 418 of file c_wiz.cpp.

References become_follower(), draw_ext_info(), draw_ext_info_format(), find_god(), find_object_both(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, guildjoin::ob, give::op, roll-o-matic::params, PLAYER, and make_face_from_files::str.

Referenced by commands_init().

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

◆ command_settings()

void command_settings ( object op,
const char *  ignored 
)

◆ command_shutdown()

void command_shutdown ( object op,
const char *  params 
)

Totally shutdowns the server.

Parameters
opwizard shutting down the server.
paramsWhen to shut down the server.

Definition at line 658 of file c_wiz.cpp.

References command_help(), draw_ext_info(), draw_ext_info_format(), llevInfo, LOG(), MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMAND_SUCCESS, NDI_ALL, NDI_UNIQUE, shutdown_s::next_warn, give::op, roll-o-matic::params, SHUTDOWN_IDLE, SHUTDOWN_NONE, shutdown_state, SHUTDOWN_TIME, shutdown_s::time, and shutdown_s::type.

Referenced by commands_init().

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

◆ command_skills()

void command_skills ( object op,
const char *  params 
)

Player is asking for her skills.

Just show player's their skills for now. Dm's can already see skills w/ inventory command - b.t.

Parameters
opplayer.
paramsoptional skill restriction.
Todo:
move out of this file as it is used by all players.

Definition at line 1365 of file c_wiz.cpp.

References give::op, roll-o-matic::params, and show_skills().

Referenced by commands_init().

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

◆ command_speed()

void command_speed ( object op,
const char *  params 
)

Changes the server speed.

Parameters
opwizard.
paramsnew speed, or NULL to see the speed.

Definition at line 1732 of file c_wiz.cpp.

References draw_ext_info_format(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, NDI_UNIQUE, give::op, roll-o-matic::params, reset_sleep(), set_tick_duration(), and tick_duration.

Referenced by commands_init().

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

◆ command_stack_clear()

void command_stack_clear ( object op,
const char *  params 
)

Empty DM item stack.

Parameters
opwizard.
paramsignored.

Definition at line 2596 of file c_wiz.cpp.

References draw_ext_info(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, NDI_UNIQUE, give::op, roll-o-matic::params, and nlohmann::detail::void().

Referenced by commands_init().

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

◆ command_stack_list()

void command_stack_list ( object op,
const char *  params 
)

Displays stack contents.

Parameters
opwizard.
paramsignored.

Definition at line 2565 of file c_wiz.cpp.

References object::count, draw_ext_info(), draw_ext_info_format(), say::item, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, object::name, NDI_UNIQUE, object_find_by_tag_global(), give::op, roll-o-matic::params, altar_valkyrie::pl, and nlohmann::detail::void().

Referenced by commands_init().

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

◆ command_stack_pop()

void command_stack_pop ( object op,
const char *  params 
)

Pop the stack top.

Parameters
opwizard.
paramsignored.

Definition at line 2534 of file c_wiz.cpp.

References dm_stack_pop(), give::op, roll-o-matic::params, and nlohmann::detail::void().

Referenced by commands_init().

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

◆ command_stack_push()

void command_stack_push ( object op,
const char *  params 
)

Push specified item on stack.

Parameters
opwizard.
paramsobject specifier.

Definition at line 2547 of file c_wiz.cpp.

References dm_stack_push(), get_dm_object(), guildjoin::ob, give::op, roll-o-matic::params, and STACK_FROM_NUMBER.

Referenced by commands_init().

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

◆ command_stats()

void command_stats ( object op,
const char *  params 
)

Displays the statistics of a player.

Parameters
opwizard.
paramsplayer's name.

Definition at line 1762 of file c_wiz.cpp.

References draw_ext_info(), draw_ext_info_format(), find_player_partial_name(), FMT64, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, give::op, roll-o-matic::params, and altar_valkyrie::pl.

Referenced by commands_init().

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

◆ command_style_map_info()

void command_style_map_info ( object op,
const char *  params 
)

Displays information about styles loaded for random maps.

Parameters
opwizard.
paramsignored.

Definition at line 2763 of file c_wiz.cpp.

References draw_ext_info(), draw_ext_info_format(), FOR_MAP_FINISH, FOR_MAP_PREPARE, MAP_HEIGHT, map_size(), MAP_WIDTH, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MAPS, NDI_UNIQUE, mapstruct::next, give::op, roll-o-matic::params, styles, Ice::tmp, nlohmann::detail::void(), diamondslots::x, and diamondslots::y.

Referenced by commands_init().

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

◆ command_summon()

void command_summon ( object op,
const char *  params 
)

Summons player near DM.

Parameters
opDM.
paramsplayer to summon.

Definition at line 866 of file c_wiz.cpp.

References add_string(), draw_ext_info(), draw_ext_info_format(), enter_exit(), EXIT_PATH, EXIT_X, EXIT_Y, FREE_OBJ_NO_DESTROY_CALLBACK, freearr_x, freearr_y, get_other_player_from_name(), MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, object_find_free_spot(), object_free(), object_new(), give::op, roll-o-matic::params, and altar_valkyrie::pl.

Referenced by commands_init().

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

◆ command_swap()

void command_swap ( object op,
const char *  params 
)

Mark a map as ready for swapping.

Definition at line 907 of file c_wiz.cpp.

References draw_ext_info(), has_been_loaded(), HUGE_BUF, m, MAP_IN_MEMORY, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, MSG_TYPE_COMMAND_SUCCESS, NDI_UNIQUE, give::op, roll-o-matic::params, python_init::path, and path_combine_and_normalize().

Referenced by commands_init().

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

◆ command_teleport()

void command_teleport ( object op,
const char *  params 
)

Teleport next to target player.

Parameters
opDM teleporting.
paramsoptions sent by player.

Definition at line 933 of file c_wiz.cpp.

References add_string(), draw_ext_info(), draw_ext_info_format(), enter_exit(), EXIT_PATH, EXIT_X, EXIT_Y, find_player_partial_name(), FREE_OBJ_NO_DESTROY_CALLBACK, freearr_x, freearr_y, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, object_find_free_spot(), object_free(), object_new(), give::op, roll-o-matic::params, and altar_valkyrie::pl.

Referenced by commands_init().

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

◆ command_toggle_shout()

void command_toggle_shout ( object op,
const char *  params 
)

A simple toggle for the no_shout field. AKA the MUZZLE command.

Parameters
opwizard toggling.
paramsplayer to mute/unmute.

Definition at line 615 of file c_wiz.cpp.

References draw_ext_info(), draw_ext_info_format(), EVENT_MUZZLE, events_execute_global_event(), get_other_player_from_name(), MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, MSG_TYPE_COMMAND_ERROR, NDI_ORANGE, NDI_RED, NDI_UNIQUE, give::op, roll-o-matic::params, and altar_valkyrie::pl.

Referenced by commands_init().

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

◆ command_unloadplugin()

void command_unloadplugin ( object op,
const char *  params 
)

Unloads the given plugin. The DM specified the ID of the library to unload. Note that some things may behave strangely if the correct plugins are not loaded.

Parameters
opDM unloading a plugin.
paramsshould be the plugin's internal name, eg Python

Definition at line 2490 of file c_wiz.cpp.

References draw_ext_info(), draw_ext_info_format(), init_signals(), llevInfo, LOG(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, give::op, roll-o-matic::params, and plugins_remove_plugin().

Referenced by commands_init().

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

◆ dm_stack_peek()

static object* dm_stack_peek ( player pl)
static

Get current stack top item for player. Returns NULL if no stacked item. If stacked item disappeared (freed), remove it.

Ryo, august 2004

Parameters
plwizard.
Returns
item on top of stack, or NULL if deleted/stack empty.

Definition at line 120 of file c_wiz.cpp.

References dm_stack_pop(), draw_ext_info(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, guildjoin::ob, object_find_by_tag_global(), and altar_valkyrie::pl.

Referenced by get_dm_object().

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

◆ dm_stack_pop()

static void dm_stack_pop ( player pl)
static

Remove an item from the wizard's item stack.

Parameters
plwizard.

Definition at line 95 of file c_wiz.cpp.

References draw_ext_info(), draw_ext_info_format(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, and altar_valkyrie::pl.

Referenced by command_create(), command_diff(), command_free(), command_insert_into(), command_remove(), command_stack_pop(), and dm_stack_peek().

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

◆ dm_stack_push()

static void dm_stack_push ( player pl,
tag_t  item 
)
static

Push specified item on player stack. Inform player of position. Initializes variables if needed.

Parameters
plwizard.
itemitem to put on stack.

Definition at line 150 of file c_wiz.cpp.

References draw_ext_info(), draw_ext_info_format(), say::item, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, altar_valkyrie::pl, and STACK_SIZE.

Referenced by command_create(), command_stack_push(), do_dump(), and get_dm_object().

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

◆ do_dump()

void do_dump ( object who,
object what 
)

Definition at line 2865 of file c_wiz.cpp.

References object::count, dm_stack_push(), draw_ext_info(), MSG_SUBTYPE_NONE, MSG_TYPE_COMMAND, NDI_UNIQUE, object_dump(), stringbuffer_finish(), stringbuffer_new(), and autojail::who.

Referenced by command_dumpabove(), command_dumpbelow(), and examine_cmd().

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

◆ do_wizard_dm()

static int do_wizard_dm ( object op,
const char *  params,
int  silent 
)
static

Actually changes a player to wizard.

Parameters
opplayer.
paramspassword.
silentif zero, don't inform players of the mode change.
Return values
0no mode change.
1op is now a wizard.

Definition at line 2165 of file c_wiz.cpp.

References checkdm(), clear_los(), draw_ext_info(), FLAG_WAS_WIZ, FLAG_WIZ, FLAG_WIZCAST, FLAG_WIZPASS, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, MSG_TYPE_COMMAND_ERROR, NDI_ALL, NDI_LT_GREEN, NDI_UNIQUE, give::op, roll-o-matic::params, QUERY_FLAG, and SET_FLAG.

Referenced by command_dm(), and command_dmhide().

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

◆ do_wizard_hide()

static void do_wizard_hide ( object op,
int  silent_dm 
)
static

Actually hides or unhides specified player (obviously a DM).

Parameters
opDM hiding.
silent_dmif non zero, other players are informed of DM entering/leaving, else they just think someone left/entered.

Definition at line 352 of file c_wiz.cpp.

References draw_ext_info(), draw_ext_info_format(), MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, MSG_TYPE_ADMIN_PLAYER, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_SUCCESS, NDI_ALL, NDI_DK_ORANGE, NDI_LT_GREEN, NDI_UNIQUE, give::op, and unhide().

Referenced by command_dmhide(), and command_hide().

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

◆ find_object_both()

static object* find_object_both ( const char *  params)
static

This finds and returns the object which matches the name or object number (specified via num #whatever).

Parameters
paramsobject to find.
Returns
suitable object, or NULL if none found.

Definition at line 403 of file c_wiz.cpp.

References object_find_by_name_global(), object_find_by_tag_global(), and roll-o-matic::params.

Referenced by command_setgod().

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

◆ get_dm_object()

static object* get_dm_object ( player pl,
const char **  params,
int *  from 
)
static

Checks 'params' for object code.

Can be:

  • empty => get current object stack top for player
  • number => get item with that tag, stack it for future use
  • $number => get specified stack item
  • "me" => player himself

At function exit, params points to first non-object char

'from', if not NULL, contains at exit:

Ryo, august 2004

Parameters
plwizard.
paramsobject specified.
from
Returns
pointed object, or NULL if nothing suitable was found.

Definition at line 196 of file c_wiz.cpp.

References dm_stack_peek(), dm_stack_push(), draw_ext_info_format(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_DM, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, guildjoin::ob, object_find_by_tag_global(), roll-o-matic::params, altar_valkyrie::pl, STACK_FROM_NONE, STACK_FROM_NUMBER, STACK_FROM_STACK, and STACK_FROM_TOP.

Referenced by command_diff(), command_dump(), command_free(), command_insert_into(), command_patch(), command_remove(), and command_stack_push().

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

◆ get_other_player_from_name()

static player* get_other_player_from_name ( object op,
const char *  name 
)
static

Enough of the DM functions seem to need this that I broke it out to a separate function. name is the person being saught, op is who is looking for them. This prints diagnostics messages, and returns the other player, or NULL otherwise.

Parameters
opplayer searching someone.
namename to search for.
Returns
player, or NULL if player can't be found.

Definition at line 60 of file c_wiz.cpp.

References draw_ext_info(), first_player, MAX_NAME, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, give::name, NDI_UNIQUE, give::op, altar_valkyrie::pl, and ST_PLAYING.

Referenced by command_arrest(), command_banish(), command_freeze(), command_summon(), and command_toggle_shout().

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

◆ get_spell_by_name()

static object* get_spell_by_name ( object op,
const char *  spell_name 
)
static

Returns spell object (from archetypes) by name. Used for wizard's learn spell/prayer.

Ignores archetypes "spelldirect_xxx" since these archetypes are not used anymore (but may still be present in some player's inventories and thus cannot be removed). We have to ignore them here since they have the same name than other "spell_xxx" archetypes and would always conflict.

Parameters
opplayer issuing the command.
spell_namespell to find.
Returns
NULL if 0 or more than one spell matches, spell object else.
Todo:
remove the spelldirect_xxx test?

Definition at line 2253 of file c_wiz.cpp.

References arch_to_object(), AssetsManager::archetypes(), draw_ext_info_format(), AssetsCollection< T, Key >::each(), is_valid_types_gen::found, getManager(), if(), MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_ERROR, NDI_UNIQUE, give::op, and SPELL.

Referenced by command_learn_spell_or_prayer().

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

◆ player_arrest()

int player_arrest ( object who)

Put a player into jail, taking into account cursed exits and player's region.

Parameters
whoplayer to put in jail
Return values
0player was moved to jail.
-1no jail found.
-2couldn't move to jail (map loading error, or already at jail's position).
-3op isn't a player.

Definition at line 789 of file c_wiz.cpp.

References enter_exit(), FREE_OBJ_NO_DESTROY_CALLBACK, get_jail_exit(), object_free(), PLAYER, autojail::who, diamondslots::x, and diamondslots::y.

Referenced by attack_ob_simple(), cfapi_object_move(), and command_arrest().

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

◆ reset_faces_sent()

static void reset_faces_sent ( struct socket_struct socket)
static

Definition at line 1525 of file c_wiz.cpp.

References socket_struct::faces_sent, socket_struct::faces_sent_len, and get_faces_count().

Referenced by command_recollect().

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

◆ unhide()

static void unhide ( object op)
static

Definition at line 333 of file c_wiz.cpp.

References draw_ext_info(), draw_ext_info_format(), MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_PLAYER, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_SUCCESS, NDI_ALL, NDI_DK_ORANGE, NDI_UNIQUE, and give::op.

Referenced by command_nowiz(), and do_wizard_hide().

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

Variable Documentation

◆ shutdown_state

struct shutdown_s shutdown_state

Definition at line 44 of file c_wiz.cpp.

Referenced by check_shutdown(), command_shutdown(), and login_check_shutdown().