forked from github/server
remove more static curse_type variables
This commit is contained in:
parent
f47113e9bd
commit
873e6f8086
|
@ -449,7 +449,7 @@ static void test_battle_skilldiff_building(CuTest *tc)
|
||||||
unit *ua, *ud;
|
unit *ua, *ud;
|
||||||
battle *b = NULL;
|
battle *b = NULL;
|
||||||
building_type *btype;
|
building_type *btype;
|
||||||
static const curse_type *strongwall_ct, *magicwalls_ct;
|
const curse_type *strongwall_ct, *magicwalls_ct;
|
||||||
|
|
||||||
test_cleanup();
|
test_cleanup();
|
||||||
btype = test_create_buildingtype("castle");
|
btype = test_create_buildingtype("castle");
|
||||||
|
|
|
@ -1662,7 +1662,6 @@ int unit_max_hp(const unit * u)
|
||||||
{
|
{
|
||||||
int h;
|
int h;
|
||||||
double p;
|
double p;
|
||||||
static const curse_type *heal_ct = NULL;
|
|
||||||
int rule_stamina = config_get_int("rules.stamina", STAMINA_AFFECTS_HP);
|
int rule_stamina = config_get_int("rules.stamina", STAMINA_AFFECTS_HP);
|
||||||
h = u_race(u)->hitpoints;
|
h = u_race(u)->hitpoints;
|
||||||
|
|
||||||
|
@ -1672,9 +1671,8 @@ int unit_max_hp(const unit * u)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* der healing curse veraendert die maximalen hp */
|
/* der healing curse veraendert die maximalen hp */
|
||||||
if (u->region) {
|
if (u->region && u->region->attribs) {
|
||||||
if (heal_ct == NULL)
|
const curse_type *heal_ct = ct_find("healingzone");
|
||||||
heal_ct = ct_find("healingzone");
|
|
||||||
if (heal_ct) {
|
if (heal_ct) {
|
||||||
curse *c = get_curse(u->region->attribs, heal_ct);
|
curse *c = get_curse(u->region->attribs, heal_ct);
|
||||||
if (c) {
|
if (c) {
|
||||||
|
|
Loading…
Reference in New Issue