From 7ada5312d478e4f56e8829779eb8c977877c99c2 Mon Sep 17 00:00:00 2001 From: skotlex Date: Mon, 6 Mar 2006 14:37:44 +0000 Subject: - 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 --- Changelog-Trunk.txt | 7 +++++++ conf-tmpl/battle/skill.conf | 3 +++ db/Changelog.txt | 2 ++ db/skill_db.txt | 2 +- src/map/battle.c | 2 ++ src/map/battle.h | 1 + src/map/charcommand.c | 10 +++++++--- src/map/mob.c | 3 ++- src/map/pc.c | 2 ++ src/map/skill.c | 4 ++-- 10 files changed, 29 insertions(+), 7 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 8fe12bc72..7e758742f 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,13 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EVERYTHING ELSE GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS +2006/03/06 + * Fixed a debug message showing up on skill castend nodamage id when using + a guild skill. [Skotlex] + * Fixed #save not working on maps not in the current map server. [Skotlex] + * Added battle config clear_skills_on_death to decide whether all + ground-based skills should be removed when you die. Defaults to yes. + [Skotlex] 2006/03/05 * Removed my EXP limit as it did not do what it was supposed to [Codemaster] * Fixed remove-trap [Skotlex] diff --git a/conf-tmpl/battle/skill.conf b/conf-tmpl/battle/skill.conf index 41302e0fd..42b5abf4a 100644 --- a/conf-tmpl/battle/skill.conf +++ b/conf-tmpl/battle/skill.conf @@ -80,6 +80,9 @@ skill_caster_check: yes // Should skill casting be cancelled when inflicted by curse/stun/sleep/etc? status_cast_cancel: no +// Should ground placed skills be removed as soon as the caster dies? +clear_skills_on_death: yes + //Setting this to YES will override the target mode of ground-based skills with the flag 0x01 to "No Enemies" //The two skills affected by default are Pneuma and Safety Wall (if set to yes, those two skills will not protect everyone, but only allies) //See db/skill_unit_db.txt for more info. diff --git a/db/Changelog.txt b/db/Changelog.txt index 49e7dca53..954528ed3 100644 --- a/db/Changelog.txt +++ b/db/Changelog.txt @@ -26,6 +26,8 @@ ========================= +03/06 + * Stave Crasher's element is now -1 (take weapon's element) [Skotlex] 03/03 * Fixed missing baby-dancer job in exp2.txt [Skotlex] * Added GrandCross's can't move delay of 900ms to skill_cast_db and Finger diff --git a/db/skill_db.txt b/db/skill_db.txt index f7707fbbc..710c35707 100644 --- a/db/skill_db.txt +++ b/db/skill_db.txt @@ -383,7 +383,7 @@ 362,4,6,4,0,1,0,5,1,yes,0,0,0,magic,2 //HP_BASILICA#Basilica# 363,0,0,0,0,0,0,10,0,no,0,0,0,magic,0 //HP_MEDITATIO#Meditatio# 364,0,0,0,0,0,0,10,1,no,0,0,0,magic,0 //HW_SOULDRAIN#Soul Drain# -365,9,8,1,0,0,0,1,1,yes,0,0,0,magic,0 //HW_MAGICCRASHER#Stave Crasher# +365,9,8,1,-1,0,0,1,1,yes,0,0,0,magic,0 //HW_MAGICCRASHER#Stave Crasher# 366,0,6,4,0,1,0,10,1,no,0,0,0,magic,0 //HW_MAGICPOWER#Mystical Amplification# 367,9,8,1,0,0,0,5,1,no,0,0,0,misc,0 //PA_PRESSURE#Gloria Domini# 368,0,6,4,0,1,0,5,1,yes,0,0,0,weapon,0 //PA_SACRIFICE# Martyr's Reckoning# 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; } -- cgit v1.2.3-60-g2f50