- Versuch Fix targetregion-Konvertierung

This commit is contained in:
Christian Schlittchen 2001-02-04 11:18:27 +00:00
parent 382672f723
commit 79679d995f
3 changed files with 22 additions and 5 deletions

View File

@ -1,6 +1,6 @@
/* vi: set ts=2: /* vi: set ts=2:
* *
* $Id: targetregion.c,v 1.3 2001/01/27 19:30:07 enno Exp $ * $Id: targetregion.c,v 1.4 2001/02/04 11:18:26 corwin Exp $
* Eressea PB(E)M host Copyright (C) 1998-2000 * Eressea PB(E)M host Copyright (C) 1998-2000
* Christian Schlittchen (corwin@amber.kn-bremen.de) * Christian Schlittchen (corwin@amber.kn-bremen.de)
* Katja Zedel (katze@felidae.kn-bremen.de) * Katja Zedel (katze@felidae.kn-bremen.de)
@ -32,7 +32,7 @@ read_targetregion(attrib * a, FILE * F)
{ {
if (global.data_version < BASE36IDS_VERSION) { if (global.data_version < BASE36IDS_VERSION) {
a_readdefault(a, F); a_readdefault(a, F);
a->data.v = findregion(a->data.sa[0], a->data.sa[1]); /* a->data.v = findregion(a->data.sa[0], a->data.sa[1]); */
} else { } else {
read_region_reference((region**)&a->data.v, F); read_region_reference((region**)&a->data.v, F);
} }

View File

@ -1,6 +1,6 @@
/* vi: set ts=2: /* vi: set ts=2:
* *
* $Id: eressea.h,v 1.9 2001/02/04 10:04:36 corwin Exp $ * $Id: eressea.h,v 1.10 2001/02/04 11:18:26 corwin Exp $
* Eressea PB(E)M host Copyright (C) 1998-2000 * Eressea PB(E)M host Copyright (C) 1998-2000
* Christian Schlittchen (corwin@amber.kn-bremen.de) * Christian Schlittchen (corwin@amber.kn-bremen.de)
* Katja Zedel (katze@felidae.kn-bremen.de) * Katja Zedel (katze@felidae.kn-bremen.de)
@ -63,7 +63,7 @@ struct herb_type;
#include <vset.h> #include <vset.h>
#include <attrib.h> #include <attrib.h>
#define AT_PERSISTANT #define AT_PERSISTENT
/* eressea-defined attribute-type flags */ /* eressea-defined attribute-type flags */
#define ATF_CURSE ATF_USER_DEFINED #define ATF_CURSE ATF_USER_DEFINED

View File

@ -1,6 +1,6 @@
/* vi: set ts=2: /* vi: set ts=2:
* *
* $Id: korrektur.c,v 1.13 2001/02/04 08:10:17 enno Exp $ * $Id: korrektur.c,v 1.14 2001/02/04 11:18:27 corwin Exp $
* Eressea PB(E)M host Copyright (C) 1998-2000 * Eressea PB(E)M host Copyright (C) 1998-2000
* Christian Schlittchen (corwin@amber.kn-bremen.de) * Christian Schlittchen (corwin@amber.kn-bremen.de)
* Katja Zedel (katze@felidae.kn-bremen.de) * Katja Zedel (katze@felidae.kn-bremen.de)
@ -1771,6 +1771,22 @@ undo_deadpeasants(void)
} }
} }
void
fix_targetregion_resolve(void)
{
region *r;
unit *u;
attrib *a;
for(r=regions; r; r=r->next) {
for(u=r->units; u; u=u->next) {
a = a_find(u->attribs, &at_targetregion);
if(a) a->data.v = findregion(a->data.sa[0], a->data.sa[1]);
}
}
}
#include <modules/gmcmd.h> #include <modules/gmcmd.h>
void setup_gm_faction(void); void setup_gm_faction(void);
@ -1782,6 +1798,7 @@ korrektur(void)
#endif #endif
/* Wieder entfernen! */ /* Wieder entfernen! */
do_once(atoi36("trgr"), fix_targetregion_resolve())
/* fix_herbtypes(); */ /* fix_herbtypes(); */
#ifdef CONVERT_TRIGGER #ifdef CONVERT_TRIGGER