summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/battle/player.conf4
-rw-r--r--sql-files/item_db.sql4
-rw-r--r--sql-files/item_db_re.sql8
-rw-r--r--src/map/atcommand.c4
-rw-r--r--src/map/battle.c1
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/npc.c18
-rw-r--r--src/map/npc.h1
-rw-r--r--src/map/skill.c8
9 files changed, 29 insertions, 20 deletions
diff --git a/conf/battle/player.conf b/conf/battle/player.conf
index cc2655580..2682a34c7 100644
--- a/conf/battle/player.conf
+++ b/conf/battle/player.conf
@@ -151,6 +151,10 @@ idle_no_autoloot: 0
// Default: 3 (0: disabled).
min_npc_vendchat_distance: 3
+// If min_npc_vendchat_distance is enabled,
+// can players vend/chat room nearby hidden npc? (Ie: FAKE_NPC/HIDDEN_WARP_NPC)
+vendchat_near_hiddennpc: no
+
// Super Novice's fury is enabled to increments of 10%, such as at 10.0%, 20.0% - 80.0%, 90.0%
// Changing snovice_call_type config to 1 enables its use at 0%, for maxed super novices.
// default: 0
diff --git a/sql-files/item_db.sql b/sql-files/item_db.sql
index e78ca33e6..4688c1690 100644
--- a/sql-files/item_db.sql
+++ b/sql-files/item_db.sql
@@ -4678,7 +4678,7 @@ REPLACE INTO `item_db` VALUES ('12371','Magical_Lithography','Magical Lithograph
REPLACE INTO `item_db` VALUES ('12372','Hell_Contract','Hell Contract','2','20','10','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','pet 1379;','','');
REPLACE INTO `item_db` VALUES ('12373','Boy\'s_Naivety','Boy\'s Pure Heart','2','20','10','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','pet 1370;','','');
REPLACE INTO `item_db` VALUES ('12374','Flaming_Ice','Ice Fireworks','2','20','10','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','pet 1837;','','');
-REPLACE INTO `item_db` VALUES ('12375','Acaraje','Akaraje','2','0','0','80','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0','457',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_STEAL; sc_start SC_INCHITRATE,120000,5;','','');
+REPLACE INTO `item_db` VALUES ('12375','Acaraje','Akaraje','2','0','0','80','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0','457',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_STEAL; sc_start2 SC_ACARAJE,120000,5,10;','','');
REPLACE INTO `item_db` VALUES ('12376','Mysterious_Can2','Mysterious Can2','2','10','5','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','','','');
REPLACE INTO `item_db` VALUES ('12377','Mysterious_PET_Bottle2','Mysterious PET Bottle2','2','10','5','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','','','');
REPLACE INTO `item_db` VALUES ('12378','2009_Rice_Cake_Soup','Rice Cake Soup','2','10','5','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
@@ -4739,7 +4739,7 @@ REPLACE INTO `item_db` VALUES ('12432','Siroma_Icetea','Siroma Iced Tea','2','0'
REPLACE INTO `item_db` VALUES ('12433','Drocera_Herb_Stew','Drosera Herb Salad','2','0','0','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_DROCERA_HERB_STEAMED,300000,20;','','');
REPLACE INTO `item_db` VALUES ('12434','Petti_Tail_Noodle','Petite Tail Noodles','2','0','0','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_PUTTI_TAILS_NOODLES,300000,20;','','');
REPLACE INTO `item_db` VALUES ('12435','Black_Thing','Black Mass','2','0','0','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_STOMACHACHE,60000,rand(5,10);','','');
-REPLACE INTO `item_db` VALUES ('12436','Vitata500','Vitata 500','0','10','5','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_VITATA_500,500000,0; itemheal 0,200;','','');
+REPLACE INTO `item_db` VALUES ('12436','Vitata500','Vitata 500','0','10','5','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start2 SC_VITATA_500,500000,20,5; itemheal 0,200;','','');
REPLACE INTO `item_db` VALUES ('12437','Enrich_Celermine_Juice','Concentrated Ceromain Soup','2','10','5','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_EXTRACT_SALAMINE_JUICE,500000,10;','','');
REPLACE INTO `item_db` VALUES ('12438','F_Giant_Fly_Wing','F Giant Fly Wing','2','2','1','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
REPLACE INTO `item_db` VALUES ('12439','F_Battle_Manual','F Battle Manual','2','2','1','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql
index 190b3f3be..134337cd7 100644
--- a/sql-files/item_db_re.sql
+++ b/sql-files/item_db_re.sql
@@ -5895,7 +5895,7 @@ REPLACE INTO `item_db` VALUES ('12371','Magical_Lithography','Magical Lithograph
REPLACE INTO `item_db` VALUES ('12372','Hell_Contract','Hell Contract','2','20','10','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','pet 1379;','','');
REPLACE INTO `item_db` VALUES ('12373','Boy\'s_Naivety','Boy\'s Pure Heart','2','20','10','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','pet 1370;','','');
REPLACE INTO `item_db` VALUES ('12374','Flaming_Ice','Ice Fireworks','2','20','10','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','pet 1837;','','');
-REPLACE INTO `item_db` VALUES ('12375','Acaraje','Akaraje','2','0','0','80','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_STEAL; sc_start SC_INCHITRATE,120000,5;','','');
+REPLACE INTO `item_db` VALUES ('12375','Acaraje','Akaraje','2','0','0','80','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_STEAL; sc_start2 SC_ACARAJE,120000,5,10;','','');
REPLACE INTO `item_db` VALUES ('12376','Mysterious_Can2','Mysterious Can2','2','10','5','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal 3,0; itemskill PR_GLORIA,2;','','');
REPLACE INTO `item_db` VALUES ('12377','Mysterious_PET_Bottle2','Mysterious PET Bottle2','2','10','5','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','percentheal 0,3; itemskill PR_MAGNIFICAT,1;','','');
REPLACE INTO `item_db` VALUES ('12378','2009_Rice_Cake_Soup','Rice Cake Soup','2','10','5','100','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 50,50;','','');
@@ -5956,7 +5956,7 @@ REPLACE INTO `item_db` VALUES ('12432','Siroma_Icetea','Siroma Icetea','2','1000
REPLACE INTO `item_db` VALUES ('12433','Drocera_Herb_Stew','Drosera Herb Stew','2','1000','500','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_DROCERA_HERB_STEAMED,300000,20;','','');
REPLACE INTO `item_db` VALUES ('12434','Petti_Tail_Noodle','Petite Tail Noodles','2','1000','500','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_PUTTI_TAILS_NOODLES,300000,20;','','');
REPLACE INTO `item_db` VALUES ('12435','Black_Thing','Black Thing','2','1000','500','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_STOMACHACHE,60000,rand(5,10);','','');
-REPLACE INTO `item_db` VALUES ('12436','Vitata500','Vitata500','0','100','50','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_VITATA_500,500000,0; heal 0,200;','','');
+REPLACE INTO `item_db` VALUES ('12436','Vitata500','Vitata500','0','100','50','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start2 SC_VITATA_500,500000,20,5; heal 0,200;','','');
REPLACE INTO `item_db` VALUES ('12437','Enrich_Celermine_Juice','Enrich Celermine Juice','2','100','50','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_EXTRACT_SALAMINE_JUICE,500000,10;','','');
REPLACE INTO `item_db` VALUES ('12438','F_Giant_Fly_Wing','Giant Fly Wing','2','2','1','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
REPLACE INTO `item_db` VALUES ('12439','F_Battle_Manual','Old Battle Manual','2','2','1','10','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
@@ -6186,8 +6186,8 @@ REPLACE INTO `item_db` VALUES ('12673','Lucky_Egg_C10','Lucky Egg C10','2','20',
REPLACE INTO `item_db` VALUES ('12674','God_Material_Box','God Material Box','2','20','10','500','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
REPLACE INTO `item_db` VALUES ('12675','Sg_Weapon_Supply_Box','Siege Weapon Supply Box','2','20','10','500','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem 12675,1;','','');
REPLACE INTO `item_db` VALUES ('12676','Sg_Violet_Potion_Box','Siege Violet Potion Box','2','20','10','200','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getitem 11547,50;','','');
-REPLACE INTO `item_db` VALUES ('12677','Siege_Arrow_Quiver_S','Siege Arrow Quiver S','2','2','1','100','0','0','0','0','0','4294967295','63','2','0','0','130',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getitem 1776,200;','','');
-REPLACE INTO `item_db` VALUES ('12678','Siege_Arrow_Quiver_A','Siege Arrow Quiver A','2','2','1','100','0','0','0','0','0','4294967295','63','2','0','0','95',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getitem 1775,200;','','');
+REPLACE INTO `item_db` VALUES ('12677','Siege_Arrow_Quiver_S','Siege Arrow Quiver S','2','2','1','100','0','0','0','0','0','4294967295','63','2','0','0','130',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getitem Siege_Arrow_S,200;','','');
+REPLACE INTO `item_db` VALUES ('12678','Siege_Arrow_Quiver_A','Siege Arrow Quiver A','2','2','1','100','0','0','0','0','0','4294967295','63','2','0','0','95',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getitem Siege_Arrow_A,200;','','');
REPLACE INTO `item_db` VALUES ('12679','Sg_White_Potion_Box','Siege White Potion Box','2','20','10','200','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getitem 11548,30;','','');
REPLACE INTO `item_db` VALUES ('12680','Sg_Blue_Potion_Box','Siege Blue Potion Box','2','20','10','200','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getitem 11549,10;','','');
REPLACE INTO `item_db` VALUES ('12681','Nestea_Lemon','Nestea Lemon','2','0','0','50','0','0','0','0','0','4294967295','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','','');
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index ff88f2c63..de71819de 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -77,7 +77,7 @@ struct atcmd_binding_data* get_atcommandbind_byname(const char* name) {
}
const char* atcommand_msgsd(struct map_session_data *sd, int msg_number) {
- Assert_retr("??", msg_number >= 0 && msg_number < MAX_MSG);
+ Assert_retr("??", msg_number >= 0 && msg_number < MAX_MSG && atcommand->msg_table[0][msg_number] != NULL);
if (!sd || sd->lang_id >= atcommand->max_message_table || !atcommand->msg_table[sd->lang_id][msg_number])
return atcommand->msg_table[0][msg_number];
return atcommand->msg_table[sd->lang_id][msg_number];
@@ -85,7 +85,7 @@ const char* atcommand_msgsd(struct map_session_data *sd, int msg_number) {
const char* atcommand_msgfd(int fd, int msg_number) {
struct map_session_data *sd = sockt->session_is_valid(fd) ? sockt->session[fd]->session_data : NULL;
- Assert_retr("??", msg_number >= 0 && msg_number < MAX_MSG);
+ Assert_retr("??", msg_number >= 0 && msg_number < MAX_MSG && atcommand->msg_table[0][msg_number] != NULL);
if (!sd || sd->lang_id >= atcommand->max_message_table || !atcommand->msg_table[sd->lang_id][msg_number])
return atcommand->msg_table[0][msg_number];
return atcommand->msg_table[sd->lang_id][msg_number];
diff --git a/src/map/battle.c b/src/map/battle.c
index 10990f013..d1cdd19c4 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -7106,6 +7106,7 @@ static const struct battle_data {
{ "mvp_tomb_enabled", &battle_config.mvp_tomb_enabled, 1, 0, 1 },
{ "feature.atcommand_suggestions", &battle_config.atcommand_suggestions_enabled, 0, 0, 1 },
{ "min_npc_vendchat_distance", &battle_config.min_npc_vendchat_distance, 3, 0, 100 },
+ { "vendchat_near_hiddennpc", &battle_config.vendchat_near_hiddennpc, 0, 0, 1 },
{ "atcommand_mobinfo_type", &battle_config.atcommand_mobinfo_type, 0, 0, 1 },
{ "homunculus_max_level", &battle_config.hom_max_level, 99, 0, MAX_LEVEL, },
{ "homunculus_S_max_level", &battle_config.hom_S_max_level, 150, 0, MAX_LEVEL, },
diff --git a/src/map/battle.h b/src/map/battle.h
index eeecaaf89..68a427e72 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -471,6 +471,7 @@ struct Battle_Config {
int atcommand_suggestions_enabled;
int min_npc_vendchat_distance;
+ int vendchat_near_hiddennpc;
int atcommand_mobinfo_type;
int mob_size_influence; // Enable modifications on earned experience, drop rates and monster status depending on monster size. [mkbu95]
diff --git a/src/map/npc.c b/src/map/npc.c
index 9573c1c6f..21970a42f 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -137,6 +137,9 @@ int npc_isnear_sub(struct block_list* bl, va_list args) {
if( nd->option & (OPTION_HIDE|OPTION_INVISIBLE) )
return 0;
+ if( battle_config.vendchat_near_hiddennpc && ( nd->class_ == FAKE_NPC || nd->class_ == HIDDEN_WARP_CLASS ) )
+ return 0;
+
return 1;
}
@@ -2514,7 +2517,7 @@ void npc_parsename(struct npc_data* nd, const char* name, const char* start, con
// Parse View
// Support for using Constants in place of NPC View IDs.
int npc_parseview(const char* w4, const char* start, const char* buffer, const char* filepath) {
- int val = -1, i = 0;
+ int val = FAKE_NPC, i = 0;
char viewid[1024]; // Max size of name from const.txt, see script->read_constdb.
// Extract view ID / constant
@@ -2538,7 +2541,7 @@ int npc_parseview(const char* w4, const char* start, const char* buffer, const c
} else {
// NPC has an ID specified for view id.
val = atoi(w4);
- if (val != -1)
+ if (val != FAKE_NPC) // TODO: Add this to the constants table and replace -1 with FAKE_NPC in the scripts, then remove this check.
ShowWarning("npc_parseview: Use of numeric NPC view IDs is deprecated and may be removed in a future update. Please use NPC view constants instead. ID '%d' specified in file '%s', line '%d'.\n", val, filepath, strline(buffer, start-buffer));
}
@@ -2549,8 +2552,7 @@ int npc_parseview(const char* w4, const char* start, const char* buffer, const c
// Checks if given view is an ID or constant.
bool npc_viewisid(const char * viewid)
{
- if(atoi(viewid) != -1)
- {
+ if (atoi(viewid) != FAKE_NPC) {
// Loop through view, looking for non-numeric character.
while (*viewid) {
if (ISDIGIT(*viewid++) == 0) return false;
@@ -2786,7 +2788,7 @@ const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const char* s
return strchr(start,'\n');// continue
}
- class_ = m == -1 ? -1 : npc->parseview(w4, start, buffer, filepath);
+ class_ = m == -1 ? FAKE_NPC : npc->parseview(w4, start, buffer, filepath);
nd = npc->create_npc(type, m, x, y, dir, class_);
CREATE(nd->u.shop.shop_item, struct npc_item_list, i);
memcpy(nd->u.shop.shop_item, items, sizeof(items[0])*i);
@@ -2954,7 +2956,7 @@ const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, const char*
npc->convertlabel_db(label_list,filepath);
}
- class_ = m == -1 ? -1 : npc->parseview(w4, start, buffer, filepath);
+ class_ = m == -1 ? FAKE_NPC : npc->parseview(w4, start, buffer, filepath);
nd = npc->create_npc(SCRIPT, m, x, y, dir, class_);
if (sscanf(w4, "%*[^,],%d,%d", &xs, &ys) == 2) {
// OnTouch area defined
@@ -3224,7 +3226,7 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch
return end;// next line, try to continue
}
- class_ = m == -1 ? -1 : npc->parseview(w4, start, buffer, filepath);
+ class_ = m == -1 ? FAKE_NPC : npc->parseview(w4, start, buffer, filepath);
nd = npc->create_npc(dnd->subtype, m, x, y, dir, class_);
npc->parsename(nd, w3, start, buffer, filepath);
nd->path = npc->retainpathreference(filepath);
@@ -4685,7 +4687,7 @@ int do_init_npc(bool minimal) {
npc->fake_nd = (struct npc_data *)aCalloc(1,sizeof(struct npc_data));
npc->fake_nd->bl.m = -1;
npc->fake_nd->bl.id = npc->get_new_npc_id();
- npc->fake_nd->class_ = -1;
+ npc->fake_nd->class_ = FAKE_NPC;
npc->fake_nd->speed = 200;
strcpy(npc->fake_nd->name,"FAKE_NPC");
memcpy(npc->fake_nd->exname, npc->fake_nd->name, 9);
diff --git a/src/map/npc.h b/src/map/npc.h
index 60be1fbe4..e7fc16a21 100644
--- a/src/map/npc.h
+++ b/src/map/npc.h
@@ -109,6 +109,7 @@ struct npc_data {
#define START_NPC_NUM 110000000
enum actor_classes {
+ FAKE_NPC = -1,
WARP_CLASS = 45,
HIDDEN_WARP_CLASS = 139,
MOB_TOMB = 565,
diff --git a/src/map/skill.c b/src/map/skill.c
index cdf1c031f..8984bf0fa 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -11878,8 +11878,8 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6
//Take into account these hit more times than the timer interval can handle.
do
skill->attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*sg->interval,0);
- while(--src->val2 && x == bl->x && y == bl->y
- && ++count < SKILLUNITTIMER_INTERVAL/sg->interval && !status->isdead(bl));
+ while (src->alive != 0 && --src->val2 != 0 && x == bl->x && y == bl->y
+ && ++count < SKILLUNITTIMER_INTERVAL/sg->interval && !status->isdead(bl));
if (src->val2<=0)
skill->delunit(src);
@@ -11961,8 +11961,8 @@ int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *bl, int6
sg->limit = DIFF_TICK32(tick,sg->tick);
break;
}
- } while( x == bl->x && y == bl->y && sg->alive_count
- && ++count < SKILLUNITTIMER_INTERVAL/sg->interval && !status->isdead(bl) );
+ } while (src->alive != 0 && x == bl->x && y == bl->y && sg->alive_count != 0
+ && ++count < SKILLUNITTIMER_INTERVAL/sg->interval && !status->isdead(bl));
map->freeblock_unlock();
}
break;