summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-06-11 18:23:06 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-06-11 18:23:06 +0000
commitb44f822aa57e0e4b63cfae8e515eeb3e576677fe (patch)
treeff193b75d15a8aa7a802b97c43e5d076719607f9
parentffb32401ad12791bf79c051ef5ea1f3976608514 (diff)
downloadhercules-b44f822aa57e0e4b63cfae8e515eeb3e576677fe.tar.gz
hercules-b44f822aa57e0e4b63cfae8e515eeb3e576677fe.tar.bz2
hercules-b44f822aa57e0e4b63cfae8e515eeb3e576677fe.tar.xz
hercules-b44f822aa57e0e4b63cfae8e515eeb3e576677fe.zip
* Added support for new skill usage notification packet 0x7fb (ZC_USESKILL_ACK2).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14845 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--db/packet_db.txt2
-rw-r--r--src/map/clif.c57
-rw-r--r--src/map/clif.h2
4 files changed, 37 insertions, 25 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 86c88b4b3..5a0f68755 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -1,6 +1,7 @@
Date Added
2011/06/11
+ * Added support for new skill usage notification packet 0x7fb (ZC_USESKILL_ACK2). [Ai4rei]
* Fixed party invite packet 0xfe (ZC_REQ_JOIN_GROUP) using account id of the inviter rather than party id. [Ai4rei]
- Added support for new party invite packet 0x2c6 (ZC_PARTY_JOIN_REQ), introduction date guessed.
2011/06/02
diff --git a/db/packet_db.txt b/db/packet_db.txt
index f00c6d08e..662a41779 100644
--- a/db/packet_db.txt
+++ b/db/packet_db.txt
@@ -1439,7 +1439,7 @@ packet_ver: 25
0x07fa,8
//2009-11-24aRagexeRE
-//0x07fb,25
+0x07fb,25
//2009-12-01aRagexeRE
//0x07fc,10
diff --git a/src/map/clif.c b/src/map/clif.c
index 82b23ef3e..5537a1374 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -4279,38 +4279,49 @@ int clif_skillup(struct map_session_data *sd,int skill_num)
return 0;
}
-/*==========================================
- * スキル詠唱エフェクトを送信する
- * pl:
- * 0 = Yellow cast aura
- * 1 = Water elemental cast aura
- * 2 = Earth elemental cast aura
- * 3 = Fire elemental cast aura
- * 4 = Wind elemental cast aura
- * 5 = Poison elemental cast aura
- * 6 = White cast aura
- * ? = like 0
- *------------------------------------------*/
-int clif_skillcasting(struct block_list* bl,
- int src_id,int dst_id,int dst_x,int dst_y,int skill_num,int pl, int casttime)
-{
+
+/// Notifies clients, that an object is about to use a skill (ZC_USESKILL_ACK/ZC_USESKILL_ACK2)
+/// 013e <src id>.L <dst id>.L <x pos>.W <y pos>.W <skill id>.W <property>.L <delaytime>.L
+/// 07fb <src id>.L <dst id>.L <x pos>.W <y pos>.W <skill id>.W <property>.L <delaytime>.L <is disposable>.B
+/// property:
+/// 0 = Yellow cast aura
+/// 1 = Water elemental cast aura
+/// 2 = Earth elemental cast aura
+/// 3 = Fire elemental cast aura
+/// 4 = Wind elemental cast aura
+/// 5 = Poison elemental cast aura
+/// 6 = Holy elemental cast aura
+/// ? = like 0
+/// is disposable:
+/// 0 = yellow chat text "[src name] will use skill [skill name]."
+/// 1 = no text
+void clif_skillcasting(struct block_list* bl, int src_id, int dst_id, int dst_x, int dst_y, int skill_num, int property, int casttime)
+{
+#if PACKETVER < 20091124
+ const int cmd = 0x13e;
+#else
+ const int cmd = 0x7fb;
+#endif
unsigned char buf[32];
- WBUFW(buf,0) = 0x13e;
+
+ WBUFW(buf,0) = cmd;
WBUFL(buf,2) = src_id;
WBUFL(buf,6) = dst_id;
WBUFW(buf,10) = dst_x;
WBUFW(buf,12) = dst_y;
WBUFW(buf,14) = skill_num;
- WBUFL(buf,16) = pl<0?0:pl; //Avoid sending negatives as element [Skotlex]
+ WBUFL(buf,16) = property<0?0:property; //Avoid sending negatives as element [Skotlex]
WBUFL(buf,20) = casttime;
+#if PACKETVER >= 20091124
+ WBUFB(buf,24) = 1; // isDisposable
+#endif
+
if (disguised(bl)) {
- clif_send(buf,packet_len(0x13e), bl, AREA_WOS);
+ clif_send(buf,packet_len(cmd), bl, AREA_WOS);
WBUFL(buf,2) = -src_id;
- clif_send(buf,packet_len(0x13e), bl, SELF);
+ clif_send(buf,packet_len(cmd), bl, SELF);
} else
- clif_send(buf,packet_len(0x13e), bl, AREA);
-
- return 0;
+ clif_send(buf,packet_len(cmd), bl, AREA);
}
/*==========================================
@@ -15030,7 +15041,7 @@ static int packetdb_readdb(void)
6, 2, -1, 4, 4, 4, 4, 8, 8,268, 6, 8, 6, 54, 30, 54,
#endif
0, 0, 0, 0, 0, 8, 8, 32, -1, 5, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 14, -1, -1, -1, 8, 0, 0, 0, 26, 0,
+ 0, 0, 0, 0, 0, 0, 14, -1, -1, -1, 8, 25, 0, 0, 26, 0,
//#0x0800
#if PACKETVER < 20091229
-1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 20,
diff --git a/src/map/clif.h b/src/map/clif.h
index 744af37b7..1d50461a6 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -326,7 +326,7 @@ int clif_skillup(struct map_session_data *sd,int skill_num);
int clif_addskill(struct map_session_data *sd, int skill);
int clif_deleteskill(struct map_session_data *sd, int skill);
-int clif_skillcasting(struct block_list* bl,int src_id,int dst_id,int dst_x,int dst_y,int skill_num,int pl,int casttime);
+void clif_skillcasting(struct block_list* bl, int src_id, int dst_id, int dst_x, int dst_y, int skill_num, int property, int casttime);
int clif_skillcastcancel(struct block_list* bl);
int clif_skill_fail(struct map_session_data *sd,int skill_id,int type,int btype);
int clif_skill_cooldown(struct map_session_data *sd, int skillid, unsigned int tick);