diff --git a/src/map/clif.cpp b/src/map/clif.cpp index 471cac3e95..4ef20c2684 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -2118,7 +2118,7 @@ void clif_changemapserver( map_session_data& sd, const char* map, uint16 x, uint /// This function combines both calls and allows to simplify the calling code void clif_blown(struct block_list *bl) { - clif_slide(bl, bl->x, bl->y); + clif_slide(*bl, bl->x, bl->y); clif_fixpos( *bl ); } @@ -9992,21 +9992,20 @@ void clif_name( struct block_list* src, struct block_list *bl, send_target targe /// Visually moves(instant) a character to x,y. The char moves even /// when the target cell isn't walkable. If the char is sitting it /// stays that way. -void clif_slide(struct block_list *bl, int x, int y) -{ - unsigned char buf[10]; - nullpo_retv(bl); +void clif_slide(block_list& bl, int x, int y){ - WBUFW(buf, 0) = 0x01ff; - WBUFL(buf, 2) = bl->id; - WBUFW(buf, 6) = x; - WBUFW(buf, 8) = y; - clif_send(buf, packet_len(0x1ff), bl, AREA); + PACKET_ZC_HIGHJUMP p{}; - if( disguised(bl) ) + p.packetType = HEADER_ZC_HIGHJUMP; + p.srcId = bl.id; + p.x = x; + p.y = y; + clif_send(&p, sizeof(p), &bl, AREA); + + if( disguised(&bl) ) { - WBUFL(buf,2) = disguised_bl_id(bl->id); - clif_send(buf, packet_len(0x1ff), bl, SELF); + p.srcId = disguised_bl_id(bl.id); + clif_send(&p, sizeof(p), &bl, SELF); } } diff --git a/src/map/clif.hpp b/src/map/clif.hpp index ba2e9e3252..ffd2bb6998 100644 --- a/src/map/clif.hpp +++ b/src/map/clif.hpp @@ -838,7 +838,7 @@ void clif_move( struct unit_data& ud ); //area void clif_changemap( map_session_data& sd, short m, uint16 x, uint16 y ); void clif_changemapserver( map_session_data& sd, const char* map, uint16 x, uint16 y, uint32 ip, uint16 port ); void clif_blown(struct block_list *bl); // area -void clif_slide(struct block_list *bl, int x, int y); // area +void clif_slide(block_list& bl, int x, int y); // area void clif_fixpos( block_list& bl ); void clif_npcbuysell( map_session_data& sd, npc_data& nd ); void clif_buylist( map_session_data& sd, npc_data& nd ); diff --git a/src/map/clif_packetdb.hpp b/src/map/clif_packetdb.hpp index 7af1980b16..8d2b07fbd6 100644 --- a/src/map/clif_packetdb.hpp +++ b/src/map/clif_packetdb.hpp @@ -316,7 +316,6 @@ packet(0x01fb,56); packet(0x01fc,-1); parseable_packet( HEADER_CZ_REQ_ITEMREPAIR1, sizeof( struct PACKET_CZ_REQ_ITEMREPAIR1 ), clif_parse_RepairItem, 0 ); - packet(0x01ff,10); packet(0x0200,26); packet(0x0201,-1); parseable_packet(0x0202,26,clif_parse_FriendsListAdd,2); diff --git a/src/map/packets.hpp b/src/map/packets.hpp index 308dddc38d..74ee30f4c3 100644 --- a/src/map/packets.hpp +++ b/src/map/packets.hpp @@ -996,6 +996,14 @@ struct PACKET_ZC_SKILL_UPDATE { } __attribute__((packed)); DEFINE_PACKET_HEADER(ZC_SKILL_UPDATE, 0x1ac); +struct PACKET_ZC_HIGHJUMP{ + uint16 packetType; + uint32 srcId; + uint16 x; + uint16 y; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(ZC_HIGHJUMP, 0x01ff); + #if PACKETVER >= 20141022 struct PACKET_ZC_RECOVERY { int16 packetType; diff --git a/src/map/skill.cpp b/src/map/skill.cpp index 64287c2ded..a796625ffe 100755 --- a/src/map/skill.cpp +++ b/src/map/skill.cpp @@ -9688,7 +9688,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui if(blew_count > 0) clif_blown(src); // Always blow, otherwise it shows a casting animation. [Lemongrass] #else - clif_slide(bl, bl->x, bl->y); //Show the casting animation on pre-re + clif_slide(*bl, bl->x, bl->y); //Show the casting animation on pre-re #endif } break; diff --git a/src/map/status.cpp b/src/map/status.cpp index f9e229de41..8192feaf83 100644 --- a/src/map/status.cpp +++ b/src/map/status.cpp @@ -14790,7 +14790,7 @@ TIMER_FUNC(status_change_timer){ uint16 x = sce->val3 >> 16, y = sce->val3 & 0xFFFF; if (distance_xy(x, y, bl->x, bl->y) <= skill_get_unit_range(SO_VACUUM_EXTREME, sce->val1) && unit_movepos(bl, x, y, 0, false)) { - clif_slide(bl, x, y); + clif_slide(*bl, x, y); clif_fixpos( *bl ); } } diff --git a/src/map/unit.cpp b/src/map/unit.cpp index 1bff17e9fd..230949bcb2 100644 --- a/src/map/unit.cpp +++ b/src/map/unit.cpp @@ -1132,7 +1132,7 @@ bool unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, boo if( flag ) { unit_movepos(pbl,sd->bl.x,sd->bl.y, 0, 0); - clif_slide(pbl,pbl->x,pbl->y); + clif_slide(*pbl,pbl->x,pbl->y); } } }