Lots of fixes, changes, rewrites of various things, including but not limited to:
Logging of staff crafting items, Fixes for the OSI client changes The potion stacking stuff BaseWeapon fix, so that damage increase things don't multiply themselves. admin gump fixes for Firewall Various display tweaks for weight SoS no longer spawn in Tokuno Hiryu hues happified to OSI standards staff now see alliance chat correctly Play barkeeper text increased per OSI Various other OSI skill requirement changes Various unimplemented features of the SE moves EventSink for when the client version is received from client. Client validation moved out of the core. Client version validation now has options to ignore/kick/warn/annoy. Automagically tries to detect current client. Reverted the delayeddamagecontext back to OSI standards. Can no longer use bags of sending in jail. MagerySpell implemented. Now only Magery spells have a circle, and various other properties of 'em. TransformationSpellHelper now implemented. Things moved around for this. Spells now need a Timespan for the cast delay, instead of arbitrarily based on Circle. Circle doesn't make sense for non-Magery spells! Alot of the spellweaving spells added to OSI standards.
This commit is contained in:
parent
f12e9745c6
commit
2ad37d54aa
214 changed files with 4881 additions and 1243 deletions
|
|
@ -1182,7 +1182,7 @@ namespace Server.Gumps
|
|||
{
|
||||
object obj = m_List[index];
|
||||
|
||||
if ( !(obj is IPAddress) && !(obj is String) )
|
||||
if ( !(obj is Firewall.IFirewallEntry ) )
|
||||
break;
|
||||
|
||||
int offset = 140 + (i * 20);
|
||||
|
|
@ -1197,7 +1197,7 @@ namespace Server.Gumps
|
|||
{
|
||||
AddFirewallHeader();
|
||||
|
||||
if ( !(state is IPAddress) && !(state is String) )
|
||||
if ( !(state is Firewall.IFirewallEntry) )
|
||||
break;
|
||||
|
||||
AddHtml( 10, 125, 400, 20, Color( Center( state.ToString() ), LabelColor32 ), false, false );
|
||||
|
|
@ -1210,9 +1210,6 @@ namespace Server.Gumps
|
|||
{
|
||||
m_List = new ArrayList();
|
||||
|
||||
string pattern = state as String;
|
||||
IPAddress addr = ( state is IPAddress ? (IPAddress)state : IPAddress.Any );
|
||||
|
||||
foreach ( Account acct in Accounts.GetAccounts() )
|
||||
{
|
||||
IPAddress[] loginList = acct.LoginIPs;
|
||||
|
|
@ -1221,22 +1218,12 @@ namespace Server.Gumps
|
|||
|
||||
for( int i = 0; !contains && i < loginList.Length; ++i )
|
||||
{
|
||||
if( pattern == null ) //if is IP Address
|
||||
if( ((Firewall.IFirewallEntry)state).IsBlocked( loginList[i] ) )
|
||||
{
|
||||
contains = loginList[i].Equals( addr );
|
||||
continue;
|
||||
m_List.Add( acct );
|
||||
break;
|
||||
}
|
||||
|
||||
contains = Utility.IPMatchCIDR( pattern, loginList[i] );
|
||||
|
||||
if( !contains )
|
||||
contains = Utility.IPMatch( pattern, loginList[i] );
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ( contains )
|
||||
m_List.Add( acct );
|
||||
}
|
||||
|
||||
m_List.Sort( AccountComparer.Instance );
|
||||
|
|
@ -2481,10 +2468,7 @@ namespace Server.Gumps
|
|||
}
|
||||
else
|
||||
{
|
||||
object toAdd;
|
||||
|
||||
try{ toAdd = IPAddress.Parse( text ); }
|
||||
catch{ toAdd = text; }
|
||||
object toAdd = Firewall.ToFirewallEntry( text );
|
||||
|
||||
CommandLogging.WriteLine( from, "{0} {1} firewalling {2}", from.AccessLevel, CommandLogging.Format( from ), toAdd );
|
||||
|
||||
|
|
@ -2502,7 +2486,7 @@ namespace Server.Gumps
|
|||
}
|
||||
case 3:
|
||||
{
|
||||
if ( m_State is IPAddress || m_State is String )
|
||||
if ( m_State is Firewall.IFirewallEntry )
|
||||
{
|
||||
CommandLogging.WriteLine( from, "{0} {1} removing {2} from firewall list", from.AccessLevel, CommandLogging.Format( from ), m_State );
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ using System.Collections.Generic;
|
|||
|
||||
namespace Server.Guilds
|
||||
{
|
||||
public class GuildRosterGump : BaseGuildListGump<PlayerMobile> //TODO: Convert to <PlayerMobile>
|
||||
public class GuildRosterGump : BaseGuildListGump<PlayerMobile>
|
||||
{
|
||||
#region Comparers
|
||||
private class NameComparer : IComparer<PlayerMobile>
|
||||
|
|
|
|||
|
|
@ -9,12 +9,19 @@ namespace Server.Gumps
|
|||
public class PetResurrectGump : Gump
|
||||
{
|
||||
private BaseCreature m_Pet;
|
||||
private double m_HitsScalar;
|
||||
|
||||
public PetResurrectGump( Mobile from, BaseCreature pet ) : base( 50, 50 )
|
||||
public PetResurrectGump( Mobile from, BaseCreature pet )
|
||||
: this( from, pet, 0.0 )
|
||||
{
|
||||
}
|
||||
|
||||
public PetResurrectGump( Mobile from, BaseCreature pet, double hitsScalar ) : base( 50, 50 )
|
||||
{
|
||||
from.CloseGump( typeof( PetResurrectGump ) );
|
||||
|
||||
m_Pet = pet;
|
||||
m_HitsScalar = hitsScalar;
|
||||
|
||||
AddPage( 0 );
|
||||
|
||||
|
|
@ -48,6 +55,11 @@ namespace Server.Gumps
|
|||
from.SendLocalizedMessage( 503256 ); // You fail to resurrect the creature.
|
||||
return;
|
||||
}
|
||||
else if( m_Pet.Region != null && m_Pet.Region.IsPartOf( "Khaldun" ) ) //TODO: Confirm for pets, as per Bandage's script.
|
||||
{
|
||||
from.SendLocalizedMessage( 1010395 ); // The veil of death in this area is too strong and resists thy efforts to restore life.
|
||||
return;
|
||||
}
|
||||
|
||||
m_Pet.PlaySound( 0x214 );
|
||||
m_Pet.FixedEffect( 0x376A, 10, 16 );
|
||||
|
|
@ -62,6 +74,9 @@ namespace Server.Gumps
|
|||
|
||||
for ( int i = 0; i < m_Pet.Skills.Length; ++i ) //Decrease all skills on pet.
|
||||
m_Pet.Skills[i].Base -= decreaseAmount;
|
||||
|
||||
if( !m_Pet.IsDeadPet && m_HitsScalar > 0 )
|
||||
m_Pet.Hits = (int)(m_Pet.HitsMax * m_HitsScalar);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@ namespace Server.Gumps
|
|||
private const int SelectedColor32 = 0x8080FF;
|
||||
private const int TextColor32 = 0xFFFFFF;
|
||||
|
||||
public SetBodyGump( PropertyInfo prop, Mobile mobile, object o, Stack stack, int page, ArrayList list ) : this( prop, mobile, o, stack, page, list, 0, null, ModelBodyType.Invalid )
|
||||
public SetBodyGump( PropertyInfo prop, Mobile mobile, object o, Stack stack, int page, ArrayList list )
|
||||
: this( prop, mobile, o, stack, page, list, 0, null, ModelBodyType.Invalid )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -47,7 +48,8 @@ namespace Server.Gumps
|
|||
AddHtml( x + 35, y, 200, 20, Color( text, isSelection ? SelectedColor32 : LabelColor32 ), false, false );
|
||||
}
|
||||
|
||||
public SetBodyGump( PropertyInfo prop, Mobile mobile, object o, Stack stack, int page, ArrayList list, int ourPage, ArrayList ourList, ModelBodyType ourType ) : base( 20, 30 )
|
||||
public SetBodyGump( PropertyInfo prop, Mobile mobile, object o, Stack stack, int page, ArrayList list, int ourPage, ArrayList ourList, ModelBodyType ourType )
|
||||
: base( 20, 30 )
|
||||
{
|
||||
m_Property = prop;
|
||||
m_Mobile = mobile;
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ namespace Server.Gumps
|
|||
{
|
||||
public enum ResurrectMessage
|
||||
{
|
||||
ChaosShrine = 0,
|
||||
VirtueShrine = 1,
|
||||
Healer = 2,
|
||||
Generic = 3,
|
||||
ChaosShrine=0,
|
||||
VirtueShrine=1,
|
||||
Healer=2,
|
||||
Generic=3,
|
||||
}
|
||||
|
||||
public class ResurrectGump : Gump
|
||||
|
|
@ -22,28 +22,44 @@ namespace Server.Gumps
|
|||
private Mobile m_Healer;
|
||||
private int m_Price;
|
||||
private bool m_FromSacrifice;
|
||||
private double m_HitsScalar;
|
||||
|
||||
public ResurrectGump( Mobile owner ) : this( owner, owner, ResurrectMessage.Generic, false )
|
||||
public ResurrectGump( Mobile owner )
|
||||
: this( owner, owner, ResurrectMessage.Generic, false )
|
||||
{
|
||||
}
|
||||
|
||||
public ResurrectGump( Mobile owner, bool fromSacrifice ) : this( owner, owner, ResurrectMessage.Generic, fromSacrifice )
|
||||
public ResurrectGump( Mobile owner, double hitsScalar )
|
||||
: this( owner, owner, ResurrectMessage.Generic, false, hitsScalar )
|
||||
{
|
||||
}
|
||||
|
||||
public ResurrectGump( Mobile owner, Mobile healer ) : this( owner, healer, ResurrectMessage.Generic, false )
|
||||
public ResurrectGump( Mobile owner, bool fromSacrifice )
|
||||
: this( owner, owner, ResurrectMessage.Generic, fromSacrifice )
|
||||
{
|
||||
}
|
||||
|
||||
public ResurrectGump( Mobile owner, ResurrectMessage msg ) : this( owner, owner, msg, false )
|
||||
public ResurrectGump( Mobile owner, Mobile healer )
|
||||
: this( owner, healer, ResurrectMessage.Generic, false )
|
||||
{
|
||||
}
|
||||
|
||||
public ResurrectGump( Mobile owner, Mobile healer, ResurrectMessage msg, bool fromSacrifice ) : base( 100, 0 )
|
||||
public ResurrectGump( Mobile owner, ResurrectMessage msg )
|
||||
: this( owner, owner, msg, false )
|
||||
{
|
||||
}
|
||||
|
||||
public ResurrectGump( Mobile owner, Mobile healer, ResurrectMessage msg, bool fromSacrifice )
|
||||
: this( owner, healer, msg, fromSacrifice, 0.0 )
|
||||
{
|
||||
}
|
||||
|
||||
public ResurrectGump( Mobile owner, Mobile healer, ResurrectMessage msg, bool fromSacrifice, double hitsScalar )
|
||||
: base( 100, 0 )
|
||||
{
|
||||
m_Healer = healer;
|
||||
|
||||
m_FromSacrifice = fromSacrifice;
|
||||
m_HitsScalar = hitsScalar;
|
||||
|
||||
AddPage( 0 );
|
||||
|
||||
|
|
@ -63,7 +79,8 @@ namespace Server.Gumps
|
|||
AddHtmlLocalized( 100, 230, 110, 35, 1011011, false, false ); // CONTINUE
|
||||
}
|
||||
|
||||
public ResurrectGump( Mobile owner, Mobile healer, int price ) : base( 150, 50 )
|
||||
public ResurrectGump( Mobile owner, Mobile healer, int price )
|
||||
: base( 150, 50 )
|
||||
{
|
||||
m_Healer = healer;
|
||||
m_Price = price;
|
||||
|
|
@ -122,19 +139,19 @@ namespace Server.Gumps
|
|||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
if ( info.ButtonID == 1 || info.ButtonID == 2 )
|
||||
if( info.ButtonID == 1 || info.ButtonID == 2 )
|
||||
{
|
||||
if ( from.Map == null || !from.Map.CanFit( from.Location, 16, false, false ) )
|
||||
if( from.Map == null || !from.Map.CanFit( from.Location, 16, false, false ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 502391 ); // Thou can not be resurrected there!
|
||||
return;
|
||||
}
|
||||
|
||||
if ( m_Price > 0 )
|
||||
if( m_Price > 0 )
|
||||
{
|
||||
if ( info.IsSwitched( 1 ) )
|
||||
if( info.IsSwitched( 1 ) )
|
||||
{
|
||||
if ( Banker.Withdraw( from, m_Price ) )
|
||||
if( Banker.Withdraw( from, m_Price ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1060398, m_Price.ToString() ); // ~1_AMOUNT~ gold has been withdrawn from your bank box.
|
||||
from.SendLocalizedMessage( 1060022, Banker.GetBalance( from ).ToString() ); // You have ~1_AMOUNT~ gold in cash remaining in your bank box.
|
||||
|
|
@ -157,11 +174,11 @@ namespace Server.Gumps
|
|||
|
||||
from.Resurrect();
|
||||
|
||||
if ( m_Healer != null && from != m_Healer )
|
||||
if( m_Healer != null && from != m_Healer )
|
||||
{
|
||||
VirtueLevel level = VirtueHelper.GetLevel( m_Healer, VirtueName.Compassion );
|
||||
|
||||
switch ( level )
|
||||
switch( level )
|
||||
{
|
||||
case VirtueLevel.Seeker: from.Hits = AOS.Scale( from.HitsMax, 20 ); break;
|
||||
case VirtueLevel.Follower: from.Hits = AOS.Scale( from.HitsMax, 40 ); break;
|
||||
|
|
@ -169,56 +186,60 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
|
||||
if ( m_FromSacrifice && !from.Criminal && from is PlayerMobile )
|
||||
if( m_FromSacrifice && !from.Criminal && from is PlayerMobile )
|
||||
{
|
||||
((PlayerMobile)from).AvailableResurrects -= 1;
|
||||
|
||||
Container pack = from.Backpack;
|
||||
Container corpse = from.Corpse;
|
||||
|
||||
if ( pack != null && corpse != null )
|
||||
if( pack != null && corpse != null )
|
||||
{
|
||||
List<Item> items = new List<Item>( corpse.Items );
|
||||
|
||||
for ( int i = 0; i < items.Count; ++i )
|
||||
for( int i = 0; i < items.Count; ++i )
|
||||
{
|
||||
Item item = items[i];
|
||||
|
||||
if ( item.Layer != Layer.Hair && item.Layer != Layer.FacialHair && item.Movable )
|
||||
if( item.Layer != Layer.Hair && item.Layer != Layer.FacialHair && item.Movable )
|
||||
pack.DropItem( item );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( from.Fame > 0 )
|
||||
if( from.Fame > 0 )
|
||||
{
|
||||
int amount = from.Fame / 10;
|
||||
|
||||
Misc.Titles.AwardFame( from, -amount, true );
|
||||
}
|
||||
|
||||
if ( !Core.AOS && from.ShortTermMurders >= 5 )
|
||||
if( !Core.AOS && from.ShortTermMurders >= 5 )
|
||||
{
|
||||
double loss = (100.0 - ( 4.0 + (from.ShortTermMurders / 5.0))) / 100.0; // 5 to 15% loss
|
||||
double loss = (100.0 - (4.0 + (from.ShortTermMurders / 5.0))) / 100.0; // 5 to 15% loss
|
||||
|
||||
if ( loss < 0.85 )
|
||||
if( loss < 0.85 )
|
||||
loss = 0.85;
|
||||
else if ( loss > 0.95 )
|
||||
else if( loss > 0.95 )
|
||||
loss = 0.95;
|
||||
|
||||
if ( from.RawStr * loss > 10 )
|
||||
if( from.RawStr * loss > 10 )
|
||||
from.RawStr = (int)(from.RawStr * loss);
|
||||
if ( from.RawInt * loss > 10 )
|
||||
if( from.RawInt * loss > 10 )
|
||||
from.RawInt = (int)(from.RawInt * loss);
|
||||
if ( from.RawDex * loss > 10 )
|
||||
if( from.RawDex * loss > 10 )
|
||||
from.RawDex = (int)(from.RawDex * loss);
|
||||
|
||||
for ( int s = 0; s < from.Skills.Length; s++ )
|
||||
for( int s = 0; s < from.Skills.Length; s++ )
|
||||
{
|
||||
if ( from.Skills[s].Base * loss > 35 )
|
||||
if( from.Skills[s].Base * loss > 35 )
|
||||
from.Skills[s].Base *= loss;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if( from.Alive && m_HitsScalar > 0 )
|
||||
from.Hits = (int)(from.HitsMax * m_HitsScalar);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,13 @@ namespace Server.Gumps
|
|||
{
|
||||
private WarningGumpCallback m_Callback;
|
||||
private object m_State;
|
||||
private bool m_CancelButton;
|
||||
|
||||
public WarningGump( int header, int headerColor, object content, int contentColor, int width, int height, WarningGumpCallback callback, object state, bool cancelButton )
|
||||
: this( header, headerColor, content, contentColor, width, height, callback, state )
|
||||
{
|
||||
m_CancelButton = cancelButton;
|
||||
}
|
||||
|
||||
public WarningGump( int header, int headerColor, object content, int contentColor, int width, int height, WarningGumpCallback callback, object state ) : base( (640 - width) / 2, (480 - height) / 2 )
|
||||
{
|
||||
|
|
@ -39,8 +46,11 @@ namespace Server.Gumps
|
|||
AddButton( 10, height - 30, 4005, 4007, 1, GumpButtonType.Reply, 0 );
|
||||
AddHtmlLocalized( 40, height - 30, 170, 20, 1011036, 32767, false, false ); // OKAY
|
||||
|
||||
AddButton( 10 + ((width - 20) / 2), height - 30, 4005, 4007, 0, GumpButtonType.Reply, 0 );
|
||||
AddHtmlLocalized( 40 + ((width - 20) / 2), height - 30, 170, 20, 1011012, 32767, false, false ); // CANCEL
|
||||
if( m_CancelButton )
|
||||
{
|
||||
AddButton( 10 + ((width - 20) / 2), height - 30, 4005, 4007, 0, GumpButtonType.Reply, 0 );
|
||||
AddHtmlLocalized( 40 + ((width - 20) / 2), height - 30, 170, 20, 1011012, 32767, false, false ); // CANCEL
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnResponse( Server.Network.NetState sender, RelayInfo info )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue