|
Crossfire Server, Branch 1.12
R12190
|
Resurrection / raise dead related code. More...

Go to the source code of this file.
Functions | |
| int | cast_raise_dead_spell (object *op, object *caster, object *spell, int dir, const char *arg) |
| This handles the raise dead / resurrection spells. | |
| void | dead_player (object *op) |
| Kill a player on a permanent death server with resurrection. | |
| static int | resurrect_player (object *op, char *playername, object *spell) |
| Resurrect a player. | |
| static int | resurrection_fails (int levelcaster, int leveldead) |
| Will the resurrection succeed? | |
Resurrection / raise dead related code.
This is used on servers with permanent death on.
Definition in file resurrection.c.
| int cast_raise_dead_spell | ( | object * | op, |
| object * | caster, | ||
| object * | spell, | ||
| int | dir, | ||
| const char * | arg | ||
| ) |
This handles the raise dead / resurrection spells.
So try to revive a player.
| op | who is doing the resurrecting. |
| caster | what is casting the spell (op or a scroll/rod). |
| spell | spell object. |
| dir | direction the spell is cast. |
| arg | name of the player to revive. |
| 0 | spell had no effect, or player couldn't revive. |
| 1 | player revived, or some nasty things happened. |
Definition at line 186 of file resurrection.c.
References arch_to_object(), caster_level(), CORPSE, draw_ext_info(), draw_ext_info_format(), find_archetype(), free_object(), freearr_x, freearr_y, get_map_flags(), GET_MAP_OB, insert_ob_in_map(), treasurestruct::item, MAX_BUF, MSG_TYPE_SPELL, MSG_TYPE_SPELL_FAILURE, NDI_UNIQUE, treasurestruct::next, treasurestruct::nrof, P_OUT_OF_MAP, remove_ob(), resurrect_player(), resurrection_fails(), and summon_hostile_monsters().
Referenced by cast_spell().


| void dead_player | ( | object * | op | ) |
Kill a player on a permanent death server with resurrection.
| op | player to kill. |
Definition at line 291 of file resurrection.c.
References llevError, Settings::localdir, LOG(), MAX_BUF, Settings::playerdir, settings, snprintf(), and strerror_local().
Referenced by kill_player().


| static int resurrect_player | ( | object * | op, |
| char * | playername, | ||
| object * | spell | ||
| ) | [static] |
Resurrect a player.
This may change the player's race, or reduce experience.
| op | who is resurrecting. |
| playername | the name of the player to resurrect. |
| spell | spell that was used to resurrect. |
| 0 | resurrection failed. |
| 1 | playername is living again. |
Definition at line 62 of file resurrection.c.
References treasurestruct::chance, draw_ext_info_format(), find_treasurelist(), treasurestruct::item, treasureliststruct::items, llevError, Settings::localdir, LOG(), MAX_BUF, MSG_TYPE_SPELL, MSG_TYPE_SPELL_FAILURE, MSG_TYPE_SPELL_SUCCESS, NDI_UNIQUE, treasurestruct::next, Settings::playerdir, settings, snprintf(), treasureliststruct::total_chance, and unlink.
Referenced by cast_raise_dead_spell().


| static int resurrection_fails | ( | int | levelcaster, |
| int | leveldead | ||
| ) | [static] |
Will the resurrection succeed?
Rules:
| levelcaster | level at which the spell is cast. |
| leveldead | dead player's level. |
Definition at line 274 of file resurrection.c.
References rndm().
Referenced by cast_raise_dead_spell().


1.7.6.1