Skip to content

Commit

Permalink
Update to Net8 (#481)
Browse files Browse the repository at this point in the history
  • Loading branch information
NetDwarf authored Feb 9, 2024
2 parents 0e9a0f9 + 45fd543 commit 36fdd25
Show file tree
Hide file tree
Showing 69 changed files with 1,535 additions and 1,536 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
version: ${{ steps.release_info.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate Release Info
Expand All @@ -39,7 +39,7 @@ jobs:
#Prepend patch notes with backticks
sed -i '1s/^/```\n/' patch_notes.txt
- name: Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: release_info
path: |
Expand All @@ -56,9 +56,9 @@ jobs:
OUTPUT_FILE_NAME: DOLServer_${{ matrix.build_target }}.zip
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Dotnet
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Setup MinGW-w64
Expand Down Expand Up @@ -87,8 +87,8 @@ jobs:
cp libdol_detour.dll ../../../${{ matrix.build_target }}/dol_detour.dll
- name: Test Build
run: |
dotnet test --verbosity normal --filter "DOL.UnitTests&TestCategory!=Explicit" ./build/Tests/${{ matrix.build_target }}/lib/Tests.dll
dotnet test --verbosity normal --filter "DOL.Integration&TestCategory!=Explicit" ./build/Tests/${{ matrix.build_target }}/lib/Tests.dll
dotnet test --verbosity normal --filter "DOL.UnitTests" ./build/Tests/${{ matrix.build_target }}/lib/Tests.dll
dotnet test --verbosity normal --filter "DOL.Integration" ./build/Tests/${{ matrix.build_target }}/lib/Tests.dll
- name: Add DOLConfig
if: ${{ github.repository_owner == 'Dawn-of-Light' }}
run: |
Expand All @@ -112,7 +112,7 @@ jobs:
run: |
(cd ${{ matrix.build_target }}/ && zip -r ../${{ env.OUTPUT_FILE_NAME }} * )
- name: Upload Build Output
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build_artifacts
path: ${{ env.OUTPUT_FILE_NAME }}
Expand All @@ -123,9 +123,9 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
- name: Create Release
run: |
set -x
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/docker_build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ jobs:
run: |
echo "date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up QEMU for Docker
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .github/Docker
target: release_dotnet
Expand All @@ -44,7 +44,7 @@ jobs:
push: true
tags: dawnoflight/dolsharp:latest
- name: Build and push Sandbox
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .github/Docker
target: release_sandbox_dotnet
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test_netcore_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Dotnet
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
dotnet-version: '8.0.x'
- name: Build
run: |
dotnet build -c ${{ matrix.build_target }} "Tests/Tests.csproj" --verbosity normal
- name: Test
run: |
dotnet test ./build/Tests/${{ matrix.build_target }}/lib/Tests.dll -v n --filter "DOL.UnitTests&TestCategory!=Explicit"
dotnet test ./build/Tests/${{ matrix.build_target }}/lib/Tests.dll -v n --filter "DOL.Integration&TestCategory!=Explicit"
dotnet test ./build/Tests/${{ matrix.build_target }}/lib/Tests.dll -v n --filter "DOL.UnitTests"
dotnet test ./build/Tests/${{ matrix.build_target }}/lib/Tests.dll -v n --filter "DOL.Integration"
10 changes: 5 additions & 5 deletions .github/workflows/test_netcore_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Dotnet
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
dotnet-version: '8.0.x'
- name: Build
run: |
dotnet build -c ${{ matrix.build_target }} "Tests\Tests.csproj" --verbosity normal
- name: Test
run: |
dotnet test .\build\Tests\${{ matrix.build_target }}\lib\Tests.dll -v n --filter "DOL.UnitTests&TestCategory!=Explicit"
dotnet test .\build\Tests\${{ matrix.build_target }}\lib\Tests.dll -v n --filter "DOL.Integration&TestCategory!=Explicit"
dotnet test .\build\Tests\${{ matrix.build_target }}\lib\Tests.dll -v n --filter "DOL.UnitTests"
dotnet test .\build\Tests\${{ matrix.build_target }}\lib\Tests.dll -v n --filter "DOL.Integration"
2 changes: 1 addition & 1 deletion DOLBase/DOLBase.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<ItemGroup>
<PackageReference Include="SharpZipLib" Version="1.4.2" />
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="7.0.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>
4 changes: 2 additions & 2 deletions DOLDatabase/DOLDatabase.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="7.0.11" />
<PackageReference Include="MySqlConnector" Version="2.2.7" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="8.0.1" />
<PackageReference Include="MySqlConnector" Version="2.3.5" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>
4 changes: 2 additions & 2 deletions DOLServer/DOLServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</PropertyGroup>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand Down Expand Up @@ -45,7 +45,7 @@
<RegisterForComInterop>False</RegisterForComInterop>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.ServiceProcess.ServiceController" Version="7.0.1" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="8.0.0" />
<PackageReference Include="log4net" Version="2.0.15" />
<ProjectReference Include="..\GameServer\GameServer.csproj" Name="GameServer" />
</ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions GameServer/GameServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</PropertyGroup>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<AssemblyName>GameServer</AssemblyName>
Expand Down Expand Up @@ -38,9 +38,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.Diagnostics.Runtime" Version="3.0.442202" />
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="7.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
<PackageReference Include="Microsoft.Diagnostics.Runtime" Version="3.1.456101" />
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="8.0.0" />
<ProjectReference Include="..\DOLBase\DOLBase.csproj" Name="DOLBase" />
<ProjectReference Include="..\DOLDatabase\DOLDatabase.csproj" Name="DOLDatabase" />
</ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions GameServer/gameutils/DOLScriptCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ private static void LoadDefaultAssemblies()
.Where(s => !string.IsNullOrEmpty(s))
.Select(s => MetadataReference.CreateFromFile(s));
var additionalReferences = new string[] {
"System.Security.Cryptography.Algorithms", //for SHA256 in AutoXMLDatabaseUpdate
"System.Security.Cryptography.Primitives", //for SHA256 in AutoXMLDatabaseUpdate
"System.Security.Cryptography", //for SHA256 in AutoXMLDatabaseUpdate
"System.Net.Http"
}.Union(GameServer.Instance.Configuration.AdditionalScriptAssemblies)
.Select(r => GetPortableExecutableReference(r));
Expand Down
2 changes: 1 addition & 1 deletion GameServerScripts/GameServerScripts.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</PropertyGroup>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputType>Library</OutputType>
Expand Down
8 changes: 4 additions & 4 deletions GameServerScripts/dbupdater/LanguageSystemUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace DOL.GS.DatabaseUpdate
public class LanguageSystemUpdate : IDatabaseUpdater
{
#region DBLanguage table structure
private class language : DataObject
private class Language : DataObject
{
protected string m_translationid;
protected string m_EN = "";
Expand All @@ -39,7 +39,7 @@ private class language : DataObject
protected string m_CU = "";
protected string m_packageID;

public language() { }
public Language() { }

[DataElement(AllowDbNull = false, Unique = true)]
public string TranslationID
Expand Down Expand Up @@ -103,12 +103,12 @@ public void Update()

if (GameServer.Database.GetObjectCount<DBLanguageSystem>() < 1 && ServerProperties.Properties.USE_DBLANGUAGE)
{
var objs = GameServer.Database.SelectAllObjects<language>();
var objs = GameServer.Database.SelectAllObjects<Language>();
if (objs.Count > 0)
{
List<DBLanguageSystem> lngObjs = new List<DBLanguageSystem>();

foreach (language obj in objs)
foreach (Language obj in objs)
{
if (Util.IsEmpty(obj.TranslationID))
continue;
Expand Down
34 changes: 17 additions & 17 deletions GameServerScripts/quests/Albion/ChildsPlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

namespace DOL.GS.Quests.Albion
{
public class childsplay : BaseQuest
public class ChildsPlay : BaseQuest
{
/// <summary>
/// Defines a logger for this class.
Expand Down Expand Up @@ -82,22 +82,22 @@ public class childsplay : BaseQuest

private static IArea Albion_Statue_Area = null;

public childsplay()
public ChildsPlay()
: base()
{
}

public childsplay(GamePlayer questingPlayer)
public ChildsPlay(GamePlayer questingPlayer)
: this(questingPlayer, 1)
{
}

public childsplay(GamePlayer questingPlayer, int step)
public ChildsPlay(GamePlayer questingPlayer, int step)
: base(questingPlayer, step)
{
}

public childsplay(GamePlayer questingPlayer, DBQuest dbQuest)
public ChildsPlay(GamePlayer questingPlayer, DBQuest dbQuest)
: base(questingPlayer, dbQuest)
{
}
Expand Down Expand Up @@ -1482,7 +1482,7 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
GameEventMgr.AddHandler(Charles, GameLivingEvent.Interact, new DOLEventHandler(TalkToCharles));
GameEventMgr.AddHandler(Charles, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToCharles));

Charles.AddQuestToGive(typeof(childsplay));
Charles.AddQuestToGive(typeof(ChildsPlay));
if (log.IsInfoEnabled)
log.Info("Quest \"" + questTitle + "\" initialized");
}
Expand All @@ -1502,7 +1502,7 @@ public static void ScriptUnloaded(DOLEvent e, object sender, EventArgs args)
GameEventMgr.RemoveHandler(Charles, GameLivingEvent.Interact, new DOLEventHandler(TalkToCharles));
GameEventMgr.RemoveHandler(Charles, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToCharles));

Charles.RemoveQuestToGive(typeof(childsplay));
Charles.RemoveQuestToGive(typeof(ChildsPlay));
}

protected static void TalkToCharles(DOLEvent e, object sender, EventArgs args)
Expand All @@ -1511,10 +1511,10 @@ protected static void TalkToCharles(DOLEvent e, object sender, EventArgs args)
if (player == null)
return;

if (Charles.CanGiveQuest(typeof(childsplay), player) <= 0)
if (Charles.CanGiveQuest(typeof(ChildsPlay), player) <= 0)
return;

childsplay quest = player.IsDoingQuest(typeof(childsplay)) as childsplay;
ChildsPlay quest = player.IsDoingQuest(typeof(ChildsPlay)) as ChildsPlay;

Charles.TurnTo(player);

Expand Down Expand Up @@ -1581,7 +1581,7 @@ protected static void TalkToCharles(DOLEvent e, object sender, EventArgs args)
else if (lowerCase == LanguageMgr.GetTranslation(player.Client, "ChildsPlay.TalkToCharles.CaseText2"))
{
Charles.SayTo(player, LanguageMgr.GetTranslation(player.Client, "ChildsPlay.TalkToCharles.Text5"));
player.Out.SendQuestSubscribeCommand(Charles, QuestMgr.GetIDForQuestType(typeof(childsplay)), LanguageMgr.GetTranslation(player.Client, "ChildsPlay.TalkToCharles.Text6"));
player.Out.SendQuestSubscribeCommand(Charles, QuestMgr.GetIDForQuestType(typeof(ChildsPlay)), LanguageMgr.GetTranslation(player.Client, "ChildsPlay.TalkToCharles.Text6"));
}
else if (lowerCase == LanguageMgr.GetTranslation(player.Client, "ChildsPlay.TalkToCharles.CaseText3"))
{
Expand All @@ -1596,7 +1596,7 @@ protected static void TalkToCharles(DOLEvent e, object sender, EventArgs args)
/// <returns>true if qualified, false if not</returns>
public override bool CheckQuestQualification(GamePlayer player)
{
if (player.IsDoingQuest(typeof(childsplay)) != null)
if (player.IsDoingQuest(typeof(ChildsPlay)) != null)
return true;

if (player.Level < minimumLevel || player.Level > maximumLevel)
Expand All @@ -1607,7 +1607,7 @@ public override bool CheckQuestQualification(GamePlayer player)

private static void CheckPlayerAbortQuest(GamePlayer player, byte response)
{
childsplay quest = player.IsDoingQuest(typeof(childsplay)) as childsplay;
ChildsPlay quest = player.IsDoingQuest(typeof(ChildsPlay)) as ChildsPlay;

if (quest == null)
return;
Expand All @@ -1629,7 +1629,7 @@ protected static void SubscribeQuest(DOLEvent e, object sender, EventArgs args)
if (qargs == null)
return;

if (qargs.QuestID != QuestMgr.GetIDForQuestType(typeof(childsplay)))
if (qargs.QuestID != QuestMgr.GetIDForQuestType(typeof(ChildsPlay)))
return;

if (e == GamePlayerEvent.AcceptQuest)
Expand All @@ -1642,7 +1642,7 @@ protected static void PlayerEnterStatueArea(DOLEvent e, object sender, EventArgs
{
AreaEventArgs aargs = args as AreaEventArgs;
GamePlayer player = aargs.GameObject as GamePlayer;
childsplay quest = player.IsDoingQuest(typeof(childsplay)) as childsplay;
ChildsPlay quest = player.IsDoingQuest(typeof(ChildsPlay)) as ChildsPlay;

if (quest != null && quest.Step == 1)
{
Expand All @@ -1653,10 +1653,10 @@ protected static void PlayerEnterStatueArea(DOLEvent e, object sender, EventArgs

private static void CheckPlayerAcceptQuest(GamePlayer player, byte response)
{
if (Charles.CanGiveQuest(typeof(childsplay), player) <= 0)
if (Charles.CanGiveQuest(typeof(ChildsPlay), player) <= 0)
return;

if (player.IsDoingQuest(typeof(childsplay)) != null)
if (player.IsDoingQuest(typeof(ChildsPlay)) != null)
return;

if (response == 0x00)
Expand All @@ -1665,7 +1665,7 @@ private static void CheckPlayerAcceptQuest(GamePlayer player, byte response)
}
else
{
if (!Charles.GiveQuest(typeof(childsplay), player, 1))
if (!Charles.GiveQuest(typeof(ChildsPlay), player, 1))
return;
SendReply(player, LanguageMgr.GetTranslation(player.Client, "ChildsPlay.CheckPlayerAcceptQuest.Text2"));
}
Expand Down
Loading

0 comments on commit 36fdd25

Please sign in to comment.