Skip to content

Commit

Permalink
Merge branch 'master' into remove-newtonsoft
Browse files Browse the repository at this point in the history
  • Loading branch information
LtRipley36706 authored Dec 21, 2023
2 parents a4f1543 + a366be7 commit 9d02bbf
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 43 deletions.
2 changes: 1 addition & 1 deletion AppVeyor/dbversion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.276
0.9.277
2 changes: 1 addition & 1 deletion Source/ACE.Database/ACE.Database.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<ItemGroup>
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.24" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.25" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.2" />
<PackageReference Include="System.Diagnostics.Debug" Version="4.3.0" />
<PackageReference Include="System.IO.FileSystem" Version="4.3.0" />
Expand Down
22 changes: 15 additions & 7 deletions Source/ACE.Database/SQLFormatters/Shard/BiotaSQLWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,18 @@ public class BiotaSQLWriter : SQLWriter
/// </summary>
public string GetDefaultFileName(Biota input)
{
var result = input.Id.ToString("X8");

var name = input.GetProperty(PropertyString.Name);

return GetDefaultFileName(input.Id, name);
}

/// <summary>
/// Default is formed from: id.ToString("X8") + " " + name
/// </summary>
public static string GetDefaultFileName(uint id, string name)
{
var result = id.ToString("X8");

if (!String.IsNullOrWhiteSpace(name))
result += " " + name;

Expand Down Expand Up @@ -153,17 +161,17 @@ public void CreateSQLINSERTStatement(Biota input, StreamWriter writer)
if (input.BiotaPropertiesPalette != null && input.BiotaPropertiesPalette.Count > 0)
{
writer.WriteLine();
CreateSQLINSERTStatement(input.Id, input.BiotaPropertiesPalette.OrderBy(r => r.SubPaletteId).ToList(), writer);
CreateSQLINSERTStatement(input.Id, input.BiotaPropertiesPalette.OrderBy(r => r.Order).ThenBy(r => r.SubPaletteId).ToList(), writer);
}
if (input.BiotaPropertiesTextureMap != null && input.BiotaPropertiesTextureMap.Count > 0)
{
writer.WriteLine();
CreateSQLINSERTStatement(input.Id, input.BiotaPropertiesTextureMap.OrderBy(r => r.Index).ToList(), writer);
CreateSQLINSERTStatement(input.Id, input.BiotaPropertiesTextureMap.OrderBy(r => r.Order).ThenBy(r => r.Index).ToList(), writer);
}
if (input.BiotaPropertiesAnimPart != null && input.BiotaPropertiesAnimPart.Count > 0)
{
writer.WriteLine();
CreateSQLINSERTStatement(input.Id, input.BiotaPropertiesAnimPart.OrderBy(r => r.Index).ToList(), writer);
CreateSQLINSERTStatement(input.Id, input.BiotaPropertiesAnimPart.OrderBy(r => r.Order).ThenBy(r => r.Index).ToList(), writer);
}

if (input.BiotaPropertiesEnchantmentRegistry != null && input.BiotaPropertiesEnchantmentRegistry.Count > 0)
Expand Down Expand Up @@ -644,9 +652,9 @@ public void CreateSQLINSERTStatement(uint id, IList<BiotaPropertiesGenerator> in

public void CreateSQLINSERTStatement(uint id, IList<BiotaPropertiesPalette> input, StreamWriter writer)
{
writer.WriteLine("INSERT INTO `biota_properties_palette` (`object_Id`, `sub_Palette_Id`, `offset`, `length`)");
writer.WriteLine("INSERT INTO `biota_properties_palette` (`object_Id`, `sub_Palette_Id`, `offset`, `length`, `order`)");

var lineGenerator = new Func<int, string>(i => $"{id}, {input[i].SubPaletteId}, {input[i].Offset}, {input[i].Length})");
var lineGenerator = new Func<int, string>(i => $"{id}, {input[i].SubPaletteId}, {input[i].Offset}, {input[i].Length}, {input[i].Order})");

ValuesWriter(input.Count, lineGenerator, writer);
}
Expand Down
4 changes: 2 additions & 2 deletions Source/ACE.Database/ShardDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public int GetBiotaCount()
}

[Flags]
enum PopulatedCollectionFlags
public enum PopulatedCollectionFlags
{
BiotaPropertiesAnimPart = 0x1,
BiotaPropertiesAttribute = 0x2,
Expand Down Expand Up @@ -159,7 +159,7 @@ enum PopulatedCollectionFlags
BiotaPropertiesAllegiance = 0x1000000,
}

protected static void SetBiotaPopulatedCollections(Biota biota)
public static void SetBiotaPopulatedCollections(Biota biota)
{
PopulatedCollectionFlags populatedCollectionFlags = 0;

Expand Down
2 changes: 1 addition & 1 deletion Source/ACE.Server/ACE.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
<PackageReference Include="Log4Net.Async.Standard" Version="3.1.0" />
<PackageReference Include="McMaster.NETCore.Plugins" Version="1.4.0" />
<PackageReference Include="MySql.Data" Version="8.2.0" />
<PackageReference Include="MySqlConnector" Version="2.3.1" />
<PackageReference Include="MySqlConnector" Version="2.3.2" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0" />
</ItemGroup>

Expand Down
26 changes: 5 additions & 21 deletions Source/ACE.Server/Mods/ModContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class ModContainer
public ModMetadata Meta { get; set; }
public ModStatus Status = ModStatus.Unloaded;

public Assembly ModAssembly { get; set; }
public Assembly ModAssembly { get; set; }
public Type ModType { get; set; }
public IHarmonyMod Instance { get; set; }

Expand All @@ -37,7 +37,6 @@ public class ModContainer
ModAssembly.ManifestModule.ScopeName.Replace(".dll", "." + ModMetadata.TYPENAME);

public PluginLoader Loader { get; private set; }
//private FileSystemWatcher _dllWatcher;
private DateTime _lastChange = DateTime.Now;

/// <summary>
Expand All @@ -51,31 +50,16 @@ public void Initialize()
return;
}

//Watching for changes in the dll might be needed if it has unreleased resources?
//https://github.com/natemcmaster/DotNetCorePlugins/issues/86
//_dllWatcher = new FileSystemWatcher()
//{
// Path = FolderPath,
// //Filter = DllPath,
// Filter = $"{FolderName}.dll",
// EnableRaisingEvents = true,
// NotifyFilter = NotifyFilters.LastWrite //?
//};
//_dllWatcher.Changed += ModDll_Changed;
//_dllWatcher.Created += ModDll_Created;
//_dllWatcher.Renamed += ModDll_Renamed;
//_dllWatcher.Deleted += ModDll_Changed;
//_dllWatcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.FileName;

Loader = PluginLoader.CreateFromAssemblyFile(
assemblyFile: DllPath,
isUnloadable: true,
sharedTypes: new Type[] { },
sharedTypes: new Type[] { },
configure: config =>
{
config.EnableHotReload = Meta.HotReload;
config.IsLazyLoaded = false; //?
}
config.IsLazyLoaded = false;
config.PreferSharedTypes = true;
}
);
Loader.Reloaded += Reload;

