diff options
author | Haru <haru@dotalux.com> | 2017-11-18 20:08:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-18 20:08:29 +0100 |
commit | 901df02711777462bd9e4016c91b8166441d9353 (patch) | |
tree | 66078c91ed3cc6d99e406cad4dfc5f472f2878ee /src/map/clif.c | |
parent | 65f7edf0d88ba7a879427ad2e99c91c20b8a599f (diff) | |
parent | f48b5b3e5788105c54c90edf2ba0d3232de639bb (diff) | |
download | hercules-901df02711777462bd9e4016c91b8166441d9353.tar.gz hercules-901df02711777462bd9e4016c91b8166441d9353.tar.bz2 hercules-901df02711777462bd9e4016c91b8166441d9353.tar.xz hercules-901df02711777462bd9e4016c91b8166441d9353.zip |
Merge pull request #1903 from Asheraf/skill_scale
Implement skill scale packet for client versions >= 20151223.
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 4bf3cdf94..95a2d8f5d 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -5068,6 +5068,10 @@ void clif_useskill(struct block_list* bl, int src_id, int dst_id, int dst_x, int } else { clif->send(buf,packet_len(cmd), bl, AREA); } +#if PACKETVER >= 20151223 + if ((skill->get_inf2(skill_id) & INF2_SHOW_SKILL_SCALE) != 0) + clif->skill_scale(bl, src_id, bl->x, bl->y, skill_id, skill_lv, casttime); +#endif } /// Notifies clients in area, that an object canceled casting (ZC_DISPEL). @@ -19860,6 +19864,32 @@ void clif_parse_rodex_cancel_write_mail(int fd, struct map_session_data *sd) rodex->clean(sd, 1); } +void clif_skill_scale(struct block_list *bl, int src_id, int x, int y, uint16 skill_id, uint16 skill_lv, int casttime) +{ +#if PACKETVER >= 20151223 + struct PACKET_ZC_SKILL_SCALE p; + + p.PacketType = skillscale; + p.AID = src_id; + p.skill_id = skill_id; + p.skill_lv = skill_lv; + p.x = x; + p.y = y; + p.casttime = casttime; + + if (clif->isdisguised(bl)) { + clif->send(&p, sizeof(p), bl, AREA_WOS); + p.AID = -src_id; + clif->send(&p, sizeof(p), bl, SELF); + } else { + clif->send(&p, sizeof(p), bl, AREA); + } +#else + ShowWarning("clif_skill_scale: showing skill scale available only for clients >= 20151223."); + return; +#endif +} + /*========================================== * Main client packet processing function *------------------------------------------*/ @@ -20929,4 +20959,5 @@ void clif_defaults(void) { clif->rodex_request_items = clif_rodex_request_items; clif->rodex_icon = clif_rodex_icon; clif->rodex_send_mails_all = clif_rodex_send_mails_all; + clif->skill_scale = clif_skill_scale; } |