r6650 | Homunculus causing disconnection

This place is for Closed bug reports only. NOT for asking help!

Moderators: Moderators, Developers

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

r6650 | Homunculus causing disconnection

#1 Post by Technology »

Found what was causing this to happen. Blame goes to the sendHomunculusMove packet.
but now I need people to confirm that this fix also applies for the other affected serverTypes.

Its sad that nobody cared to include their serverTypes in the homunculus bug reports (wich are btw spread troughout the forum instead of in bug reports section)
that would make it easier to support the different serverTypes.

So if this bug applies to you, then please test the fix and post up your serverType & result.
Here is the codeblock that you must paste in src\Network\Send\serverTypeX.pm (where X is your serverType) in order to test.

Code: Select all

sub sendHomunculusMove {
	my $self = shift;
	my $homunID = shift;
	my $x = int scalar shift;
	my $y = int scalar shift;
	my $msg = pack("C*", 0x32, 0x02) . $homunID . getCoordString($x, $y, 1);
	$self->sendToServer($msg);
	debug "Sent Homunculus move to: $x, $y\n", "sendPacket", 2;
}

Looking in the next block of code will explain how this bug propagated:

Code: Select all

sub getCoordString {
	my $x = int(shift);
	my $y = int(shift);
	my $nopadding = shift;
	my $coords = "";

	shiftPack(\$coords, 0x44, 8)
		unless (($config{serverType} == 0) || ($config{serverType} == 3) || ($config{serverType} == 5) || $nopadding);
	shiftPack(\$coords, $x, 10);
	shiftPack(\$coords, $y, 10);
	shiftPack(\$coords, 0, 4);
	
	return $coords;
}
IMO, there shouldn't be any (or as less as possible) serverType specific code outside of the serverTypeX.pm!



serverTypes tested & result:
- 8_4 fixed dc problem

Fix will be committed after enough test results. (since the question now is: in wich layer of serverType override to adjust/add the sendHomunculusMove packet...)
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!

jazzv1
Noob
Noob
Posts: 2
Joined: 12 Jan 2009, 06:43
Noob?: No

Re: r6650 | Homunculus causing disconnection

#2 Post by jazzv1 »

server type 8 - fixed the problem
thank you so much..^^

benitin44
Noob
Noob
Posts: 1
Joined: 17 Jan 2009, 22:59
Noob?: No

Re: r6650 | Homunculus causing disconnection

#3 Post by benitin44 »

sorry but i dont understand :/

EDITED : working 100%

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

Re: r6650 | Homunculus causing disconnection

#4 Post by Technology »

benitin44 wrote:sorry but i dont understand :/

EDITED : working 100%
wich servertype?
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!

crowser
Noob
Noob
Posts: 8
Joined: 18 Feb 2009, 19:50
Noob?: No

Re: r6650 | Homunculus causing disconnection

#5 Post by crowser »

I tried using the code that you have provided but i'm still being disconnected. Can anyone help me? im using openkore 2.0.6.1

Server type 8 (VanRO)

below is what i saved on ServerType8_4.pm

#########################################################################
# OpenKore - Packet sending
# This module contains functions for sending packets to the server.
#
# This software is open source, licensed under the GNU General Public
# License, version 2.
# Basically, this means that you're allowed to modify and distribute
# this software. However, if you distribute modified versions, you MUST
# also distribute the source code.
# See http://www.gnu.org/licenses/gpl.html for the full license.
#
# $Revision: 5761 $
# $Id: ServerType8.pm 5761 2007-06-26 12:25:48Z bibian $
# Modified by skseo, Jan-24-2007, Fixed bugs.
########################################################################
# kRO 2008-3-26 (eA packet version 9)
# Servertype overview: http://www.openkore.com/wiki/index.php/ServerType
package Network::Send::ServerType8_4;

use strict;
use Globals qw($accountID $sessionID $sessionID2 $accountSex $char $charID %config %guild @chars $masterServer $syncSync $net);
use Network::Send::ServerType8;
use base qw(Network::Send::ServerType8);
use Log qw(message warning error debug);
use I18N qw(stringToBytes);
use Utils qw(getTickCount getHex getCoordString);

sub new {
my ($class) = @_;
return $class->SUPER::new(@_);
}

sub sendHomunculusMove {
my $self = shift;
my $homunID = shift;
my $x = int scalar shift;
my $y = int scalar shift;
my $msg = pack("C*", 0x32, 0x02) . $homunID . getCoordString($x, $y, 1);
$self->sendToServer($msg);
debug "Sent Homunculus move to: $x, $y\n", "sendPacket", 2;
}

1;

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

Re: r6650 | Homunculus causing disconnection

#6 Post by Technology »

crowser wrote:Server type 8 (VanRO)
below is what i saved on ServerType8_4.pm
spot the difference...
Also, this is not a support thread.

But ok, so serverType 8 is affected by the homunculus causing disconnection too.
Any other serverTypes? Post em up.
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!

Locked