summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-06-01 16:03:13 -0300
committershennetsind <ind@henn.et>2013-06-01 16:03:13 -0300
commit7c1447b414fe0ca732edc89013730a2bcb755dd9 (patch)
tree0e6d1dc72c1b16214115ab2f86f119a53491c7a4 /src/map
parent86e9900db60e06738880a57820125ca169c37520 (diff)
downloadhercules-7c1447b414fe0ca732edc89013730a2bcb755dd9.tar.gz
hercules-7c1447b414fe0ca732edc89013730a2bcb755dd9.tar.bz2
hercules-7c1447b414fe0ca732edc89013730a2bcb755dd9.tar.xz
hercules-7c1447b414fe0ca732edc89013730a2bcb755dd9.zip
Fixed Bug #7312
http://hercules.ws/board/tracker/issue-7312-bug-instance/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/script.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 79199858a..a086c3f65 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -11191,7 +11191,7 @@ BUILDIN(mobcount) // Added by RoVeRT
event = NULL;
else
check_event(st, event);
-
+
if( strcmp(mapname, "this") == 0 ) {
struct map_session_data *sd = script_rid2sd(st);
if( sd )
@@ -11200,17 +11200,16 @@ BUILDIN(mobcount) // Added by RoVeRT
script_pushint(st,-1);
return true;
}
- }
- else if( (m = map_mapname2mapid(mapname)) < 0 ) {
+ } else if( (m = map_mapname2mapid(mapname)) < 0 ) {
script_pushint(st,-1);
return true;
}
-
- if( map[m].flag.src4instance && map[m].instance_id >= 0 && st->instance_id >= 0 && (m = instance->mapid2imapid(m, st->instance_id)) < 0 ) {
+
+ if( map[m].flag.src4instance && map[m].instance_id == -1 && st->instance_id >= 0 && (m = instance->mapid2imapid(m, st->instance_id)) < 0 ) {
script_pushint(st,-1);
return true;
}
-
+
script_pushint(st,map_foreachinmap(buildin_mobcount_sub, m, BL_MOB, event));
return true;