Crossfire Server, Branches 1.12
R18729
|
#include <global.h>
Go to the source code of this file.
Functions | |
void | clean_tmp_files (void) |
void | dragon_ability_gain (object *ob, int x, int y) |
void | draw_ext_info (int flags, int pri, const object *pl, uint8 type, uint8 subtype, const char *txt, const char *txt2) |
void | draw_ext_info_format (int flags, int pri, const object *pl, uint8 type, uint8 subtype, const char *new_format, const char *old_format,...) |
void | emergency_save (int x) |
void | esrv_del_item (player *pl, int tag) |
void | esrv_send_item (object *ob, object *obx) |
void | esrv_update_item (int flags, object *pl, object *op) |
void | esrv_update_spells (player *pl) |
int | execute_event (object *op, int eventcode, object *activator, object *third, const char *message, int fix) |
int | execute_global_event (int eventcode,...) |
void | ext_info_map (int color, const mapstruct *map, uint8 type, uint8 subtype, const char *str1, const char *str2) |
object * | find_skill_by_number (object *who, int skillno) |
void | fix_auto_apply (mapstruct *m) |
void | monster_check_apply (object *ob, object *obt) |
void | move_firewall (object *ob) |
void | set_darkness_map (mapstruct *m) |
void | trap_adjust (object *ob, int x) |
void clean_tmp_files | ( | void | ) |
Remove temporary map files.
Definition at line 33 of file stubs_common.c.
void dragon_ability_gain | ( | object * | ob, |
int | x, | ||
int | y | ||
) |
When a dragon-player gains a new stage of evolution, he gets some treasure.
who | the dragon player. |
atnr | the attack-number of the ability focus. |
level | ability level. |
Definition at line 42 of file stubs_common.c.
void draw_ext_info | ( | int | flags, |
int | pri, | ||
const object * | pl, | ||
uint8 | type, | ||
uint8 | subtype, | ||
const char * | txt, | ||
const char * | txt2 | ||
) |
Those are dummy functions defined to resolve all symboles. Added as part of glue cleaning. Ryo 2005-07-15
Sends message to player(s).
flags | Various flags - mostly color, plus a few specials. |
pri | Priority. It is a little odd - the lower the value, the more important it is. Thus, 0 gets sent no matter what. Otherwise, the value must be less than the listening level that the player has set. Unfortunately, there is no clear guideline on what each level does what. |
pl | Can be passed as NULL - in fact, this will be done if NDI_ALL is set in the flags. |
If message is black, and not NDI_UNIQUE, gets sent through output buffers. If the client supports the new readables, this is sent to the client without processing in the output buffers.
type | The type MSG_TYPE for the type of message. |
subtype | The type MSG_TYPE for the type of message. |
message | The message to send for clients that support draw_ext_info. |
oldmessage | is for clients that do not support it. oldmessage can be NULL, in which case this function will strip out the tags of message. |
Definition at line 11 of file stubs_common.c.
References logfile.
void draw_ext_info_format | ( | int | flags, |
int | pri, | ||
const object * | pl, | ||
uint8 | type, | ||
uint8 | subtype, | ||
const char * | new_format, | ||
const char * | old_format, | ||
... | |||
) |
Sends message to player(s).
This function is the same as draw_ext_info, but takes varargs format. Otherwise, the meaning of all the fields is the same. This is perhaps not the most efficient as we do vsnprintf on both the old and newbuf, but it simplifies the code greatly since we can just call draw_ext_info. Also, hopefully at some point, need for old_format will go away.
flags | Various flags - mostly color, plus a few specials. |
pri | Priority. It is a little odd - the lower the value, the more important it is. Thus, 0 gets sent no matter what. Otherwise, the value must be less than the listening level that the player has set. Unfortunately, there is no clear guideline on what each level does what. |
pl | Can be passed as NULL - in fact, this will be done if NDI_ALL is set in the flags. |
If message is black, and not NDI_UNIQUE, gets sent through output buffers. If the client supports the new readables, this is sent to the client without processing in the output buffers.
type | The type MSG_TYPE for the type of message. |
subtype | The type MSG_TYPE for the type of message. |
new_format | |
old_format |
Definition at line 15 of file stubs_common.c.
References logfile.
void emergency_save | ( | int | x | ) |
Save all players.
flag | if non zero, it means that we want to try and save everyone, but keep the game running. Thus, we don't want to free any information. |
Definition at line 30 of file stubs_common.c.
void esrv_del_item | ( | player * | pl, |
int | tag | ||
) |
Tells the client to delete an item. Uses the item command with a -1 location.
Definition at line 52 of file stubs_common.c.
Sends item's info to player.
Definition at line 36 of file stubs_common.c.
Updates object *op for player *pl.
flags is a list of values to update to the client (as defined in newclient.h - might as well use the same value both places.
Definition at line 39 of file stubs_common.c.
void esrv_update_spells | ( | player * | pl | ) |
This looks for any spells the player may have that have changed their stats. It then sends an updspell packet for each spell that has changed in this way.
Definition at line 55 of file stubs_common.c.
int execute_event | ( | object * | op, |
int | eventcode, | ||
object * | activator, | ||
object * | third, | ||
const char * | message, | ||
int | fix | ||
) |
Definition at line 64 of file stubs_common.c.
int execute_global_event | ( | int | eventcode, |
... | |||
) |
Definition at line 68 of file stubs_common.c.
void ext_info_map | ( | int | color, |
const mapstruct * | map, | ||
uint8 | type, | ||
uint8 | subtype, | ||
const char * | str1, | ||
const char * | str2 | ||
) |
Writes to everyone on the specified map
Definition at line 23 of file stubs_common.c.
References logfile.
This returns the skill pointer of the given name (the one that accumlates exp, has the level, etc).
It is presumed that the player will be needing to actually use the skill, so a skill tool will be equipped if one if found to benefit from its bonuses.
This code is basically the same as find_skill_by_name() above, but instead of a skill name, we search by matching number.
who | player applying a skill. |
skillno | skill subtype. |
Definition at line 48 of file stubs_common.c.
void fix_auto_apply | ( | mapstruct * | m | ) |
Those are dummy functions defined to resolve all symboles. Added as part of glue cleaning. Ryo 2005-07-15
Definition at line 8 of file stubs_common.c.
Definition at line 58 of file stubs_common.c.
void move_firewall | ( | object * | ob | ) |
Move for FIREWALL.
firewalls fire other spells. The direction of the wall is stored in op->stats.sp. walls can have hp, so they can be torn down.
op | firewall. |
Definition at line 27 of file stubs_common.c.
void set_darkness_map | ( | mapstruct * | m | ) |
Set the darkness level for a map, based on the time of the day.
m | map to alter. |
Definition at line 45 of file stubs_common.c.
void trap_adjust | ( | object * | ob, |
int | x | ||
) |
Adjust trap difficulty to the map. The default traps are too strong for wimpy level 1 players, and unthreatening to anyone of high level
trap | trap to adjust. |
difficulty | map difficulty. |
Definition at line 61 of file stubs_common.c.