Skip to content

Commit

Permalink
Merge dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaioru committed Oct 13, 2023
2 parents bcf5fa9 + a0bc589 commit 7fe00f7
Show file tree
Hide file tree
Showing 409 changed files with 2,247 additions and 1,195 deletions.
7 changes: 7 additions & 0 deletions Edelstein.sln
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Protocol.Services
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Common.Services.Social", "src\common\Edelstein.Common.Services.Social\Edelstein.Common.Services.Social.csproj", "{3FA5F4D2-519A-438D-B7AB-CF1D52C5A7D8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Common.Constants", "src\common\Edelstein.Common.Constants\Edelstein.Common.Constants.csproj", "{EFAF05A4-B54F-4B30-96C6-A7CDC2C2A81A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -137,6 +139,7 @@ Global
{D7A9F029-E2A7-4D4E-A153-54C3A322F482} = {52AE6DEF-E54C-47DC-85F3-8AF3C6FCD504}
{0731AA3B-FE03-4456-BD86-C7D6412B40B5} = {7F8DD283-A64C-40EC-98F2-84FA38716C28}
{3FA5F4D2-519A-438D-B7AB-CF1D52C5A7D8} = {52AE6DEF-E54C-47DC-85F3-8AF3C6FCD504}
{EFAF05A4-B54F-4B30-96C6-A7CDC2C2A81A} = {52AE6DEF-E54C-47DC-85F3-8AF3C6FCD504}
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{23073F7B-2195-482E-B3E8-DBCB6BEB587A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -267,5 +270,9 @@ Global
{3FA5F4D2-519A-438D-B7AB-CF1D52C5A7D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3FA5F4D2-519A-438D-B7AB-CF1D52C5A7D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3FA5F4D2-519A-438D-B7AB-CF1D52C5A7D8}.Release|Any CPU.Build.0 = Release|Any CPU
{EFAF05A4-B54F-4B30-96C6-A7CDC2C2A81A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EFAF05A4-B54F-4B30-96C6-A7CDC2C2A81A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EFAF05A4-B54F-4B30-96C6-A7CDC2C2A81A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EFAF05A4-B54F-4B30-96C6-A7CDC2C2A81A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
12 changes: 12 additions & 0 deletions src/Source.targets
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,25 @@
</PropertyGroup>

<PropertyGroup>
<Authors>Kaioru</Authors>

<RepositoryUrl>https://github.com/Kaioru/Edelstein</RepositoryUrl>
<RepositoryType>git</RepositoryType>

<PackageProjectUrl>https://github.com/Kaioru/Edelstein</PackageProjectUrl>

<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
</PropertyGroup>

<ItemGroup>
<None Include="../../../README.md" Pack="true" PackagePath="/"/>
<None Include="../../../LICENSE" Pack="true" PackagePath="/"/>
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/app/Edelstein.Application.Server/ProgramHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
using Edelstein.Common.Gameplay.Game.Conversations;
using Edelstein.Common.Gameplay.Game.Objects.NPC;
using Edelstein.Common.Gameplay.Game.Quests;
using Edelstein.Common.Gameplay.Handling;
using Edelstein.Common.Gameplay.Login;
using Edelstein.Common.Gameplay.Models.Inventories;
using Edelstein.Common.Gameplay.Packets;
using Edelstein.Common.Gameplay.Shop;
using Edelstein.Common.Gameplay.Shop.Commodities;
using Edelstein.Common.Gameplay.Trade;
Expand Down
14 changes: 14 additions & 0 deletions src/app/Edelstein.Application.Server/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,11 @@
"resolved": "8.0.0-rc.1.23419.4",
"contentHash": "zyoB4zblhvpylS9VOmKyBuGH+RjKDsfi0cTB2KRPPDD6tFinpP+vGr3dictaNYLhGUg6jaBmq+2H/WZMCnvGDQ=="
},
"Microsoft.IO.RecyclableMemoryStream": {
"type": "Transitive",
"resolved": "2.3.2",
"contentHash": "Oh1qXXFdJFcHozvb4H6XYLf2W0meZFuG0A+TfapFPj9z5fd4vxiARGEhAaLj/6XWQaMYIv4SH/9Q6H78Hw0E2Q=="
},
"MoonSharp": {
"type": "Transitive",
"resolved": "2.0.0",
Expand Down Expand Up @@ -616,6 +621,12 @@
"System.Text.Encodings.Web": "7.0.0"
}
},
"edelstein.common.constants": {
"type": "Project",
"dependencies": {
"Edelstein.Protocol.Gameplay": "[1.0.0, )"
}
},
"edelstein.common.crypto": {
"type": "Project"
},
Expand All @@ -636,6 +647,7 @@
"type": "Project",
"dependencies": {
"Duey.Abstractions": "[2.0.0, )",
"Edelstein.Common.Constants": "[1.0.0, )",
"Edelstein.Common.Utilities": "[1.0.0, )",
"Edelstein.Protocol.Gameplay": "[1.0.0, )",
"Edelstein.Protocol.Services.Server": "[1.0.0, )",
Expand All @@ -647,6 +659,7 @@
"edelstein.common.gameplay.game": {
"type": "Project",
"dependencies": {
"Edelstein.Common.Constants": "[1.0.0, )",
"Edelstein.Common.Gameplay": "[1.0.0, )",
"Edelstein.Protocol.Gameplay.Game": "[1.0.0, )",
"Edelstein.Protocol.Scripting": "[1.0.0, )",
Expand Down Expand Up @@ -755,6 +768,7 @@
"dependencies": {
"Edelstein.Protocol.Utilities": "[1.0.0, )",
"Microsoft.Extensions.Logging.Abstractions": "[7.0.0, )",
"Microsoft.IO.RecyclableMemoryStream": "[2.3.2, )",
"RBush": "[3.2.0, )"
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Edelstein.Common.Gameplay.Constants;
namespace Edelstein.Common.Constants;

public static class EXPTable
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="..\Common.targets"/>

<ItemGroup>
<ProjectReference Include="..\..\protocol\Edelstein.Protocol.Gameplay\Edelstein.Protocol.Gameplay.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Edelstein.Common.Gameplay.Constants;
namespace Edelstein.Common.Constants;

public static class ItemConstants
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Edelstein.Common.Gameplay.Constants;
namespace Edelstein.Common.Constants;

public static class ItemGrade
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Edelstein.Common.Gameplay.Constants;
namespace Edelstein.Common.Constants;

public static class Job
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Edelstein.Common.Gameplay.Constants;
namespace Edelstein.Common.Constants;

public static class JobConstants
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Edelstein.Common.Gameplay.Constants;
namespace Edelstein.Common.Constants;

public static class JobRace
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Edelstein.Common.Gameplay.Constants;
namespace Edelstein.Common.Constants;

public static class JobType
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Edelstein.Common.Gameplay.Constants;
namespace Edelstein.Common.Constants;

public class QuestRecords
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Edelstein.Common.Gameplay.Constants;
namespace Edelstein.Common.Constants;

public static class Skill
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Edelstein.Protocol.Gameplay.Models.Characters.Skills.Templates;

namespace Edelstein.Common.Gameplay.Constants;
namespace Edelstein.Common.Constants;

public static class SkillConstants
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Edelstein.Common.Gameplay.Constants;
namespace Edelstein.Common.Constants;

public enum WeaponType
{
Expand Down
55 changes: 55 additions & 0 deletions src/common/Edelstein.Common.Constants/packages.lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"version": 1,
"dependencies": {
"net8.0": {
"Microsoft.Extensions.Logging.Abstractions": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "kmn78+LPVMOWeITUjIlfxUPDsI0R6G0RkeAMBmQxAJ7vBJn4q2dTva7pWi65ceN5vPGjJ9q/Uae2WKgvfktJAw=="
},
"Microsoft.IO.RecyclableMemoryStream": {
"type": "Transitive",
"resolved": "2.3.2",
"contentHash": "Oh1qXXFdJFcHozvb4H6XYLf2W0meZFuG0A+TfapFPj9z5fd4vxiARGEhAaLj/6XWQaMYIv4SH/9Q6H78Hw0E2Q=="
},
"RBush": {
"type": "Transitive",
"resolved": "3.2.0",
"contentHash": "ijGh9N0zZ7JfXk3oQkWCwK8SwSSByexbyh/MjbCjNxOft9eG5ZqKC1vdgiYq78h4IZRFmN4s3JZ/b10Jipud5w=="
},
"edelstein.common.utilities": {
"type": "Project",
"dependencies": {
"Edelstein.Protocol.Utilities": "[1.0.0, )",
"Microsoft.Extensions.Logging.Abstractions": "[7.0.0, )",
"Microsoft.IO.RecyclableMemoryStream": "[2.3.2, )",
"RBush": "[3.2.0, )"
}
},
"edelstein.protocol.gameplay": {
"type": "Project",
"dependencies": {
"Edelstein.Common.Utilities": "[1.0.0, )",
"Edelstein.Protocol.Network": "[1.0.0, )",
"Edelstein.Protocol.Services.Social": "[1.0.0, )",
"Edelstein.Protocol.Utilities": "[1.0.0, )"
}
},
"edelstein.protocol.network": {
"type": "Project",
"dependencies": {
"Edelstein.Protocol.Utilities": "[1.0.0, )"
}
},
"edelstein.protocol.services.social": {
"type": "Project",
"dependencies": {
"Edelstein.Protocol.Utilities": "[1.0.0, )"
}
},
"edelstein.protocol.utilities": {
"type": "Project"
}
}
}
}
22 changes: 11 additions & 11 deletions src/common/Edelstein.Common.Crypto/AESCipher.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Security.Cryptography;
using System.Buffers;
using System.Security.Cryptography;

namespace Edelstein.Common.Crypto;

Expand All @@ -24,18 +25,18 @@ public AESCipher(ReadOnlySpan<byte> userKey)
_transformer = cipher.CreateEncryptor();
}

public void Transform(Span<byte> input, uint pSrc)
public void Transform(Span<byte> input, int remaining, uint pSrc)
{
var remaining = input.Length;
var length = 0x5B0;
var start = 0;

var srcExp = new byte[sizeof(int) * 4];
const int srcExpL = sizeof(int) * 4;
var srcExp = ArrayPool<byte>.Shared.Rent(srcExpL);
var srcBytes = BitConverter.GetBytes(pSrc);

while (remaining > 0)
{
for (var i = 0; i < srcExp.Length; ++i)
for (var i = 0; i < srcExpL; ++i)
srcExp[i] = srcBytes[i % 4];

if (remaining < length)
Expand All @@ -45,18 +46,17 @@ public void Transform(Span<byte> input, uint pSrc)
{
var sub = i - start;

if (sub % srcExp.Length == 0)
{
var result = _transformer.TransformFinalBlock(srcExp, 0, srcExp.Length);
Array.Copy(result, srcExp, srcExp.Length);
}
if (sub % srcExpL == 0)
_transformer.TransformBlock(srcExp, 0, srcExpL, srcExp, 0);

input[i] ^= srcExp[sub % srcExp.Length];
input[i] ^= srcExp[sub % srcExpL];
}

start += length;
remaining -= length;
length = 0x5B4;
}

ArrayPool<byte>.Shared.Return(srcExp);
}
}
8 changes: 3 additions & 5 deletions src/common/Edelstein.Common.Crypto/ShandaCipher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

public class ShandaCipher
{
public static void EncryptTransform(Span<byte> input)
public static void EncryptTransform(Span<byte> input, int size)
{
var size = input.Length;
for (var i = 0; i < 3; i++)
{
byte a = 0;
Expand All @@ -23,7 +22,7 @@ public static void EncryptTransform(Span<byte> input)
}

a = 0;
for (var j = input.Length; j > 0; j--)
for (var j = size; j > 0; j--)
{
c = input[j - 1];
c = RollLeft(c, 4);
Expand All @@ -37,9 +36,8 @@ public static void EncryptTransform(Span<byte> input)
}
}

public static void DecryptTransform(Span<byte> input)
public static void DecryptTransform(Span<byte> input, int size)
{
var size = input.Length;
for (var i = 0; i < 3; i++)
{
byte a;
Expand Down
13 changes: 13 additions & 0 deletions src/common/Edelstein.Common.Database/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@
"resolved": "8.0.0-rc.1.23419.4",
"contentHash": "zyoB4zblhvpylS9VOmKyBuGH+RjKDsfi0cTB2KRPPDD6tFinpP+vGr3dictaNYLhGUg6jaBmq+2H/WZMCnvGDQ=="
},
"Microsoft.IO.RecyclableMemoryStream": {
"type": "Transitive",
"resolved": "2.3.2",
"contentHash": "Oh1qXXFdJFcHozvb4H6XYLf2W0meZFuG0A+TfapFPj9z5fd4vxiARGEhAaLj/6XWQaMYIv4SH/9Q6H78Hw0E2Q=="
},
"Mono.TextTemplating": {
"type": "Transitive",
"resolved": "2.2.1",
Expand Down Expand Up @@ -271,10 +276,17 @@
"System.Text.Encodings.Web": "7.0.0"
}
},
"edelstein.common.constants": {
"type": "Project",
"dependencies": {
"Edelstein.Protocol.Gameplay": "[1.0.0, )"
}
},
"edelstein.common.gameplay": {
"type": "Project",
"dependencies": {
"Duey.Abstractions": "[2.0.0, )",
"Edelstein.Common.Constants": "[1.0.0, )",
"Edelstein.Common.Utilities": "[1.0.0, )",
"Edelstein.Protocol.Gameplay": "[1.0.0, )",
"Edelstein.Protocol.Services.Server": "[1.0.0, )",
Expand All @@ -288,6 +300,7 @@
"dependencies": {
"Edelstein.Protocol.Utilities": "[1.0.0, )",
"Microsoft.Extensions.Logging.Abstractions": "[7.0.0, )",
"Microsoft.IO.RecyclableMemoryStream": "[2.3.2, )",
"RBush": "[3.2.0, )"
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public virtual Task HandleAttackMob(ISkillContext context, IFieldUser user, IFie
public virtual async Task HandleSkillUse(ISkillContext context, IFieldUser user)
{
await this.HandleSkillUseBasic(context, user);
await this.HandleSkillUseBeginner(context, user);
}

public virtual Task HandleSkillCancel(ISkillContext context, IFieldUser user)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Edelstein.Protocol.Gameplay.Game.Objects;
using Edelstein.Protocol.Gameplay.Game.Objects.Summoned;
using Edelstein.Protocol.Utilities.Spatial;

namespace Edelstein.Common.Gameplay.Game.Combat.Contexts;

Expand All @@ -8,5 +9,7 @@ public record SkillContextSummoned(
SummonedAssistType SummonedAssistType,
int SkillID,
int SkillLevel,
DateTime Expire
bool AllowDuplicate,
DateTime Expire,
IPoint2D Position
);
Loading

0 comments on commit 7fe00f7

Please sign in to comment.