Jump to content
  • 0

disguised packets, blocklist behavior


Question

Posted

Hey guys, does anyone can explain why the packets have to be changed when casting spells while disguised?
For example in clif_skill_poseffect
 

void clif_skill_poseffect( block_list& bl, uint16 skill_id, uint16 skill_lv, uint16 x, uint16 y, t_tick tick ){
	PACKET_ZC_NOTIFY_GROUNDSKILL packet{};

	packet.PacketType = HEADER_ZC_NOTIFY_GROUNDSKILL;
	packet.SKID = skill_id;
	packet.AID = bl.id;
	packet.level = skill_lv;
	packet.xPos = x;
	packet.yPos = y;
	packet.startTime = client_tick( tick );

	if (disguised(&bl)) {
		clif_send( &packet, sizeof( packet ), &bl, AREA_WOS );
		
		packet.AID = disguised_bl_id( bl.id );
		clif_send( &packet, sizeof( packet ), &bl, SELF );
	} else {
		clif_send( &packet, sizeof( packet ), &bl, AREA );
	}
}

why the packet.AID is changed to basically -bl.id ? for the disguised player, how does that effect the client? and why when i tried to just yet the code, i changed nothing ? (just keeping clif_send( &packet, sizeof( packet ), &bl, AREA );)

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...