server/src/common/items/demonseye.c

63 lines
1.6 KiB
C
Raw Normal View History

2001-01-25 10:37:55 +01:00
/* vi: set ts=2:
*
*
* Eressea PB(E)M host Copyright (C) 1998-2003
2001-01-25 10:37:55 +01:00
* Christian Schlittchen (corwin@amber.kn-bremen.de)
* Katja Zedel (katze@felidae.kn-bremen.de)
* Henning Peters (faroul@beyond.kn-bremen.de)
* Enno Rehling (enno@eressea-pbem.de)
* Ingo Wilken (Ingo.Wilken@informatik.uni-oldenburg.de)
*
* This program may not be used, modified or distributed without
* prior permission by the authors of Eressea.
*/
#include <config.h>
#include <eressea.h>
#include "demonseye.h"
/* kernel includes */
#include <faction.h>
2001-01-25 10:37:55 +01:00
#include <item.h>
#include <message.h>
#include <plane.h>
#include <region.h>
#include <unit.h>
2001-01-25 10:37:55 +01:00
/* util includes */
#include <functions.h>
2001-01-25 10:37:55 +01:00
/* libc includes */
#include <assert.h>
static int
2004-06-21 18:45:27 +02:00
summon_igjarjuk(struct unit * u, const struct item_type * itype, int amount, struct order * ord)
2001-01-25 10:37:55 +01:00
{
struct plane * p = rplane(u->region);
unused(amount);
2001-01-25 10:37:55 +01:00
unused(itype);
if (p!=NULL) {
2004-06-21 18:45:27 +02:00
ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "use_realworld_only", ""));
return EUNUSABLE;
} else {
assert(!"not implemented");
return EUNUSABLE;
}
2001-01-25 10:37:55 +01:00
}
static boolean
2004-06-21 18:45:27 +02:00
give_igjarjuk(const struct unit * src, const struct unit * d, const struct item_type * itype, int n, struct order * ord)
2001-01-25 10:37:55 +01:00
{
sprintf(buf, "Eine h<>here Macht hindert %s daran, das Objekt zu <20>bergeben. "
"'ES IST DEINS, MEIN KIND. DEINS GANZ ALLEIN'.", unitname(src));
2004-06-21 18:45:27 +02:00
mistake(src, ord, buf, MSG_COMMERCE);
2001-01-25 10:37:55 +01:00
return false;
}
void
register_demonseye(void)
{
register_function((pf_generic)summon_igjarjuk, "useigjarjuk");
register_function((pf_generic)give_igjarjuk, "giveigjarjuk");
}