mirror of
https://github.com/runuo/runuo
synced 2026-08-11 22:26:04 -04:00
+ Update to .NET 4.5.2
+ Housekeeping. + [Go gump support for Ter Mur. + Vendor API update for buyer/seller referencing. + Update DateTime references for consistent Now/UtcNow implementation.
This commit is contained in:
parent
b0649aee8b
commit
e1946e3216
9 changed files with 44 additions and 24 deletions
|
|
@ -31,7 +31,7 @@ namespace Server
|
|||
Console.WriteLine( "Client: {0}: Past IP limit threshold", ip );
|
||||
|
||||
using ( StreamWriter op = new StreamWriter( "ipLimits.log", true ) )
|
||||
op.WriteLine( "{0}\tPast IP limit threshold\t{1}", ip, DateTime.UtcNow );
|
||||
op.WriteLine( "{0}\tPast IP limit threshold\t{1}", ip, DateTime.Now );
|
||||
|
||||
e.AllowConnection = false;
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -763,6 +763,7 @@ namespace Server.Accounting
|
|||
public Account( XmlElement node )
|
||||
{
|
||||
m_Username = Utility.GetText( node["username"], "empty" );
|
||||
m_Email = Utility.GetText( node["email"], "none" );
|
||||
|
||||
string plainPassword = Utility.GetText( node["password"], null );
|
||||
string cryptPassword = Utility.GetText( node["cryptPassword"], null );
|
||||
|
|
@ -1128,6 +1129,10 @@ namespace Server.Accounting
|
|||
xml.WriteString( m_Username );
|
||||
xml.WriteEndElement();
|
||||
|
||||
xml.WriteStartElement( "email" );
|
||||
xml.WriteString( m_Email );
|
||||
xml.WriteEndElement();
|
||||
|
||||
if ( m_PlainPassword != null )
|
||||
{
|
||||
xml.WriteStartElement( "password" );
|
||||
|
|
|
|||
|
|
@ -214,6 +214,7 @@ namespace Server.Misc
|
|||
acct.Comments.Add( new AccountComment( "System", String.Format( "Character #{0} {1} deleted by {2}", index + 1, m, state ) ) );
|
||||
|
||||
m.Delete();
|
||||
|
||||
state.Send( new CharacterListUpdate( acct ) );
|
||||
}
|
||||
}
|
||||
|
|
@ -306,7 +307,7 @@ namespace Server.Misc
|
|||
Console.WriteLine( "Login: {0}: Past IP limit threshold", e.State );
|
||||
|
||||
using ( StreamWriter op = new StreamWriter( "ipLimits.log", true ) )
|
||||
op.WriteLine( "{0}\tPast IP limit threshold\t{1}", e.State, DateTime.UtcNow );
|
||||
op.WriteLine( "{0}\tPast IP limit threshold\t{1}", e.State, DateTime.Now );
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
@ -370,7 +371,7 @@ namespace Server.Misc
|
|||
Console.WriteLine( "Login: {0}: Past IP limit threshold", e.State );
|
||||
|
||||
using ( StreamWriter op = new StreamWriter( "ipLimits.log", true ) )
|
||||
op.WriteLine( "{0}\tPast IP limit threshold\t{1}", e.State, DateTime.UtcNow );
|
||||
op.WriteLine( "{0}\tPast IP limit threshold\t{1}", e.State, DateTime.Now );
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ namespace Server.Engines.MyRunUO
|
|||
{
|
||||
if ( m_Command != null && !m_Command.HasCompleted )
|
||||
return;
|
||||
DateTime start = DateTime.Now;
|
||||
|
||||
Console.WriteLine( "MyRunUO: Creating tables" );
|
||||
try
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ namespace Server.Gumps
|
|||
public static readonly LocationTree Ilshenar = new LocationTree( "ilshenar.xml", Map.Ilshenar );
|
||||
public static readonly LocationTree Malas = new LocationTree( "malas.xml", Map.Malas );
|
||||
public static readonly LocationTree Tokuno = new LocationTree( "tokuno.xml", Map.Tokuno );
|
||||
public static readonly LocationTree TerMur = new LocationTree( "termur.xml", Map.TerMur );
|
||||
|
||||
public static bool OldStyle = PropsConfig.OldStyle;
|
||||
|
||||
|
|
@ -76,8 +77,10 @@ namespace Server.Gumps
|
|||
tree = Trammel;
|
||||
else if ( from.Map == Map.Malas )
|
||||
tree = Malas;
|
||||
else
|
||||
else if ( from.Map == Map.Tokuno )
|
||||
tree = Tokuno;
|
||||
else
|
||||
tree = TerMur;
|
||||
|
||||
ParentNode branch = null;
|
||||
tree.LastBranch.TryGetValue( from, out branch );
|
||||
|
|
|
|||
|
|
@ -63,11 +63,13 @@ namespace Server.Mobiles
|
|||
if (AccountGold.Enabled && m.Account != null)
|
||||
{
|
||||
int goldStub;
|
||||
|
||||
m.Account.GetGoldBalance(out goldStub, out balance);
|
||||
|
||||
if (balance > Int32.MaxValue)
|
||||
{
|
||||
gold = checks = new Item[0];
|
||||
|
||||
return Int32.MaxValue;
|
||||
}
|
||||
}
|
||||
|
|
@ -182,6 +184,7 @@ namespace Server.Mobiles
|
|||
else
|
||||
{
|
||||
item.Delete();
|
||||
|
||||
foreach (var curItem in items)
|
||||
{
|
||||
curItem.Delete();
|
||||
|
|
@ -210,6 +213,7 @@ namespace Server.Mobiles
|
|||
}
|
||||
|
||||
var amountLeft = amount;
|
||||
|
||||
while (amountLeft > 0)
|
||||
{
|
||||
Item item;
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ namespace Server.Mobiles
|
|||
}
|
||||
|
||||
#region Faction
|
||||
public virtual int GetPriceScalar()
|
||||
public virtual int GetPriceScalar( Mobile buyer )
|
||||
{
|
||||
Town town = Town.FromRegion( this.Region );
|
||||
|
||||
|
|
@ -87,9 +87,9 @@ namespace Server.Mobiles
|
|||
return 100;
|
||||
}
|
||||
|
||||
public void UpdateBuyInfo()
|
||||
public void UpdateBuyInfo( Mobile buyer )
|
||||
{
|
||||
int priceScalar = GetPriceScalar();
|
||||
int priceScalar = GetPriceScalar( buyer );
|
||||
|
||||
IBuyItemInfo[] buyinfo = (IBuyItemInfo[])m_ArmorBuyInfo.ToArray( typeof( IBuyItemInfo ) );
|
||||
|
||||
|
|
@ -512,7 +512,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
m_LastRestock = DateTime.UtcNow;
|
||||
|
||||
IBuyItemInfo[] buyInfo = this.GetBuyInfo();
|
||||
IBuyItemInfo[] buyInfo = this.GetBuyInfo( );
|
||||
|
||||
foreach ( IBuyItemInfo bii in buyInfo )
|
||||
bii.OnRestock();
|
||||
|
|
@ -537,7 +537,7 @@ namespace Server.Mobiles
|
|||
if ( DateTime.UtcNow - m_LastRestock > RestockDelay )
|
||||
Restock();
|
||||
|
||||
UpdateBuyInfo();
|
||||
UpdateBuyInfo( from );
|
||||
|
||||
int count = 0;
|
||||
List<BuyItemState> list;
|
||||
|
|
@ -710,7 +710,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
IShopSellInfo[] info = GetSellInfo();
|
||||
|
||||
Dictionary<Item, SellItemState> table = new Dictionary<Item, SellItemState>();
|
||||
List<SellItemState> table = new List<SellItemState>();
|
||||
|
||||
foreach ( IShopSellInfo ssi in info )
|
||||
{
|
||||
|
|
@ -721,8 +721,13 @@ namespace Server.Mobiles
|
|||
if ( item is Container && ( (Container)item ).Items.Count != 0 )
|
||||
continue;
|
||||
|
||||
LockableContainer parentcon = item.Parent as LockableContainer;
|
||||
|
||||
if ( parentcon != null && parentcon.Locked )
|
||||
continue;
|
||||
|
||||
if ( item.IsStandardLoot() && item.Movable && ssi.IsSellable( item ) )
|
||||
table[item] = new SellItemState( item, ssi.GetSellPriceFor( item ), ssi.GetNameFor( item ) );
|
||||
table.Add( new SellItemState( item, ssi.GetSellPriceFor( item ), ssi.GetNameFor( item ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -730,7 +735,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
SendPacksTo( from );
|
||||
|
||||
from.Send( new VendorSellList( this, table.Values ) );
|
||||
from.Send( new VendorSellList( this, table ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -928,7 +933,7 @@ namespace Server.Mobiles
|
|||
return false;
|
||||
}
|
||||
|
||||
UpdateBuyInfo();
|
||||
UpdateBuyInfo( buyer );
|
||||
|
||||
IBuyItemInfo[] buyInfo = this.GetBuyInfo();
|
||||
IShopSellInfo[] info = GetSellInfo();
|
||||
|
|
@ -1282,8 +1287,6 @@ namespace Server.Mobiles
|
|||
seller.SendGump( new SmallBODAcceptGump( seller, (SmallBOD)bulkOrder ) );
|
||||
}
|
||||
}
|
||||
//no cliloc for this?
|
||||
//SayTo( seller, true, "Thank you! I bought {0} item{1}. Here is your {2}gp.", Sold, (Sold > 1 ? "s" : ""), GiveGold );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1389,7 +1392,7 @@ namespace Server.Mobiles
|
|||
if ( IsParagon )
|
||||
IsParagon = false;
|
||||
|
||||
Timer.DelayCall( TimeSpan.Zero, new TimerCallback( CheckMorph ) );
|
||||
Timer.DelayCall( CheckMorph );
|
||||
}
|
||||
|
||||
public override void AddCustomContextEntries( Mobile from, List<ContextMenuEntry> list )
|
||||
|
|
@ -1409,12 +1412,12 @@ namespace Server.Mobiles
|
|||
base.AddCustomContextEntries( from, list );
|
||||
}
|
||||
|
||||
public virtual IShopSellInfo[] GetSellInfo()
|
||||
public virtual IShopSellInfo[] GetSellInfo( )
|
||||
{
|
||||
return (IShopSellInfo[])m_ArmorSellInfo.ToArray( typeof( IShopSellInfo ) );
|
||||
}
|
||||
|
||||
public virtual IBuyItemInfo[] GetBuyInfo()
|
||||
public virtual IBuyItemInfo[] GetBuyInfo( )
|
||||
{
|
||||
return (IBuyItemInfo[])m_ArmorBuyInfo.ToArray( typeof( IBuyItemInfo ) );
|
||||
}
|
||||
|
|
@ -1514,4 +1517,4 @@ namespace Server
|
|||
//called when its time for the whole shop to restock
|
||||
void OnRestock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
<OutputType>Library</OutputType>
|
||||
<NoStandardLibraries>false</NoStandardLibraries>
|
||||
<AssemblyName>Scripts.CS</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
|
|
@ -21,6 +21,7 @@
|
|||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
|
|
@ -30,6 +31,7 @@
|
|||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<RootNamespace>Server</RootNamespace>
|
||||
|
|
@ -43,6 +45,7 @@
|
|||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>Output\</OutputPath>
|
||||
|
|
@ -53,6 +56,7 @@
|
|||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ namespace Server.Spells.Mysticism
|
|||
|
||||
public void OnDamage()
|
||||
{
|
||||
if ( DateTime.Now > ( m_LastExploded + TimeSpan.FromSeconds( 2.0 ) ) )
|
||||
if ( DateTime.UtcNow > ( m_LastExploded + TimeSpan.FromSeconds( 2.0 ) ) )
|
||||
{
|
||||
var exploChance = 90 - ( m_Explosions * 30 );
|
||||
|
||||
|
|
@ -173,7 +173,7 @@ namespace Server.Spells.Mysticism
|
|||
var damage = m_Owner.GetNewAosDamage( 15 + ( m_Explosions * 3 ), 1, 5, m_Target );
|
||||
|
||||
m_Explosions++;
|
||||
m_LastExploded = DateTime.Now;
|
||||
m_LastExploded = DateTime.UtcNow;
|
||||
|
||||
var types = new int[4];
|
||||
types[Utility.Random( types.Length )] = 100;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue