summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorAsheraf <acheraf1998@gmail.com>2017-11-12 23:56:11 +0000
committerAsheraf <acheraf1998@gmail.com>2017-11-16 11:18:41 +0000
commita11db78940ba20570f11eda90b21028c09da03f2 (patch)
tree22d0963b31eac60bf4762dc16af5249eac3632f4 /src/map/clif.c
parent14ca1ab7a98d3c6df94b967159d4dd2df555d7e7 (diff)
downloadhercules-a11db78940ba20570f11eda90b21028c09da03f2.tar.gz
hercules-a11db78940ba20570f11eda90b21028c09da03f2.tar.bz2
hercules-a11db78940ba20570f11eda90b21028c09da03f2.tar.xz
hercules-a11db78940ba20570f11eda90b21028c09da03f2.zip
Implement skill scale packet for client versions >= 20151223.
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 4dc36be6d..7fa05af05 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;
}