Jump to content
  • 0

Broadcastpacket Is Worst Than Tryskell


Question

Posted (edited)

warning: CLICKBAIT title

 

Ok here's whats going on. player.broadcastUserInfo(); basically spreads  UserInfo(), charInfo() and extraInfo() onto knownlist players. 

So let's say we change title and then name color, we do broadcastTitle(); and broadcastUserInfo(); 

 

All players around get the new info BUT if a new player come in town of giran or teleport next to him, he see the old title + old name color cause simply he didn't receive

the packet (cause he wasnt in the knownlist region). 

 

Basically using player.decay(); player.spawn(); works fine after all but i cant really use this for 100 chars every 1 second example..

 

Is this knownlist problem? I guess no. But how to update properlya player without respawn him or without do a World.getInstance().getAllPlayers() -> sendPacket to all individual. ?

 

Tryskell ps. thanks for previous one.

Edited by Afou To Patisa

Recommended Posts

  • 0
Posted (edited)

It's probably a knownlist problem, since L2J got a ghosts issue (which is nothing more than people didn't receive the DeleteObject packet when he left the region).

 

If you set something, and except if you edited it meanwhile (or was temporary enough to craft a packet but not saved anywhere), there is no reason you don't receive new informations. And if it worked once, it means the packet can handle the behavior, so it is correctly implemented. If you teleport, it normally refresh all packets.

 

PS : you could simply reuse your previous topic rather than writting clickbaiting topic.

Edited by Tryskell
  • 0
Posted

It's probably a knownlist problem, since L2J got a ghosts issue (which is nothing more than people didn't receive the DeleteObject packet when he left the region).

 

If you set something, and except if you edited it meanwhile, there is no reason you don't receive new informations. And if it worked once, it means the packet can handle the behavior, so it is correctly implemented. If you teleport, it normally refresh all packets.

No it doesnt, i tested it with normal gk teleport also didnt update. title either color. Any idea?

  • 0
Posted (edited)

No it doesnt, i tested it with normal gk teleport also didnt update. title either color. Any idea?

 

Yup, shitty pack. :)

 

Test with regular settitle / setname admincommands, if it works you messed up somewhere.

Edited by Tryskell
  • 0
Posted (edited)

Yup, shitty pack. :)

 

Test with regular settitle / setname admincommands, if it works you messed up somewhere.

No you iddnt understand, thats the problem i've done it tho //settitle or anything relative to admin.. no custom mod or custom npc.. 

Any clue what should i check? I really got stuck, idk what to look for exaxtly, knownlist or what.. 

Edited by Afou To Patisa
  • 0
Posted

by your words knowlist seems working fine ... your problem could be in setRegion after teleport..

Could u give me a clue? Really it's big problem to me and i can't find the source of problem, i dont want the solution i just want someone enlight me where the source of problem is.

  • 0
Posted (edited)

Come on someone give me a f . clue.. im checking updateRegion, knownList       PK broadcast works fine so i guess knownlist is fine.. whats wrong with broacastUserInfo()? ..

which method is working when a player walks to receive info from other players? where is that method? 

Edited by Afou To Patisa
  • 0
Posted

PcAppearance.java

 

	public final String getVisibleName()
	{
		if (_visibleName == null)
		{
-			_visibleName = getOwner().getName();
+			return getOwner().getName();
		}
		return _visibleName;
	}
	
	
 		if (_visibleTitle == null)

 		{

-			_visibleTitle = getOwner().getTitle();

+			return getOwner().getTitle();

 		}

 		return _visibleTitle;

 	}
  • 0
Posted

 

PcAppearance.java

 

 

	public final String getVisibleName()
	{
		if (_visibleName == null)
		{
-			_visibleName = getOwner().getName();
+			return getOwner().getName();
		}
		return _visibleName;
	}
	
	
 		if (_visibleTitle == null)

 		{

-			_visibleTitle = getOwner().getTitle();

+			return getOwner().getTitle();

 		}

 		return _visibleTitle;

 	}

wtf it worked with title.. but why this? whats the difference? And if so why in territory war also doesnt update the icon above of head? 

Thanks for respond tho.

  • 0
Posted

I always told. All public info for UserInfo and CharInfo must be getting from PcAppearance template. So, PcAppearance must use custom info and info not was setted then get direct info from PcInstance. Current model are wrong. Something and somewhere missed always and add new checks everywhere. Too many code.

  • 0
Posted

I always told. All public info for UserInfo and CharInfo must be getting from PcAppearance template. So, PcAppearance must use custom info and info not was setted then get direct info from PcInstance. Current model are wrong. Something and somewhere missed always and add new checks everywhere. Too many code.

I really didnt understand what you said..  but tho this 

 

PcAppearance.java

https://pastebin.com/kaYP24Pc

 

UserInfo

https://pastebin.com/Bq5tGcKj

 

is pure l2j i dont think i've done something wrong. 

  • 0
Posted (edited)

I really didnt understand what you said..  but tho this 

 

PcAppearance.java

https://pastebin.com/kaYP24Pc

 

UserInfo

https://pastebin.com/Bq5tGcKj

 

is pure l2j i dont think i've done something wrong. 

 

Don't cares if you don't understanding L2J mechanics. You got the answer, but not see it.

Edited by Rootware
  • 0
Posted

So thats the best help i can get? an "ironic" comment.. ? 

 

Modify PcAppearance like from example in prev. post and change all plases where setting Name, Title, etc to this template except neccessary places (temporary use). Because current model for changing name and title uses PcAppearance and after by task all data stored to DB from this template (not direct from PcInstance). This is the big shit!

 

Don't forget change store method for using direct name and title.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.




×
×
  • Create New...