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 12-02-2008, 08:45 PM   #1 (permalink)
Forum Expert
 
Join Date: Oct 2002
Age: 47
Posts: 4,755
Post Enabling 7th Character Slot [RUO SVN 301]

Props to our friends over at POL who are maintaining a current UO Packet Guide where I found the needed packet info to enable the slot.


1. SCRIPT MODS

In Scripts\Accounting\Account.cs:

Line 590, Change:

Code:
m_Mobiles = new Mobile[6];
To:

Code:
m_Mobiles = new Mobile[7];
Line 773, Change:

Code:
Mobile[] list = new Mobile[6];
To:

Code:
Mobile[] list = new Mobile[7];
Line 1107, Change:

Code:
public int Limit
{
    get { return ( Core.AOS ? 6 : 5 ); }
}
To:

Code:
public int Limit
{
    get { return ( Core.AOS ? 7 : 5 ); }
}

2. CORE MODS:

In Server\Network\Packet.cs:

Line 2522, Change:

Code:
if ( acct != null && acct.Limit >= 6 )
{
	flags |= 0x8020;
	flags &= ~0x004;
}
To:

Code:
if ( acct != null && acct.Limit == 7 )
{
	flags |= 0x9000; 
	flags &= ~0x004;
}
else if ( acct != null && acct.Limit == 6 )
{
	flags |= 0x8020;  
	flags &= ~0x004; 
}
Line 3378, Change:

Code:
if ( count >= 6 )
	flags |= 0x40; // 6th character slot
else if ( a.Limit == 1 )
	flags |= 0x14; // Limit characters & one character
To:

Code:
if ( count == 7 )
	flags |= 0x1000; // 7th character slot
else if ( count == 6 )
	flags |= 0x40; // 6th character slot
else if ( a.Limit == 1 )
	flags |= 0x14; // Limit characters & one character
Recompile the core and you're done!


NOTES:

I believe the first version of the client to support 7th character slot was v6.0.4.0 (18 Oct 07) - this version of the client came out the same day OSI announced that 7th character slots could be purchased from the UO store.

DISCLAIMER:

One thing that should be done in the SVN is to allow extra character slots to be enabled or disabled independently from other expansion features. Right now the 6th character slot is tied to AOS - see the change to the line:

Code:
get { return ( Core.AOS ? 6 : 5 ); }
...and of course there really is no expansion to even associate the 7th character slot with without making more changes to the code. The extra character slot features should be tied more to client versions than to expansions.

Nevertheless, it doesn't really affect anything since only clients that support the extra client slot(s) will be able to use them anyway.

Hope you find this helpful!
__________________
HellRazor is offline   Reply With Quote
Old 12-02-2008, 09:11 PM   #2 (permalink)
Forum Novice
 
Join Date: May 2007
Location: Somewhere In The Sunshine State!
Age: 42
Posts: 660
Default Thank You For This Information

I'll be updating the core tomorrow, but i did already update the Account.cs
Sythen is offline   Reply With Quote
Old 12-04-2008, 05:20 AM   #3 (permalink)
Forum Expert
 
Erica's Avatar
 
Join Date: Jan 2005
Location: Laramie, Wyoming
Age: 45
Posts: 1,699
Send a message via ICQ to Erica Send a message via AIM to Erica Send a message via MSN to Erica Send a message via Yahoo to Erica Send a message via Skype™ to Erica
Default

Quote:
Originally Posted by HellRazor View Post
Props to our friends over at POL who are maintaining a current UO Packet Guide where I found the needed packet info to enable the slot.


1. SCRIPT MODS

In Scripts\Accounting\Account.cs:

Line 590, Change:

Code:
m_Mobiles = new Mobile[6];
To:

Code:
m_Mobiles = new Mobile[7];
Line 773, Change:

Code:
Mobile[] list = new Mobile[6];
To:

Code:
Mobile[] list = new Mobile[7];
Line 1107, Change:

Code:
public int Limit
{
    get { return ( Core.AOS ? 6 : 5 ); }
}
To:

Code:
public int Limit
{
    get { return ( Core.AOS ? 7 : 5 ); }
}

2. CORE MODS:

In Server\Network\Packet.cs:

Line 2522, Change:

Code:
if ( acct != null && acct.Limit >= 6 )
{
	flags |= 0x8020;
	flags &= ~0x004;
}
To:

Code:
if ( acct != null && acct.Limit == 7 )
{
	flags |= 0x9000; 
	flags &= ~0x004;
}
else if ( acct != null && acct.Limit == 6 )
{
	flags |= 0x8020;  
	flags &= ~0x004; 
}
Line 3378, Change:

