Technically we should make C_MOB_SPEC() a function but that would require
more rewriting than this simple solution.
Also available on my web page as stock20.patch.
--- 8< --- 8< ---
diff -uprN -x *.o ../stk/castle.c ./castle.c
--- ../stk/castle.c Thu Jun 19 00:58:36 1997
+++ ./castle.c Wed Sep 10 14:14:36 1997
@@ -29,6 +29,7 @@ extern struct descriptor_data *descripto
extern struct index_data *mob_index;
extern struct index_data *obj_index;
extern struct time_info_data time_info;
+extern int mini_mud;
/* IMPORTANT!
The below defined number is the zone number of the Kings Castle.
@@ -44,7 +45,14 @@ extern struct time_info_data time_info;
|* Coded by Sapowox (d90-jkr@nada.kth.se) *|
\**********************************************************************/
-#define C_MOB_SPEC(zone,mob) (mob_index[real_mobile(((zone)*100)+(mob))].func)
+#define C_MOB_SPEC(zone,mob) \
+ if ((check = real_mobile(((zone)*100)+(mob))) < 0) { \
+ if (!mini_mud) { \
+ sprintf(buf, "assign_kings_castle(): can't find mob #%d.", ((zone)*100)+(mob)); \
+ log(buf); \
+ } \
+ } else \
+ mob_index[check].func
#define R_MOB(zone, mob) (real_mobile(((zone)*100)+(mob)))
#define R_OBJ(zone, obj) (real_object(((zone)*100)+(obj)))
@@ -70,6 +78,8 @@ SPECIAL(jerry);
void assign_kings_castle(void)
{
+ int check;
+
C_MOB_SPEC(Z_KINGS_C, 0) = CastleGuard; /* Gwydion */
/* Added the previous line -- Furry */
C_MOB_SPEC(Z_KINGS_C, 1) = king_welmar; /* Our dear friend, the King */
--
George Greer - Me@Null.net | Genius may have its limitations, but stupidity
http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/08/00 PST