Expand Down
14 changes: 7 additions & 7 deletions Source/ACE.Server/ServerBuildInfo_Dynamic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ namespace ACE.Server
public static partial class ServerBuildInfo
{
public static string Branch = "master";
public static string Commit = "f78c3ce189384b943005b33fea95bd57e9438e85";
public static string Commit = "5eea5154e1aad15f1f731d53b180a81e03094723";

public static string Version = "1.55";
public static string Build = "4452";
public static string Build = "4457";

public static int BuildYear = 2023;
public static int BuildMonth = 11;
public static int BuildDay = 26;
public static int BuildHour = 21;
public static int BuildMinute = 51;
public static int BuildSecond = 28;
public static int BuildMonth = 12;
public static int BuildDay = 17;
public static int BuildHour = 20;
public static int BuildMinute = 15;
public static int BuildSecond = 55;
}
}

6 changes: 4 additions & 2 deletions Source/ACE.Server/WorldObjects/Corpse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public override void Close(Player player)
{
base.Close(player);

if (VictimId == null)
/*if (VictimId == null)
return;
var victimGuid = new ObjectGuid(VictimId.Value);
Expand All @@ -228,7 +228,9 @@ public override void Close(Player player)
// player corpses -- after corpse owner or killer loots, becomes open to anyone?
if (player != null && (player.Guid == killerGuid || player.Guid == victimGuid))
IsLooted = true;
}
}*/

IsLooted = true;
}

public bool CorpseGeneratedRare
Expand Down
2 changes: 1 addition & 1 deletion Source/ACE.Server/WorldObjects/Entity/CreatureVital.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public uint Current

public uint GetMaxValue(bool enchanted)
{
var attr = AttributeFormula.GetFormula(creature, Vital, true);
var attr = AttributeFormula.GetFormula(creature, Vital, enchanted);

uint total = StartingValue + Ranks + attr;

Expand Down
1 change: 1 addition & 0 deletions Source/ACE.Server/WorldObjects/Player_Spells.cs
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ private void CreateEnchantmentSilent(Spell spell, WorldObject target)
"DirtyFightingMastery",
"RecklessnessMastery",
"SneakAttackMastery",
"ShieldMastery",
"@Impenetrability",
"@PiercingBane",
"@BludgeonBane",
Expand Down

0 comments on commit 9d02bbf

Please sign in to comment.