|
@@ -5373,22 +5373,20 @@ void clif_getareachar_item( map_session_data& sd, flooritem_data& fitem ){
|
|
|
|
|
|
/// Notifes client about Graffiti
|
|
|
/// 01c9 <id>.L <creator id>.L <x>.W <y>.W <unit id>.B <visible>.B <has msg>.B <msg>.80B (ZC_SKILL_ENTRY2)
|
|
|
-static void clif_graffiti(struct block_list *bl, struct skill_unit *unit, enum send_target target) {
|
|
|
- unsigned char buf[128];
|
|
|
-
|
|
|
- nullpo_retv(bl);
|
|
|
- nullpo_retv(unit);
|
|
|
+static void clif_graffiti( skill_unit& unit, send_target target, block_list& bl ){
|
|
|
+ packet_graffiti_entry p = {};
|
|
|
+
|
|
|
+ p.PacketType = graffiti_entryType;
|
|
|
+ p.AID = unit.bl.id;
|
|
|
+ p.creatorAID = unit.group->src_id;
|
|
|
+ p.xPos = unit.bl.x;
|
|
|
+ p.yPos = unit.bl.y;
|
|
|
+ p.job = unit.group->unit_id;
|
|
|
+ p.isContens = 1;
|
|
|
+ p.isVisible = 1;
|
|
|
+ safestrncpy( p.msg, unit.group->valstr, sizeof( p.msg ) );
|
|
|
|
|
|
- WBUFW(buf, 0) = 0x1c9;
|
|
|
- WBUFL(buf, 2) = unit->bl.id;
|
|
|
- WBUFL(buf, 6) = unit->group->src_id;
|
|
|
- WBUFW(buf,10) = unit->bl.x;
|
|
|
- WBUFW(buf,12) = unit->bl.y;
|
|
|
- WBUFB(buf,14) = unit->group->unit_id;
|
|
|
- WBUFB(buf,15) = 1;
|
|
|
- WBUFB(buf,16) = 1;
|
|
|
- safestrncpy(WBUFCP(buf,17),unit->group->valstr,MESSAGE_SIZE);
|
|
|
- clif_send(buf,packet_len(0x1c9),bl,target);
|
|
|
+ clif_send( &p, sizeof( p ), &bl, target );
|
|
|
}
|
|
|
|
|
|
/// Notifies the client of a skill unit.
|
|
@@ -5421,7 +5419,7 @@ void clif_getareachar_skillunit(struct block_list *bl, struct skill_unit *unit,
|
|
|
|
|
|
#if PACKETVER >= 3
|
|
|
if (unit_id == UNT_GRAFFITI) { // Graffiti [Valaris]
|
|
|
- clif_graffiti(bl, unit, target);
|
|
|
+ clif_graffiti( *unit, target, *bl );
|
|
|
return;
|
|
|
}
|
|
|
#endif
|