Просмотр исходного кода

- @produce now can make any kind of equipment
- Fixed a warning on the mob_ai
- Made HLIF_AVOID and HAMI_DEFENCE cause the status change on both caster and target.
- AM_REST shouldn't be checking for a range now (since it's a self skill)


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

skotlex 19 лет назад
Родитель
Сommit
04d969e781
7 измененных файлов с 21 добавлено и 17 удалено
  1. 5 0
      Changelog-Trunk.txt
  2. 1 1
      src/char/int_pet.c
  3. 3 2
      src/map/atcommand.c
  4. 1 1
      src/map/mob.c
  5. 2 2
      src/map/pet.c
  6. 9 2
      src/map/skill.c
  7. 0 9
      src/map/unit.c

+ 5 - 0
Changelog-Trunk.txt

@@ -4,6 +4,11 @@ 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.
 
 2006/08/16
+	* @produce now can make any kind of equipment [Skotlex]
+	* Made HLIF_AVOID and HAMI_DEFENCE cause the status change on both caster
+	  and target. [Skotlex]
+	* AM_REST shouldn't be checking for a range now (since it's a self skill)
+	  [Skotlex]
 	* Updated mob_ai so that mobs will use their rude-attacked skill when they
 	  can't reach their current target. [Skotlex]
 	* Fixed the default txt config making pets be saved to the homun file

+ 1 - 1
src/char/int_pet.c

@@ -175,7 +175,7 @@ int mapif_pet_created(int fd,int account_id,struct s_pet *p)
 
 int mapif_pet_info(int fd,int account_id,struct s_pet *p)
 {
-        WFIFOHEAD(fd, sizeof(struct s_pet) + 9);
+	WFIFOHEAD(fd, sizeof(struct s_pet) + 9);
 	WFIFOW(fd,0)=0x3881;
 	WFIFOW(fd,2)=sizeof(struct s_pet) + 9;
 	WFIFOL(fd,4)=account_id;

+ 3 - 2
src/map/atcommand.c

@@ -3875,7 +3875,7 @@ int atcommand_produce(
 		return -1;
 	}
 	item_id = item_data->nameid;
-	if (itemdb_isequip2(item_data) && item_data->type == IT_WEAPON) {
+	if (itemdb_isequip2(item_data)) {
 		if (attribute < MIN_ATTRIBUTE || attribute > MAX_ATTRIBUTE)
 			attribute = ATTRIBUTE_NORMAL;
 		if (star < MIN_STAR || star > MAX_STAR)
@@ -3885,7 +3885,8 @@ int atcommand_produce(
 		tmp_item.amount = 1;
 		tmp_item.identify = 1;
 		tmp_item.card[0] = CARD0_FORGE;
-		tmp_item.card[1] = ((star * 5) << 8) + attribute;
+		tmp_item.card[1] = item_data->type==IT_WEAPON?
+			((star*5) << 8) + attribute:0;
 		tmp_item.card[2] = GetWord(sd->char_id, 0);
 		tmp_item.card[3] = GetWord(sd->char_id, 1);
 		clif_produceeffect(sd, 0, item_id);

+ 1 - 1
src/map/mob.c

@@ -1096,7 +1096,7 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
 		{
 			if (!battle_check_range(&md->bl, tbl, md->status.rhw.range) &&
 				((!can_move && battle_config.mob_ai&2) ||
-				(!mob_can_reach(md, tbl, dist+2, MSS_RUSH))))
+				(!mob_can_reach(md, tbl, md->min_chase, MSS_RUSH))))
 			{	//Rude-attacked (avoid triggering due to can-walk delay).
 				if (DIFF_TICK(tick, md->ud.canmove_tick) > 0 &&
 				  	md->attacked_count++ >= RUDE_ATTACKED_COUNT)

+ 2 - 2
src/map/pet.c

@@ -410,11 +410,11 @@ int pet_data_init(struct map_session_data *sd, struct s_pet *pet)
 	pd->bl.x = pd->ud.to_x;
 	pd->bl.y = pd->ud.to_y;
 	pd->bl.id = npc_get_new_npc_id();
-	pd->db = mob_db(pd->pet.class_);
+	pd->db = mob_db(pet->class_);
 	pd->bl.subtype = MONS;
 	pd->bl.type = BL_PET;
 	pd->msd = sd;
-	status_set_viewdata(&pd->bl, pd->pet.class_);
+	status_set_viewdata(&pd->bl, pet->class_);
 	unit_dataset(&pd->bl);
 	pd->ud.dir = sd->ud.dir;
 	pd->last_thinktime = gettick();

+ 9 - 2
src/map/skill.c

@@ -3734,11 +3734,18 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
 	case NJ_KASUMIKIRI:
 	case NJ_UTSUSEMI:
 	case NJ_NEN:
-	case HLIF_AVOID:	//[orn]
-	case HAMI_DEFENCE:	//[orn]
 		clif_skill_nodamage(src,bl,skillid,skilllv,
 			sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
 		break;
+	case HLIF_AVOID:	//[orn]
+	case HAMI_DEFENCE:
+		i = skill_get_time(skillid,skilllv);
+		clif_skill_nodamage(src,bl,skillid,skilllv,
+			sc_start(src,type,100,skilllv,i));
+		if (bl != src)
+			clif_skill_nodamage(src,bl,skillid,skilllv,
+				sc_start(bl,type,100,skilllv,i));
+		break;
 	case NJ_BUNSINJYUTSU:
 		clif_skill_nodamage(src,bl,skillid,skilllv,
 			sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));

+ 0 - 9
src/map/unit.c

@@ -773,15 +773,6 @@ int unit_skilluse_id2(struct block_list *src, int target_id, int skill_num, int
 				return 0;
 			}
 			break;
-		//TODO: here we should place and correct skills that should target homun automatically. However some work still needs be done as "dead homuns" are deleted from memory, and as such, you can't really target them. [Skotlex]
-		case AM_REST:
-//		case AM_RESURRECTHOMUN:
-			target = (struct block_list*)sd->hd;
-			if (!target) {
-				clif_skill_fail(sd,skill_num,0,0);
-				return 0;
-			}
-			break;
 		}
 		if (target)
 			target_id = target->id;