瀏覽代碼

- Updated clone skill copy to consider combo-skills.
- no_spawn_on_player won't work on mobs with no respawn delays now.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5581 54d463be-8e91-2dee-dedb-b68131a5f0ec

skotlex 19 年之前
父節點
當前提交
0e82adb9bf
共有 2 個文件被更改,包括 22 次插入10 次删除
  1. 4 0
      Changelog-Trunk.txt
  2. 18 10
      src/map/mob.c

+ 4 - 0
Changelog-Trunk.txt

@@ -4,6 +4,10 @@ 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/12
+	* Updated clone skill copy to consider combo-skills. [Skotlex]
+	* no_spawn_on_player won't work on mobs with no respawn delays now. [Skotlex]
 2006/03/10
 	* Cleaned up the Skillbreaker implementation, HP gaining happens at level 5
 	  now. [Skotlex]

+ 18 - 10
src/map/mob.c

@@ -1078,6 +1078,7 @@ int mob_spawn (int id)
 
 		//Avoid spawning on the view-range of players. [Skotlex]
 		if (battle_config.no_spawn_on_player &&
+			!(md->spawndelay1 == -1 && md->spawndelay2 == -1) &&
 			c++ < battle_config.no_spawn_on_player &&
 			map_foreachinarea(mob_count_sub, md->m,
 				x-AREA_SIZE, y-AREA_SIZE, x+AREA_SIZE, y+AREA_SIZE, BL_PC)
@@ -4124,18 +4125,25 @@ int mob_clone_spawn(struct map_session_data *sd, char *map, int x, int y, const
 				ms[i].cond2 = 95;
 			}
 		} else if (inf&INF_SELF_SKILL) {
-			if (!(skill_get_nk(skill_id)&NK_NO_DAMAGE)) { //Offensive skill
+			if (skill_get_inf2(skill_id)&INF2_NO_TARGET_SELF) { //auto-select target skill.
 				ms[i].target = MST_TARGET;
-				ms[i].state = MSS_BERSERK;
-			} else //Self skill
+				ms[i].cond1 = MSC_ALWAYS;
+				if (skill_get_range(skill_id, ms[i].skill_lv)  > 3) {
+					ms[i].state = MSS_RUSH;
+				} else {
+					ms[i].state = MSS_BERSERK;
+					ms[i].permillage = 2500;
+				}
+			} else { //Self skill
 				ms[i].target = MST_SELF;
-			ms[i].cond1 = MSC_MYHPLTMAXRATE;
-			ms[i].cond2 = 90;
-			ms[i].permillage = 2000;
-			//Delay: Remove the stock 5 secs and add half of the support time.
-			ms[i].delay += -5000 +(skill_get_time(skill_id, ms[i].skill_lv) + skill_get_time2(skill_id, ms[i].skill_lv))/2;
-			if (ms[i].delay < 5000)
-				ms[i].delay = 5000; //With a minimum of 5 secs.
+				ms[i].cond1 = MSC_MYHPLTMAXRATE;
+				ms[i].cond2 = 90;
+				ms[i].permillage = 2000;
+				//Delay: Remove the stock 5 secs and add half of the support time.
+				ms[i].delay += -5000 +(skill_get_time(skill_id, ms[i].skill_lv) + skill_get_time2(skill_id, ms[i].skill_lv))/2;
+				if (ms[i].delay < 5000)
+					ms[i].delay = 5000; //With a minimum of 5 secs.
+			}
 		} else if (inf&INF_SUPPORT_SKILL) {
 			ms[i].target = MST_FRIEND;
 			ms[i].cond1 = MSC_FRIENDHPLTMAXRATE;