summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/atcommand.c6
-rw-r--r--src/map/mob.c3
-rw-r--r--src/map/script.c17
3 files changed, 16 insertions, 10 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index abdd8267e..ebdd7353b 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -7931,7 +7931,11 @@ ACMD_FUNC(clone)
if (strcmpi(command+1, "clone") == 0)
flag = 1;
else if (strcmpi(command+1, "slaveclone") == 0) {
- flag = 2;
+ flag = 2;
+ if(pc_isdead(sd)){
+ clif_displaymessage(fd, msg_txt(129+flag*2));
+ return 0;
+ }
master = sd->bl.id;
if (battle_config.atc_slave_clone_limit
&& mob_countslave(&sd->bl) >= battle_config.atc_slave_clone_limit) {
diff --git a/src/map/mob.c b/src/map/mob.c
index b5db08038..6ea3afed8 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -3343,6 +3343,9 @@ int mob_clone_spawn(struct map_session_data *sd, int m, int x, int y, const char
nullpo_ret(sd);
+ if(pc_isdead(sd) && master_id && flag&1)
+ return 0;
+
ARR_FIND( MOB_CLONE_START, MOB_CLONE_END, class_, mob_db_data[class_] == NULL );
if(class_ >= MOB_CLONE_END)
return 0;
diff --git a/src/map/script.c b/src/map/script.c
index 53dbfae98..2cbb6f6b6 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -6125,9 +6125,8 @@ BUILDIN_FUNC(checkweight)
return 0;
}
nbargs = script_lastdata(st)+1;
- ShowInfo("nb args = %d\n",nbargs);
if(nbargs%2){
- ShowError("buildin_checkweight: Invalid nb of args should be a multiple of 2.\n"); // returns string, regardless of what it was
+ ShowError("buildin_checkweight: Invalid nb of args should be a multiple of 2.\n");
script_pushint(st,0);
return 1;
}
@@ -6216,7 +6215,7 @@ BUILDIN_FUNC(checkweight2)
if( !data_isreference(data_it) || !data_isreference(data_nb))
{
- ShowError("script:checkweight3: parameter not a variable\n");
+ ShowError("script:checkweight2: parameter not a variable\n");
script_pushint(st,0);
return 1;// not a variable
}
@@ -6229,12 +6228,12 @@ BUILDIN_FUNC(checkweight2)
if( not_array_variable(*name_it) || not_array_variable(*name_nb))
{
- ShowError("script:checkweight3: illegal scope\n");
+ ShowError("script:checkweight2: illegal scope\n");
script_pushint(st,0);
return 1;// not supported
}
if(is_string_variable(name_it) || is_string_variable(name_nb)){
- ShowError("script:checkweight3: illegal type, need int\n");
+ ShowError("script:checkweight2: illegal type, need int\n");
script_pushint(st,0);
return 1;// not supported
}
@@ -6254,12 +6253,12 @@ BUILDIN_FUNC(checkweight2)
if(fail) continue; //cpntonie to depop rest
if(itemdb_exists(nameid) == NULL ){
- ShowError("buildin_checkweight3: Invalid item '%d'.\n", nameid);
+ ShowError("buildin_checkweight2: Invalid item '%d'.\n", nameid);
fail=1;
continue;
}
if(amount < 0 ){
- ShowError("buildin_checkweight3: Invalid amount '%d'.\n", amount);
+ ShowError("buildin_checkweight2: Invalid amount '%d'.\n", amount);
fail = 1;
continue;
}
@@ -9967,7 +9966,7 @@ BUILDIN_FUNC(sc_end)
if (!sce)
return 0;
-
+
switch (type)
{
@@ -9976,7 +9975,7 @@ BUILDIN_FUNC(sc_end)
case SC_NOCHAT:
case SC_PUSH_CART:
return 0;
-
+
default:
break;
}