mirror of
https://github.com/tbamud/tbamud.git
synced 2026-01-05 08:58:49 +01:00
[Oct 08 2009] - Rumble
Fixed do_purge to allow targetting of multiple objects of the same name. i.e. 2.knife. (thanks Drefs) [Oct 07 2009] - Rumble Added CAN_SEE_IN_DARK and AFF_BLIND checks in do_automap. (thanks Frenze) [Oct 06 2009] - Rumble Fixed do_cast to allow targetting of multiple objects of the same name. i.e. 2 .knife. (thanks Drefs) [Oct 04 2009] - Rumble Fixed a bug on filling unlimited containers where it doesn't update weight. (t hanks Drefs) [Oct 02 2009] - Rumble Fixed buildwalk so it does not require the first room to exist. (thanks Zizaza t)
This commit is contained in:
parent
5e3caf42ff
commit
9f5b893ec5
6 changed files with 35 additions and 12 deletions
|
|
@ -489,7 +489,7 @@ ACMD(do_cast)
|
|||
struct char_data *tch = NULL;
|
||||
struct obj_data *tobj = NULL;
|
||||
char *s, *t;
|
||||
int mana, spellnum, i, target = 0;
|
||||
int number, mana, spellnum, i, target = 0;
|
||||
|
||||
if (IS_NPC(ch))
|
||||
return;
|
||||
|
|
@ -539,16 +539,17 @@ ACMD(do_cast)
|
|||
if (IS_SET(SINFO.targets, TAR_IGNORE)) {
|
||||
target = TRUE;
|
||||
} else if (t != NULL && *t) {
|
||||
number = get_number(&t);
|
||||
if (!target && (IS_SET(SINFO.targets, TAR_CHAR_ROOM))) {
|
||||
if ((tch = get_char_vis(ch, t, NULL, FIND_CHAR_ROOM)) != NULL)
|
||||
if ((tch = get_char_vis(ch, t, &number, FIND_CHAR_ROOM)) != NULL)
|
||||
target = TRUE;
|
||||
}
|
||||
if (!target && IS_SET(SINFO.targets, TAR_CHAR_WORLD))
|
||||
if ((tch = get_char_vis(ch, t, NULL, FIND_CHAR_WORLD)) != NULL)
|
||||
if ((tch = get_char_vis(ch, t, &number, FIND_CHAR_WORLD)) != NULL)
|
||||
target = TRUE;
|
||||
|
||||
if (!target && IS_SET(SINFO.targets, TAR_OBJ_INV))
|
||||
if ((tobj = get_obj_in_list_vis(ch, t, NULL, ch->carrying)) != NULL)
|
||||
if ((tobj = get_obj_in_list_vis(ch, t, &number, ch->carrying)) != NULL)
|
||||
target = TRUE;
|
||||
|
||||
if (!target && IS_SET(SINFO.targets, TAR_OBJ_EQUIP)) {
|
||||
|
|
@ -559,11 +560,11 @@ ACMD(do_cast)
|
|||
}
|
||||
}
|
||||
if (!target && IS_SET(SINFO.targets, TAR_OBJ_ROOM))
|
||||
if ((tobj = get_obj_in_list_vis(ch, t, NULL, world[IN_ROOM(ch)].contents)) != NULL)
|
||||
if ((tobj = get_obj_in_list_vis(ch, t, &number, world[IN_ROOM(ch)].contents)) != NULL)
|
||||
target = TRUE;
|
||||
|
||||
if (!target && IS_SET(SINFO.targets, TAR_OBJ_WORLD))
|
||||
if ((tobj = get_obj_vis(ch, t, NULL)) != NULL)
|
||||
if ((tobj = get_obj_vis(ch, t, &number)) != NULL)
|
||||
target = TRUE;
|
||||
|
||||
} else { /* if target string is empty */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue