summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnnieRuru <jeankof@ymail.com>2015-11-05 06:22:20 +0800
committerHaru <haru@dotalux.com>2015-11-14 21:05:35 +0100
commit5869aadef89270cf38bee53f5ce3959142dde10a (patch)
tree90307ad880afd23f017fb52b7d479dc0eab94db0
parenta3e041b4c425411ff38f4dfd6fd4aa1f6bca457c (diff)
downloadhercules-5869aadef89270cf38bee53f5ce3959142dde10a.tar.gz
hercules-5869aadef89270cf38bee53f5ce3959142dde10a.tar.bz2
hercules-5869aadef89270cf38bee53f5ce3959142dde10a.tar.xz
hercules-5869aadef89270cf38bee53f5ce3959142dde10a.zip
Fix @QMapChangeTo$ not usable when HQO_OnMapChange triggered
- also add documentation for it
-rw-r--r--doc/script_commands.txt3
-rw-r--r--src/map/pc.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 28c218eba..6e2b92417 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -8987,6 +8987,9 @@ Modifies <queue_id>'s <optionType>. When <option val> is not present
Currently 3 options are available:
HQO_OnDeath (1), HQO_OnLogout (2), HQO_OnMapChange (3)
+When HQO_OnMapChange event is triggered, it sets a temp char var
+@QMapChangeTo$ with the destination map name.
+
Note: The constant names are not final.
Example:
diff --git a/src/map/pc.c b/src/map/pc.c
index 0671bfb5e..d3b5498cc 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5529,7 +5529,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short map_index, int x, int
for( i = 0; i < sd->queues_count; i++ ) {
struct script_queue *queue = script->queue(sd->queues[i]);
if (queue && queue->event_mapchange[0] != '\0') {
- pc->setregstr(sd, script->add_str("QMapChangeTo"), map->list[m].name);
+ pc->setregstr(sd, script->add_str("@QMapChangeTo$"), map->list[m].name);
npc->event(sd, queue->event_mapchange, 0);
}
}