|
@@ -1490,19 +1490,6 @@ void clif_class_change_target(struct block_list *bl,int class_,int type, enum se
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-/// Notifies the client of an object's spirits.
|
|
|
-/// 01d0 <id>.L <amount>.W (ZC_SPIRITS)
|
|
|
-/// 01e1 <id>.L <amount>.W (ZC_SPIRITS2)
|
|
|
-static void clif_spiritball_single(int fd, struct map_session_data *sd)
|
|
|
-{
|
|
|
- WFIFOHEAD(fd, packet_len(0x1e1));
|
|
|
- WFIFOW(fd,0)=0x1e1;
|
|
|
- WFIFOL(fd,2)=sd->bl.id;
|
|
|
- WFIFOW(fd,6)=sd->spiritball;
|
|
|
- WFIFOSET(fd, packet_len(0x1e1));
|
|
|
-}
|
|
|
-
|
|
|
/// Notifies the client of an object's Millenium Shields.
|
|
|
static void clif_millenniumshield_single(int fd, map_session_data *sd)
|
|
|
{
|
|
@@ -1532,29 +1519,6 @@ static void clif_spiritcharm_single(int fd, struct map_session_data *sd)
|
|
|
WFIFOSET(fd, packet_len(0x08cf));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-/// Notifies the client of an object's souls.
|
|
|
-/// Note: Spirit spheres and Soul spheres work on
|
|
|
-/// seprate systems officially, but both send out
|
|
|
-/// the same packet which leads to confusion on how
|
|
|
-/// much soul energy a Soul Reaper acturally has
|
|
|
-/// should the player also have spirit spheres.
|
|
|
-/// They will likely create a new packet for this soon
|
|
|
-/// to seprate the animations for spirit and soul spheres.
|
|
|
-/// For now well use this and replace it later when possible. [Rytech]
|
|
|
-///
|
|
|
-/// 01d0 <id>.L <amount>.W (ZC_SPIRITS)
|
|
|
-/// 01e1 <id>.L <amount>.W (ZC_SPIRITS2)
|
|
|
-static void clif_soulball_single(int fd, struct map_session_data *sd)
|
|
|
-{
|
|
|
- WFIFOHEAD(fd, packet_len(0x1d0));
|
|
|
- WFIFOW(fd,0)=0x1d0;
|
|
|
- WFIFOL(fd,2)=sd->bl.id;
|
|
|
- WFIFOW(fd,6)=sd->soulball;
|
|
|
- WFIFOSET(fd, packet_len(0x1d0));
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
/*==========================================
|
|
|
* Run when player changes map / refreshes
|
|
|
* Tells its client to display all weather settings being used by this map
|
|
@@ -4705,29 +4669,25 @@ void clif_storageclose(struct map_session_data* sd)
|
|
|
}
|
|
|
|
|
|
|
|
|
-/// Notifies clients in an area of an object's souls.
|
|
|
-/// Note: Spirit spheres and Soul spheres work on
|
|
|
-/// seprate systems officially, but both send out
|
|
|
-/// the same packet which leads to confusion on how
|
|
|
-/// much soul energy a Soul Reaper actually has
|
|
|
-/// should the player also have spirit spheres.
|
|
|
-/// They will likely create a new packet for this soon
|
|
|
-/// to seprate the animations for spirit and soul spheres.
|
|
|
-/// For now we'll use this and replace it later when possible. [Rytech]
|
|
|
-///
|
|
|
+/// Notifies clients in an area of a player's souls.
|
|
|
/// 01d0 <id>.L <amount>.W (ZC_SPIRITS)
|
|
|
/// 01e1 <id>.L <amount>.W (ZC_SPIRITS2)
|
|
|
-void clif_soulball(struct map_session_data *sd)
|
|
|
-{
|
|
|
- unsigned char buf[8];
|
|
|
+/// 0b73 <id>.L <amount>.W
|
|
|
+void clif_soulball( struct map_session_data *sd, struct block_list* target, enum send_target send_target ){
|
|
|
+#if PACKETVER_MAIN_NUM >= 20200916 || PACKETVER_RE_NUM >= 20200724
|
|
|
+ struct PACKET_ZC_UNCONFIRMED_SPIRITS3 p = {};
|
|
|
|
|
|
- nullpo_retv(sd);
|
|
|
+ p.packetType = HEADER_ZC_UNCONFIRMED_SPIRITS3;
|
|
|
+#else
|
|
|
+ struct PACKET_ZC_SPIRITS p = {};
|
|
|
|
|
|
- WBUFW(buf,0)=0x1d0;
|
|
|
- WBUFL(buf,2)=sd->bl.id;
|
|
|
- WBUFW(buf,6)=sd->soulball;
|
|
|
- clif_send(buf,packet_len(0x1d0),&sd->bl,AREA);
|
|
|
- return;
|
|
|
+ p.packetType = HEADER_ZC_SPIRITS;
|
|
|
+#endif
|
|
|
+
|
|
|
+ p.GID = sd->bl.id;
|
|
|
+ p.amount = sd->soulball;
|
|
|
+
|
|
|
+ clif_send( &p, sizeof( p ), target == nullptr ? &sd->bl : target, send_target );
|
|
|
}
|
|
|
|
|
|
|
|
@@ -4749,13 +4709,13 @@ static void clif_getareachar_pc(struct map_session_data* sd,struct map_session_d
|
|
|
clif_buyingstore_entry_single(sd, dstsd);
|
|
|
|
|
|
if(dstsd->spiritball > 0)
|
|
|
- clif_spiritball_single(sd->fd, dstsd);
|
|
|
+ clif_spiritball( &dstsd->bl, &sd->bl, SELF );
|
|
|
if (dstsd->sc.data[SC_MILLENNIUMSHIELD])
|
|
|
clif_millenniumshield_single(sd->fd, dstsd);
|
|
|
if (dstsd->spiritcharm_type != CHARM_TYPE_NONE && dstsd->spiritcharm > 0)
|
|
|
clif_spiritcharm_single(sd->fd, dstsd);
|
|
|
if (dstsd->soulball > 0)
|
|
|
- clif_soulball_single(sd->fd, dstsd);
|
|
|
+ clif_soulball( dstsd, &sd->bl, SELF );
|
|
|
if( (sd->status.party_id && dstsd->status.party_id == sd->status.party_id) || //Party-mate, or hpdisp setting.
|
|
|
(sd->bg_id && sd->bg_id == dstsd->bg_id) || //BattleGround
|
|
|
pc_has_permission(sd, PC_PERM_VIEW_HPMETER)
|
|
@@ -8329,27 +8289,27 @@ void clif_devotion(struct block_list *src, struct map_session_data *tsd)
|
|
|
clif_send(buf, packet_len(0x1cf), src, AREA);
|
|
|
}
|
|
|
|
|
|
-/*==========================================
|
|
|
- * Server tells clients nearby 'sd' (and himself) to display 'sd->spiritball' number of spiritballs on 'sd'
|
|
|
- * Notifies clients in an area of an object's spirits.
|
|
|
- * 01d0 <id>.L <amount>.W (ZC_SPIRITS)
|
|
|
- * 01e1 <id>.L <amount>.W (ZC_SPIRITS2)
|
|
|
- *------------------------------------------*/
|
|
|
-void clif_spiritball(struct block_list *bl) {
|
|
|
- unsigned char buf[16];
|
|
|
- TBL_PC *sd = BL_CAST(BL_PC,bl);
|
|
|
- TBL_HOM *hd = BL_CAST(BL_HOM,bl);
|
|
|
-
|
|
|
- nullpo_retv(bl);
|
|
|
-
|
|
|
- WBUFW(buf, 0) = 0x1d0;
|
|
|
- WBUFL(buf, 2) = bl->id;
|
|
|
- WBUFW(buf, 6) = 0; //init to 0
|
|
|
- switch(bl->type){
|
|
|
- case BL_PC: WBUFW(buf, 6) = sd->spiritball; break;
|
|
|
- case BL_HOM: WBUFW(buf, 6) = hd->homunculus.spiritball; break;
|
|
|
- }
|
|
|
- clif_send(buf, packet_len(0x1d0), bl, AREA);
|
|
|
+/// Notifies the client of an object's spirits.
|
|
|
+/// 01d0 <id>.L <amount>.W (ZC_SPIRITS)
|
|
|
+/// 01e1 <id>.L <amount>.W (ZC_SPIRITS2)
|
|
|
+void clif_spiritball( struct block_list *bl, struct block_list* target, enum send_target send_target ){
|
|
|
+ nullpo_retv( bl );
|
|
|
+
|
|
|
+ struct PACKET_ZC_SPIRITS p = {};
|
|
|
+
|
|
|
+ p.packetType = HEADER_ZC_SPIRITS;
|
|
|
+ p.GID = bl->id;
|
|
|
+
|
|
|
+ switch( bl->type ){
|
|
|
+ case BL_PC:
|
|
|
+ p.amount = ( (struct map_session_data*)bl )->spiritball;
|
|
|
+ break;
|
|
|
+ case BL_HOM:
|
|
|
+ p.amount = ( (struct homun_data*)bl )->homunculus.spiritball;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ clif_send( &p, sizeof( p ), target == nullptr ? bl : target, send_target );
|
|
|
}
|
|
|
|
|
|
|
|
@@ -9677,13 +9637,13 @@ void clif_refresh(struct map_session_data *sd)
|
|
|
clif_updatestatus(sd,SP_DEX);
|
|
|
clif_updatestatus(sd,SP_LUK);
|
|
|
if (sd->spiritball)
|
|
|
- clif_spiritball_single(sd->fd, sd);
|
|
|
+ clif_spiritball( &sd->bl, &sd->bl, SELF );
|
|
|
if (sd->sc.data[SC_MILLENNIUMSHIELD])
|
|
|
clif_millenniumshield_single(sd->fd, sd);
|
|
|
if (sd->spiritcharm_type != CHARM_TYPE_NONE && sd->spiritcharm > 0)
|
|
|
clif_spiritcharm_single(sd->fd, sd);
|
|
|
if (sd->soulball)
|
|
|
- clif_soulball_single(sd->fd, sd);
|
|
|
+ clif_soulball( sd, &sd->bl, SELF );
|
|
|
if (sd->vd.cloth_color)
|
|
|
clif_refreshlook(&sd->bl,sd->bl.id,LOOK_CLOTHES_COLOR,sd->vd.cloth_color,SELF);
|
|
|
if (sd->vd.body_style)
|