-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,418 changed files
with
101,530 additions
and
109,085 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
|
||
<IsPackable>false</IsPackable> | ||
<IsTestProject>true</IsTestProject> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0-preview-24080-01" /> | ||
<PackageReference Include="NUnit" Version="4.0.1" /> | ||
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" /> | ||
<PackageReference Include="NUnit.Analyzers" Version="4.0.1"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference Include="coverlet.collector" Version="6.0.0"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\src\OpenMir2\OpenMir2.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
global using NUnit.Framework; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
using OpenMir2; | ||
using OpenMir2.Packets.ClientPackets; | ||
using System.Text; | ||
|
||
namespace GameSrvTest | ||
{ | ||
public class Tests | ||
{ | ||
[SetUp] | ||
public void Setup() | ||
{ | ||
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); | ||
//MemoryPackFormatterProvider.Register<Ability>(new AbilityFormatter()); | ||
} | ||
|
||
[Test] | ||
public void Test1() | ||
{ | ||
Assert.Pass(); | ||
} | ||
|
||
[Test] | ||
public void EncodeAbility() | ||
{ | ||
byte[] s = new byte[2] { 154, 1 }; | ||
BitConverter.ToUInt16(s); | ||
|
||
Ability ability = new Ability(); | ||
ability.Level = 38; | ||
ability.DC = 4167; | ||
ability.SC = 6411; | ||
ability.MC = 0; | ||
ability.AC = 0; | ||
ability.Exp = 16230; | ||
ability.MaxExp = 2000000; | ||
ability.ExpCount = 0; | ||
ability.ExpMaxCount = 0; | ||
ability.HP = 78; | ||
ability.MP = 128; | ||
ability.MaxHP = 350; | ||
ability.MaxMP = 410; | ||
ability.HandWeight = 46; | ||
ability.MaxHandWeight = 46; | ||
ability.MaxWearWeight = 44; | ||
ability.MaxWeight = 411; | ||
ability.Weight = 89; | ||
ability.WearWeight = 7; | ||
ability.MAC = 2051; | ||
string strs = EDCode.EncodeMessage(ability); | ||
|
||
//^dhgdg`kwhhgdgqivdh?dzihJehcddhknchddDdKjdqodKiig\>d^< | ||
//^dhgdg`kwhhgdgqivdh?dzihJehcddhknchddDdKjdqodKiig\>d^< | ||
Console.WriteLine(strs); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"sdk": { | ||
"version": "7.0.201", | ||
"version": "8.0.0", | ||
"rollForward": "latestMajor", | ||
"allowPrerelease": true | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,34 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- XSD manual extracted from package NLog.Schema: https://www.nuget.org/packages/NLog.Schema--> | ||
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true" throwExceptions="false" protectedLogLevel="Off" protectedLogFile="NlogRecords.log"> | ||
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
autoReload="true" throwExceptions="false" protectedLogLevel="Off" protectedLogFile="NlogRecords.log"> | ||
<!--Nlog内部日志记录为Off关闭。除非纠错,不可以设为Trace否则速度很慢,起码Debug以上--> | ||
<targets async="true"> | ||
<target name="fileTarget" xsi:type="File" fileName="${basedir}/log/${shortdate}.log" | ||
<target name="fileTarget" xsi:type="File" fileName="${basedir}/log/${shortdate}.log" | ||
layout="[${longdate}] | ${level:uppercase=false} | ${message} ${onexception:${exception:format=tostring} ${newline} ${stacktrace} ${newline}" | ||
/> | ||
<!--ColoredConsole彩色控制台 xsi:type="Console"是指定输出到普通控制台--> | ||
<target name="consoleTarget" xsi:type="ColoredConsole" useDefaultRowHighlightingRules="true" layout="[${time}] ${message} ${exception}" bufferSize="2048"> | ||
<highlight-row condition="level == LogLevel.Trace" foregroundColor="DarkGray" /> | ||
<highlight-row condition="level == LogLevel.Debug" foregroundColor="DarkMagenta" /> | ||
<highlight-row condition="level == LogLevel.Info" foregroundColor="Green" /> | ||
<highlight-row condition="level == LogLevel.Warn" foregroundColor="Yellow" /> | ||
<highlight-row condition="level == LogLevel.Error" foregroundColor="Red" /> | ||
<highlight-row condition="level == LogLevel.Fatal" foregroundColor="Magenta" backgroundColor="White" /> | ||
<target name="consoleTarget" xsi:type="ColoredConsole" useDefaultRowHighlightingRules="true" | ||
layout="[${time}] ${message} ${exception}" bufferSize="2048"> | ||
<highlight-row condition="level == LogLevel.Trace" foregroundColor="DarkGray"/> | ||
<highlight-row condition="level == LogLevel.Debug" foregroundColor="DarkMagenta"/> | ||
<highlight-row condition="level == LogLevel.Info" foregroundColor="Green"/> | ||
<highlight-row condition="level == LogLevel.Warn" foregroundColor="Yellow"/> | ||
<highlight-row condition="level == LogLevel.Error" foregroundColor="Red"/> | ||
<highlight-row condition="level == LogLevel.Fatal" foregroundColor="Magenta" backgroundColor="White"/> | ||
</target> | ||
</targets> | ||
<rules> | ||
<!--跳过所有级别的Microsoft组件的日志记录--> | ||
<logger name="Microsoft.*" maxlevel="Info" final="true" /> | ||
<logger name="Microsoft.*" maxlevel="Info" final="true"/> | ||
<!-- BlackHole without writeTo --> | ||
<!--只通过数据库记录日志,这里的*,如果给了name名字,代码里用日志记录的时候,取logger需要把name当做参数--> | ||
<logger name="*" minlevel="Trace" writeTo="fileTarget,consoleTarget" /> | ||
<!--<logger name="*" minlevel="Debug" writeTo="fileTarget,consoleTarget" /> | ||
<logger name="*" minlevel="Trace" writeTo="fileTarget,consoleTarget"/> | ||
<!--<logger name="*" minlevel="Debug" writeTo="fileTarget,consoleTarget" /> | ||
<logger name="*" minlevel="Trace" writeTo="fileTarget,consoleTarget" /> | ||
<logger name="*" minlevel="Warn" writeTo="fileTarget,consoleTarget" /> | ||
<logger name="*" minlevel="Error" writeTo="fileTarget,consoleTarget" />--> | ||
<!--记录致命错误到控制台--> | ||
<logger name="*" minlevel="Fatal" writeTo="fileTarget,consoleTarget" /> | ||
<logger name="*" minlevel="Fatal" writeTo="fileTarget,consoleTarget"/> | ||
</rules> | ||
</nlog> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.