forked from github/server
* unitcurse kompiliert so
This commit is contained in:
parent
05d073373d
commit
873419c675
|
@ -90,6 +90,10 @@ SOURCE=.\alp.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\regioncurse.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\spells.h
|
SOURCE=.\spells.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# End Group
|
# End Group
|
||||||
|
@ -99,7 +103,19 @@ SOURCE=.\alp.c
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\regioncurse.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\shipcurse.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\spells.c
|
SOURCE=.\spells.c
|
||||||
# End Source File
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\unitcurse.c
|
||||||
|
# End Source File
|
||||||
# End Target
|
# End Target
|
||||||
# End Project
|
# End Project
|
||||||
|
|
|
@ -16,21 +16,27 @@
|
||||||
#include "unitcurse.h"
|
#include "unitcurse.h"
|
||||||
|
|
||||||
/* kernel includes */
|
/* kernel includes */
|
||||||
#include "message.h"
|
#include <message.h>
|
||||||
#include "nrmessage.h"
|
#include <nrmessage.h>
|
||||||
#include "objtypes.h"
|
#include <race.h>
|
||||||
#include "curse.h"
|
#include <skill.h>
|
||||||
|
#include <unit.h>
|
||||||
|
#include <faction.h>
|
||||||
|
#include <objtypes.h>
|
||||||
|
#include <curse.h>
|
||||||
|
|
||||||
/* util includes */
|
/* util includes */
|
||||||
#include <message.h>
|
#include <message.h>
|
||||||
|
#include <base36.h>
|
||||||
|
#include <functions.h>
|
||||||
|
|
||||||
/* libc includes */
|
/* libc includes */
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
static int
|
int
|
||||||
cinfo_unit(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
cinfo_unit(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
message * msg;
|
message * msg;
|
||||||
|
|
||||||
|
@ -47,15 +53,15 @@ cinfo_unit(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
cinfo_unit_onlyowner(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
cinfo_unit_onlyowner(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
message * msg;
|
message * msg;
|
||||||
unit *u;
|
struct unit *u;
|
||||||
|
|
||||||
unused(typ);
|
unused(typ);
|
||||||
|
|
||||||
assert(typ == TYP_UNIT);
|
assert(typ == TYP_UNIT);
|
||||||
u = (unit *)obj;
|
u = (struct unit *)obj;
|
||||||
|
|
||||||
if (self){
|
if (self){
|
||||||
msg = msg_message(mkname("curseinfo", c->type->cname), "id", c->no);
|
msg = msg_message(mkname("curseinfo", c->type->cname), "id", c->no);
|
||||||
|
@ -71,12 +77,12 @@ cinfo_unit_onlyowner(const locale * lang, void * obj, typ_t typ, curse *c, int s
|
||||||
/* C_AURA */
|
/* C_AURA */
|
||||||
/* erhöht/senkt regeneration und maxaura um effect% */
|
/* erhöht/senkt regeneration und maxaura um effect% */
|
||||||
static int
|
static int
|
||||||
cinfo_auraboost(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
cinfo_auraboost(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
unit *u;
|
struct unit *u;
|
||||||
unused(typ);
|
unused(typ);
|
||||||
assert(typ == TYP_UNIT);
|
assert(typ == TYP_UNIT);
|
||||||
u = (unit *)obj;
|
u = (struct unit *)obj;
|
||||||
|
|
||||||
if (self){
|
if (self){
|
||||||
if (c->effect > 100){
|
if (c->effect > 100){
|
||||||
|
@ -93,7 +99,7 @@ cinfo_auraboost(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
||||||
|
|
||||||
/* C_SLAVE */
|
/* C_SLAVE */
|
||||||
static int
|
static int
|
||||||
cinfo_slave(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
cinfo_slave(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
unit *u;
|
unit *u;
|
||||||
unused(typ);
|
unused(typ);
|
||||||
|
@ -111,10 +117,10 @@ cinfo_slave(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
||||||
|
|
||||||
/* C_CALM */
|
/* C_CALM */
|
||||||
static int
|
static int
|
||||||
cinfo_calm(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
cinfo_calm(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
unit *u;
|
unit *u;
|
||||||
const race * rc;
|
const struct race * rc;
|
||||||
faction *f;
|
faction *f;
|
||||||
unused(typ);
|
unused(typ);
|
||||||
|
|
||||||
|
@ -138,7 +144,7 @@ cinfo_calm(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
||||||
}
|
}
|
||||||
/* C_SPEED */
|
/* C_SPEED */
|
||||||
static int
|
static int
|
||||||
cinfo_speed(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
cinfo_speed(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
unit *u;
|
unit *u;
|
||||||
curse_unit * cu;
|
curse_unit * cu;
|
||||||
|
@ -160,7 +166,7 @@ cinfo_speed(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
||||||
}
|
}
|
||||||
/* C_ORC */
|
/* C_ORC */
|
||||||
static int
|
static int
|
||||||
cinfo_orc(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
cinfo_orc(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
unit *u;
|
unit *u;
|
||||||
message * msg;
|
message * msg;
|
||||||
|
@ -180,7 +186,7 @@ cinfo_orc(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
||||||
|
|
||||||
/* C_KAELTESCHUTZ */
|
/* C_KAELTESCHUTZ */
|
||||||
static int
|
static int
|
||||||
cinfo_kaelteschutz(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
cinfo_kaelteschutz(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
unit *u;
|
unit *u;
|
||||||
curse_unit * cu;
|
curse_unit * cu;
|
||||||
|
@ -202,7 +208,7 @@ cinfo_kaelteschutz(const locale * lang, void * obj, typ_t typ, curse *c, int sel
|
||||||
|
|
||||||
/* C_SPARKLE */
|
/* C_SPARKLE */
|
||||||
static int
|
static int
|
||||||
cinfo_sparkle(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
cinfo_sparkle(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
const char * effects[] = {
|
const char * effects[] = {
|
||||||
NULL, /* end grau*/
|
NULL, /* end grau*/
|
||||||
|
@ -257,7 +263,7 @@ cinfo_sparkle(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
||||||
|
|
||||||
/* C_STRENGTH */
|
/* C_STRENGTH */
|
||||||
static int
|
static int
|
||||||
cinfo_strength(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
cinfo_strength(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
unused(c);
|
unused(c);
|
||||||
unused(typ);
|
unused(typ);
|
||||||
|
@ -274,7 +280,7 @@ cinfo_strength(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
||||||
}
|
}
|
||||||
/* C_ALLSKILLS */
|
/* C_ALLSKILLS */
|
||||||
static int
|
static int
|
||||||
cinfo_allskills(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
cinfo_allskills(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
unused(obj);
|
unused(obj);
|
||||||
unused(typ);
|
unused(typ);
|
||||||
|
@ -290,7 +296,7 @@ cinfo_allskills(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
||||||
}
|
}
|
||||||
/* C_SKILL */
|
/* C_SKILL */
|
||||||
static int
|
static int
|
||||||
cinfo_skill(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
cinfo_skill(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
unit *u = (unit *)obj;
|
unit *u = (unit *)obj;
|
||||||
int sk = (int)c->data;
|
int sk = (int)c->data;
|
||||||
|
@ -306,7 +312,7 @@ cinfo_skill(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
||||||
}
|
}
|
||||||
/* C_ITEMCLOAK */
|
/* C_ITEMCLOAK */
|
||||||
static int
|
static int
|
||||||
cinfo_itemcloak(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
cinfo_itemcloak(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
unit *u;
|
unit *u;
|
||||||
unused(typ);
|
unused(typ);
|
||||||
|
@ -323,7 +329,7 @@ cinfo_itemcloak(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
cinfo_fumble(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
cinfo_fumble(const struct locale * lang, void * obj, enum typ_t typ, struct curse *c, int self)
|
||||||
{
|
{
|
||||||
unit * u = (unit*)obj;
|
unit * u = (unit*)obj;
|
||||||
unused(typ);
|
unused(typ);
|
||||||
|
@ -338,3 +344,22 @@ cinfo_fumble(const locale * lang, void * obj, typ_t typ, curse *c, int self)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
register_unitcurse(void)
|
||||||
|
{
|
||||||
|
register_function((pf_generic)register_function((pf_generic)cinfo_unit, "unit");, "cinfo::unit, "unit");");
|
||||||
|
register_function((pf_generic)register_function((pf_generic)cinfo_unit_onlyowner, "unit_onlyowner");, "cinfo::unit_onlyowner, "unit_onlyowner");");
|
||||||
|
register_function((pf_generic)register_function((pf_generic)cinfo_auraboost, "auraboost");, "cinfo::auraboost, "auraboost");");
|
||||||
|
register_function((pf_generic)register_function((pf_generic)cinfo_slave, "slave");, "cinfo::slave, "slave");");
|
||||||
|
register_function((pf_generic)register_function((pf_generic)cinfo_calm, "calm");, "cinfo::calm, "calm");");
|
||||||
|
register_function((pf_generic)register_function((pf_generic)cinfo_speed, "speed");, "cinfo::speed, "speed");");
|
||||||
|
register_function((pf_generic)register_function((pf_generic)cinfo_orc, "orc");, "cinfo::orc, "orc");");
|
||||||
|
register_function((pf_generic)register_function((pf_generic)cinfo_kaelteschutz, "kaelteschutz");, "cinfo::kaelteschutz, "kaelteschutz");");
|
||||||
|
register_function((pf_generic)register_function((pf_generic)cinfo_sparkle, "sparkle");, "cinfo::sparkle, "sparkle");");
|
||||||
|
register_function((pf_generic)register_function((pf_generic)cinfo_strength, "strength");, "cinfo::strength, "strength");");
|
||||||
|
register_function((pf_generic)register_function((pf_generic)cinfo_allskills, "allskills");, "cinfo::allskills, "allskills");");
|
||||||
|
register_function((pf_generic)register_function((pf_generic)cinfo_skill, "skill");, "cinfo::skill, "skill");");
|
||||||
|
register_function((pf_generic)register_function((pf_generic)cinfo_itemcloak, "itemcloak");, "cinfo::itemcloak, "itemcloak");");
|
||||||
|
register_function((pf_generic)register_function((pf_generic)cinfo_fumble, "fumble");, "cinfo::fumble, "fumble");");
|
||||||
|
}
|
||||||
|
|
|
@ -13,23 +13,27 @@
|
||||||
|
|
||||||
#ifndef _UCURSE_H
|
#ifndef _UCURSE_H
|
||||||
#define _UCURSE_H
|
#define _UCURSE_H
|
||||||
|
/* Die sollen ganz sicher nicht an andere module exporiert werden, sondern in
|
||||||
int cinfo_unit(const locale *, void *, typ_t, curse *, int);
|
* einer register-funktion registriert werden:
|
||||||
int cinfo_unit_onlyowner(const locale *, void *, typ_t, curse *, int);
|
int cinfo_unit(const struct locale *, void *, enum typ_t, struct curse *, int);
|
||||||
|
int cinfo_unit_onlyowner(const struct locale *, void *, enum typ_t, struct curse *, int);
|
||||||
|
*/
|
||||||
/* altlasten */
|
/* altlasten */
|
||||||
|
/*
|
||||||
|
int cinfo_auraboost(void *, enum typ_t, struct curse *, int);
|
||||||
|
int cinfo_slave(void *, enum typ_t, struct curse *, int);
|
||||||
|
int cinfo_calm(void *, enum typ_t, struct curse *, int);
|
||||||
|
int cinfo_speed(void *, enum typ_t, struct curse *, int);
|
||||||
|
int cinfo_orc(void *, enum typ_t, struct curse *, int);
|
||||||
|
int cinfo_kaelteschutz(void *, enum typ_t, struct curse *, int);
|
||||||
|
int cinfo_sparkle(void *, enum typ_t, struct curse *, int);
|
||||||
|
int cinfo_strength(void *, enum typ_t, struct curse *, int);
|
||||||
|
int cinfo_allskills(void *, enum typ_t, struct curse *, int);
|
||||||
|
int cinfo_skill(void *, enum typ_t, struct curse *, int);
|
||||||
|
int cinfo_itemcloak(void *, enum typ_t, struct curse *, int);
|
||||||
|
int cinfo_fumble(void *, enum typ_t, struct curse *, int);
|
||||||
|
*/
|
||||||
|
|
||||||
int cinfo_auraboost(void *, typ_t, curse *, int);
|
extern void register_unitcurse(void);
|
||||||
int cinfo_slave(void *, typ_t, curse *, int);
|
|
||||||
int cinfo_calm(void *, typ_t, curse *, int);
|
|
||||||
int cinfo_speed(void *, typ_t, curse *, int);
|
|
||||||
int cinfo_orc(void *, typ_t, curse *, int);
|
|
||||||
int cinfo_kaelteschutz(void *, typ_t, curse *, int);
|
|
||||||
int cinfo_sparkle(void *, typ_t, curse *, int);
|
|
||||||
int cinfo_strength(void *, typ_t, curse *, int);
|
|
||||||
int cinfo_allskills(void *, typ_t, curse *, int);
|
|
||||||
int cinfo_skill(void *, typ_t, curse *, int);
|
|
||||||
int cinfo_itemcloak(void *, typ_t, curse *, int);
|
|
||||||
int cinfo_fumble(void *, typ_t, curse *, int);
|
|
||||||
|
|
||||||
#endif /* _UCURSE_H */
|
#endif /* _UCURSE_H */
|
||||||
|
|
Loading…
Reference in New Issue