Bladeren bron

- 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://svn.code.sf.net/p/rathena/svn/trunk@5472 54d463be-8e91-2dee-dedb-b68131a5f0ec

skotlex 19 jaren geleden
bovenliggende
commit
2b874adf3c
10 gewijzigde bestanden met toevoegingen van 29 en 7 verwijderingen
  1. 7 0
      Changelog-Trunk.txt
  2. 3 0
      conf-tmpl/battle/skill.conf
  3. 2 0
      db/Changelog.txt
  4. 1 1
      db/skill_db.txt
  5. 2 0
      src/map/battle.c
  6. 1 0
      src/map/battle.h
  7. 7 3
      src/map/charcommand.c
  8. 2 1
      src/map/mob.c
  9. 2 0
      src/map/pc.c
  10. 2 2
      src/map/skill.c

+ 7 - 0
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]

+ 3 - 0
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.

+ 2 - 0
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

+ 1 - 1
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#

+ 2 - 0
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;

+ 1 - 0
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;

+ 7 - 3
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 {

+ 2 - 1
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);

+ 2 - 0
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); //Ž€‚ɃJƒEƒ“ƒ^?�‘‚«?‚Ý
 	 // changed penalty options, added death by player if pk_mode [Valaris]

+ 2 - 2
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;
 	}