summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-06 14:37:44 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-06 14:37:44 +0000
commit7ada5312d478e4f56e8829779eb8c977877c99c2 (patch)
tree107125b7f161e95e1f520072d5a9ecc959dd0ce7 /src
parent374f1656a59e2130ed4ee7bb7520ff5dc2bf6b82 (diff)
downloadhercules-7ada5312d478e4f56e8829779eb8c977877c99c2.tar.gz
hercules-7ada5312d478e4f56e8829779eb8c977877c99c2.tar.bz2
hercules-7ada5312d478e4f56e8829779eb8c977877c99c2.tar.xz
hercules-7ada5312d478e4f56e8829779eb8c977877c99c2.zip
- Fixed a debug message showing up on skill castend nodamage id when using a guild skill
- Fixed #save not working on maps not in the current map server. - Added battle config clear_skills_on_death to decide whether all ground-based skills should be removed when you die. Defaults to yes. - Changed Magic Crasher's element to -1 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5472 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/charcommand.c10
-rw-r--r--src/map/mob.c3
-rw-r--r--src/map/pc.c2
-rw-r--r--src/map/skill.c4
6 files changed, 16 insertions, 6 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 79ec8bc68..e2391a2f9 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3543,6 +3543,7 @@ static const struct battle_data_short {
{ "player_damage_delay_rate", &battle_config.pc_damage_delay_rate },
{ "defunit_not_enemy", &battle_config.defnotenemy },
{ "gvg_traps_target_all", &battle_config.vs_traps_bctall },
+ { "clear_skills_on_death", &battle_config.clear_unit_ondeath },
{ "random_monster_checklv", &battle_config.random_monster_checklv },
{ "attribute_recover", &battle_config.attr_recover },
{ "flooritem_lifetime", &battle_config.flooritem_lifetime },
@@ -3916,6 +3917,7 @@ void battle_set_defaults() {
battle_config.pc_damage_delay_rate=100;
battle_config.defnotenemy=0;
battle_config.vs_traps_bctall=1;
+ battle_config.clear_unit_ondeath=1;
battle_config.random_monster_checklv=1;
battle_config.attr_recover=1;
battle_config.flooritem_lifetime=LIFETIME_FLOORITEM*1000;
diff --git a/src/map/battle.h b/src/map/battle.h
index 786db1d66..dd49039ca 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -115,6 +115,7 @@ extern struct Battle_Config {
unsigned short pc_damage_delay_rate;
unsigned short defnotenemy;
unsigned short vs_traps_bctall;
+ unsigned short clear_unit_ondeath; //[Skotlex]
unsigned short random_monster_checklv;
unsigned short attr_recover;
unsigned short flooritem_lifetime;
diff --git a/src/map/charcommand.c b/src/map/charcommand.c
index 51f6a7106..3f931e24a 100644
--- a/src/map/charcommand.c
+++ b/src/map/charcommand.c
@@ -614,15 +614,19 @@ int charcommand_save(
if ((pl_sd = map_nick2sd(character)) != NULL) {
if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can change save point only to lower or same gm level
m = map_mapname2mapid(map_name);
- if (m < 0) {
+ if (m < 0 && !mapindex_name2id(map_name)) {
clif_displaymessage(fd, msg_table[1]); // Map not found.
return -1;
} else {
- if (map[m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ //FIXME: What do you do if the map is in another map server with the nowarpto flag?
+ if (m>=0 && map[m].flag.nosave && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
clif_displaymessage(fd, "You are not authorised to set this map as a save map.");
return -1;
}
- pc_setsavepoint(pl_sd, map[m].index, x, y);
+ if (m>=0)
+ pc_setsavepoint(pl_sd, map[m].index, x, y);
+ else
+ pc_setsavepoint(pl_sd, mapindex_name2id(map_name), x, y);
clif_displaymessage(fd, msg_table[57]); // Character's respawn point changed.
}
} else {
diff --git a/src/map/mob.c b/src/map/mob.c
index 529b75cea..700b00e7f 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -817,7 +817,8 @@ int mob_changestate(struct mob_data *md,int state,int type)
clif_foreachclient(mob_stopattacked,md->bl.id);
skill_unit_move(&md->bl,gettick(),4);
status_change_clear(&md->bl,2); // ステータス異常を解除する
- skill_clear_unitgroup(&md->bl); // 全てのスキルユニットグループを削除する
+ if (battle_config.clear_unit_ondeath)
+ skill_clear_unitgroup(&md->bl);
skill_cleartimerskill(&md->bl);
if(md->deletetimer!=-1)
delete_timer(md->deletetimer,mob_timer_delete);
diff --git a/src/map/pc.c b/src/map/pc.c
index c9ac91d3e..73c79b982 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5406,6 +5406,8 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage)
pc_setdead(sd);
skill_unit_move(&sd->bl,gettick(),4);
+ if (battle_config.clear_unit_ondeath)
+ skill_clear_unitgroup(&sd->bl); //orn
pc_setglobalreg(sd,"PC_DIE_COUNTER",++sd->die_counter); //死にカウンタ?書き?み
// changed penalty options, added death by player if pk_mode [Valaris]
diff --git a/src/map/skill.c b/src/map/skill.c
index 5085dd94f..9061078b8 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3064,9 +3064,9 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
struct mob_data *dstmd = NULL;
int i,type=-1;
- if(skillid < 0 || skillid > MAX_SKILL)
+ if(skillid < 0 || (skillid > MAX_SKILL || (skillid >= GD_SKILLBASE && skillid > GD_SKILLBASE + MAX_GUILDSKILL)))
{ // remove the debug print when this case is finished
- ShowDebug("skill_castend_nodamage_id: skillid=%i\ncall: %p %p %i %i %i %i",skillid,
+ ShowDebug("skill_castend_nodamage_id: skillid=%i call: %p %p %i %i %i %i\n",skillid,
src, bl,skillid,skilllv,tick,flag);
return 0;
}