diff --git a/scripts/tests/pool.lua b/scripts/tests/pool.lua index b89d180fa..2ac9c87f2 100644 --- a/scripts/tests/pool.lua +++ b/scripts/tests/pool.lua @@ -8,7 +8,6 @@ function setup() eressea.settings.set("rules.economy.food", "0") eressea.settings.set("nmr.removenewbie", "0") eressea.settings.set("nmr.timeout", "0") - eressea.settings.set("GiveRestriction", "0") eressea.settings.set("rules.magic.playerschools", "") conf = [[{ "races": { diff --git a/src/give.c b/src/give.c index d211a5518..646770074 100644 --- a/src/give.c +++ b/src/give.c @@ -57,12 +57,7 @@ static int max_transfers(void) { static int GiveRestriction(void) { - static int value = -1; - if (value < 0) { - const char *str = get_param(global.parameters, "GiveRestriction"); - value = str ? atoi(str) : 0; - } - return value; + return get_param_int(global.parameters, "GiveRestriction", 0); } static void feedback_give_not_allowed(unit * u, order * ord)