src/Network/Receive/kRO/Sakexe_0.pm::party_join()

Forum closed. All further discussion to be discussed at https://github.com/OpenKore/

Moderator: Moderators

Message
Author
Beechbone
Noob
Noob
Posts: 7
Joined: 01 Nov 2013, 17:47
Noob?: No

src/Network/Receive/kRO/Sakexe_0.pm::party_join()

#1 Post by Beechbone »

After my bot started to spam "Party EXP set to Even Share" every time a party member was on another map, I started to follow code paths. It lead me to Sakexe_0::party_join(), which ends (unconditionally) in:

Code: Select all

	if ($config{partyAutoShare} && $char->{party} && $char->{party}{users}{$accountID}{admin}) {
		$messageSender->sendPartyOption(1, 0);
	}
}
So every packet 0x01E9 triggers the bot to (re-)set exp sharing. Looks right, but it seems 0x01E9 is received much more often than on a real join. About on every move a party member makes on another map?

So I dumped the packets and looked them over. At first glance it seems $type is 1 on map changes and teleport, and it is 0 on move. (I did not check a real party join.) I had to guess, because I could not find any docs on it. So does anyone know what the values for $type are?

If my guess is right, this would be a valid fix:

Code: Select all

	if ($config{partyAutoShare} && $char->{party} && $char->{party}{users}{$accountID}{admin} && $type) {
		$messageSender->sendPartyOption(1, 0);
	}
}

Locked