summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/npc-parse.cpp5
-rw-r--r--src/map/npc.hpp1
-rw-r--r--src/map/script-call-internal.hpp2
-rw-r--r--src/map/script-call.cpp4
-rw-r--r--src/map/script-fun.cpp22
-rw-r--r--src/map/tmw.cpp4
6 files changed, 27 insertions, 11 deletions
diff --git a/src/map/npc-parse.cpp b/src/map/npc-parse.cpp
index bdb212c..443a1e7 100644
--- a/src/map/npc-parse.cpp
+++ b/src/map/npc-parse.cpp
@@ -154,10 +154,7 @@ bool npc_load_warp(ast::npc::Warp& warp)
nd->flag = 0;
nd->name = warp.name.data;
- if (!battle_config.warp_point_debug)
- nd->npc_class = WARP_CLASS;
- else
- nd->npc_class = WARP_DEBUG_CLASS;
+ nd->npc_class = WARP_CLASS;
nd->speed = 200_ms;
nd->option = Opt0::ZERO;
nd->opt1 = Opt1::ZERO;
diff --git a/src/map/npc.hpp b/src/map/npc.hpp
index c856a8c..b9f32b9 100644
--- a/src/map/npc.hpp
+++ b/src/map/npc.hpp
@@ -41,7 +41,6 @@ constexpr BlockId START_NPC_NUM = wrap<BlockId>(110000000);
// TODO make these species, see npc_class in npc_data
constexpr Species WARP_CLASS = wrap<Species>(45);
constexpr Species FAKE_NPC_CLASS = wrap<Species>(127);
-constexpr Species WARP_DEBUG_CLASS = wrap<Species>(722);
constexpr Species INVISIBLE_CLASS = wrap<Species>(32767);
int npc_event_dequeue(dumb_ptr<map_session_data> sd);
diff --git a/src/map/script-call-internal.hpp b/src/map/script-call-internal.hpp
index 983b361..b9b3a9f 100644
--- a/src/map/script-call-internal.hpp
+++ b/src/map/script-call-internal.hpp
@@ -53,7 +53,7 @@ public:
ScriptEndState state;
BlockId rid, oid;
ScriptPointer scriptp, new_scriptp;
- int defsp, new_defsp;
+ int defsp, new_defsp, freeloop;
};
void run_func(ScriptState *st);
diff --git a/src/map/script-call.cpp b/src/map/script-call.cpp
index b66af74..f412328 100644
--- a/src/map/script-call.cpp
+++ b/src/map/script-call.cpp
@@ -757,7 +757,7 @@ void run_script_main(ScriptState *st, Borrowed<const ScriptBuffer> rootscript)
{
rerun_pos = st->scriptp.pos;
st->state = ScriptEndState::ZERO;
- if (gotocount > 0 && (--gotocount) <= 0)
+ if (!st->freeloop && gotocount > 0 && (--gotocount) <= 0)
{
PRINTF("run_script: infinity loop !\n"_fmt);
st->state = ScriptEndState::END;
@@ -806,7 +806,7 @@ void run_script_main(ScriptState *st, Borrowed<const ScriptBuffer> rootscript)
st->state = ScriptEndState::END;
break;
}
- if (cmdcount > 0 && (--cmdcount) <= 0)
+ if (!st->freeloop && cmdcount > 0 && (--cmdcount) <= 0)
{
PRINTF("run_script: infinity loop !\n"_fmt);
st->state = ScriptEndState::END;
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp
index 4e19d5d..6c04616 100644
--- a/src/map/script-fun.cpp
+++ b/src/map/script-fun.cpp
@@ -1123,6 +1123,25 @@ void builtin_getequipid(ScriptState *st)
}
/*==========================================
+ * freeloop
+ *------------------------------------------
+ */
+static
+void builtin_freeloop(ScriptState *st)
+{
+ int num;
+ num = conv_num(st, &AARG(0));
+ if(num == 1)
+ {
+ st->freeloop = 1;
+ }
+ else
+ {
+ st->freeloop = 0;
+ }
+}
+
+/*==========================================
* 装備名文字列(精錬メニュー用)
*------------------------------------------
*/
@@ -2166,7 +2185,7 @@ void builtin_emotion(ScriptState *st)
{
int type;
type = conv_num(st, &AARG(0));
- if (type < 0 || type > 100)
+ if (type < 0 || type > 200)
return;
clif_emotion(map_id2bl(st->oid), type);
}
@@ -3121,6 +3140,7 @@ BuiltinFunction builtin_functions[] =
BUILTIN(gety, ""_s, 'i'),
BUILTIN(getmap, ""_s, 's'),
BUILTIN(mapexit, ""_s, '\0'),
+ BUILTIN(freeloop, "i"_s, '\0'),
{nullptr, ""_s, ""_s, '\0'},
};
} // namespace map
diff --git a/src/map/tmw.cpp b/src/map/tmw.cpp
index 3f6bb3a..df76720 100644
--- a/src/map/tmw.cpp
+++ b/src/map/tmw.cpp
@@ -109,8 +109,8 @@ int tmw_CheckChatSpam(dumb_ptr<map_session_data> sd, XString message)
(sd->chat_lines_in >= battle_config.chat_spam_warn
|| sd->chat_total_repeats >= battle_config.chat_spam_warn))
{
- clif_displaymessage(sd->sess, "WARNING: You are about to be automatically banned for spam!"_s);
- clif_displaymessage(sd->sess, "WARNING: Please slow down, do not repeat, and do not SHOUT!"_s);
+ clif_displaymessage(sd->sess, "##1WARNING : ##BYou are about to be automatically banned for spam!"_s);
+ clif_displaymessage(sd->sess, "##1WARNING : ##BPlease slow down, do not repeat, and do not SHOUT!"_s);
}
return 0;