diff --git a/src/common/kernel/curse.c b/src/common/kernel/curse.c index 4742ccc43..245d92134 100644 --- a/src/common/kernel/curse.c +++ b/src/common/kernel/curse.c @@ -672,51 +672,6 @@ is_cursed_with(attrib *ap, curse *c) return false; } /* ------------------------------------------------------------- */ -/* Diese Funktionen werden von reports.c:print_curses() während der - * Generierung des Normalreports aufgerufen und ersetzen - * cursedisplay - */ -/* C_MAGICSTONE*/ -static int -cinfo_magicrunes(void * obj, typ_t typ, curse *c, int self) -{ - - if (typ == TYP_BUILDING){ - building * b; - b = (building*)obj; - if (self){ - sprintf(buf, "Auf den Mauern von %s erkennt man seltsame Runen. (%s)", - b->name, curseid(c)); - return 1; - } - } else if (typ == TYP_SHIP) { - ship *sh; - sh = (ship*)obj; - if (self){ - sprintf(buf, "Auf den Planken von %s erkennt man seltsame Runen. (%s)", - sh->name, curseid(c)); - return 1; - } - } - - return 0; -} - -/* C_DISORIENTATION */ -static int -cinfo_disorientation(void * obj, typ_t typ, curse *c, int self) -{ - unused(typ); - unused(obj); - unused(self); - - assert(typ == TYP_SHIP); - - sprintf(buf, "Der Kompaß kaputt, die Segel zerrissen, der Himmel " - "wolkenverhangen. Wohin fahren wir? (%s)", curseid(c)); - - return 1; -} static int read_skill(FILE * F, curse * c) diff --git a/src/common/spells/buildingcurse.c b/src/common/spells/buildingcurse.c index a10981fef..21b1e3323 100644 --- a/src/common/spells/buildingcurse.c +++ b/src/common/spells/buildingcurse.c @@ -39,9 +39,9 @@ cinfo_building(const locale * lang, void * obj, typ_t typ, curse *c, int self) unused(typ); assert(typ == TYP_BUILDING); - if (self){ + if (self == 1){ /* owner or inside */ msg = msg_message(mkname("curseinfo", c->type->cname), "id", c->no); - } else { + } else { /* outside */ msg = msg_message(mkname("curseinfo", "buildingunknown"), "id", c->no); } nr_render(msg, lang, buf, sizeof(buf), NULL); @@ -51,3 +51,29 @@ cinfo_building(const locale * lang, void * obj, typ_t typ, curse *c, int self) /* CurseInfo mit Spezialabfragen */ +/* C_MAGICSTONE*/ +static int +cinfo_magicrunes(void * obj, typ_t typ, curse *c, int self) +{ + + if (typ == TYP_BUILDING){ + building * b; + b = (building*)obj; + if (self){ + sprintf(buf, "Auf den Mauern von %s erkennt man seltsame Runen. (%s)", + b->name, curseid(c)); + return 1; + } + } else if (typ == TYP_SHIP) { + ship *sh; + sh = (ship*)obj; + if (self){ + sprintf(buf, "Auf den Planken von %s erkennt man seltsame Runen. (%s)", + sh->name, curseid(c)); + return 1; + } + } + + return 0; +} + diff --git a/src/common/spells/regioncurse.c b/src/common/spells/regioncurse.c index c5d03e5fa..8dfbb1645 100644 --- a/src/common/spells/regioncurse.c +++ b/src/common/spells/regioncurse.c @@ -114,6 +114,7 @@ cinfo_magicstreet(const locale * lang,void * obj, typ_t typ, curse *c, int self) return 1; } + void register_regioncurse(void) { diff --git a/src/common/spells/shipcurse.c b/src/common/spells/shipcurse.c index 50c224acb..a337fa5f5 100644 --- a/src/common/spells/shipcurse.c +++ b/src/common/spells/shipcurse.c @@ -41,7 +41,7 @@ cinfo_ship(const locale * lang, void * obj, typ_t typ, curse *c, int self) unused(obj); assert(typ == TYP_SHIP); - if (self){ + if (self){ /* owner or inside */ msg = msg_message(mkname("curseinfo", c->type->cname), "id", c->no); } else { msg = msg_message(mkname("curseinfo", "shipunknown"), "id", c->no); @@ -51,24 +51,6 @@ cinfo_ship(const locale * lang, void * obj, typ_t typ, curse *c, int self) return 1; } -static int -cinfo_ship_onlyowner(const locale * lang, void * obj, typ_t typ, curse *c, int self) -{ - message * msg; - - unused(obj); - unused(typ); - assert(typ == TYP_SHIP); - - if (self){ - msg = msg_message(mkname("curseinfo", c->type->cname), "id", c->no); - nr_render(msg, lang, buf, sizeof(buf), NULL); - msg_release(msg); - return 1; - } - return 0; -} - /* CurseInfo mit Spezialabfragen */ /* C_SHIP_NODRIFT */ @@ -96,3 +78,19 @@ cinfo_shipnodrift(const locale * lang, void * obj, typ_t typ, curse *c, int self return 1; } +/* C_DISORIENTATION */ +static int +cinfo_disorientation(void * obj, typ_t typ, curse *c, int self) +{ + unused(typ); + unused(obj); + unused(self); + + assert(typ == TYP_SHIP); + + sprintf(buf, "Der Kompaß kaputt, die Segel zerrissen, der Himmel " + "wolkenverhangen. Wohin fahren wir? (%s)", curseid(c)); + + return 1; +} +