summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/script-fun.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp
index bde1458..f08cf60 100644
--- a/src/map/script-fun.cpp
+++ b/src/map/script-fun.cpp
@@ -2192,17 +2192,18 @@ void builtin_getpvpflag(ScriptState *st)
{
dumb_ptr<map_session_data> sd = script_rid2sd(st);
int num = conv_num(st, &AARG(0));
+ int flag = 0;
switch (num){
case 0:
- num = sd->state.pvpon;
+ flag = sd->state.pvpon;
break;
case 1:
flag = bool(sd->status.option & Opt0::HIDE);
break;
}
- push_int<ScriptDataInt>(st->stack, num);
+ push_int<ScriptDataInt>(st->stack, flag);
}
/*==========================================