Xkore on eAthena servers

Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.

Moderator: Moderators

Message
Author
Technology
Super Moderators
Super Moderators
Posts: 801
Joined: 06 May 2008, 12:47
Noob?: No

Re: Xkore on eAthena servers

#21 Post by Technology »

Logging in with XKore 2 mode seems to work now. Nice one Isieo.
Equipment is not showing up due to a typo.
Diff (package Network::XKore2::MapServer):

Code: Select all

Index: MapServer.pm
===================================================================
--- MapServer.pm	(revision 6470)
+++ MapServer.pm	(working copy)
@@ -195,7 +195,7 @@
 
 		# Send non-stackable item (mostly equipment) information
 		$output = '';
-		foreach my $item (@stackable) {
+		foreach my $item (@nonstackable) {
 			$output .= pack('v2 C2 v2 C2 a8',
 				$item->{index}, $item->{nameID}, $item->{type},
 				$item->{identified}, $item->{type_equip}, $item->{equipped}, $item->{broken},
I have never used xkore2 before,
so does anyone know if it is normal that the RO client gets disconnected from the emulated map server whenever you use a skill manually inside the RO client?

[EDIT 1]
Well, that didn't seem to be normal, so here is the fix for the DC'ing upon skill usage for serverType 8 - 8_4.
Diff (package Base::Ragnarok::MapServer):
(changed spaces into tabs aswell, thats why so much seems to be changing)

Code: Select all

Index: MapServer.pm
===================================================================
--- MapServer.pm	(revision 6487)
+++ MapServer.pm	(working copy)
@@ -48,7 +48,7 @@
 		$self->{sessionStore}->remove($session);
 		$client->{session} = $session;
 
-		$client->send($accountID);
+		$client->send($accountID) if ($self->getServerType() != '8_4');
 
 		my $charInfo = $self->getCharInfo($session);
 		my $coords = '';
@@ -66,15 +66,19 @@
 
 sub process_0072 {
 	my ($self, $client, $message) = @_;
-	if ($self->{serverType} == 0) {
+	if ($self->getServerType() == 0) {
 		# Map server login.
-      my ($accountID, $charID, $sessionID, $gender) = unpack('x2 a4 a4 V x4 C', $message);
-      $self->handleLogin($client, $accountID, $charID, $sessionID, $gender);
-      return 1;
+		my ($accountID, $charID, $sessionID, $gender) = unpack('x2 a4 a4 V x4 C', $message);
+		$self->handleLogin($client, $accountID, $charID, $sessionID, $gender);
+		return 1;
+	} elsif ($self->getServerType()  == 8) {
+		# packet sendSkillUse
+		$self->unhandledMessage($client, $message);
+		return 0;
 	} else { #oRO and pRO and idRO
 		my ($accountID, $charID, $sessionID, $gender) = unpack('x2 a4 x5 a4 x2 V x4 C', $message);
-      $self->handleLogin($client, $accountID, $charID, $sessionID, $gender);
-      return 1;
+		$self->handleLogin($client, $accountID, $charID, $sessionID, $gender);
+		return 1;
 	}
 }
 
[EDIT 2]
the m/^8(_[1-4])?$/ regex didn't seem to be needed, it seems that serverType 8 already includes 8_1,2,3,4
So i've changed "} elsif ($self->getServerType() == m/^8(_[1-4])?$/) {" to "} elsif ($self->getServerType() == 8) {" in the previous diff-patch. => IS THIS NORMAL? because this way if you check somewhere for serverType 8, you are also including the other 4 servertypes, and this might cause trouble.

For something completely different now.
I'm playing on a 8_4 server and i could only connect 1 out of 10 times to the RO client,
but by commenting out a line 51 in package Base::Ragnarok::MapServer ==> #$client->send($accountID);
it seems to work for 100%, you can even log in trough the dummy characters.
I think that the login sequence for serverType 8_4 is a bit different opposed to that off all previous serverTypes that it has worked on.
You already seem to be sending that accountID in package package Base::Ragnarok::CharServer on line 139.
What i want to ask now, is this actually needed for the serverType's sequences to send that accountID twice?
I don't want to make a fix for 8_4 that would screw up the others, and atm i don't have time to test it.

[EDIT 3]
Updated previous patch, so that 8_4 works perfectly and other serverTypes would not be affected.
I'm not sure tough if the last problem i've described only applies for serverType 8_4, so could anyone test this on other serverTypes (8, 8_1, ...) ?
Last edited by Technology on 02 Sep 2008, 19:22, edited 12 times in total.
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...

Mount Doom awaits us, fellowship of OpenKore!

Silence
Human
Human
Posts: 26
Joined: 17 Aug 2008, 01:20
Noob?: No

Re: Xkore on eAthena servers

#22 Post by Silence »

so is DC on skill use fixed for all server types or just for 8 though 8_4?

(or was it just broken on those)

and i tried using 8_4 and was able to cast skills then it randomly crashed which looked like the same crash as if i used a skill before....humm

[Edit]

While using 8_4 and placing skills on the quick bar forces the bot to logout but casting skills works fine.

Technology
Super Moderators
Super Moderators
Posts: 801
Joined: 06 May 2008, 12:47
Noob?: No

Re: Xkore on eAthena servers

#23 Post by Technology »

@ Silence
From what i can tell from OK\src\Network\Send serverTypes 8 to 8_4, all the packets for normal skill usage have the packet switch 0072, so the connection closing to the ro client would occur on these servertypes.
So it only seems to be "broken" on those serverTypes.

And about your edit,
sendSkillUseLoc & sendSkillUse are different packets with different packetswitches,
i believe that you have put a sendSkillUse categorized skill in the F12 bar wich caused it to DC
and used a skill categorized under sendSkillUseLoc from the ingame skill list wich obviously woudln't lead to DC.

In different serverTypes, packets can have a different meaning.
(ex. packetswitch 0072) What is the map server login packet for serverType 0 is also the skillUse packet for serverType 8.
I don't think that the current system is a good way to support different serverTypes for xkore2.


About the bugged walkspeed, it doesn't seem to occur on a lvl 99 sinx on 8_4, but does occur on all other chars.

[EDIT]
fixes have been made in SVN version
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...

Mount Doom awaits us, fellowship of OpenKore!

Post Reply