Browse Source

Fixed bugreport:6380 Snap/Body Relocation animation, super ultra special thanks to emong.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16541 54d463be-8e91-2dee-dedb-b68131a5f0ec
shennetsind 12 years ago
parent
commit
496deaaec4
4 changed files with 27 additions and 8 deletions
  1. 1 0
      db/packet_db.txt
  2. 17 4
      src/map/clif.c
  3. 2 0
      src/map/clif.h
  4. 7 4
      src/map/skill.c

+ 1 - 0
db/packet_db.txt

@@ -1645,6 +1645,7 @@ packet_ver: 27
 0x088a,6,getcharnamerequest,2
 0x088a,6,getcharnamerequest,2
 0x0838,6,solvecharname,2
 0x0838,6,solvecharname,2
 0x0439,8,useitem,2:4
 0x0439,8,useitem,2:4
+0x08d2,10
 
 
 // 2011-11-02aRagexe
 // 2011-11-02aRagexe
 packet_ver: 28
 packet_ver: 28

+ 17 - 4
src/map/clif.c

@@ -16096,7 +16096,7 @@ int clif_status_load_notick(struct block_list *bl,int type,int flag,int val1, in
 	WBUFL(buf,17) = val2;
 	WBUFL(buf,17) = val2;
 	WBUFL(buf,21) = val3;
 	WBUFL(buf,21) = val3;
 
 
-	clif_send(buf,packet_len(WBUFW(buf,0)),bl,AREA);
+	clif_send(buf,packet_len(0x043f),bl,AREA);
 	return 0;
 	return 0;
 }
 }
 //Notifies FD of ID's type
 //Notifies FD of ID's type
@@ -16174,14 +16174,16 @@ void clif_talisman(struct map_session_data *sd,short type)
 void clif_parse_MoveItem(int fd, struct map_session_data *sd) {
 void clif_parse_MoveItem(int fd, struct map_session_data *sd) {
 #if PACKETVER >= 20111122
 #if PACKETVER >= 20111122
 	int index;
 	int index;
-		
+	
+	/* can't move while dead. */
 	if(pc_isdead(sd)) {
 	if(pc_isdead(sd)) {
 		return;
 		return;
 	}
 	}
+	
 	index = RFIFOW(fd,2)-2; 
 	index = RFIFOW(fd,2)-2; 
 	if (index < 0 || index >= MAX_INVENTORY)
 	if (index < 0 || index >= MAX_INVENTORY)
 		return;
 		return;
-	if (sd->status.inventory[index].favorite && sd->status.inventory[index].favorite == 1)
+	if ( sd->status.inventory[index].favorite )
 			sd->status.inventory[index].favorite = 0;
 			sd->status.inventory[index].favorite = 0;
 		else
 		else
 			sd->status.inventory[index].favorite = 1;
 			sd->status.inventory[index].favorite = 1;
@@ -16203,6 +16205,17 @@ void clif_favorite_item(struct map_session_data* sd, unsigned short index) {
 	WFIFOSET(fd,packet_len(0x908));
 	WFIFOSET(fd,packet_len(0x908));
 }
 }
 
 
+void clif_snap( struct block_list *bl, short x, short y ) {
+	unsigned char buf[10];
+
+	WBUFW(buf,0) = 0x8d2;
+	WBUFL(buf,2) = bl->id;
+	WBUFW(buf,6) = x;
+	WBUFW(buf,8) = y;
+	
+	clif_send(buf,packet_len(0x8d2),bl,AREA);
+}
+
 /*==========================================
 /*==========================================
  * Main client packet processing function
  * Main client packet processing function
  *------------------------------------------*/
  *------------------------------------------*/
@@ -16590,7 +16603,7 @@ static int packetdb_readdb(void)
 		0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
 		0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
 	//#0x08C0
 	//#0x08C0
 		0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 10,
 		0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 10,
-		0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+		0,  0, 10,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
 		0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
 		0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
 		0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
 		0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
 	//#0x0900
 	//#0x0900

+ 2 - 0
src/map/clif.h

@@ -738,6 +738,8 @@ void clif_elemental_updatestatus(struct map_session_data *sd, int type);
 
 
 void clif_talisman(struct map_session_data *sd, short type);
 void clif_talisman(struct map_session_data *sd, short type);
 
 
+void clif_snap( struct block_list *bl, short x, short y );
+
 /**
 /**
  * Color Table
  * Color Table
  **/
  **/

+ 7 - 4
src/map/skill.c

@@ -9543,14 +9543,17 @@ int skill_castend_pos2(struct block_list* src, int x, int y, int skillid, int sk
 
 
 	case MO_BODYRELOCATION:
 	case MO_BODYRELOCATION:
 		if (unit_movepos(src, x, y, 1, 1)) {
 		if (unit_movepos(src, x, y, 1, 1)) {
+#if PACKETVER >= 20111005
+			clif_snap(src, src->x, src->y);
+#else
 			clif_skill_poseffect(src,skillid,skilllv,src->x,src->y,tick);
 			clif_skill_poseffect(src,skillid,skilllv,src->x,src->y,tick);
-//			clif_slide(src, src->x, src->y); //Poseffect is the one that makes the char snap on the client...
-			if (sd) skill_blockpc_start (sd, MO_EXTREMITYFIST, 2000);
+#endif
+			if (sd)
+				skill_blockpc_start (sd, MO_EXTREMITYFIST, 2000);
 		}
 		}
 		break;
 		break;
 	case NJ_SHADOWJUMP:
 	case NJ_SHADOWJUMP:
-		if( !map_flag_gvg(src->m) && !map[src->m].flag.battleground )
-		{	//You don't move on GVG grounds.
+		if( !map_flag_gvg(src->m) && !map[src->m].flag.battleground ) { //You don't move on GVG grounds.
 			unit_movepos(src, x, y, 1, 0);
 			unit_movepos(src, x, y, 1, 0);
 			clif_slide(src,x,y);
 			clif_slide(src,x,y);
 		}
 		}