mirror of
https://github.com/runuo/runuo
synced 2026-08-11 22:26:04 -04:00
+ Update to .NET 4.5.2
+ Housekeeping. + Endless Journey core foundation support. + Peek functionality for Serialization. + IEntity supports a Name string.
This commit is contained in:
parent
dbf816582e
commit
b0649aee8b
8 changed files with 113 additions and 39 deletions
|
|
@ -34,7 +34,8 @@ namespace Server
|
|||
ML,
|
||||
SA,
|
||||
HS,
|
||||
TOL
|
||||
TOL,
|
||||
EJ
|
||||
}
|
||||
|
||||
[Flags]
|
||||
|
|
@ -79,6 +80,7 @@ namespace Server
|
|||
Jungle = 0x00100000,
|
||||
Shadowguard = 0x00200000,
|
||||
TOL = 0x00400000,
|
||||
EJ = 0x00800000,
|
||||
|
||||
ExpansionNone = None,
|
||||
ExpansionT2A = T2A,
|
||||
|
|
@ -90,7 +92,8 @@ namespace Server
|
|||
ExpansionML = ExpansionSE | ML | NinthAge,
|
||||
ExpansionSA = ExpansionML | SA | Gothic | Rustic,
|
||||
ExpansionHS = ExpansionSA | HS,
|
||||
ExpansionTOL = ExpansionHS | TOL | Jungle | Shadowguard
|
||||
ExpansionTOL = ExpansionHS | TOL | Jungle | Shadowguard,
|
||||
ExpansionEJ = ExpansionTOL | EJ
|
||||
}
|
||||
|
||||
[Flags]
|
||||
|
|
@ -124,7 +127,8 @@ namespace Server
|
|||
ExpansionML = ExpansionSE | ML,
|
||||
ExpansionSA = ExpansionML,
|
||||
ExpansionHS = ExpansionSA,
|
||||
ExpansionTOL = ExpansionHS
|
||||
ExpansionTOL = ExpansionHS,
|
||||
ExpansionEJ = ExpansionTOL
|
||||
}
|
||||
|
||||
[Flags]
|
||||
|
|
@ -142,13 +146,15 @@ namespace Server
|
|||
Jungle = 0x100000,
|
||||
Shadowguard = 0x200000,
|
||||
TOL = 0x400000,
|
||||
EJ = 0x800000,
|
||||
|
||||
HousingAOS = AOS,
|
||||
HousingSE = HousingAOS | SE,
|
||||
HousingML = HousingSE | ML | Crystal,
|
||||
HousingSA = HousingML | SA | Gothic | Rustic,
|
||||
HousingHS = HousingSA | HS,
|
||||
HousingTOL = HousingHS | TOL | Jungle | Shadowguard
|
||||
HousingTOL = HousingHS | TOL | Jungle | Shadowguard,
|
||||
HousingEJ = HousingTOL | EJ
|
||||
}
|
||||
|
||||
public class ExpansionInfo
|
||||
|
|
@ -237,7 +243,14 @@ namespace Server
|
|||
new ClientVersion("7.0.45.65"),
|
||||
FeatureFlags.ExpansionTOL,
|
||||
CharacterListFlags.ExpansionTOL,
|
||||
HousingFlags.HousingTOL)
|
||||
HousingFlags.HousingTOL),
|
||||
new ExpansionInfo(
|
||||
11,
|
||||
"Endless Journey",
|
||||
new ClientVersion("7.0.61.0"),
|
||||
FeatureFlags.ExpansionEJ,
|
||||
CharacterListFlags.ExpansionEJ,
|
||||
HousingFlags.HousingEJ)
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ namespace Server
|
|||
{
|
||||
public interface IEntity : IPoint3D, IComparable, IComparable<IEntity>
|
||||
{
|
||||
string Name { get; set; }
|
||||
Serial Serial{ get; }
|
||||
Point3D Location{ get; }
|
||||
Map Map{ get; }
|
||||
|
|
@ -31,6 +32,7 @@ namespace Server
|
|||
|
||||
void Delete();
|
||||
void ProcessDelta();
|
||||
void InvalidateProperties();
|
||||
}
|
||||
|
||||
public class Entity : IEntity, IComparable<Entity>
|
||||
|
|
@ -56,6 +58,7 @@ namespace Server
|
|||
throw new ArgumentException();
|
||||
}
|
||||
|
||||
private string m_Name;
|
||||
private Serial m_Serial;
|
||||
private Point3D m_Location;
|
||||
private Map m_Map;
|
||||
|
|
@ -63,12 +66,22 @@ namespace Server
|
|||
|
||||
public Entity( Serial serial, Point3D loc, Map map )
|
||||
{
|
||||
m_Name = null;
|
||||
m_Serial = serial;
|
||||
m_Location = loc;
|
||||
m_Map = map;
|
||||
m_Deleted = false;
|
||||
}
|
||||
|
||||
public string Name {
|
||||
get {
|
||||
return m_Name;
|
||||
}
|
||||
set {
|
||||
m_Name = value;
|
||||
}
|
||||
}
|
||||
|
||||
public Serial Serial {
|
||||
get {
|
||||
return m_Serial;
|
||||
|
|
@ -113,10 +126,15 @@ namespace Server
|
|||
|
||||
public void Delete()
|
||||
{
|
||||
m_Deleted = true;
|
||||
}
|
||||
|
||||
public void ProcessDelta()
|
||||
{
|
||||
}
|
||||
|
||||
public void InvalidateProperties()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3820,7 +3820,7 @@ namespace Server
|
|||
|
||||
public virtual bool OnDroppedToMobile( Mobile from, Mobile target )
|
||||
{
|
||||
if( Nontransferable && from.Player )
|
||||
if( Nontransferable && from.Player && from.AccessLevel < AccessLevel.GameMaster )
|
||||
{
|
||||
HandleInvalidTransfer( from );
|
||||
return false;
|
||||
|
|
@ -3853,7 +3853,7 @@ namespace Server
|
|||
{
|
||||
return false;
|
||||
}
|
||||
else if( Nontransferable && from.Player && target != from.Backpack )
|
||||
else if( Nontransferable && from.Player && target != from.Backpack && from.AccessLevel < AccessLevel.GameMaster )
|
||||
{
|
||||
HandleInvalidTransfer( from );
|
||||
return false;
|
||||
|
|
@ -3874,7 +3874,7 @@ namespace Server
|
|||
return false;
|
||||
else if ( !from.OnDroppedItemOnto( this, target ) )
|
||||
return false;
|
||||
else if( Nontransferable && from.Player && target != from.Backpack )
|
||||
else if( Nontransferable && from.Player && target != from.Backpack && from.AccessLevel < AccessLevel.GameMaster )
|
||||
{
|
||||
HandleInvalidTransfer( from );
|
||||
return false;
|
||||
|
|
@ -3908,7 +3908,7 @@ namespace Server
|
|||
|
||||
public virtual bool OnDroppedToWorld( Mobile from, Point3D p )
|
||||
{
|
||||
if( Nontransferable && from.Player )
|
||||
if( Nontransferable && from.Player && from.AccessLevel < AccessLevel.GameMaster )
|
||||
{
|
||||
HandleInvalidTransfer( from );
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@
|
|||
* Map property from the Gump; The list of names may not be what you expect,
|
||||
* in which case, enabling this update will fix it.
|
||||
*/
|
||||
//#define Map_InternalProtection
|
||||
#define Map_InternalProtection
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -4478,7 +4478,7 @@ namespace Server
|
|||
|
||||
foreach(NetState ns in eable) {
|
||||
if (ns.StygianAbyss)
|
||||
continue;
|
||||
continue;
|
||||
|
||||
if( ns.Mobile != this && ns.Mobile.CanSee( this ) && ns.Mobile.InLOS( this ) && ns.Mobile.CanSee( root ) ) {
|
||||
if (p == null) {
|
||||
|
|
@ -8129,7 +8129,7 @@ namespace Server
|
|||
}
|
||||
}
|
||||
|
||||
Timer.DelayCall( TimeSpan.Zero, delegate { item.Delete(); } );
|
||||
Timer.DelayCall( item.Delete );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -9662,6 +9662,7 @@ namespace Server
|
|||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool OpenTrade(Mobile from)
|
||||
{
|
||||
return OpenTrade(from, null);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#region References
|
||||
#region References
|
||||
using System;
|
||||
using System.IO;
|
||||
#endregion
|
||||
|
|
@ -114,4 +114,4 @@ namespace Server
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ namespace Server
|
|||
{
|
||||
protected GenericReader() { }
|
||||
|
||||
public abstract int PeekInt();
|
||||
|
||||
public abstract string ReadString();
|
||||
public abstract DateTime ReadDateTime();
|
||||
public abstract DateTimeOffset ReadDateTimeOffset();
|
||||
|
|
@ -634,6 +636,7 @@ namespace Server
|
|||
{
|
||||
WriteMobileList( list, false );
|
||||
}
|
||||
|
||||
public override void WriteMobileList( ArrayList list, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -657,6 +660,7 @@ namespace Server
|
|||
{
|
||||
WriteItemList( list, false );
|
||||
}
|
||||
|
||||
public override void WriteItemList( ArrayList list, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -680,6 +684,7 @@ namespace Server
|
|||
{
|
||||
WriteGuildList( list, false );
|
||||
}
|
||||
|
||||
public override void WriteGuildList( ArrayList list, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -703,6 +708,7 @@ namespace Server
|
|||
{
|
||||
Write( list, false );
|
||||
}
|
||||
|
||||
public override void Write( List<Item> list, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -726,6 +732,7 @@ namespace Server
|
|||
{
|
||||
WriteItemList<T>( list, false );
|
||||
}
|
||||
|
||||
public override void WriteItemList<T>( List<T> list, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -749,6 +756,7 @@ namespace Server
|
|||
{
|
||||
Write( set, false );
|
||||
}
|
||||
|
||||
public override void Write( HashSet<Item> set, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -768,6 +776,7 @@ namespace Server
|
|||
{
|
||||
WriteItemSet( set, false );
|
||||
}
|
||||
|
||||
public override void WriteItemSet<T>( HashSet<T> set, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -787,6 +796,7 @@ namespace Server
|
|||
{
|
||||
Write( list, false );
|
||||
}
|
||||
|
||||
public override void Write( List<Mobile> list, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -810,6 +820,7 @@ namespace Server
|
|||
{
|
||||
WriteMobileList<T>( list, false );
|
||||
}
|
||||
|
||||
public override void WriteMobileList<T>( List<T> list, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -833,6 +844,7 @@ namespace Server
|
|||
{
|
||||
Write( set, false );
|
||||
}
|
||||
|
||||
public override void Write( HashSet<Mobile> set, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -852,6 +864,7 @@ namespace Server
|
|||
{
|
||||
WriteMobileSet( set, false );
|
||||
}
|
||||
|
||||
public override void WriteMobileSet<T>( HashSet<T> set, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -871,6 +884,7 @@ namespace Server
|
|||
{
|
||||
Write( list, false );
|
||||
}
|
||||
|
||||
public override void Write( List<BaseGuild> list, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -894,6 +908,7 @@ namespace Server
|
|||
{
|
||||
WriteGuildList<T>( list, false );
|
||||
}
|
||||
|
||||
public override void WriteGuildList<T>( List<T> list, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -917,6 +932,7 @@ namespace Server
|
|||
{
|
||||
Write( set, false );
|
||||
}
|
||||
|
||||
public override void Write( HashSet<BaseGuild> set, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -936,6 +952,7 @@ namespace Server
|
|||
{
|
||||
WriteGuildSet( set, false );
|
||||
}
|
||||
|
||||
public override void WriteGuildSet<T>( HashSet<T> set, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -976,6 +993,15 @@ namespace Server
|
|||
return m_File.BaseStream.Seek( offset, origin );
|
||||
}
|
||||
|
||||
public override int PeekInt()
|
||||
{
|
||||
var peek = m_File.ReadInt32();
|
||||
|
||||
m_File.BaseStream.Seek( -4, SeekOrigin.Current );
|
||||
|
||||
return peek;
|
||||
}
|
||||
|
||||
public override string ReadString()
|
||||
{
|
||||
if( ReadByte() != 0 )
|
||||
|
|
@ -1768,6 +1794,7 @@ namespace Server
|
|||
{
|
||||
WriteMobileList( list, false );
|
||||
}
|
||||
|
||||
public override void WriteMobileList( ArrayList list, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -1791,6 +1818,7 @@ namespace Server
|
|||
{
|
||||
WriteItemList( list, false );
|
||||
}
|
||||
|
||||
public override void WriteItemList( ArrayList list, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -1814,6 +1842,7 @@ namespace Server
|
|||
{
|
||||
WriteGuildList( list, false );
|
||||
}
|
||||
|
||||
public override void WriteGuildList( ArrayList list, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -1837,6 +1866,7 @@ namespace Server
|
|||
{
|
||||
Write( list, false );
|
||||
}
|
||||
|
||||
public override void Write( List<Item> list, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -1883,6 +1913,7 @@ namespace Server
|
|||
{
|
||||
Write( set, false );
|
||||
}
|
||||
|
||||
public override void Write( HashSet<Item> set, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -1902,6 +1933,7 @@ namespace Server
|
|||
{
|
||||
WriteItemSet( set, false );
|
||||
}
|
||||
|
||||
public override void WriteItemSet<T>( HashSet<T> set, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -1921,6 +1953,7 @@ namespace Server
|
|||
{
|
||||
Write( list, false );
|
||||
}
|
||||
|
||||
public override void Write( List<Mobile> list, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -1944,6 +1977,7 @@ namespace Server
|
|||
{
|
||||
WriteMobileList<T>( list, false );
|
||||
}
|
||||
|
||||
public override void WriteMobileList<T>( List<T> list, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -1967,6 +2001,7 @@ namespace Server
|
|||
{
|
||||
Write( set, false );
|
||||
}
|
||||
|
||||
public override void Write( HashSet<Mobile> set, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -1986,6 +2021,7 @@ namespace Server
|
|||
{
|
||||
WriteMobileSet( set, false );
|
||||
}
|
||||
|
||||
public override void WriteMobileSet<T>( HashSet<T> set, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -2005,6 +2041,7 @@ namespace Server
|
|||
{
|
||||
Write( list, false );
|
||||
}
|
||||
|
||||
public override void Write( List<BaseGuild> list, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -2028,6 +2065,7 @@ namespace Server
|
|||
{
|
||||
WriteGuildList<T>( list, false );
|
||||
}
|
||||
|
||||
public override void WriteGuildList<T>( List<T> list, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -2051,6 +2089,7 @@ namespace Server
|
|||
{
|
||||
Write( set, false );
|
||||
}
|
||||
|
||||
public override void Write( HashSet<BaseGuild> set, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
@ -2070,6 +2109,7 @@ namespace Server
|
|||
{
|
||||
WriteGuildSet( set, false );
|
||||
}
|
||||
|
||||
public override void WriteGuildSet<T>( HashSet<T> set, bool tidy )
|
||||
{
|
||||
if( tidy )
|
||||
|
|
|
|||
|
|
@ -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)' == '' ">x86</Platform>
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
<OutputType>Exe</OutputType>
|
||||
<NoStandardLibraries>false</NoStandardLibraries>
|
||||
<AssemblyName>RunUO</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
|
|
@ -46,6 +46,7 @@
|
|||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
||||
<OutputPath>..\</OutputPath>
|
||||
|
|
@ -57,6 +58,7 @@
|
|||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
@ -64,6 +66,28 @@
|
|||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 4.5</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AggressorInfo.cs" />
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
|
|
@ -192,28 +216,6 @@
|
|||
<ItemGroup>
|
||||
<Content Include="runuo.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4 Client Profile %28x86 and x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.4.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Windows Installer 4.5</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.Targets" />
|
||||
<ProjectExtensions>
|
||||
<VisualStudio AllowExistingFolder="true" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue