summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/map/script.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index ebd058b88..1fcbf5230 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -1,6 +1,7 @@
Date Added
2010/12/15
+ * Corrected type of second argument of script command 'setbattleflag' from string to number (bugreport:4640, topic:261833, since r5407, related r14577). [Ai4rei]
* Fixed missing check in cooking, causing cooking kit requirement could be bypassed by sending 0x25b (CZ_REQ_MAKINGITEM) directly (bugreport:4642, since r13628). [Ai4rei]
2010/12/13
* Fixed plugin 'sig' not being compilable on Mac OS X, due to different return value type of 'strsignal' (bugreport:4637). [Ai4rei]
diff --git a/src/map/script.c b/src/map/script.c
index 72f6c3774..14b8806bc 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -12088,7 +12088,7 @@ BUILDIN_FUNC(setbattleflag)
const char *flag, *value;
flag = script_getstr(st,2);
- value = script_getstr(st,3);
+ value = script_getstr(st,3); // HACK: Retrieve number as string (auto-converted) for battle_set_value
if (battle_set_value(flag, value) == 0)
ShowWarning("buildin_setbattleflag: unknown battle_config flag '%s'\n",flag);
@@ -14776,7 +14776,7 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(npcshopattach,"s?"),
BUILDIN_DEF(equip,"i"),
BUILDIN_DEF(autoequip,"ii"),
- BUILDIN_DEF(setbattleflag,"ss"),
+ BUILDIN_DEF(setbattleflag,"si"),
BUILDIN_DEF(getbattleflag,"s"),
BUILDIN_DEF(setitemscript,"is?"), //Set NEW item bonus script. Lupus
BUILDIN_DEF(disguise,"i"), //disguise player. Lupus