forked from project-redbud/FunGame-Core
Add Club (#23)
This commit is contained in:
parent
d7609de7f6
commit
185fea4b40
27
Entity/System/Club.cs
Normal file
27
Entity/System/Club.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Milimoe.FunGame.Core.Interface.Entity;
|
||||
|
||||
namespace Milimoe.FunGame.Core.Entity
|
||||
{
|
||||
public class Club : BaseEntity
|
||||
{
|
||||
public string Prefix { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
public bool IsNeedApproval { get; set; } = false;
|
||||
public bool IsPublic { get; set; } = false;
|
||||
public decimal ClubPoins { get; set; } = 0M;
|
||||
public User? Master { get; set; }
|
||||
public Dictionary<string, User> Admins { get; set; } = new();
|
||||
public Dictionary<string, User> Members { get; set; } = new();
|
||||
public Dictionary<string, User> Applicants { get; set; } = new();
|
||||
|
||||
public bool Equals(Club other)
|
||||
{
|
||||
return Equals(other);
|
||||
}
|
||||
|
||||
public override bool Equals(IBaseEntity? other)
|
||||
{
|
||||
return other?.Id == Id;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,13 +1,11 @@
|
||||
using System.Collections;
|
||||
|
||||
namespace Milimoe.FunGame.Core.Entity
|
||||
namespace Milimoe.FunGame.Core.Entity
|
||||
{
|
||||
public class Inventory
|
||||
{
|
||||
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 Dictionary<string, Character> Characters { get; set; } = new();
|
||||
public Dictionary<string, Item> Items { get; set; } = new();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
using System.Data;
|
||||
using System.Collections;
|
||||
using Milimoe.FunGame.Core.Interface.Entity;
|
||||
using Milimoe.FunGame.Core.Library.Constant;
|
||||
using Milimoe.FunGame.Core.Library.SQLScript.Entity;
|
||||
using System.Linq;
|
||||
|
||||
namespace Milimoe.FunGame.Core.Entity
|
||||
{
|
||||
@ -12,7 +10,7 @@ namespace Milimoe.FunGame.Core.Entity
|
||||
public override long Id { get => base.Id ; set => base.Id = value; }
|
||||
public string Roomid { get; set; } = "";
|
||||
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||
public Hashtable PlayerList { get; set; } = new Hashtable();
|
||||
public Dictionary<string, User> Players { get; set; } = new();
|
||||
public User? RoomMaster { get; set; }
|
||||
public RoomType RoomType { get; set; }
|
||||
public RoomState RoomState { get; set; }
|
||||
@ -47,12 +45,12 @@ namespace Milimoe.FunGame.Core.Entity
|
||||
|
||||
public bool Equals(Room other)
|
||||
{
|
||||
return other.Id == Id;
|
||||
return Equals(other);
|
||||
}
|
||||
|
||||
public override bool Equals(IBaseEntity? other)
|
||||
{
|
||||
return Equals(other);
|
||||
return other?.Id == Id;
|
||||
}
|
||||
|
||||
private static int GetUserRowIndex(DataSet? DsUser, long UID)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user