Go Back   RunUO - Ultima Online Emulation > RunUO > Core Modifications > Network Modifications

Network Modifications This forum is for modifications to the networking code of RunUO

Reply
 
Thread Tools Display Modes
Old 06-17-2005, 05:44 AM   #1 (permalink)
Forum Novice
 
Join Date: Aug 2003
Posts: 124
Send a message via ICQ to pinco
Default Character list sort

when someone delete a character in the list remain a "hole", with this modification we solve the problem. Let's start the editing from Packet.cs in the core files.

after line 2922, exactly after this:


Code:
 for ( int i = 0; i < a.Length; ++i ) 
{ 
if ( a != null ) 
highSlot = i; 
}

and after line 2891, exactly after this:



Code:
 m_Stream.Write( (byte) a.Count );
add this code block:



Code:
 // Sort for update list by Keldron Isenhart 
for ( int i = 0; i < a.Length; ++i ) 
{ 
for ( int j = i; j < a.Length; ++j ) 
{ 
if (a==null) 
{ 
a=a[j]; 
a[j]=null; 
} 
} 
} 
//end sort 
at last, compile the core and try, the problem is solved
pinco is offline   Reply With Quote
Old 06-17-2005, 08:04 AM   #2 (permalink)
psz
UO Gamers: Demise Administrator
 
psz's Avatar
 
Join Date: Oct 2002
Location: Swamp
Age: 28
Posts: 10,636
Default

Hehehe. OSI still has the "hole" problem as well.


You should send this fix in to them ^_^


(j/k, of course)
__________________
psz
Demise' Creator (Retired)
The RunUO.com Forum Moderator Team
Former Official RunUO Scripter (Retired)
Websites:
My 360 Blog
My Gaming Site(Old Link)
My Gaming Site(New Link)
psz is offline   Reply With Quote
Old 06-17-2005, 08:19 AM   #3 (permalink)
Forum Novice
 
Join Date: Aug 2003
Posts: 124
Send a message via ICQ to pinco
Default

I like the osi style, but replicate the bug is not good
pinco is offline   Reply With Quote
Old 08-28-2005, 11:36 PM   #4 (permalink)
Forum Novice
 
Join Date: Mar 2005
Age: 29
Posts: 226
Send a message via AIM to Noxih
Default

I got a quetion on this, Does this problem slow down the server?
Noxih is offline   Reply With Quote
Old 08-28-2005, 11:56 PM   #5 (permalink)
Forum Expert
 
Alis's Avatar
 
Join Date: Jun 2005
Location: Probably where people call it heaven
Posts: 1,452
Send a message via AIM to Alis Send a message via MSN to Alis
Default

no it doesnt slow down..
Alis is offline   Reply With Quote
Old 08-29-2005, 02:52 AM   #6 (permalink)
Forum Expert
 
Join Date: Jul 2005
Location: Istanbul/Turkey
Age: 27
Posts: 425
Default

are you sure that code is correct

i think this is what you meant:

Code:
for ( int i = 0; i < a.Length; ++i ) 
{ 
  if (a[i] == null)
  {
     for ( int j = i+1; j < a.Length; ++j ) 
    { 
       if (a[j] != null)
       {
          for(int k=i; j<a.Length; k++,j++)
         {
           a[k]=a[j]; 
           a[j]=null; 
          }
          break;
       }
    } 
  } 
}
noobie is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5