diff options
author | Haru <haru@dotalux.com> | 2019-08-25 18:41:36 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2019-09-22 23:45:32 +0200 |
commit | 205b602a893cb84e99ab61bafe2b84e0338acf9b (patch) | |
tree | f1487b2a1f34e8f38545e23c12872e1c5e800599 /src/map/script.c | |
parent | 92f3ecdcb341b798c93d5c8b0320fb8cb85e759c (diff) | |
download | hercules-205b602a893cb84e99ab61bafe2b84e0338acf9b.tar.gz hercules-205b602a893cb84e99ab61bafe2b84e0338acf9b.tar.bz2 hercules-205b602a893cb84e99ab61bafe2b84e0338acf9b.tar.xz hercules-205b602a893cb84e99ab61bafe2b84e0338acf9b.zip |
Fix several issues caused by the nick partial match feature, when enabled.
Partial match is now disabled in all the internal (source) and script
lookups, while it's enabled for the lookups requested by atcommands and
client.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/map/script.c b/src/map/script.c index de00f66be..a11d4b080 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -2813,7 +2813,7 @@ static struct map_session_data *script_charid2sd(struct script_state *st, int ch static struct map_session_data *script_nick2sd(struct script_state *st, const char *name) { struct map_session_data *sd; - if ((sd = map->nick2sd(name)) == NULL) { + if ((sd = map->nick2sd(name, false)) == NULL) { ShowWarning("script_nick2sd: Player name '%s' not found!\n", name); script->reportfunc(st); script->reportsrc(st); @@ -8780,7 +8780,7 @@ static BUILDIN(getcharid) struct map_session_data *sd; if (script_hasdata(st, 3)) - sd = map->nick2sd(script_getstr(st, 3)); + sd = map->nick2sd(script_getstr(st, 3), false); else sd = script->rid2sd(st); @@ -16488,7 +16488,7 @@ static BUILDIN(getmapxy) case 0: //Get Character Position if (script_hasdata(st,6)) { if (script_isstringtype(st,6)) - sd = map->nick2sd(script_getstr(st,6)); + sd = map->nick2sd(script_getstr(st,6), false); else sd = map->id2sd(script_getnum(st,6)); } else { @@ -16515,7 +16515,7 @@ static BUILDIN(getmapxy) case 2: //Get Pet Position if (script_hasdata(st,6)) { if (script_isstringtype(st,6)) - sd = map->nick2sd(script_getstr(st,6)); + sd = map->nick2sd(script_getstr(st,6), false); else { bl = map->id2bl(script_getnum(st,6)); break; @@ -16537,7 +16537,7 @@ static BUILDIN(getmapxy) case 4: //Get Homun Position if (script_hasdata(st,6)) { if (script_isstringtype(st,6)) { - sd = map->nick2sd(script_getstr(st,6)); + sd = map->nick2sd(script_getstr(st,6), false); } else { bl = map->id2bl(script_getnum(st,6)); break; @@ -16552,7 +16552,7 @@ static BUILDIN(getmapxy) case 5: //Get Mercenary Position if (script_hasdata(st,6)) { if (script_isstringtype(st,6)) { - sd = map->nick2sd(script_getstr(st,6)); + sd = map->nick2sd(script_getstr(st,6), false); } else { bl = map->id2bl(script_getnum(st,6)); break; @@ -16567,7 +16567,7 @@ static BUILDIN(getmapxy) case 6: //Get Elemental Position if (script_hasdata(st,6)) { if (script_isstringtype(st,6)) { - sd = map->nick2sd(script_getstr(st,6)); + sd = map->nick2sd(script_getstr(st,6), false); } else { bl = map->id2bl(script_getnum(st,6)); break; @@ -23070,7 +23070,7 @@ static BUILDIN(getcharip) /* check if a character name is specified */ if (script_hasdata(st, 2)) { if (script_isstringtype(st, 2)) { - sd = map->nick2sd(script_getstr(st, 2)); + sd = map->nick2sd(script_getstr(st, 2), false); } else { int id = script_getnum(st, 2); sd = (map->id2sd(id) ? map->id2sd(id) : map->charid2sd(id)); |