Cleanup Expansions
WorldPacketSA should not be used yet. There is much more work to be done and that version has not been looked at in quite some time.
This commit is contained in:
parent
01eee98298
commit
177eb4c6ff
26 changed files with 388 additions and 204 deletions
|
|
@ -1114,7 +1114,7 @@ namespace Server.Accounting
|
|||
/// </summary>
|
||||
public int Limit
|
||||
{
|
||||
get { return ( /* Core.SA ? 7 : */ Core.AOS ? 6 : 5 ); } //TODO: complete SA core support and uncomment
|
||||
get { return ( Core.SA ? 7 : Core.AOS ? 6 : 5 ); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ namespace Server.Commands
|
|||
if ( ns != null ) {
|
||||
if ( targ.CanSee( from ) )
|
||||
{
|
||||
if ( ns.IsPost7000 )
|
||||
if ( ns.StygianAbyss )
|
||||
ns.Send( new MobileIncoming( targ, from ) );
|
||||
else
|
||||
ns.Send( new MobileIncomingOld( targ, from ) );
|
||||
|
|
|
|||
|
|
@ -219,9 +219,6 @@ namespace Server.Gumps
|
|||
ExpansionInfo info = state.ExpansionInfo;
|
||||
string expansionName = info.Name;
|
||||
|
||||
if ( info.ID == (int)Expansion.None )
|
||||
expansionName = (((state.Flags & 0x04) != 0) ? "Blackthorn's Revenge" : ((state.Flags & 0x02) != 0) ? "Third Dawn" : ((state.Flags & 0x01) != 0) ? "Renaissance" : "The Second Age" );
|
||||
|
||||
AddHtml( 70, 36 + (line++ * 20), 200, 20, Color( expansionName, LabelColor32 ), false, false );
|
||||
|
||||
Account a = state.Account as Account;
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ namespace Server.Items
|
|||
NetState state = from.NetState;
|
||||
|
||||
state.Send( new BBDisplayBoard( this ) );
|
||||
if ( state.IsPost6017 )
|
||||
if ( state.ContainerGridLines )
|
||||
state.Send( new ContainerContent6017( from, this ) );
|
||||
else
|
||||
state.Send( new ContainerContent( from, this ) );
|
||||
|
|
|
|||
|
|
@ -321,14 +321,14 @@ namespace Server.Items
|
|||
}
|
||||
else
|
||||
{
|
||||
int flags = mobile.NetState == null ? 0 : mobile.NetState.Flags;
|
||||
ClientFlags flags = mobile.NetState == null ? ClientFlags.None : mobile.NetState.Flags;
|
||||
bool young = mobile is PlayerMobile ? ((PlayerMobile)mobile).Young : false;
|
||||
|
||||
if ( Core.SE && (flags & 0x10) != 0 )
|
||||
if ( Core.SE && (flags & ClientFlags.Tokuno) != 0 )
|
||||
checkLists = young ? PMList.SEListsYoung : PMList.SELists;
|
||||
else if ( Core.AOS && (flags & 0x8) != 0 )
|
||||
else if ( Core.AOS && (flags & ClientFlags.Malas) != 0 )
|
||||
checkLists = young ? PMList.AOSListsYoung : PMList.AOSLists;
|
||||
else if ( (flags & 0x4) != 0 )
|
||||
else if ( (flags & ClientFlags.Ilshenar) != 0 )
|
||||
checkLists = young ? PMList.LBRListsYoung : PMList.LBRLists;
|
||||
else
|
||||
checkLists = young ? PMList.UORListsYoung : PMList.UORLists;
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ namespace Server.Items
|
|||
|
||||
public virtual void UseGate( Mobile m )
|
||||
{
|
||||
int flags = m.NetState == null ? 0 : m.NetState.Flags;
|
||||
ClientFlags flags = m.NetState == null ? ClientFlags.None : m.NetState.Flags;
|
||||
|
||||
if ( Factions.Sigil.ExistsOn( m ) )
|
||||
{
|
||||
|
|
@ -122,7 +122,7 @@ namespace Server.Items
|
|||
{
|
||||
m.SendLocalizedMessage( 1049543 ); // You decide against traveling to Felucca while you are still young.
|
||||
}
|
||||
else if ( (m.Kills >= 5 && m_TargetMap != Map.Felucca) || ( m_TargetMap == Map.Tokuno && (flags & 0x10) == 0 ) || ( m_TargetMap == Map.Malas && (flags & 0x8) == 0 ) || ( m_TargetMap == Map.Ilshenar && (flags & 0x4) == 0 ) )
|
||||
else if ( (m.Kills >= 5 && m_TargetMap != Map.Felucca) || ( m_TargetMap == Map.Tokuno && (flags & ClientFlags.Tokuno) == 0 ) || ( m_TargetMap == Map.Malas && (flags & ClientFlags.Malas) == 0 ) || ( m_TargetMap == Map.Ilshenar && (flags & ClientFlags.Ilshenar) == 0 ) )
|
||||
{
|
||||
m.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -490,8 +490,6 @@ namespace Server.Items
|
|||
{
|
||||
}
|
||||
|
||||
private static readonly ClientVersion Version_400a = new ClientVersion( "4.0.0a" );
|
||||
|
||||
public void DisplayTo( Mobile to )
|
||||
{
|
||||
// The client must know about the spellbook or it will crash!
|
||||
|
|
@ -506,7 +504,7 @@ namespace Server.Items
|
|||
return;
|
||||
|
||||
// What will happen if the client doesn't know about our parent?
|
||||
if ( to.NetState.IsPost6017 )
|
||||
if ( to.NetState.ContainerGridLines )
|
||||
to.Send( new ContainerContentUpdate6017( this ) );
|
||||
else
|
||||
to.Send( new ContainerContentUpdate( this ) );
|
||||
|
|
@ -523,14 +521,14 @@ namespace Server.Items
|
|||
return;
|
||||
|
||||
if ( Core.AOS ) {
|
||||
if ( to.NetState.Version != null && to.NetState.Version >= Version_400a ) {
|
||||
if ( to.NetState.NewSpellbook ) {
|
||||
to.Send( new NewSpellbookContent( this, ItemID, BookOffset + 1, m_Content ) );
|
||||
} else {
|
||||
to.Send( new SpellbookContent( m_Count, BookOffset + 1, m_Content, this ) );
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ( to.NetState.IsPost6017 ) {
|
||||
if ( to.NetState.ContainerGridLines ) {
|
||||
to.Send( new SpellbookContent6017( m_Count, BookOffset + 1, m_Content, this ) );
|
||||
} else {
|
||||
to.Send( new SpellbookContent( m_Count, BookOffset + 1, m_Content, this ) );
|
||||
|
|
|
|||
|
|
@ -166,9 +166,12 @@ namespace Server.Items
|
|||
if ( !from.Player )
|
||||
return true;
|
||||
|
||||
int flags = (from.NetState == null) ? 0 : from.NetState.Flags;
|
||||
NetState state = from.NetState;
|
||||
|
||||
if( RequiresSE && (flags & 0x10) == 0 ) //TODO: Convert to expansionInfo
|
||||
if ( state == null )
|
||||
return false;
|
||||
|
||||
if( RequiresSE && state.SupportsExpansion( Expansion.SE ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1063456 ); // You must upgrade to Samurai Empire in order to use that ability.
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -24,9 +24,6 @@ namespace Server
|
|||
}
|
||||
}
|
||||
|
||||
private static readonly ClientVersion m_RequiredClient = new ClientVersion( "5.0.2b" );
|
||||
public static ClientVersion RequiredClient { get { return m_RequiredClient; } }
|
||||
|
||||
#region Properties
|
||||
private BuffIcon m_ID;
|
||||
public BuffIcon ID { get { return m_ID; } }
|
||||
|
|
|
|||
|
|
@ -734,14 +734,13 @@ namespace Server.Misc
|
|||
}
|
||||
}
|
||||
|
||||
private static readonly ClientVersion m_NewHavenClient = new ClientVersion( "6.0.0.0" );
|
||||
private static readonly CityInfo m_NewHavenInfo = new CityInfo( "New Haven", "The Bountiful Harvest Inn", 3503, 2574, 14, Map.Trammel );
|
||||
|
||||
private static CityInfo GetStartLocation( CharacterCreatedEventArgs args, bool isYoung )
|
||||
{
|
||||
if( Core.ML )
|
||||
{
|
||||
//if( args.State != null && args.State.Version >= m_NewHavenClient )
|
||||
//if( args.State != null && args.State.NewHaven )
|
||||
return m_NewHavenInfo; //We don't get the client Version until AFTER Character creation
|
||||
|
||||
//return args.City; TODO: Uncomment when the old quest system is actually phased out
|
||||
|
|
@ -749,14 +748,14 @@ namespace Server.Misc
|
|||
|
||||
bool useHaven = isYoung;
|
||||
|
||||
int flags = args.State == null ? 0 : args.State.Flags;
|
||||
ClientFlags flags = args.State == null ? ClientFlags.None : args.State.Flags;
|
||||
Mobile m = args.Mobile;
|
||||
|
||||
switch ( args.Profession )
|
||||
{
|
||||
case 4: //Necro
|
||||
{
|
||||
if ( (flags & 0x8) != 0 )
|
||||
if ( (flags & ClientFlags.Malas) != 0 )
|
||||
{
|
||||
return new CityInfo( "Umbra", "Mardoth's Tower", 2114, 1301, -50, Map.Malas );
|
||||
}
|
||||
|
|
@ -782,7 +781,7 @@ namespace Server.Misc
|
|||
}
|
||||
case 6: //Samurai
|
||||
{
|
||||
if ( (flags & 0x10) != 0 )
|
||||
if ( (flags & ClientFlags.Tokuno) != 0 )
|
||||
{
|
||||
return new CityInfo( "Samurai DE", "Haoti's Grounds", 368, 780, -1, Map.Malas );
|
||||
}
|
||||
|
|
@ -804,7 +803,7 @@ namespace Server.Misc
|
|||
}
|
||||
case 7: //Ninja
|
||||
{
|
||||
if ( (flags & 0x10) != 0 )
|
||||
if ( (flags & ClientFlags.Tokuno) != 0 )
|
||||
{
|
||||
return new CityInfo( "Ninja DE", "Enimo's Residence", 414, 823, -1, Map.Malas );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ namespace Server
|
|||
{
|
||||
public class CurrentExpansion
|
||||
{
|
||||
private static readonly Expansion Expansion = Expansion.ML;
|
||||
private static readonly Expansion Expansion = Expansion.SA;
|
||||
|
||||
public static void Configure()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3426,7 +3426,7 @@ namespace Server.Mobiles
|
|||
NetState ns = this.NetState;
|
||||
|
||||
if ( ns != null ) {
|
||||
if ( ns.IsPost7000 ) {
|
||||
if ( ns.StygianAbyss ) {
|
||||
ns.Send( new MobileMoving( m, Notoriety.Compute( this, m ) ) );
|
||||
} else {
|
||||
ns.Send( new MobileMovingOld( m, Notoriety.Compute( this, m ) ) );
|
||||
|
|
@ -4108,7 +4108,7 @@ namespace Server.Mobiles
|
|||
|
||||
NetState state = this.NetState;
|
||||
|
||||
if( state != null && state.Version >= BuffInfo.RequiredClient )
|
||||
if( state != null && state.BuffIcon )
|
||||
{
|
||||
foreach( BuffInfo info in m_BuffTable.Values )
|
||||
{
|
||||
|
|
@ -4133,7 +4133,7 @@ namespace Server.Mobiles
|
|||
|
||||
NetState state = this.NetState;
|
||||
|
||||
if( state != null && state.Version >= BuffInfo.RequiredClient )
|
||||
if( state != null && state.BuffIcon )
|
||||
{
|
||||
state.Send( new AddBuffPacket( this, b ) );
|
||||
}
|
||||
|
|
@ -4161,7 +4161,7 @@ namespace Server.Mobiles
|
|||
|
||||
NetState state = this.NetState;
|
||||
|
||||
if( state != null && state.Version >= BuffInfo.RequiredClient )
|
||||
if( state != null && state.BuffIcon )
|
||||
{
|
||||
state.Send( new RemoveBuffPacket( this, b ) );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -637,7 +637,7 @@ namespace Server.Mobiles
|
|||
if ( from.NetState == null )
|
||||
return;
|
||||
|
||||
if ( from.NetState.IsPost6017 )
|
||||
if ( from.NetState.ContainerGridLines )
|
||||
from.Send( new VendorBuyContent6017( list ) );
|
||||
else
|
||||
from.Send( new VendorBuyContent( list ) );
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ namespace Server.Spells.Bushido
|
|||
if ( from.NetState == null )
|
||||
return false;
|
||||
|
||||
//return ( (from.NetState.Flags & 0x10) != 0 );
|
||||
return from.NetState.SupportsExpansion( Expansion.SE );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ namespace Server.Spells.Ninjitsu
|
|||
if ( from.NetState == null )
|
||||
return false;
|
||||
|
||||
//return ( (from.NetState.Flags & 0x10) != 0 );
|
||||
return from.NetState.SupportsExpansion( Expansion.SE );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue