Openkore.com

OpenKore Forums
It is currently 22 Nov 2018, 07:18

All times are UTC - 5 hours [ DST ]





Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: r6650 | Homunculus causing disconnection
PostPosted: 16 Jan 2009, 23:04 
Offline
Super Moderators
Super Moderators
User avatar

Joined: 06 May 2008, 12:47
Posts: 801
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:
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:
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!


Top
 Profile  
 
 Post subject: Re: r6650 | Homunculus causing disconnection
PostPosted: 17 Jan 2009, 00:29 
Offline
Noob
Noob

Joined: 12 Jan 2009, 06:43
Posts: 2
server type 8 - fixed the problem
thank you so much..^^


Top
 Profile  
 
 Post subject: Re: r6650 | Homunculus causing disconnection
PostPosted: 22 Jan 2009, 19:39 
Offline
Noob
Noob

Joined: 17 Jan 2009, 22:59
Posts: 1
sorry but i dont understand :/

EDITED : working 100%


Top
 Profile  
 
 Post subject: Re: r6650 | Homunculus causing disconnection
PostPosted: 22 Jan 2009, 23:57 
Offline
Super Moderators
Super Moderators
User avatar

Joined: 06 May 2008, 12:47
Posts: 801
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!


Top
 Profile  
 
 Post subject: Re: r6650 | Homunculus causing disconnection
PostPosted: 18 Feb 2009, 19:55 
Offline
Noob
Noob

Joined: 18 Feb 2009, 19:50
Posts: 8
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;


Top
 Profile  
 
 Post subject: Re: r6650 | Homunculus causing disconnection
PostPosted: 19 Feb 2009, 11:05 
Offline
Super Moderators
Super Moderators
User avatar

Joined: 06 May 2008, 12:47
Posts: 801
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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group