forked from github/server
bugfix mapper, conquest rules
This commit is contained in:
parent
53ebc4c0ce
commit
2e1537cb2c
|
@ -243,6 +243,7 @@ alliancevictory(void)
|
|||
const struct building_type * btype = bt_find("stronghold");
|
||||
region * r = regions;
|
||||
alliance * al = alliances;
|
||||
if (btype==NULL) return;
|
||||
while (r!=NULL) {
|
||||
building * b = r->buildings;
|
||||
while (b!=NULL) {
|
||||
|
|
|
@ -67,7 +67,6 @@ bt_find(const char* name)
|
|||
btl = buildingtypes;
|
||||
while (btl && strncasecmp(btl->type->_name, name, strlen(name))) btl = btl->next;
|
||||
}
|
||||
assert(btl);
|
||||
return btl?btl->type:NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -243,6 +243,7 @@ alliancevictory(void)
|
|||
const struct building_type * btype = bt_find("stronghold");
|
||||
region * r = regions;
|
||||
alliance * al = alliances;
|
||||
if (btype==NULL) return;
|
||||
while (r!=NULL) {
|
||||
building * b = r->buildings;
|
||||
while (b!=NULL) {
|
||||
|
|
|
@ -293,7 +293,7 @@ score(void)
|
|||
if (token!=NULL) {
|
||||
unit * u = f->units;
|
||||
while (u!=NULL) {
|
||||
const item ** iitem = i_find(&u->items, token);
|
||||
item ** iitem = i_find(&u->items, token);
|
||||
if (iitem!=NULL && *iitem!=NULL) {
|
||||
grails += (*iitem)->number;
|
||||
}
|
||||
|
|
|
@ -322,7 +322,7 @@ read_newfactions(const char * filename)
|
|||
#ifdef ALLIANCES
|
||||
int alliance;
|
||||
/* email;race;locale;startbonus;subscription;alliance */
|
||||
if (fscanf(F, "%s %s %s %d %s %d %d", email, race, lang, &bonus, &subscription, password, &alliance)<=0) break;
|
||||
if (fscanf(F, "%s %s %s %d %d %s %d", email, race, lang, &bonus, &subscription, password, &alliance)<=0) break;
|
||||
#else
|
||||
/* email;race;locale;startbonus;subscription */
|
||||
if (fscanf(F, "%s %s %s %d %d %s", email, race, lang, &bonus, &subscription, password)<=0) break;
|
||||
|
|
Loading…
Reference in New Issue