summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c6
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/script.c8
3 files changed, 5 insertions, 10 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 37fc03bca..726547c66 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3467,11 +3467,6 @@ static int64 battle_calc_gvg_damage(struct block_list *src, struct block_list *b
case NC_SELFDESTRUCTION:
break;
default:
- /* Uncomment if you want god-mode Emperiums at 100 defense. [Kisuka]
- if (md && md->guardian_data) {
- damage -= damage * (md->guardian_data->castle->defense/100) * battle_config.castle_defense_rate/100;
- }
- */
break;
}
return damage;
@@ -7188,7 +7183,6 @@ static const struct battle_data {
{ "skill_removetrap_type", &battle_config.skill_removetrap_type, 0, 0, 1, },
{ "disp_experience", &battle_config.disp_experience, 0, 0, 1, },
{ "disp_zeny", &battle_config.disp_zeny, 0, 0, 1, },
- { "castle_defense_rate", &battle_config.castle_defense_rate, 100, 0, 100, },
{ "bone_drop", &battle_config.bone_drop, 0, 0, 2, },
{ "buyer_name", &battle_config.buyer_name, 1, 0, 1, },
{ "skill_wall_check", &battle_config.skill_wall_check, 1, 0, 1, },
diff --git a/src/map/battle.h b/src/map/battle.h
index 4400d37d1..e9bc6b258 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -342,7 +342,6 @@ struct Battle_Config {
int skill_removetrap_type;
int disp_experience;
int disp_zeny;
- int castle_defense_rate;
int backstab_bow_penalty;
int hp_rate;
int sp_rate;
diff --git a/src/map/script.c b/src/map/script.c
index 0fe97574c..fffe57c34 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -18494,10 +18494,12 @@ static BUILDIN(npcshopdelitem)
unsigned int nameid = script_getnum(st,i);
ARR_FIND(0, size, n, nd->u.shop.shop_item[n].nameid == nameid);
- if (n < size) {
- memmove(&nd->u.shop.shop_item[n], &nd->u.shop.shop_item[n+1], sizeof(nd->u.shop.shop_item[0])*(size-n));
- size--;
+ if (n == size) {
+ continue;
+ } else if (n < size - 1) {
+ memmove(&nd->u.shop.shop_item[n], &nd->u.shop.shop_item[n+1], sizeof(nd->u.shop.shop_item[0]) * (size - n - 1));
}
+ size--;
}
RECREATE(nd->u.shop.shop_item, struct npc_item_list, size);