Code:
if ( count >= 6 )
	flags |= 0x40; // 6th character slot
else if ( a.Limit == 1 )
	flags |= 0x14; // Limit characters & one character
To:

Code:
if ( count == 7 )
	flags |= 0x1000; // 7th character slot
else if ( count == 6 )
	flags |= 0x40; // 6th character slot
else if ( a.Limit == 1 )
	flags |= 0x14; // Limit characters & one character
Recompile the core and you're done!


NOTES:

I believe the first version of the client to support 7th character slot was v6.0.4.0 (18 Oct 07) - this version of the client came out the same day OSI announced that 7th character slots could be purchased from the UO store.

DISCLAIMER:

One thing that should be done in the SVN is to allow extra character slots to be enabled or disabled independently from other expansion features. Right now the 6th character slot is tied to AOS - see the change to the line:

Code:
get { return ( Core.AOS ? 6 : 5 ); }
...and of course there really is no expansion to even associate the 7th character slot with without making more changes to the code. The extra character slot features should be tied more to client versions than to expansions.

Nevertheless, it doesn't really affect anything since only clients that support the extra client slot(s) will be able to use them anyway.

Hope you find this helpful!
Awesome Job HellRazor Thanks for the fix works great.
__________________
Erica is offline   Reply With Quote
Old 05-10-2009, 12:17 PM   #4 (permalink)
Forum Expert
 
Greystar's Avatar
 
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 36
Posts: 3,974
Default

Thank you for providing this detailed information, worked like a charm!





PS) Don't bother flaming me for Res'ing an old Thread. I've been gone a while so it's new to me.
__________________
Quote:
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
Killable Guards (GS Version)
Just a Simple Staff Tool
You can leave me messages.
Ernest Gary Gygax - Quote "I would like the world to remember me as the guy who really enjoyed playing games and sharing his knowledge and his fun pastimes with everybody else."
Greystar is offline   Reply With Quote
Old 05-10-2009, 02:55 PM   #5 (permalink)
Master of the Internet
 
Lord_Greywolf's Avatar
 
Join Date: Dec 2005
Posts: 12,143
Send a message via Yahoo to Lord_Greywolf
Default

not going to flame you fro rezing an old thread
going to flame you for taking over 6 months off of RunUO
Shame on you
__________________
http://www.AoAUO.com

:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :)
Lord_Greywolf is offline   Reply With Quote
Old 05-10-2009, 04:09 PM   #6 (permalink)
Forum Expert
 
Greystar's Avatar
 
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 36
Posts: 3,974
Default

Quote:
Originally Posted by Lord_Greywolf View Post
not going to flame you fro rezing an old thread
going to flame you for taking over 6 months off of RunUO
Shame on you
One acronym sums it up Nicely ... WoW
__________________
Quote:
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
Killable Guards (GS Version)
Just a Simple Staff Tool
You can leave me messages.
Ernest Gary Gygax - Quote "I would like the world to remember me as the guy who really enjoyed playing games and sharing his knowledge and his fun pastimes with everybody else."
Greystar is offline   Reply With Quote
Old 06-26-2009, 11:52 AM   #7 (permalink)
Newbie
 
Join Date: Apr 2009
Age: 29
Posts: 86
Default

is there any way to add this to a specific account?
TheAvatar1 is offline   Reply With Quote
Old 06-26-2009, 08:35 PM   #8 (permalink)
Forum Novice
 
Thilgon's Avatar
 
Join Date: Apr 2008
Location: Messina, Sicily, Italy
Age: 26
Posts: 536
Default

search for Character slots (or something like that), i believe it was a RoninGT or ArteGordon script... that allows to set (or give as reward) any different number of char slots (or housing slots)... Mod it a little, and it will work easy with this
I am not using this (yet), but i'm using the char slots mod on the latest SVN and it is working more than fine...
Thilgon is offline   Reply With Quote
Old 06-26-2009, 08:52 PM   #9 (permalink)
Newbie
 
Join Date: Apr 2009
Age: 29
Posts: 86
Default

thanks bro found it.
TheAvatar1 is offline   Reply With Quote
Old 07-15-2009, 11:10 PM   #10 (permalink)
Forum Novice
 
Join Date: Nov 2008
Age: 23
Posts: 199
Default

Been wanting to do this on my shard for a while but I'm not really good at reverse engineering packets. I knew exactly where I was looking, just did not know what to set it to. :P Got it working now, thanks for posting!
__________________
Acronis :: Don't let data disasters kill you. Backup!
Acronis 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 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5