From 2202474541d1f8a1c14d41f403ba7309088e358c Mon Sep 17 00:00:00 2001 From: Mili Date: Thu, 1 Sep 2022 23:09:10 +0800 Subject: [PATCH] update .gitignore --- .gitignore | 5 ++- FunGameServer.Core/FunGameServer.Core.csproj | 17 ++++++- FunGameServer/FunGameServer.csproj | 20 +++++++++ FunGameServer/Models/Entity/ActiveItem.cs | 18 -------- FunGameServer/Models/Entity/ActiveSkill.cs | 29 ------------ FunGameServer/Models/Entity/Character.cs | 42 ------------------ .../Models/Entity/CharacterStatistics.cs | 34 -------------- FunGameServer/Models/Entity/GameStatistics.cs | 35 --------------- FunGameServer/Models/Entity/Item.cs | 19 -------- FunGameServer/Models/Entity/PassiveItem.cs | 18 -------- FunGameServer/Models/Entity/PassiveSkill.cs | 27 ------------ FunGameServer/Models/Entity/Room.cs | 33 -------------- FunGameServer/Models/Entity/Skill.cs | 17 ------- FunGameServer/Models/Entity/Stock.cs | 23 ---------- FunGameServer/Models/Entity/User.cs | 44 ------------------- FunGameServer/Models/Entity/UserStatistics.cs | 35 --------------- FunGameServer/Sockets/ClientSocket.cs | 2 - 17 files changed, 40 insertions(+), 378 deletions(-) delete mode 100644 FunGameServer/Models/Entity/ActiveItem.cs delete mode 100644 FunGameServer/Models/Entity/ActiveSkill.cs delete mode 100644 FunGameServer/Models/Entity/Character.cs delete mode 100644 FunGameServer/Models/Entity/CharacterStatistics.cs delete mode 100644 FunGameServer/Models/Entity/GameStatistics.cs delete mode 100644 FunGameServer/Models/Entity/Item.cs delete mode 100644 FunGameServer/Models/Entity/PassiveItem.cs delete mode 100644 FunGameServer/Models/Entity/PassiveSkill.cs delete mode 100644 FunGameServer/Models/Entity/Room.cs delete mode 100644 FunGameServer/Models/Entity/Skill.cs delete mode 100644 FunGameServer/Models/Entity/Stock.cs delete mode 100644 FunGameServer/Models/Entity/User.cs delete mode 100644 FunGameServer/Models/Entity/UserStatistics.cs diff --git a/.gitignore b/.gitignore index 9491a2f..4771ed3 100644 --- a/.gitignore +++ b/.gitignore @@ -360,4 +360,7 @@ MigrationBackup/ .ionide/ # Fody - auto-generated XML schema -FodyWeavers.xsd \ No newline at end of file +FodyWeavers.xsd + +#FunGameServer.Implement +FunGameServer.Core/Implement/*.cs \ No newline at end of file diff --git a/FunGameServer.Core/FunGameServer.Core.csproj b/FunGameServer.Core/FunGameServer.Core.csproj index 62689ee..120f1db 100644 --- a/FunGameServer.Core/FunGameServer.Core.csproj +++ b/FunGameServer.Core/FunGameServer.Core.csproj @@ -5,10 +5,25 @@ enable enable C:\milimoe\FunGame\bin + FunGameServer + Milimoe + $(AssemblyName) + Milimoe + C:\milimoe\FunGame\bin + 1.0 + 1.0 + + + + embedded + + + + embedded - + diff --git a/FunGameServer/FunGameServer.csproj b/FunGameServer/FunGameServer.csproj index 6d59bc1..336a2e7 100644 --- a/FunGameServer/FunGameServer.csproj +++ b/FunGameServer/FunGameServer.csproj @@ -8,12 +8,32 @@ logo.ico logo.ico C:\milimoe\FunGame\bin + FunGameServer + Milimoe + Milimoe + C:\milimoe\FunGame\bin + 1.0 + 1.0 + + + + embedded + + + + embedded + + + ..\..\FunGame\bin\Debug\net6.0\FunGame.Core.Api.dll + + + True diff --git a/FunGameServer/Models/Entity/ActiveItem.cs b/FunGameServer/Models/Entity/ActiveItem.cs deleted file mode 100644 index 144b53c..0000000 --- a/FunGameServer/Models/Entity/ActiveItem.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FunGame.Models.Entity -{ - public class ActiveItem : Item - { - public ActiveSkill? Skill { get; set; } = null; - - public ActiveItem() - { - Active = true; - } - } -} diff --git a/FunGameServer/Models/Entity/ActiveSkill.cs b/FunGameServer/Models/Entity/ActiveSkill.cs deleted file mode 100644 index 61392f2..0000000 --- a/FunGameServer/Models/Entity/ActiveSkill.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FunGame.Models.Entity -{ - public class ActiveSkill : Skill - { - public decimal MP { get; set; } = 0; - public decimal EP { get; set; } = 0; - public decimal Reference1 { get; set; } = 0; - public decimal Reference2 { get; set; } = 0; - public decimal Reference3 { get; set; } = 0; - public decimal Reference4 { get; set; } = 0; - public decimal Reference5 { get; set; } = 0; - public decimal Reference6 { get; set; } = 0; - public decimal Reference7 { get; set; } = 0; - public decimal Reference8 { get; set; } = 0; - public decimal Reference9 { get; set; } = 0; - public decimal Reference10 { get; set; } = 0; - - public ActiveSkill() - { - Active = true; - } - } -} diff --git a/FunGameServer/Models/Entity/Character.cs b/FunGameServer/Models/Entity/Character.cs deleted file mode 100644 index 04135b3..0000000 --- a/FunGameServer/Models/Entity/Character.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FunGame.Models.Entity -{ - public class Character - { - public int Id { get; set; } - public string Name { get; set; } = ""; - public string FirstName { get; set; } = ""; - public User? User { get; set; } = null; - public CharacterStatistics? Statistics { get; set; } = null; - public int Level { get; set; } = 1; - public decimal EXP { get; set; } - public decimal HP { get; set; } - public decimal MP { get; set; } - public decimal EP { get; set; } - public decimal ATK { get; set; } - public decimal DEF { get; set; } - public decimal PhysicalReduction { get; set; } - public decimal MDF { get; set; } - public decimal HPRecovery { get; set; } = 0; - public decimal MPRecovery { get; set; } = 0; - public decimal EPRecovery { get; set; } = 0; - public decimal SPD { get; set; } - public decimal ATR { get; set; } - public decimal CritRate { get; set; } = 0.05M; - public decimal CritDMG { get; set; } = 1.25M; - public decimal EvadeRate { get; set; } = 0.05M; - public Hashtable? Skills { get; set; } = new Hashtable(); - public Hashtable? Items { get; set; } = new Hashtable(); - - public Character() - { - - } - } -} diff --git a/FunGameServer/Models/Entity/CharacterStatistics.cs b/FunGameServer/Models/Entity/CharacterStatistics.cs deleted file mode 100644 index a611f4b..0000000 --- a/FunGameServer/Models/Entity/CharacterStatistics.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FunGame.Models.Entity -{ - public class CharacterStatistics - { - public int Id { get; set; } - public Character? Character { get; set; } = null; - public Hashtable? DamageStats { get; set; } = new Hashtable(); - public Hashtable? PhysicalDamageStats { get; set; } = new Hashtable(); - public Hashtable? MagicDamageStats { get; set; } = new Hashtable(); - public Hashtable? RealDamageStats { get; set; } = new Hashtable(); - public Hashtable? AvgDamageStats { get; set; } = new Hashtable(); - public Hashtable? AvgLiveRoundStats { get; set; } = new Hashtable(); - public Hashtable? AvgDamageRoundStats { get; set; } = new Hashtable(); - public Hashtable? KillStats { get; set; } = new Hashtable(); - public Hashtable? DeathStats { get; set; } = new Hashtable(); - public Hashtable? AssistStats { get; set; } = new Hashtable(); - public Hashtable? Plays { get; set; } = new Hashtable(); - public Hashtable? Wins { get; set; } = new Hashtable(); - public Hashtable? Loses { get; set; } = new Hashtable(); - public Hashtable? Winrates { get; set; } = new Hashtable(); - - public CharacterStatistics() - { - - } - } -} diff --git a/FunGameServer/Models/Entity/GameStatistics.cs b/FunGameServer/Models/Entity/GameStatistics.cs deleted file mode 100644 index e13409a..0000000 --- a/FunGameServer/Models/Entity/GameStatistics.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FunGame.Models.Entity -{ - public class GameStatistics - { - public int Id { get; set; } - public Room? Room { get; set; } = null; - public string? GameRecord { get; set; } = null; - public string? RunTime { get; set; } = null; - public Hashtable? DamageStats { get; set; } = new Hashtable(); - public Hashtable? PhysicalDamageStats { get; set; } = new Hashtable(); - public Hashtable? MagicDamageStats { get; set; } = new Hashtable(); - public Hashtable? RealDamageStats { get; set; } = new Hashtable(); - public Hashtable? AvgDamageStats { get; set; } = new Hashtable(); - public Hashtable? KillStats { get; set; } = new Hashtable(); - public Hashtable? KillDetailStats { get; set; } = new Hashtable(); - public Hashtable? DeathStats { get; set; } = new Hashtable(); - public Hashtable? DeathDetailStats { get; set; } = new Hashtable(); - public Hashtable? AssistStats { get; set; } = new Hashtable(); - public Hashtable? RatingStats { get; set; } = new Hashtable(); - public Hashtable? EloStats { get; set; } = new Hashtable(); - public Hashtable? RankStats { get; set; } = new Hashtable(); - - public GameStatistics() - { - - } - } -} diff --git a/FunGameServer/Models/Entity/Item.cs b/FunGameServer/Models/Entity/Item.cs deleted file mode 100644 index 11cac8b..0000000 --- a/FunGameServer/Models/Entity/Item.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FunGame.Models.Entity -{ - public abstract class Item - { - public int Id { get; set; } - public string Name { get; set; } = ""; - public string Describe { get; set; } = ""; - public decimal Price { get; set; } - public char Key { get; set; } - public bool Active { get; set; } - public Character? Character { get; set; } = null; - } -} diff --git a/FunGameServer/Models/Entity/PassiveItem.cs b/FunGameServer/Models/Entity/PassiveItem.cs deleted file mode 100644 index 1d88be2..0000000 --- a/FunGameServer/Models/Entity/PassiveItem.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FunGame.Models.Entity -{ - public class PassiveItem : Item - { - public PassiveSkill? Skill { get; set; } = null; - - public PassiveItem() - { - Active = false; - } - } -} diff --git a/FunGameServer/Models/Entity/PassiveSkill.cs b/FunGameServer/Models/Entity/PassiveSkill.cs deleted file mode 100644 index 8dee862..0000000 --- a/FunGameServer/Models/Entity/PassiveSkill.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FunGame.Models.Entity -{ - public class PassiveSkill : Skill - { - public decimal Reference1 { get; set; } = 0; - public decimal Reference2 { get; set; } = 0; - public decimal Reference3 { get; set; } = 0; - public decimal Reference4 { get; set; } = 0; - public decimal Reference5 { get; set; } = 0; - public decimal Reference6 { get; set; } = 0; - public decimal Reference7 { get; set; } = 0; - public decimal Reference8 { get; set; } = 0; - public decimal Reference9 { get; set; } = 0; - public decimal Reference10 { get; set; } = 0; - - public PassiveSkill() - { - Active = false; - } - } -} diff --git a/FunGameServer/Models/Entity/Room.cs b/FunGameServer/Models/Entity/Room.cs deleted file mode 100644 index 9b56d23..0000000 --- a/FunGameServer/Models/Entity/Room.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Security.Policy; -using System.Text; -using System.Threading.Tasks; - -namespace FunGame.Models.Entity -{ - public class Room - { - public int Id { get; set; } - public string Roomid { get; set; } = ""; - public DateTime Time { get; set; } = DateTime.Now; - public Hashtable PlayerList { get; set; } = new Hashtable(); - public User? RoomMaster { get; set; } - public int RoomType { get; set; } - public int RoomState { get; set; } - public GameStatistics? Statistics { get; set; } = null; - - public Room(User? master = null) - { - if (master != null) RoomMaster = master; - } - - public Room(string roomid, User? master = null) - { - Roomid = roomid; - if (master != null) RoomMaster = master; - } - } -} diff --git a/FunGameServer/Models/Entity/Skill.cs b/FunGameServer/Models/Entity/Skill.cs deleted file mode 100644 index 4b150f6..0000000 --- a/FunGameServer/Models/Entity/Skill.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FunGame.Models.Entity -{ - public abstract class Skill - { - public int Id { get; set; } - public string Name { get; set; } = ""; - public string Describe { get; set; } = ""; - public char Key { get; set; } - public bool Active { get; set; } - } -} diff --git a/FunGameServer/Models/Entity/Stock.cs b/FunGameServer/Models/Entity/Stock.cs deleted file mode 100644 index 3587f5f..0000000 --- a/FunGameServer/Models/Entity/Stock.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FunGame.Models.Entity -{ - public class Stock - { - public int Id { get; set; } - public string Name { get; set; } = ""; - public User? User { get; set; } = null; - public Hashtable? Characters { get; set; } = new Hashtable(); - public Hashtable? Items { get; set; } = new Hashtable(); - - public Stock() - { - - } - } -} diff --git a/FunGameServer/Models/Entity/User.cs b/FunGameServer/Models/Entity/User.cs deleted file mode 100644 index 38411a8..0000000 --- a/FunGameServer/Models/Entity/User.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FunGame.Models.Entity -{ - public class User - { - public int Id { get; set; } - public string Userame { get; set; } = ""; - public string Password { get; set; } = ""; - public DateTime RegTime { get; set; } - public DateTime LastTime { get; set; } - public string Email { get; set; } = ""; - public string NickName { get; set; } = ""; - public bool IsAdmin { get; set; } = false; - public bool IsOperator { get; set; } = false; - public bool IsEnable { get; set; } = false; - public int OnlineState { get; set; } = 0; - public string Roomid { get; set; } = ""; - public int Credits { get; set; } = 0; - public int Material { get; set; } = 0; - public UserStatistics? Statistics { get; set; } = null; - public Stock? Stock { get; set; } = null; - - public User() - { - - } - - public User(string username) - { - Userame = username; - } - - public User(string username, string password) - { - Userame = username; - Password = password; - } - } -} diff --git a/FunGameServer/Models/Entity/UserStatistics.cs b/FunGameServer/Models/Entity/UserStatistics.cs deleted file mode 100644 index 9132c53..0000000 --- a/FunGameServer/Models/Entity/UserStatistics.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace FunGame.Models.Entity -{ - public class UserStatistics - { - public int Id { get; set; } - public User? User { get; set; } = null; - public Hashtable? DamageStats { get; set; } = new Hashtable(); - public Hashtable? PhysicalDamageStats { get; set; } = new Hashtable(); - public Hashtable? MagicDamageStats { get; set; } = new Hashtable(); - public Hashtable? RealDamageStats { get; set; } = new Hashtable(); - public Hashtable? AvgDamageStats { get; set; } = new Hashtable(); - public Hashtable? KillStats { get; set; } = new Hashtable(); - public Hashtable? DeathStats { get; set; } = new Hashtable(); - public Hashtable? AssistStats { get; set; } = new Hashtable(); - public Hashtable? Plays { get; set; } = new Hashtable(); - public Hashtable? Wins { get; set; } = new Hashtable(); - public Hashtable? Loses { get; set; } = new Hashtable(); - public Hashtable? Winrates { get; set; } = new Hashtable(); - public Hashtable? RatingStats { get; set; } = new Hashtable(); - public Hashtable? EloStats { get; set; } = new Hashtable(); - public Hashtable? RankStats { get; set; } = new Hashtable(); - - public UserStatistics() - { - - } - } -} diff --git a/FunGameServer/Sockets/ClientSocket.cs b/FunGameServer/Sockets/ClientSocket.cs index 92f46a7..27016ff 100644 --- a/FunGameServer/Sockets/ClientSocket.cs +++ b/FunGameServer/Sockets/ClientSocket.cs @@ -80,8 +80,6 @@ namespace FunGameServer.Sockets { if (msg != "") SocketHelper.WriteLine(SocketHelper.GetPrefix() + "[ 客户端(" + typestring + ")] <- " + msg); - //else - // SocketHelper.WriteLine(SocketHelper.GetPrefix() + "-> [ 客户端(" + typestring + ")]"); return true; } throw new Exception();