From 5bb68970dece3052f5bf82d53bec8c6eeac60e15 Mon Sep 17 00:00:00 2001 From: Fate Date: Sun, 23 Nov 2008 23:30:51 -0700 Subject: Magic: looping over spells, spell field access, is-equipped check --- src/map/magic-expr.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/map/magic-expr.h') diff --git a/src/map/magic-expr.h b/src/map/magic-expr.h index 5f58d3c..1a54293 100644 --- a/src/map/magic-expr.h +++ b/src/map/magic-expr.h @@ -89,4 +89,10 @@ magic_copy_var(val_t *dest, val_t *src); void magic_random_location(location_t *dest, area_t *area); -#endif /* !defined(MAGIC_EXPR_H_) */ \ No newline at end of file +int // ret -1: not a string, ret 1: no such item, ret 0: OK +magic_find_item(val_t *args, int index, struct item *item, int *stackable); + +#define GET_ARG_ITEM(index, dest, stackable) switch(magic_find_item(args, index, &dest, &stackable)) { case -1 : return 1; case 1 : return 0; } + + +#endif /* !defined(MAGIC_EXPR_H_) */ -- cgit v1.2.3-60-g2f50