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