Bladeren bron

- Changed checks of item's identify field from 0/1 to 0/non-zero
- Corrected TK_JUMPKICK to place the caster on the tile next to the target rather than on top of it.


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

skotlex 19 jaren geleden
bovenliggende
commit
99a6cf0627
3 gewijzigde bestanden met toevoegingen van 20 en 6 verwijderingen
  1. 3 0
      Changelog-Trunk.txt
  2. 4 4
      src/map/clif.c
  3. 13 2
      src/map/skill.c

+ 3 - 0
Changelog-Trunk.txt

@@ -4,6 +4,9 @@ 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/04/29
+	* Changed checks of item's identify field from 0/1 to 0/non-zero [Skotlex]
+	* Corrected TK_JUMPKICK to place the caster on the tile next to the target
+	  rather than on top of it. [Skotlex]
 	* Small change in pc_calc_skilltree which should fix the infinite loop...
 	  [Skotlex]
 	* Added @noask command: enable/disable deals/invites autorejecting.

+ 4 - 4
src/map/clif.c

@@ -5224,7 +5224,7 @@ int clif_item_identify_list(struct map_session_data *sd)
 	WFIFOHEAD(fd,MAX_INVENTORY * 2 + 4);
 	WFIFOW(fd,0)=0x177;
 	for(i=c=0;i<MAX_INVENTORY;i++){
-		if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].identify!=1){
+		if(sd->status.inventory[i].nameid > 0 && !sd->status.inventory[i].identify){
 			WFIFOW(fd,c*2+4)=i+2;
 			c++;
 		}
@@ -5340,7 +5340,7 @@ int clif_item_refine_list(struct map_session_data *sd)
 	WFIFOW(fd,0)=0x221;
 	for(i=c=0;i<MAX_INVENTORY;i++){
 		if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].refine < skilllv &&
-			sd->status.inventory[i].identify==1 && (wlv=itemdb_wlv(sd->status.inventory[i].nameid)) >=1 &&
+			sd->status.inventory[i].identify && (wlv=itemdb_wlv(sd->status.inventory[i].nameid)) >=1 &&
 			refine_item[wlv]!=-1 && !(sd->status.inventory[i].equip&0x0022)){
 			WFIFOW(fd,c*13+ 4)=i+2;
 			WFIFOW(fd,c*13+ 6)=sd->status.inventory[i].nameid;
@@ -5700,7 +5700,7 @@ int clif_openvending(struct map_session_data *sd,int id,struct vending *vending)
 		WBUFL(buf,8+n*22)=vending[i].value;
 		WBUFW(buf,12+n*22)=(index=vending[i].index)+2;
 		WBUFW(buf,14+n*22)=vending[i].amount;
-		if(sd->status.cart[index].nameid <= 0 || sd->status.cart[index].amount <= 0 || sd->status.cart[index].identify==0 ||
+		if(sd->status.cart[index].nameid <= 0 || sd->status.cart[index].amount <= 0 || !sd->status.cart[index].identify ||
 			sd->status.cart[index].attribute==1) // Prevent unidentified and broken items from being sold [Valaris]
 			continue;
 		data = itemdb_search(sd->status.cart[index].nameid);
@@ -9103,7 +9103,7 @@ void clif_parse_EquipItem(int fd,struct map_session_data *sd)
 	if(sd->sc.data[SC_BLADESTOP].timer!=-1 || sd->sc.data[SC_BERSERK].timer!=-1 )
 		return;
 
-	if(sd->status.inventory[index].identify != 1) {		// –¢ŠÓ’è
+	if(!sd->status.inventory[index].identify) {		// –¢ŠÓ’è
 		clif_equipitemack(sd,index,0,0);	// fail
 		return;
 	}

+ 13 - 2
src/map/skill.c

@@ -2561,12 +2561,23 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s
 			BF_WEAPON, src, src, skillid, skilllv, tick, flag, BCT_ENEMY);	
 		break;
 	case TK_JUMPKICK:
+	{
+		short x, y;
+		x = bl->x;
+		y = bl->y;
 		if (!unit_can_move(src))
 			break;
+		if (src->x < bl->x) x--;
+		else if (src->x > bl->x) x++;
+		if (src->y < bl->y) y--;
+		else if (src->y > bl->y) y++;
+		if (map_getcell(bl->m, x, y, CELL_CHKNOPASS))
+		{	x = bl->x; y = bl->y; }
 		skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
-		if (unit_movepos(src, bl->x, bl->y, 0, 0))
-			clif_slide(src,bl->x,bl->y);
+		if (unit_movepos(src, x, y, 0, 0))
+			clif_slide(src,src->x,src->y);
 		break;
+	}
 	case ASC_BREAKER:				/* ƒ\ƒEƒ‹ƒuƒŒ?ƒJ? */	// [DracoRPG]
 		// Separate weapon and magic attacks
 		skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);