mirror of
https://github.com/MikuLeaks/MikuSB.git
synced 2026-06-04 09:03:58 +00:00
Compare commits
24 Commits
v0.3
...
8d6e0d7638
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d6e0d7638 | ||
|
|
5f0de1a9f0 | ||
|
|
069ee6aa2a | ||
|
|
64f977173f | ||
|
|
0e62fcc9b2 | ||
|
|
f4ad74e00d | ||
|
|
ccdfbee828 | ||
|
|
5d0f587fb9 | ||
|
|
94f972ff82 | ||
|
|
1b4f3531d1 | ||
|
|
1cac82d10d | ||
|
|
1e4d93bab1 | ||
|
|
5f92f2c116 | ||
|
|
16d1413cd8 | ||
|
|
00d5f35c30 | ||
|
|
7e45bd8dcb | ||
|
|
ac5762fc42 | ||
|
|
12df57b273 | ||
|
|
c109c82a91 | ||
|
|
d214778af1 | ||
|
|
1fc300300f | ||
|
|
0e408c9dad | ||
|
|
7b6d1a3054 | ||
|
|
8415969ffe |
@@ -16,7 +16,7 @@ public class HttpServerConfig
|
||||
public string BindAddress { get; set; } = "0.0.0.0";
|
||||
public string PublicAddress { get; set; } = "127.0.0.1";
|
||||
public int Port { get; set; } = 21500;
|
||||
public bool EnableLog { get; set; } = true;
|
||||
public bool EnableLog { get; set; } = false;
|
||||
|
||||
public string GetDisplayAddress()
|
||||
{
|
||||
|
||||
@@ -19,6 +19,7 @@ public class CardExcel : ExcelResource
|
||||
[JsonProperty("profile")] public List<List<int>> Profile { get; set; } = [];
|
||||
public List<List<int>> Pieces { get; set; } = [];
|
||||
public List<int> Attribute { get; set; } = [];
|
||||
[JsonProperty("SpineID")] public uint SpineId { get; set; }
|
||||
public override uint GetId()
|
||||
{
|
||||
return Icon;
|
||||
|
||||
41
Common/Data/Excel/NodeConditionExcel.cs
Normal file
41
Common/Data/Excel/NodeConditionExcel.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace MikuSB.Data.Excel;
|
||||
|
||||
// nodecondition.json: NodeConditionId → NodeXCost per sub-node (1-9)
|
||||
[ResourceEntity("nodecondition.json")]
|
||||
public class NodeConditionExcel : ExcelResource
|
||||
{
|
||||
[JsonProperty("ID")] public uint Id { get; set; }
|
||||
|
||||
[JsonProperty("Node1Cost")] public List<List<int>> Node1Cost { get; set; } = [];
|
||||
[JsonProperty("Node2Cost")] public List<List<int>> Node2Cost { get; set; } = [];
|
||||
[JsonProperty("Node3Cost")] public List<List<int>> Node3Cost { get; set; } = [];
|
||||
[JsonProperty("Node4Cost")] public List<List<int>> Node4Cost { get; set; } = [];
|
||||
[JsonProperty("Node5Cost")] public List<List<int>> Node5Cost { get; set; } = [];
|
||||
[JsonProperty("Node6Cost")] public List<List<int>> Node6Cost { get; set; } = [];
|
||||
[JsonProperty("Node7Cost")] public List<List<int>> Node7Cost { get; set; } = [];
|
||||
[JsonProperty("Node8Cost")] public List<List<int>> Node8Cost { get; set; } = [];
|
||||
[JsonProperty("Node9Cost")] public List<List<int>> Node9Cost { get; set; } = [];
|
||||
|
||||
public List<List<int>> GetNodeCost(int subIdx) => subIdx switch
|
||||
{
|
||||
1 => Node1Cost,
|
||||
2 => Node2Cost,
|
||||
3 => Node3Cost,
|
||||
4 => Node4Cost,
|
||||
5 => Node5Cost,
|
||||
6 => Node6Cost,
|
||||
7 => Node7Cost,
|
||||
8 => Node8Cost,
|
||||
9 => Node9Cost,
|
||||
_ => []
|
||||
};
|
||||
|
||||
public override uint GetId() => Id;
|
||||
|
||||
public override void Loaded()
|
||||
{
|
||||
GameData.NodeConditionData[Id] = this;
|
||||
}
|
||||
}
|
||||
35
Common/Data/Excel/SpineExcel.cs
Normal file
35
Common/Data/Excel/SpineExcel.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace MikuSB.Data.Excel;
|
||||
|
||||
// spine.json: SpineId → Node{i}Req (nodecondition ID per master node index)
|
||||
[ResourceEntity("spine.json")]
|
||||
public class SpineExcel : ExcelResource
|
||||
{
|
||||
[JsonProperty("ID")] public uint Id { get; set; }
|
||||
|
||||
[JsonProperty("Node1Req")] public uint Node1Req { get; set; }
|
||||
[JsonProperty("Node2Req")] public uint Node2Req { get; set; }
|
||||
[JsonProperty("Node3Req")] public uint Node3Req { get; set; }
|
||||
[JsonProperty("Node4Req")] public uint Node4Req { get; set; }
|
||||
[JsonProperty("Node5Req")] public uint Node5Req { get; set; }
|
||||
[JsonProperty("Node6Req")] public uint Node6Req { get; set; }
|
||||
|
||||
public uint GetNodeReq(int mastIdx) => mastIdx switch
|
||||
{
|
||||
1 => Node1Req,
|
||||
2 => Node2Req,
|
||||
3 => Node3Req,
|
||||
4 => Node4Req,
|
||||
5 => Node5Req,
|
||||
6 => Node6Req,
|
||||
_ => 0
|
||||
};
|
||||
|
||||
public override uint GetId() => Id;
|
||||
|
||||
public override void Loaded()
|
||||
{
|
||||
GameData.SpineData[Id] = this;
|
||||
}
|
||||
}
|
||||
32
Common/Data/Excel/SupportCardExcel.cs
Normal file
32
Common/Data/Excel/SupportCardExcel.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace MikuSB.Data.Excel;
|
||||
|
||||
[ResourceEntity("support_card.json")]
|
||||
public class SupportCardExcel : ExcelResource
|
||||
{
|
||||
public uint Genre { get; set; }
|
||||
public uint Detail { get; set; }
|
||||
public uint Particular { get; set; }
|
||||
public uint Level { get; set; }
|
||||
public uint Icon { get; set; }
|
||||
public uint ProvideExp { get; set; }
|
||||
[JsonProperty("LevelLimitID")] public int LevelLimitId { get; set; }
|
||||
|
||||
public uint MaxLevel => LevelLimitId switch
|
||||
{
|
||||
1007 => 10,
|
||||
1008 => 13,
|
||||
1009 => 16,
|
||||
_ => 10
|
||||
};
|
||||
|
||||
public ulong TemplateId => GameResourceTemplateId.FromGdpl(Genre, Detail, Particular, Level);
|
||||
|
||||
public override uint GetId() => Icon;
|
||||
|
||||
public override void Loaded()
|
||||
{
|
||||
GameData.SupportCardData.Add(this);
|
||||
}
|
||||
}
|
||||
24
Common/Data/Excel/WeaponSkinExcel.cs
Normal file
24
Common/Data/Excel/WeaponSkinExcel.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace MikuSB.Data.Excel;
|
||||
|
||||
[ResourceEntity("weapon_skin.json")]
|
||||
public class WeaponSkinExcel : ExcelResource
|
||||
{
|
||||
public uint Genre { get; set; }
|
||||
public uint Detail { get; set; }
|
||||
public uint Particular { get; set; }
|
||||
public uint Level { get; set; }
|
||||
public string I18n { get; set; } = "";
|
||||
|
||||
public override uint GetId()
|
||||
{
|
||||
return (uint)I18n.GetHashCode();
|
||||
}
|
||||
|
||||
public override void Loaded()
|
||||
{
|
||||
GameData.WeaponSkinData.Add(GetId(), this);
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,10 @@ public static class GameData
|
||||
public static Dictionary<uint, ArItemExcel> ArItemData { get; private set; } = [];
|
||||
public static Dictionary<uint, ManifestationExcel> ManifestationData { get; private set; } = [];
|
||||
public static Dictionary<uint, Rogue3DDifficultExcel> Rogue3DDifficultData { get; private set; } = [];
|
||||
public static Dictionary<uint, SpineExcel> SpineData { get; private set; } = [];
|
||||
public static Dictionary<uint, NodeConditionExcel> NodeConditionData { get; private set; } = [];
|
||||
public static List<SupportCardExcel> SupportCardData { get; private set; } = [];
|
||||
public static Dictionary<uint, WeaponSkinExcel> WeaponSkinData { get; private set; } = [];
|
||||
}
|
||||
|
||||
public static class GameResourceTemplateId
|
||||
|
||||
@@ -19,14 +19,18 @@ public class CharacterInfo
|
||||
public int Exp { get; set; }
|
||||
public uint Break { get; set; }
|
||||
public int Evolue { get; set; }
|
||||
public uint ProLevel { get; set; }
|
||||
public int Trust { get; set; }
|
||||
public uint WeaponUniqueId { get; set; }
|
||||
public uint SkinId { get; set; }
|
||||
public uint WeaponSkinId { get; set; }
|
||||
public ItemFlagEnum Flag { get; set; } = ItemFlagEnum.FLAG_READED;
|
||||
public uint Expiration { get; set; }
|
||||
[SugarColumn(IsJson = true)] public List<uint> UnlockedSkin { get; set; } = [];
|
||||
[SugarColumn(IsJson = true)] public List<uint> Spines { get; set; } = [];
|
||||
[SugarColumn(IsJson = true)] public List<uint> Affixs { get; set; } = [];
|
||||
// Key = EqSlot (= support card Detail), Value = support card UniqueId
|
||||
[SugarColumn(IsJson = true)] public Dictionary<uint, uint> SupportSlots { get; set; } = [];
|
||||
public long Timestamp { get; set; }
|
||||
public uint Count { get; set; } = 1;
|
||||
|
||||
@@ -45,6 +49,7 @@ public class CharacterInfo
|
||||
Exp = ToUInt32(Exp),
|
||||
Break = Break,
|
||||
Evolue = ToUInt32(Evolue),
|
||||
ProLevel = ProLevel,
|
||||
Trust = ToUInt32(Trust)
|
||||
}
|
||||
};
|
||||
@@ -53,6 +58,9 @@ public class CharacterInfo
|
||||
|
||||
proto.Slots[4] = WeaponUniqueId;
|
||||
proto.Slots[5] = SkinId;
|
||||
proto.Slots[6] = WeaponSkinId;
|
||||
foreach (var (slot, uid) in SupportSlots)
|
||||
proto.Slots[slot] = uid;
|
||||
|
||||
return proto;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,9 @@ public class InventoryData : BaseDatabaseDataHelper
|
||||
|
||||
[SugarColumn(IsJson = true)]
|
||||
public Dictionary<uint, GameSkinInfo> Skins { get; set; } = []; // Key: UniqueId
|
||||
|
||||
[SugarColumn(IsJson = true)]
|
||||
public Dictionary<uint, GameSupportCardInfo> SupportCards { get; set; } = []; // Key: UniqueId
|
||||
}
|
||||
|
||||
public class BaseGameItemInfo
|
||||
@@ -26,24 +29,29 @@ public class BaseGameItemInfo
|
||||
public uint ItemCount { get; set; }
|
||||
public ItemTypeEnum ItemType { get; set; }
|
||||
public ItemFlagEnum Flag { get; set; } = ItemFlagEnum.FLAG_READED;
|
||||
public uint Level { get; set; }
|
||||
public uint Exp { get; set; }
|
||||
|
||||
public virtual Item ToProto()
|
||||
{
|
||||
return new Item
|
||||
var proto = new Item
|
||||
{
|
||||
Id = UniqueId,
|
||||
Template = TemplateId,
|
||||
Count = ItemCount,
|
||||
Flag = (uint)Flag
|
||||
};
|
||||
if (Level > 0 || Exp > 0)
|
||||
proto.Enhance = new Enhance { Level = Level, Exp = Exp };
|
||||
return proto;
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class GrowableItemInfo : BaseGameItemInfo
|
||||
{
|
||||
public bool IsLocked { get; set; }
|
||||
public uint Level { get; set; }
|
||||
public uint Exp { get; set; }
|
||||
public new uint Level { get; set; }
|
||||
public new uint Exp { get; set; }
|
||||
public uint Break { get; set; }
|
||||
public uint EquipAvatarId { get; set; }
|
||||
}
|
||||
@@ -67,9 +75,10 @@ public class GameWeaponInfo : GrowableItemInfo
|
||||
};
|
||||
return proto;
|
||||
}
|
||||
}public class GameSkinInfo : BaseGameItemInfo
|
||||
}
|
||||
public class GameSkinInfo : BaseGameItemInfo
|
||||
{
|
||||
public uint Level { get; set; }
|
||||
public uint SkinType { get; set; }
|
||||
public override Item ToProto()
|
||||
{
|
||||
var proto = new Item
|
||||
@@ -79,6 +88,30 @@ public class GameWeaponInfo : GrowableItemInfo
|
||||
Count = ItemCount,
|
||||
Flag = (uint)Flag,
|
||||
};
|
||||
proto.Slots[11] = SkinType;
|
||||
return proto;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class GameSupportCardInfo : BaseGameItemInfo
|
||||
{
|
||||
public uint AffixId { get; set; }
|
||||
public override Item ToProto()
|
||||
{
|
||||
var proto = new Item
|
||||
{
|
||||
Id = UniqueId,
|
||||
Template = TemplateId,
|
||||
Count = ItemCount,
|
||||
Flag = (uint)Flag,
|
||||
Enhance = new Enhance
|
||||
{
|
||||
Level = Level,
|
||||
Exp = Exp
|
||||
}
|
||||
};
|
||||
proto.Slots[1] = AffixId;
|
||||
return proto;
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,8 @@ namespace MikuSB.Database.Player;
|
||||
[SugarTable("Player")]
|
||||
public class PlayerGameData : BaseDatabaseDataHelper
|
||||
{
|
||||
public const string DefaultDisplayName = "Miku";
|
||||
|
||||
public string? Name { get; set; } = "";
|
||||
public string? Signature { get; set; } = "MikuPS";
|
||||
public uint Level { get; set; } = 100;
|
||||
@@ -16,6 +18,7 @@ public class PlayerGameData : BaseDatabaseDataHelper
|
||||
public Sex Gender { get; set; } = Sex.Female;
|
||||
public uint Vigor { get; set; } = 240;
|
||||
[SugarColumn(IsJson = true)] public List<PlayerAttr> Attrs { get; set; } = [];
|
||||
[SugarColumn(IsJson = true)] public List<PlayerStrAttr> StrAttrs { get; set; } = [];
|
||||
[SugarColumn(IsJson = true)] public List<ulong> ShowItems { get; set; } = [];
|
||||
|
||||
public static PlayerGameData? GetPlayerByUid(long uid)
|
||||
@@ -24,13 +27,30 @@ public class PlayerGameData : BaseDatabaseDataHelper
|
||||
return result;
|
||||
}
|
||||
|
||||
public static string NormalizeDisplayName(string? name)
|
||||
{
|
||||
var normalized = name?.Trim();
|
||||
return string.IsNullOrWhiteSpace(normalized) ? DefaultDisplayName : normalized;
|
||||
}
|
||||
|
||||
public bool EnsureDisplayName()
|
||||
{
|
||||
var normalized = NormalizeDisplayName(Name);
|
||||
if (string.Equals(Name, normalized, StringComparison.Ordinal))
|
||||
return false;
|
||||
|
||||
Name = normalized;
|
||||
return true;
|
||||
}
|
||||
|
||||
public PlayerProfile ToProfileProto()
|
||||
{
|
||||
var displayName = NormalizeDisplayName(Name);
|
||||
var proto = new PlayerProfile
|
||||
{
|
||||
Pid = (uint)Uid,
|
||||
Account = Name,
|
||||
Name = Name,
|
||||
Account = displayName,
|
||||
Name = displayName,
|
||||
Level = Level,
|
||||
Sex = Gender,
|
||||
Sign = Signature,
|
||||
@@ -45,4 +65,11 @@ public class PlayerAttr
|
||||
public uint Gid { get; set; }
|
||||
public uint Sid { get; set; }
|
||||
public uint Val { get; set; }
|
||||
}
|
||||
|
||||
public class PlayerStrAttr
|
||||
{
|
||||
public uint Gid { get; set; }
|
||||
public uint Sid { get; set; }
|
||||
public string Val { get; set; } = "";
|
||||
}
|
||||
@@ -35,6 +35,9 @@ public class ServerTextCHS
|
||||
/// </summary>
|
||||
public class WordTextCHS
|
||||
{
|
||||
public string WeaponSkin => "武器皮肤";
|
||||
public string SupportCard => "支援卡";
|
||||
public string Weapon => "武器";
|
||||
public string Rank => "星魂";
|
||||
public string Avatar => "角色";
|
||||
public string Material => "材料";
|
||||
@@ -218,11 +221,13 @@ public class GirlTextCHS
|
||||
|
||||
public string Usage =>
|
||||
"用法: /girl add <detail/-1> -p<particular> -l<level> -s<star>\n" +
|
||||
"用法: /girl level <guid/-1> <level>";
|
||||
"用法: /girl level <guid/-1> <level>\n" +
|
||||
"用法: /girl neuronic <guid/-1> <level>";
|
||||
|
||||
public string NotFound => "角色不存在!";
|
||||
public string Added => "已为玩家添加 {0} 个角色!";
|
||||
public string UpdateLevel => "已将 {1} 个角色等级设置为 {0}!";
|
||||
public string UpdateNeuronicLevel => "已将 {1} 个角色的神经元等级设置为 {0}!";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -230,11 +235,13 @@ public class GirlTextCHS
|
||||
/// </summary>
|
||||
public class GiveAllTextCHS
|
||||
{
|
||||
public string Desc => "给玩家所有物品\n" +
|
||||
"备注: -1 代表全部";
|
||||
public string Usage => "用法: /giveall weapon <detail/-1> -p<particular> -l<level>";
|
||||
public string WeaponNotFound => "找不到武器!";
|
||||
public string WeaponAdded => "已添加 {0} 把武器给玩家!";
|
||||
public string Desc => "给予玩家所有物品\n" +
|
||||
"注意:-1 表示全部";
|
||||
public string Usage => "用法:/giveall weapon <detail/-1> -p<特定> -l<等級>\n" +
|
||||
"用法:/giveall weaponskin <detail/-1> -p<特定>\n" +
|
||||
"用法:/giveall card <detail/-1> -p<特定> -l<等級>";
|
||||
public string NotFound => "未找到 {0}!";
|
||||
public string GiveAllItems => "已向玩家添加 {0} 个 {1}!";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -35,6 +35,9 @@ public class ServerTextCHT
|
||||
/// </summary>
|
||||
public class WordTextCHT
|
||||
{
|
||||
public string WeaponSkin => "武器外觀";
|
||||
public string SupportCard => "支援卡";
|
||||
public string Weapon => "武器";
|
||||
public string Rank => "星魂";
|
||||
public string Avatar => "角色";
|
||||
public string Material => "材料";
|
||||
@@ -218,11 +221,13 @@ public class GirlTextCHT
|
||||
|
||||
public string Usage =>
|
||||
"用法: /girl add <detail/-1> -p<particular> -l<level> -s<star>\n" +
|
||||
"用法: /girl level <guid/-1> <level>";
|
||||
"用法: /girl level <guid/-1> <level>\n" +
|
||||
"用法: /girl neuronic <guid/-1> <level>";
|
||||
|
||||
public string NotFound => "角色不存在!";
|
||||
public string Added => "已為玩家新增 {0} 個角色!";
|
||||
public string UpdateLevel => "已將 {1} 個角色等級設為 {0}!";
|
||||
public string UpdateNeuronicLevel => "已將 {1} 個角色的神經元等級設置為 {0}!";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -230,11 +235,13 @@ public class GirlTextCHT
|
||||
/// </summary>
|
||||
public class GiveAllTextCHT
|
||||
{
|
||||
public string Desc => "給玩家所有物品\n" +
|
||||
"備註: -1 代表全部";
|
||||
public string Usage => "用法: /giveall weapon <detail/-1> -p<particular> -l<level>";
|
||||
public string WeaponNotFound => "找不到武器!";
|
||||
public string WeaponAdded => "已添加 {0} 把武器給玩家!";
|
||||
public string Desc => "給予玩家所有物品\n" +
|
||||
"注意:-1 表示全部";
|
||||
public string Usage => "用法:/giveall weapon <detail/-1> -p<特定> -l<等級>\n" +
|
||||
"用法:/giveall weaponskin <detail/-1> -p<特定>\n" +
|
||||
"用法:/giveall card <detail/-1> -p<特定> -l<等級>";
|
||||
public string NotFound => "未找到 {0}!";
|
||||
public string GiveAllItems => "已向玩家添加 {0} 個 {1}!";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -35,10 +35,10 @@ public class ServerTextEN
|
||||
/// </summary>
|
||||
public class WordTextEN
|
||||
{
|
||||
public string Star => "Star";
|
||||
public string WeaponSkin => "Weapon Skin";
|
||||
public string Valk => "Valkyrie";
|
||||
public string Material => "Material";
|
||||
public string Stigmata => "Stigmata";
|
||||
public string SupportCard => "Support Card";
|
||||
public string Weapon => "Weapon";
|
||||
public string Banner => "Gacha";
|
||||
public string Activity => "Activity";
|
||||
@@ -187,11 +187,13 @@ public class GirlTextEN
|
||||
|
||||
public string Usage =>
|
||||
"Usage: /girl add <detail/-1> -p<particular> -l<level> -s<star>\n" +
|
||||
"Usage: /girl level <guid/-1> <level>";
|
||||
"Usage: /girl level <guid/-1> <level>\n" +
|
||||
"Usage: /girl neuronic <guid/-1> <level>";
|
||||
|
||||
public string NotFound => "Character not found!";
|
||||
public string Added => "Granted {0} character(s) to player!";
|
||||
public string UpdateLevel => "Set {1} character(s) to level {0}!";
|
||||
public string UpdateNeuronicLevel => "Set {1} character(s) Neuronic to level {0}!";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -201,9 +203,11 @@ public class GiveAllTextEN
|
||||
{
|
||||
public string Desc => "Give all items to player\n"+
|
||||
"Note: -1 means all";
|
||||
public string Usage => "Usage: /giveall weapon <detail/-1> -p<particular> -l<level>";
|
||||
public string WeaponNotFound => "Weapon not found!";
|
||||
public string WeaponAdded => "Added {0} weapon(s) to player!";
|
||||
public string Usage => "Usage: /giveall weapon <detail/-1> -p<particular> -l<level>\n" +
|
||||
"Usage: /giveall weaponskin <detail/-1> -p<particular>\n" +
|
||||
"Usage: /giveall card <detail/-1> -p<particular> -l<level>";
|
||||
public string NotFound => "{0} not found!";
|
||||
public string GiveAllItems => "Added {0} {1} to player!";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -84,4 +84,49 @@ public class CommandGirl : ICommands
|
||||
level.ToString(),
|
||||
girls.Count.ToString()));
|
||||
}
|
||||
|
||||
[CommandMethod("neuronic")]
|
||||
public async ValueTask UpdateNeuronicLevel(CommandArg arg)
|
||||
{
|
||||
if (!await arg.CheckOnlineTarget()) return;
|
||||
if (!await arg.CheckArgCnt(2)) return;
|
||||
|
||||
var guid = arg.GetInt(0);
|
||||
var level = Math.Clamp(arg.GetInt(1), 0, 6);
|
||||
var player = arg.Target!.Player!;
|
||||
List<CharacterInfo> girls = [];
|
||||
|
||||
List<uint> spines = new List<uint>();
|
||||
for (int i = 0; i < 6; i++)
|
||||
spines.Add(i < level ? 511u : 0u);
|
||||
|
||||
uint proLevel = (uint)(spines.Count(x => x == 511) / 2);
|
||||
|
||||
if (guid == -1)
|
||||
{
|
||||
foreach (var girl in player.CharacterManager.CharacterData.Characters)
|
||||
{
|
||||
girl.Spines = spines;
|
||||
girl.ProLevel = proLevel;
|
||||
girls.Add(girl);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var girl = player.CharacterManager.GetCharacterByGUID((uint)guid);
|
||||
if (girl == null)
|
||||
{
|
||||
await arg.SendMsg(I18NManager.Translate("Game.Command.Girl.NotFound"));
|
||||
return;
|
||||
}
|
||||
girl.Spines = spines;
|
||||
girl.ProLevel = proLevel;
|
||||
girls.Add(girl);
|
||||
}
|
||||
|
||||
if (girls.Count > 0) await player.SendPacket(new PacketNtfCallScript(girls));
|
||||
await arg.SendMsg(I18NManager.Translate("Game.Command.Girl.UpdateNeuronicLevel",
|
||||
level.ToString(),
|
||||
girls.Count.ToString()));
|
||||
}
|
||||
}
|
||||
@@ -36,12 +36,82 @@ public class CommandGiveAll : ICommands
|
||||
var weapon = await player.InventoryManager!.AddWeaponItem(ItemTypeEnum.TYPE_WEAPON, (uint)detail,(uint)particular,1,(uint)level,false);
|
||||
if (weapon == null)
|
||||
{
|
||||
await arg.SendMsg(I18NManager.Translate("Game.Command.GiveAll.WeaponNotFound"));
|
||||
await arg.SendMsg(I18NManager.Translate("Game.Command.GiveAll.NotFound", I18NManager.Translate("Word.Weapon")));
|
||||
return;
|
||||
}
|
||||
weapons.Add(weapon);
|
||||
}
|
||||
if (weapons.Count > 0) await player.SendPacket(new PacketNtfCallScript(weapons));
|
||||
await arg.SendMsg(I18NManager.Translate("Game.Command.GiveAll.WeaponAdded", weapons.Count.ToString()));
|
||||
await arg.SendMsg(I18NManager.Translate("Game.Command.GiveAll.GiveAllItems",
|
||||
I18NManager.Translate("Word.Weapon"), weapons.Count.ToString()));
|
||||
}
|
||||
|
||||
[CommandMethod("card")]
|
||||
public async ValueTask GiveAllSupportCard(CommandArg arg)
|
||||
{
|
||||
if (!await arg.CheckOnlineTarget()) return;
|
||||
if (await arg.GetOption('p') is not int particular) return;
|
||||
if (await arg.GetOption('l') is not int level) return;
|
||||
|
||||
var detail = arg.GetInt(0);
|
||||
var player = arg.Target!.Player!;
|
||||
List<GameSupportCardInfo> supportCards = [];
|
||||
if (detail == -1)
|
||||
{
|
||||
// add all
|
||||
foreach (var config in GameData.SupportCardData)
|
||||
{
|
||||
var supportCard = await player.InventoryManager!
|
||||
.AddSupportCardItem(config.Detail, config.Particular, config.Level, (uint)level, false);
|
||||
if (supportCard != null) supportCards.Add(supportCard);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var supportCard = await player.InventoryManager!.AddSupportCardItem((uint)detail, (uint)particular, 1, (uint)level, false);
|
||||
if (supportCard == null)
|
||||
{
|
||||
await arg.SendMsg(I18NManager.Translate("Game.Command.GiveAll.NotFound", I18NManager.Translate("Word.SupportCard")));
|
||||
return;
|
||||
}
|
||||
supportCards.Add(supportCard);
|
||||
}
|
||||
if (supportCards.Count > 0) await player.SendPacket(new PacketNtfCallScript(supportCards));
|
||||
await arg.SendMsg(I18NManager.Translate("Game.Command.GiveAll.GiveAllItems",
|
||||
I18NManager.Translate("Word.SupportCard"), supportCards.Count.ToString()));
|
||||
}
|
||||
|
||||
[CommandMethod("weaponskin")]
|
||||
public async ValueTask GiveAllWeaponSkin(CommandArg arg)
|
||||
{
|
||||
if (!await arg.CheckOnlineTarget()) return;
|
||||
if (await arg.GetOption('p') is not int particular) return;
|
||||
|
||||
var detail = arg.GetInt(0);
|
||||
var player = arg.Target!.Player!;
|
||||
List<BaseGameItemInfo> weaponSkins = [];
|
||||
if (detail == -1)
|
||||
{
|
||||
// add all
|
||||
foreach (var config in GameData.WeaponSkinData.Values)
|
||||
{
|
||||
var weaponSkin = await player.InventoryManager!
|
||||
.AddWeaponSkinItem((ItemTypeEnum)config.Genre, config.Detail, config.Particular, 1, false);
|
||||
if (weaponSkin != null) weaponSkins.Add(weaponSkin);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var weaponSkin = await player.InventoryManager!.AddWeaponSkinItem(ItemTypeEnum.TYPE_WEAPON, (uint)detail, (uint)particular, 1, false);
|
||||
if (weaponSkin == null)
|
||||
{
|
||||
await arg.SendMsg(I18NManager.Translate("Game.Command.GiveAll.NotFound", I18NManager.Translate("Word.WeaponSkin")));
|
||||
return;
|
||||
}
|
||||
weaponSkins.Add(weaponSkin);
|
||||
}
|
||||
if (weaponSkins.Count > 0) await player.SendPacket(new PacketNtfCallScript(weaponSkins));
|
||||
await arg.SendMsg(I18NManager.Translate("Game.Command.GiveAll.GiveAllItems",
|
||||
I18NManager.Translate("Word.WeaponSkin"), weaponSkins.Count.ToString()));
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,7 @@ public class CharacterManager(PlayerInstance player) : BasePlayerManager(player)
|
||||
var weaponInfo = await Player.InventoryManager!.AddWeaponItem((ItemTypeEnum)CharacterExcel.DefaultWeaponGPDL[0], CharacterExcel.DefaultWeaponGPDL[1], CharacterExcel.DefaultWeaponGPDL[2], CharacterExcel.DefaultWeaponGPDL[3],sendPacket:false);
|
||||
if (weaponInfo != null) character.WeaponUniqueId = weaponInfo.UniqueId;
|
||||
|
||||
var skinInfo = Player.InventoryManager!.GetNormalItemGDPL(ItemTypeEnum.TYPE_CARD_SKIN, detail, particular, level)
|
||||
var skinInfo = Player.InventoryManager!.GetSkinItemGDPL(ItemTypeEnum.TYPE_CARD_SKIN, detail, particular, level)
|
||||
?? await Player.InventoryManager!.AddSkinItem(ItemTypeEnum.TYPE_CARD_SKIN, detail, particular, level, false);
|
||||
if (skinInfo != null) character.SkinId = skinInfo.UniqueId;
|
||||
|
||||
|
||||
@@ -51,27 +51,43 @@ public class InventoryManager(PlayerInstance player) : BasePlayerManager(player)
|
||||
return InventoryData.Weapons.Values.FirstOrDefault(x => x.TemplateId == templateId);
|
||||
}
|
||||
|
||||
public async ValueTask<BaseGameItemInfo?> AddSkinItem(ItemTypeEnum genre, uint detail, uint particular, uint level = 1, bool sendPacket = true)
|
||||
public async ValueTask<GameSkinInfo?> AddSkinItem(ItemTypeEnum genre, uint detail, uint particular, uint level = 1, bool sendPacket = true)
|
||||
{
|
||||
if (genre != ItemTypeEnum.TYPE_CARD_SKIN) return null;
|
||||
var skinData = GameData.CardSkinData.Values.FirstOrDefault(x => x.Genre == (int)genre && x.Detail == detail && x.Particular == particular && x.Level == level);
|
||||
if (skinData == null) return null;
|
||||
|
||||
var templateId = GameResourceTemplateId.FromGdpl((uint)genre,detail,particular,level);
|
||||
var skinInfo = new BaseGameItemInfo
|
||||
var skinInfo = new GameSkinInfo
|
||||
{
|
||||
TemplateId = templateId,
|
||||
UniqueId = InventoryData.NextUniqueUid++,
|
||||
ItemType = ItemTypeEnum.TYPE_CARD_SKIN,
|
||||
ItemCount = 1
|
||||
};
|
||||
InventoryData.Items[skinInfo.UniqueId] = skinInfo;
|
||||
InventoryData.Skins[skinInfo.UniqueId] = skinInfo;
|
||||
|
||||
if (sendPacket) await Player.SendPacket(new PacketNtfCallScript([skinInfo]));
|
||||
|
||||
return skinInfo;
|
||||
}
|
||||
|
||||
public GameSkinInfo? GetSkinItem(uint uniqueId)
|
||||
{
|
||||
return InventoryData.Skins.GetValueOrDefault(uniqueId);
|
||||
}
|
||||
|
||||
public GameSkinInfo? GetSkinItemByTemplateId(ulong templateId)
|
||||
{
|
||||
return InventoryData.Skins.Values.FirstOrDefault(x => x.TemplateId == templateId);
|
||||
}
|
||||
|
||||
public GameSkinInfo? GetSkinItemGDPL(ItemTypeEnum genre, uint detail, uint particular, uint level)
|
||||
{
|
||||
var templateId = GameResourceTemplateId.FromGdpl((uint)genre, detail, particular, level);
|
||||
return InventoryData.Skins.Values.FirstOrDefault(x => x.TemplateId == templateId);
|
||||
}
|
||||
|
||||
public async ValueTask<BaseGameItemInfo?> AddArItem(ItemTypeEnum genre, uint detail, uint particular, uint level = 1, bool sendPacket = true)
|
||||
{
|
||||
if (genre != ItemTypeEnum.TYPE_AR) return null;
|
||||
@@ -94,6 +110,44 @@ public class InventoryManager(PlayerInstance player) : BasePlayerManager(player)
|
||||
return arInfo;
|
||||
}
|
||||
|
||||
public async ValueTask<GameSupportCardInfo?> AddSupportCardItem(uint detail, uint particular, uint level = 1, uint cardLevel = 1, bool sendPacket = true)
|
||||
{
|
||||
const ItemTypeEnum genre = ItemTypeEnum.TYPE_SUPPORT;
|
||||
var spCard = GameData.SupportCardData.FirstOrDefault(x => x.Genre == (int)genre && x.Detail == detail && x.Particular == particular && x.Level == level);
|
||||
if (spCard == null) return null;
|
||||
var templateId = GameResourceTemplateId.FromGdpl((uint)genre, detail, particular, level);
|
||||
cardLevel = Math.Clamp(cardLevel, 1, spCard.MaxLevel);
|
||||
var info = new GameSupportCardInfo
|
||||
{
|
||||
TemplateId = templateId,
|
||||
UniqueId = InventoryData.NextUniqueUid++,
|
||||
ItemType = genre,
|
||||
ItemCount = 1,
|
||||
Level = cardLevel,
|
||||
};
|
||||
InventoryData.SupportCards[info.UniqueId] = info;
|
||||
|
||||
if (sendPacket) await Player.SendPacket(new PacketNtfCallScript([info]));
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
public GameSupportCardInfo? GetSupportCardItem(uint uniqueId)
|
||||
{
|
||||
return InventoryData.SupportCards.GetValueOrDefault(uniqueId);
|
||||
}
|
||||
|
||||
public GameSupportCardInfo? GetSupportCardByTemplateId(ulong templateId)
|
||||
{
|
||||
return InventoryData.SupportCards.Values.FirstOrDefault(x => x.TemplateId == templateId);
|
||||
}
|
||||
|
||||
public GameSupportCardInfo? GetSupportCardItemGDPL(ItemTypeEnum genre, uint detail, uint particular, uint level)
|
||||
{
|
||||
var templateId = GameResourceTemplateId.FromGdpl((uint)genre, detail, particular, level);
|
||||
return InventoryData.SupportCards.Values.FirstOrDefault(x => x.TemplateId == templateId);
|
||||
}
|
||||
|
||||
public async ValueTask<BaseGameItemInfo?> AddManifestationItem(ItemTypeEnum genre, uint detail, uint particular, uint level = 1, bool sendPacket = true)
|
||||
{
|
||||
if (genre != ItemTypeEnum.TYPE_MANIFESTATION) return null;
|
||||
@@ -162,4 +216,26 @@ public class InventoryManager(PlayerInstance player) : BasePlayerManager(player)
|
||||
|
||||
return itemInfo;
|
||||
}
|
||||
|
||||
public async ValueTask<BaseGameItemInfo?> AddWeaponSkinItem(ItemTypeEnum genre, uint detail, uint particular, uint level = 1, bool sendPacket = true)
|
||||
{
|
||||
if (genre != ItemTypeEnum.TYPE_WEAPON_SKIN) return null;
|
||||
var skinData = GameData.WeaponSkinData.Values.FirstOrDefault(x => x.Genre == (int)genre && x.Detail == detail && x.Particular == particular && x.Level == level);
|
||||
if (skinData == null) return null;
|
||||
|
||||
var templateId = GameResourceTemplateId.FromGdpl((uint)genre, detail, particular, level);
|
||||
if (InventoryData.Items.Values.Any(x => x.TemplateId == templateId)) return null;
|
||||
var skinInfo = new BaseGameItemInfo
|
||||
{
|
||||
TemplateId = templateId,
|
||||
UniqueId = InventoryData.NextUniqueUid++,
|
||||
ItemType = ItemTypeEnum.TYPE_WEAPON_SKIN,
|
||||
ItemCount = 1
|
||||
};
|
||||
InventoryData.Items[skinInfo.UniqueId] = skinInfo;
|
||||
|
||||
if (sendPacket) await Player.SendPacket(new PacketNtfCallScript([skinInfo]));
|
||||
|
||||
return skinInfo;
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,7 @@ public class PlayerInstance(PlayerGameData data)
|
||||
{
|
||||
// new player
|
||||
IsNewPlayer = true;
|
||||
Data.Name = AccountData.GetAccountByUid(uid)?.Username;
|
||||
Data.Name = PlayerGameData.NormalizeDisplayName(AccountData.GetAccountByUid(uid)?.Username);
|
||||
|
||||
DatabaseHelper.CreateInstance(Data);
|
||||
|
||||
@@ -134,6 +134,7 @@ public class PlayerInstance(PlayerGameData data)
|
||||
public async ValueTask OnEnterGame()
|
||||
{
|
||||
if (!Initialized) await InitialPlayerManager();
|
||||
Data.EnsureDisplayName();
|
||||
await CharacterManager.RepairCharacterWeapons();
|
||||
await EnsureSupplies();
|
||||
}
|
||||
@@ -225,12 +226,13 @@ public class PlayerInstance(PlayerGameData data)
|
||||
|
||||
public Proto.Player ToPlayerProto()
|
||||
{
|
||||
var displayName = PlayerGameData.NormalizeDisplayName(Data.Name);
|
||||
var proto = new Proto.Player
|
||||
{
|
||||
Pid = (ulong)Data.Uid,
|
||||
Account = Data.Name,
|
||||
Provider = Data.Name,
|
||||
Name = Data.Name,
|
||||
Account = displayName,
|
||||
Provider = displayName,
|
||||
Name = displayName,
|
||||
Level = Data.Level,
|
||||
Sex = Data.Gender,
|
||||
Vigor = Data.Vigor,
|
||||
@@ -259,6 +261,11 @@ public class PlayerInstance(PlayerGameData data)
|
||||
return proto;
|
||||
}
|
||||
|
||||
public void SetDisplayName(string? name)
|
||||
{
|
||||
Data.Name = PlayerGameData.NormalizeDisplayName(name);
|
||||
}
|
||||
|
||||
public void SetShowItem(int index, ulong itemId)
|
||||
{
|
||||
if (index <= 0)
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
using MikuSB.Database;
|
||||
using MikuSB.Proto;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace MikuSB.GameServer.Server.CallGS.Handlers.Girl;
|
||||
|
||||
[CallGSApi("GirlCard_ProLevelPromote")]
|
||||
public class GirlCard_ProLevelPromote : ICallGSHandler
|
||||
{
|
||||
private const uint MaxProLevel = 3;
|
||||
|
||||
public async Task Handle(Connection connection, string param, ushort seqNo)
|
||||
{
|
||||
var player = connection.Player!;
|
||||
var req = JsonSerializer.Deserialize<ProLevelPromoteParam>(param);
|
||||
if (req == null || req.CardId == 0)
|
||||
{
|
||||
await CallGSRouter.SendScript(connection, "GirlCard_ProLevelPromote", "{\"sErr\":\"error.BadParam\"}");
|
||||
return;
|
||||
}
|
||||
|
||||
var card = player.CharacterManager.GetCharacterByGUID((uint)req.CardId);
|
||||
if (card == null)
|
||||
{
|
||||
await CallGSRouter.SendScript(connection, "GirlCard_ProLevelPromote", "{\"sErr\":\"error.BadParam\"}");
|
||||
return;
|
||||
}
|
||||
|
||||
if (card.ProLevel >= MaxProLevel)
|
||||
{
|
||||
await CallGSRouter.SendScript(connection, "GirlCard_ProLevelPromote", "{\"sErr\":\"error.BadParam\"}");
|
||||
return;
|
||||
}
|
||||
|
||||
card.ProLevel++;
|
||||
|
||||
DatabaseHelper.SaveDatabaseType(player.CharacterManager.CharacterData);
|
||||
|
||||
var sync = new NtfSyncPlayer();
|
||||
sync.Items.Add(card.ToProto());
|
||||
|
||||
// s2c callback takes no params — return empty arg
|
||||
await CallGSRouter.SendScript(connection, "GirlCard_ProLevelPromote", "{}", sync);
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ProLevelPromoteParam
|
||||
{
|
||||
[JsonPropertyName("nID")]
|
||||
public int CardId { get; set; }
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Text.Json;
|
||||
using MikuSB.Proto;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Nodes;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
@@ -15,16 +16,35 @@ public class GirlSkin_ChangeSkinType : ICallGSHandler
|
||||
["nType"] = req?.Type ?? 1,
|
||||
["nSkinId"] = req?.SkinId
|
||||
};
|
||||
// TODO change type in proto Item ??
|
||||
await CallGSRouter.SendScript(connection, "GirlSkin_ChangeSkinType", response.ToJsonString());
|
||||
if (req == null)
|
||||
{
|
||||
await CallGSRouter.SendScript(connection, "GirlSkin_ChangeSkinType", response.ToJsonString());
|
||||
return;
|
||||
}
|
||||
|
||||
var player = connection.Player!;
|
||||
var skinData = player.InventoryManager.GetSkinItem(req.SkinId);
|
||||
if (skinData == null)
|
||||
{
|
||||
await CallGSRouter.SendScript(connection, "GirlSkin_ChangeSkinType", response.ToJsonString());
|
||||
return;
|
||||
}
|
||||
|
||||
skinData.SkinType = req.Type;
|
||||
var sync = new NtfSyncPlayer
|
||||
{
|
||||
Items = { skinData.ToProto() }
|
||||
};
|
||||
|
||||
await CallGSRouter.SendScript(connection, "GirlSkin_ChangeSkinType", response.ToJsonString(), sync);
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ChangeSkinTypeParam
|
||||
{
|
||||
[JsonPropertyName("nType")]
|
||||
public int? Type { get; set; }
|
||||
public uint Type { get; set; }
|
||||
|
||||
[JsonPropertyName("nSkinId")]
|
||||
public uint? SkinId { get; set; }
|
||||
public uint SkinId { get; set; }
|
||||
}
|
||||
|
||||
182
GameServer/Server/CallGS/Handlers/Girl/GirlSpine_ChildUnLock.cs
Normal file
182
GameServer/Server/CallGS/Handlers/Girl/GirlSpine_ChildUnLock.cs
Normal file
@@ -0,0 +1,182 @@
|
||||
using MikuSB.Data;
|
||||
using MikuSB.Database;
|
||||
using MikuSB.Database.Player;
|
||||
using MikuSB.Proto;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace MikuSB.GameServer.Server.CallGS.Handlers.Girl;
|
||||
|
||||
// Spine node encoding: (MastIdx << 8) | SubIdx stored as uint in CharacterInfo.Spines
|
||||
// GetStrAttribute(Gid=30, Sid=Detail) stores JSON: { "<Particular>": { "ns": <MastIdx>, "tbn": [0,0], "tbr": [] } }
|
||||
[CallGSApi("GirlSpine_ChildUnLock")]
|
||||
public class GirlSpine_ChildUnLock : ICallGSHandler
|
||||
{
|
||||
private const uint SpineStrAttrGid = 30;
|
||||
|
||||
public async Task Handle(Connection connection, string param, ushort seqNo)
|
||||
{
|
||||
var player = connection.Player!;
|
||||
var req = JsonSerializer.Deserialize<ChildUnLockParam>(param);
|
||||
if (req == null || req.CardId == 0 || req.Info == null || req.Materials == null)
|
||||
{
|
||||
await CallGSRouter.SendScript(connection, "GirlSpine_ChildUnLock", "{\"sErr\":\"error.BadParam\"}");
|
||||
return;
|
||||
}
|
||||
|
||||
var card = player.CharacterManager.GetCharacterByGUID((uint)req.CardId);
|
||||
if (card == null)
|
||||
{
|
||||
await CallGSRouter.SendScript(connection, "GirlSpine_ChildUnLock", "{\"sErr\":\"error.BadParam\"}");
|
||||
return;
|
||||
}
|
||||
|
||||
var mastIdx = req.Info.Indx;
|
||||
var subIdx = req.Info.InSubIdx;
|
||||
if (mastIdx <= 0 || subIdx <= 0)
|
||||
{
|
||||
await CallGSRouter.SendScript(connection, "GirlSpine_ChildUnLock", "{\"sErr\":\"error.BadParam\"}");
|
||||
return;
|
||||
}
|
||||
|
||||
// Spines[MastIdx-1] is a bitmask; bit (SubIdx-1) = 1 means that sub-node is unlocked.
|
||||
// GetSpine(MastIdx, SubIdx) checks (Spines[MastIdx-1] & (1 << (SubIdx-1))) != 0
|
||||
int spineListIdx = mastIdx - 1;
|
||||
uint spineBit = 1u << (subIdx - 1);
|
||||
|
||||
while (card.Spines.Count <= spineListIdx)
|
||||
card.Spines.Add(0);
|
||||
|
||||
if ((card.Spines[spineListIdx] & spineBit) != 0)
|
||||
{
|
||||
await CallGSRouter.SendScript(connection, "GirlSpine_ChildUnLock", "{\"sErr\":\"tip.girlcard_alread_break\"}");
|
||||
return;
|
||||
}
|
||||
|
||||
// Consume materials
|
||||
var requestedMaterials = new Dictionary<ulong, uint>();
|
||||
foreach (var row in req.Materials)
|
||||
{
|
||||
if (row == null || row.Count < 5) continue;
|
||||
var genre = (uint)Math.Max(0, row[0]);
|
||||
var detail = (uint)Math.Max(0, row[1]);
|
||||
var particular = (uint)Math.Max(0, row[2]);
|
||||
var level = (uint)Math.Max(0, row[3]);
|
||||
var count = (uint)Math.Max(0, row[4]);
|
||||
if (genre == 0 || detail == 0 || particular == 0 || level == 0 || count == 0) continue;
|
||||
var tid = GameResourceTemplateId.FromGdpl(genre, detail, particular, level);
|
||||
requestedMaterials[tid] = requestedMaterials.GetValueOrDefault(tid) + count;
|
||||
}
|
||||
|
||||
var syncItems = new List<Item>();
|
||||
foreach (var (tid, count) in requestedMaterials)
|
||||
{
|
||||
var item = player.InventoryManager.InventoryData.Items.Values.FirstOrDefault(x => x.TemplateId == tid);
|
||||
if (item == null || item.ItemCount < count)
|
||||
{
|
||||
await CallGSRouter.SendScript(connection, "GirlSpine_ChildUnLock", "{\"sErr\":\"tip.not_material\"}");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var (tid, count) in requestedMaterials)
|
||||
{
|
||||
var item = player.InventoryManager.InventoryData.Items.Values.First(x => x.TemplateId == tid);
|
||||
item.ItemCount -= count;
|
||||
var proto = item.ToProto();
|
||||
if (item.ItemCount == 0)
|
||||
{
|
||||
player.InventoryManager.InventoryData.Items.Remove(item.UniqueId);
|
||||
proto.Count = 0;
|
||||
}
|
||||
syncItems.Add(proto);
|
||||
}
|
||||
|
||||
// Unlock the spine node by setting the corresponding bit
|
||||
card.Spines[spineListIdx] |= spineBit;
|
||||
syncItems.Add(card.ToProto());
|
||||
|
||||
// Extract Detail and Particular from TemplateId for StrAttr
|
||||
var cardDetail = (uint)((card.TemplateId >> 16) & 0xFFFF);
|
||||
var cardParticular = (uint)((card.TemplateId >> 32) & 0xFFFF);
|
||||
|
||||
// Build and persist StrAttr JSON: { "<particular>": { "ns": mastIdx, "tbn": [0,0], "tbr": [] } }
|
||||
UpdateSpineStrAttr(player.Data, cardDetail, cardParticular, mastIdx);
|
||||
|
||||
DatabaseHelper.SaveDatabaseType(player.InventoryManager.InventoryData);
|
||||
DatabaseHelper.SaveDatabaseType(player.CharacterManager.CharacterData);
|
||||
DatabaseHelper.SaveDatabaseType(player.Data);
|
||||
|
||||
// Send NtfSetStrAttr so client's GetStrAttribute(30, Detail) returns fresh data
|
||||
var strAttrData = GetSpineStrAttrJson(player.Data, cardDetail);
|
||||
var ntfStrAttr = new NtfSetStrAttr { Gid = SpineStrAttrGid, Sid = cardDetail, Val = strAttrData };
|
||||
await connection.Player!.SendPacket(CmdIds.NtfSetStrAttr, ntfStrAttr);
|
||||
|
||||
var sync = new NtfSyncPlayer();
|
||||
sync.Items.AddRange(syncItems);
|
||||
|
||||
var rsp = $"{{\"tb\":{{\"D\":{cardDetail},\"pId\":{req.CardId},\"MastIdx\":{mastIdx},\"SubIdx\":{subIdx}}}}}";
|
||||
await CallGSRouter.SendScript(connection, "GirlSpine_ChildUnLock", rsp, sync);
|
||||
}
|
||||
|
||||
private static void UpdateSpineStrAttr(PlayerGameData data, uint detail, uint particular, int mastIdx)
|
||||
{
|
||||
var existing = data.StrAttrs.FirstOrDefault(x => x.Gid == SpineStrAttrGid && x.Sid == detail);
|
||||
if (existing == null)
|
||||
{
|
||||
existing = new PlayerStrAttr { Gid = SpineStrAttrGid, Sid = detail, Val = "{}" };
|
||||
data.StrAttrs.Add(existing);
|
||||
}
|
||||
|
||||
var root = JsonSerializer.Deserialize<Dictionary<string, SpineStrData>>(existing.Val)
|
||||
?? new Dictionary<string, SpineStrData>();
|
||||
|
||||
var key = particular.ToString();
|
||||
if (!root.TryGetValue(key, out var entry))
|
||||
entry = new SpineStrData();
|
||||
|
||||
entry.Ns = mastIdx;
|
||||
root[key] = entry;
|
||||
|
||||
existing.Val = JsonSerializer.Serialize(root);
|
||||
}
|
||||
|
||||
private static string GetSpineStrAttrJson(PlayerGameData data, uint detail)
|
||||
{
|
||||
var existing = data.StrAttrs.FirstOrDefault(x => x.Gid == SpineStrAttrGid && x.Sid == detail);
|
||||
return existing?.Val ?? "{}";
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class ChildUnLockParam
|
||||
{
|
||||
[JsonPropertyName("pId")]
|
||||
public int CardId { get; set; }
|
||||
|
||||
[JsonPropertyName("tbInfo")]
|
||||
public NodeInfo? Info { get; set; }
|
||||
|
||||
[JsonPropertyName("tbMat")]
|
||||
public List<List<int>> Materials { get; set; } = [];
|
||||
}
|
||||
|
||||
internal sealed class NodeInfo
|
||||
{
|
||||
[JsonPropertyName("Indx")]
|
||||
public int Indx { get; set; }
|
||||
|
||||
[JsonPropertyName("InSubIdx")]
|
||||
public int InSubIdx { get; set; }
|
||||
}
|
||||
|
||||
internal sealed class SpineStrData
|
||||
{
|
||||
[JsonPropertyName("ns")]
|
||||
public int Ns { get; set; } = 0;
|
||||
|
||||
[JsonPropertyName("tbn")]
|
||||
public List<int> Tbn { get; set; } = [0, 0];
|
||||
|
||||
[JsonPropertyName("tbr")]
|
||||
public List<int> Tbr { get; set; } = [];
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
using MikuSB.Data;
|
||||
using MikuSB.Database;
|
||||
using MikuSB.Proto;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace MikuSB.GameServer.Server.CallGS.Handlers.Girl;
|
||||
|
||||
[CallGSApi("GirlSpine_UnlockNodeOneKey")]
|
||||
public class GirlSpine_UnlockNodeOneKey : ICallGSHandler
|
||||
{
|
||||
public async Task Handle(Connection connection, string param, ushort seqNo)
|
||||
{
|
||||
var player = connection.Player!;
|
||||
var req = JsonSerializer.Deserialize<OneKeyUnlockParam>(param);
|
||||
if (req == null || req.CardId == 0 || req.MastIdx <= 0 || req.SubIdxList == null || req.SubIdxList.Count == 0)
|
||||
{
|
||||
await CallGSRouter.SendScript(connection, "GirlSpine_ChildUnLock", "{\"sErr\":\"error.BadParam\"}");
|
||||
return;
|
||||
}
|
||||
|
||||
var card = player.CharacterManager.GetCharacterByGUID((uint)req.CardId);
|
||||
if (card == null)
|
||||
{
|
||||
await CallGSRouter.SendScript(connection, "GirlSpine_ChildUnLock", "{\"sErr\":\"error.BadParam\"}");
|
||||
return;
|
||||
}
|
||||
|
||||
// Look up costs from config: CardExcel → SpineId → SpineExcel → NodeConditionId → NodeConditionExcel
|
||||
var cardTemplateId = card.TemplateId;
|
||||
var cardDetail = (uint)((cardTemplateId >> 16) & 0xFFFF);
|
||||
var cardParticular = (uint)((cardTemplateId >> 32) & 0xFFFF);
|
||||
|
||||
var cardExcel = GameData.CardData.Values.FirstOrDefault(
|
||||
x => x.Detail == cardDetail && x.Particular == cardParticular);
|
||||
|
||||
var requestedMaterials = new Dictionary<ulong, uint>();
|
||||
|
||||
if (cardExcel != null && GameData.SpineData.TryGetValue(cardExcel.SpineId, out var spineExcel))
|
||||
{
|
||||
var nodeCondId = spineExcel.GetNodeReq(req.MastIdx);
|
||||
if (nodeCondId != 0 && GameData.NodeConditionData.TryGetValue(nodeCondId, out var nodeCond))
|
||||
{
|
||||
int spineListIdx = req.MastIdx - 1;
|
||||
while (card.Spines.Count <= spineListIdx) card.Spines.Add(0);
|
||||
var currentMask = card.Spines[spineListIdx];
|
||||
|
||||
foreach (var subIdx in req.SubIdxList)
|
||||
{
|
||||
if (subIdx <= 0) continue;
|
||||
uint bit = 1u << (subIdx - 1);
|
||||
if ((currentMask & bit) != 0) continue; // already unlocked, skip cost
|
||||
|
||||
foreach (var row in nodeCond.GetNodeCost(subIdx))
|
||||
{
|
||||
if (row.Count < 5) continue;
|
||||
var tid = GameResourceTemplateId.FromGdpl(
|
||||
(uint)row[0], (uint)row[1], (uint)row[2], (uint)row[3]);
|
||||
requestedMaterials[tid] = requestedMaterials.GetValueOrDefault(tid) + (uint)row[4];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Validate materials
|
||||
foreach (var (tid, count) in requestedMaterials)
|
||||
{
|
||||
var item = player.InventoryManager.InventoryData.Items.Values.FirstOrDefault(x => x.TemplateId == tid);
|
||||
if (item == null || item.ItemCount < count)
|
||||
{
|
||||
await CallGSRouter.SendScript(connection, "GirlSpine_ChildUnLock", "{\"sErr\":\"tip.not_material\"}");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Consume materials
|
||||
var syncItems = new List<Item>();
|
||||
foreach (var (tid, count) in requestedMaterials)
|
||||
{
|
||||
var item = player.InventoryManager.InventoryData.Items.Values.First(x => x.TemplateId == tid);
|
||||
item.ItemCount -= count;
|
||||
var proto = item.ToProto();
|
||||
if (item.ItemCount == 0)
|
||||
{
|
||||
player.InventoryManager.InventoryData.Items.Remove(item.UniqueId);
|
||||
proto.Count = 0;
|
||||
}
|
||||
syncItems.Add(proto);
|
||||
}
|
||||
|
||||
// Unlock all specified sub-nodes
|
||||
int mastSpineIdx = req.MastIdx - 1;
|
||||
while (card.Spines.Count <= mastSpineIdx) card.Spines.Add(0);
|
||||
foreach (var subIdx in req.SubIdxList)
|
||||
{
|
||||
if (subIdx <= 0) continue;
|
||||
card.Spines[mastSpineIdx] |= 1u << (subIdx - 1);
|
||||
}
|
||||
syncItems.Add(card.ToProto());
|
||||
|
||||
DatabaseHelper.SaveDatabaseType(player.InventoryManager.InventoryData);
|
||||
DatabaseHelper.SaveDatabaseType(player.CharacterManager.CharacterData);
|
||||
|
||||
var sync = new NtfSyncPlayer();
|
||||
sync.Items.AddRange(syncItems);
|
||||
|
||||
// No s2c handler exists for GirlSpine_UnlockNodeOneKey — reuse GirlSpine_ChildUnLock
|
||||
// which calls UI.CloseConnection() and triggers OnNerveNodeUp to refresh the UI.
|
||||
var lastSubIdx = req.SubIdxList.Count > 0 ? req.SubIdxList[^1] : 9;
|
||||
var rsp = $"{{\"tb\":{{\"D\":{cardDetail},\"pId\":{req.CardId},\"MastIdx\":{req.MastIdx},\"SubIdx\":{lastSubIdx}}}}}";
|
||||
await CallGSRouter.SendScript(connection, "GirlSpine_ChildUnLock", rsp, sync);
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class OneKeyUnlockParam
|
||||
{
|
||||
[JsonPropertyName("pId")]
|
||||
public int CardId { get; set; }
|
||||
|
||||
[JsonPropertyName("nIdx")]
|
||||
public int MastIdx { get; set; }
|
||||
|
||||
[JsonPropertyName("tbOneKey")]
|
||||
public List<int> SubIdxList { get; set; } = [];
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using MikuSB.Proto;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Nodes;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace MikuSB.GameServer.Server.CallGS.Handlers.Girl;
|
||||
|
||||
[CallGSApi("GirlWeaponSkin_Change")]
|
||||
public class GirlWeaponSkin_Change : ICallGSHandler
|
||||
{
|
||||
public async Task Handle(Connection connection, string param, ushort seqNo)
|
||||
{
|
||||
var req = JsonSerializer.Deserialize<GirlWeaponSkinParam>(param);
|
||||
if (req == null)
|
||||
{
|
||||
await CallGSRouter.SendScript(connection, "GirlWeaponSkin_Change", "{}");
|
||||
return;
|
||||
}
|
||||
|
||||
var player = connection.Player!;
|
||||
var cardData = player.CharacterManager.GetCharacterByGUID(req.CardId);
|
||||
if (cardData == null) return;
|
||||
var skinData = player.InventoryManager.GetNormalItem(req.SkinId);
|
||||
if (skinData == null)
|
||||
{
|
||||
await CallGSRouter.SendScript(connection, "GirlWeaponSkin_Change", "{\"err\":\"error.BadParam\"}");
|
||||
return;
|
||||
}
|
||||
|
||||
cardData.WeaponSkinId = req.SkinId;
|
||||
var sync = new NtfSyncPlayer
|
||||
{
|
||||
Items = { cardData.ToProto() }
|
||||
};
|
||||
|
||||
await CallGSRouter.SendScript(connection, "GirlWeaponSkin_Change", "{}", sync);
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class GirlWeaponSkinParam
|
||||
{
|
||||
[JsonPropertyName("nCardId")]
|
||||
public uint CardId { get; set; }
|
||||
|
||||
[JsonPropertyName("nSkinId")]
|
||||
public uint SkinId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using MikuSB.Database.Player;
|
||||
using MikuSB.GameServer.Server.CallGS.Handlers.Misc;
|
||||
using MikuSB.Proto;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace MikuSB.GameServer.Server.CallGS.Handlers.Preview;
|
||||
|
||||
[CallGSApi("RecordConfession")]
|
||||
public class RecordConfession : ICallGSHandler
|
||||
{
|
||||
private const int MainSceneGID = 132;
|
||||
public async Task Handle(Connection connection, string param, ushort seqNo)
|
||||
{
|
||||
var req = JsonSerializer.Deserialize<RecordConfessionParam>(param);
|
||||
if (req == null) return;
|
||||
var sid = req.Id + 10;
|
||||
var player = connection.Player!;
|
||||
var attr = player.Data.Attrs
|
||||
.FirstOrDefault(x => x.Gid == MainSceneGID && x.Sid == sid);
|
||||
if (attr == null)
|
||||
{
|
||||
attr = new PlayerAttr
|
||||
{
|
||||
Gid = MainSceneGID,
|
||||
Sid = sid,
|
||||
Val = 1
|
||||
};
|
||||
player.Data.Attrs.Add(attr);
|
||||
}
|
||||
var sync = new NtfSyncPlayer();
|
||||
sync.Custom[player.ToPackedAttrKey(MainSceneGID, sid)] = attr.Val;
|
||||
sync.Custom[player.ToShiftedAttrKey(MainSceneGID, sid)] = attr.Val;
|
||||
await CallGSRouter.SendScript(connection, "RecordConfession", "{}", sync);
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class RecordConfessionParam
|
||||
{
|
||||
[JsonPropertyName("nIdx")]
|
||||
public uint Id { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
using MikuSB.Database;
|
||||
using MikuSB.Proto;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace MikuSB.GameServer.Server.CallGS.Handlers.SupporterCard;
|
||||
|
||||
[CallGSApi("SupporterCard_Equip")]
|
||||
public class SupporterCard_Equip : ICallGSHandler
|
||||
{
|
||||
public async Task Handle(Connection connection, string param, ushort seqNo)
|
||||
{
|
||||
var player = connection.Player!;
|
||||
var req = JsonSerializer.Deserialize<SupporterCardEquipParam>(param);
|
||||
if (req == null || req.CardId == 0 || req.SupportCardUid == 0)
|
||||
{
|
||||
await CallGSRouter.SendScript(connection, "Logistics_Equip", "{}");
|
||||
return;
|
||||
}
|
||||
|
||||
var card = player.CharacterManager.GetCharacterByGUID((uint)req.CardId);
|
||||
if (card == null)
|
||||
{
|
||||
await CallGSRouter.SendScript(connection, "Logistics_Equip", "{}");
|
||||
return;
|
||||
}
|
||||
|
||||
var slot = (uint)req.EqSlot;
|
||||
|
||||
// If an existing card is equipped in this slot and bForce is false, ask for confirmation
|
||||
if (!req.Force && req.CurrentEquippedUid != 0 && card.SupportSlots.TryGetValue(slot, out var existing) && existing != 0)
|
||||
{
|
||||
await CallGSRouter.SendScript(connection, "Logistics_Confirm", "{}");
|
||||
return;
|
||||
}
|
||||
|
||||
// Perform equip
|
||||
card.SupportSlots[slot] = (uint)req.SupportCardUid;
|
||||
|
||||
DatabaseHelper.SaveDatabaseType(player.CharacterManager.CharacterData);
|
||||
|
||||
var sync = new NtfSyncPlayer();
|
||||
sync.Items.Add(card.ToProto());
|
||||
|
||||
// Req_EquipChange (no Model) → Logistics_Change; Req_Equip (has Model) → Logistics_Equip
|
||||
var responseApi = string.IsNullOrEmpty(req.Model) ? "Logistics_Change" : "Logistics_Equip";
|
||||
await CallGSRouter.SendScript(connection, responseApi, "{}", sync);
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class SupporterCardEquipParam
|
||||
{
|
||||
[JsonPropertyName("EqId")]
|
||||
public int CardId { get; set; }
|
||||
|
||||
[JsonPropertyName("beEqId")]
|
||||
public int SupportCardUid { get; set; }
|
||||
|
||||
[JsonPropertyName("EqSlot")]
|
||||
public int EqSlot { get; set; }
|
||||
|
||||
[JsonPropertyName("BEqId")]
|
||||
public int CurrentEquippedUid { get; set; }
|
||||
|
||||
[JsonPropertyName("bForce")]
|
||||
public bool Force { get; set; }
|
||||
|
||||
[JsonPropertyName("Model")]
|
||||
public string? Model { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
using MikuSB.Data;
|
||||
using MikuSB.Database;
|
||||
using MikuSB.Proto;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace MikuSB.GameServer.Server.CallGS.Handlers.SupporterCard;
|
||||
|
||||
[CallGSApi("SupporterCard_Upgrade")]
|
||||
public class SupporterCard_Upgrade : ICallGSHandler
|
||||
{
|
||||
public async Task Handle(Connection connection, string param, ushort seqNo)
|
||||
{
|
||||
var player = connection.Player!;
|
||||
var req = JsonSerializer.Deserialize<SupporterCardUpgradeParam>(param);
|
||||
if (req == null || req.SupportCardUid == 0 || req.Materials == null || req.Materials.Count == 0)
|
||||
{
|
||||
await CallGSRouter.SendScript(connection, "Logistics_Upgrade", "{}");
|
||||
return;
|
||||
}
|
||||
|
||||
var supportCard = player.InventoryManager.InventoryData.Items.GetValueOrDefault((uint)req.SupportCardUid);
|
||||
if (supportCard == null)
|
||||
{
|
||||
await CallGSRouter.SendScript(connection, "Logistics_Upgrade", "{}");
|
||||
return;
|
||||
}
|
||||
|
||||
var supportCardExcel = GameData.SupportCardData.FirstOrDefault(x => x.TemplateId == supportCard.TemplateId);
|
||||
var maxLevel = supportCardExcel?.MaxLevel ?? 10;
|
||||
|
||||
// Validate all materials exist with sufficient count
|
||||
foreach (var mat in req.Materials)
|
||||
{
|
||||
var item = player.InventoryManager.InventoryData.Items.GetValueOrDefault((uint)mat.Id);
|
||||
if (item == null || item.ItemCount < mat.Num)
|
||||
{
|
||||
await CallGSRouter.SendScript(connection, "Logistics_Upgrade", "{}");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Consume materials and accumulate exp
|
||||
var syncItems = new List<Item>();
|
||||
uint gainedExp = 0;
|
||||
|
||||
foreach (var mat in req.Materials)
|
||||
{
|
||||
var item = player.InventoryManager.InventoryData.Items[(uint)mat.Id];
|
||||
|
||||
// Look up ProvideExp: check SupportCardData first, then SuppliesData
|
||||
uint provideExp = 0;
|
||||
var scExcel = GameData.SupportCardData.FirstOrDefault(x => x.TemplateId == item.TemplateId);
|
||||
if (scExcel != null)
|
||||
provideExp = scExcel.ProvideExp;
|
||||
else if (GameData.SuppliesData.TryGetValue((uint)item.TemplateId, out var supExcel))
|
||||
provideExp = supExcel.ProvideExp;
|
||||
gainedExp += provideExp * (uint)mat.Num;
|
||||
|
||||
item.ItemCount -= (uint)mat.Num;
|
||||
var proto = item.ToProto();
|
||||
if (item.ItemCount == 0)
|
||||
{
|
||||
player.InventoryManager.InventoryData.Items.Remove(item.UniqueId);
|
||||
proto.Count = 0;
|
||||
}
|
||||
syncItems.Add(proto);
|
||||
}
|
||||
|
||||
// Apply exp and level up
|
||||
supportCard.Exp += gainedExp;
|
||||
while (supportCard.Level < maxLevel)
|
||||
{
|
||||
var expNeeded = GetExpNeeded(supportCard.Level + 1);
|
||||
if (expNeeded == 0 || supportCard.Exp < expNeeded) break;
|
||||
supportCard.Exp -= expNeeded;
|
||||
supportCard.Level++;
|
||||
}
|
||||
if (supportCard.Level >= maxLevel)
|
||||
{
|
||||
supportCard.Exp = 0;
|
||||
supportCard.Level = maxLevel;
|
||||
}
|
||||
|
||||
syncItems.Add(supportCard.ToProto());
|
||||
|
||||
DatabaseHelper.SaveDatabaseType(player.InventoryManager.InventoryData);
|
||||
|
||||
var sync = new NtfSyncPlayer();
|
||||
sync.Items.AddRange(syncItems);
|
||||
|
||||
await CallGSRouter.SendScript(connection, "Logistics_Upgrade", "{}", sync);
|
||||
}
|
||||
|
||||
private static uint GetExpNeeded(uint level)
|
||||
{
|
||||
if (GameData.UpgradeExpData.TryGetValue((int)level, out var row))
|
||||
return row.SusNeedExp;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class SupporterCardUpgradeParam
|
||||
{
|
||||
[JsonPropertyName("Id")]
|
||||
public int SupportCardUid { get; set; }
|
||||
|
||||
[JsonPropertyName("tbMaterials")]
|
||||
public List<UpgradeMaterial> Materials { get; set; } = [];
|
||||
}
|
||||
|
||||
internal sealed class UpgradeMaterial
|
||||
{
|
||||
[JsonPropertyName("Id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[JsonPropertyName("Num")]
|
||||
public uint Num { get; set; }
|
||||
}
|
||||
@@ -43,6 +43,8 @@ public class HandlerReqLogin : Handler
|
||||
connection.State = SessionStateEnum.WAITING_FOR_LOGIN;
|
||||
var pd = DatabaseHelper.GetInstance<PlayerGameData>(account.Uid);
|
||||
connection.Player = pd == null ? new PlayerInstance(account.Uid) : new PlayerInstance(pd);
|
||||
if (connection.Player.Data.EnsureDisplayName())
|
||||
DatabaseHelper.UpdateInstance(connection.Player.Data);
|
||||
|
||||
connection.DebugFile = Path.Combine(ConfigManager.Config.Path.LogPath, "Debug/", $"{account.Uid}/",
|
||||
$"Debug-{DateTime.Now:yyyy-MM-dd HH-mm-ss}.log");
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using MikuSB.Proto;
|
||||
using Google.Protobuf;
|
||||
using MikuSB.Database;
|
||||
using MikuSB.Proto;
|
||||
|
||||
namespace MikuSB.GameServer.Server.Packet.Recv.Login;
|
||||
|
||||
@@ -7,6 +9,57 @@ public class HandlerReqRename : Handler
|
||||
{
|
||||
public override async Task OnHandle(Connection connection, byte[] data, ushort seqNo)
|
||||
{
|
||||
var player = connection.Player;
|
||||
if (player != null)
|
||||
{
|
||||
var requestedName = ParseDisplayName(data);
|
||||
player.SetDisplayName(requestedName);
|
||||
DatabaseHelper.UpdateInstance(player.Data);
|
||||
await player.OnHeartBeat();
|
||||
}
|
||||
|
||||
await connection.SendPacket(CmdIds.RspRename);
|
||||
}
|
||||
|
||||
private static string? ParseDisplayName(byte[] data)
|
||||
{
|
||||
if (data.Length == 0)
|
||||
return null;
|
||||
|
||||
try
|
||||
{
|
||||
var input = new CodedInputStream(data);
|
||||
while (!input.IsAtEnd)
|
||||
{
|
||||
var tag = input.ReadTag();
|
||||
if (tag == 0)
|
||||
break;
|
||||
|
||||
if (WireFormat.GetTagWireType(tag) == WireFormat.WireType.LengthDelimited)
|
||||
{
|
||||
var value = input.ReadString();
|
||||
if (!string.IsNullOrWhiteSpace(value))
|
||||
return value;
|
||||
}
|
||||
else
|
||||
{
|
||||
input.SkipLastField();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Fall back to raw UTF-8 payload handling below.
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var rawText = System.Text.Encoding.UTF8.GetString(data).Trim('\0', ' ', '\r', '\n', '\t');
|
||||
return string.IsNullOrWhiteSpace(rawText) ? null : rawText;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,6 +53,21 @@ public class PacketNtfCallScript : BasePacket
|
||||
SetData(proto);
|
||||
}
|
||||
|
||||
public PacketNtfCallScript(List<GameSupportCardInfo> cards) : base(CmdIds.NtfScript)
|
||||
{
|
||||
var proto = new NtfCallScript
|
||||
{
|
||||
Api = "",
|
||||
Arg = "{}",
|
||||
ExtraSync = new NtfSyncPlayer
|
||||
{
|
||||
Items = { cards.Select(x => x.ToProto()) }
|
||||
}
|
||||
};
|
||||
|
||||
SetData(proto);
|
||||
}
|
||||
|
||||
public PacketNtfCallScript(InventoryData inventory) : base(CmdIds.NtfScript)
|
||||
{
|
||||
var proto = new NtfCallScript
|
||||
@@ -62,8 +77,10 @@ public class PacketNtfCallScript : BasePacket
|
||||
};
|
||||
|
||||
var extraSync = new NtfSyncPlayer();
|
||||
foreach (var item in inventory.Items.Values) if ((item.TemplateId & 0xFFFF) != 5) extraSync.Items.Add(item.ToProto());
|
||||
foreach (var item in inventory.Items.Values) extraSync.Items.Add(item.ToProto());
|
||||
foreach (var skin in inventory.Skins.Values) extraSync.Items.Add(skin.ToProto());
|
||||
foreach (var weapon in inventory.Weapons.Values) extraSync.Items.Add(weapon.ToProto());
|
||||
foreach (var supportCard in inventory.SupportCards.Values) extraSync.Items.Add(supportCard.ToProto());
|
||||
proto.ExtraSync = extraSync;
|
||||
SetData(proto);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ if (!argsMap.TryGetValue("--package", out var packagePath)
|
||||
}
|
||||
|
||||
argsMap.TryGetValue("--pid", out var pidValue);
|
||||
argsMap.TryGetValue("--resource-package", out var resourcePackagePath);
|
||||
argsMap.TryGetValue("--resource-target", out var resourceTargetDirectory);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -23,6 +25,9 @@ try
|
||||
ZipFile.ExtractToDirectory(packagePath, stagingDirectory, overwriteFiles: true);
|
||||
CopyDirectory(stagingDirectory, targetDirectory);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(resourcePackagePath) && !string.IsNullOrWhiteSpace(resourceTargetDirectory))
|
||||
UpdateResources(resourcePackagePath, resourceTargetDirectory);
|
||||
|
||||
Process.Start(new ProcessStartInfo
|
||||
{
|
||||
FileName = restartExecutable,
|
||||
@@ -88,3 +93,20 @@ static bool ShouldSkip(string relativePath)
|
||||
{
|
||||
return relativePath.StartsWith("Config", StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
static void UpdateResources(string resourcePackagePath, string resourceTargetDirectory)
|
||||
{
|
||||
var resourceStagingDirectory = Path.Combine(Path.GetTempPath(), "MikuSB", "resource-staging", Guid.NewGuid().ToString("N"));
|
||||
Directory.CreateDirectory(resourceStagingDirectory);
|
||||
|
||||
ZipFile.ExtractToDirectory(resourcePackagePath, resourceStagingDirectory, overwriteFiles: true);
|
||||
|
||||
var extractedRoot = Directory.GetDirectories(resourceStagingDirectory).FirstOrDefault() ?? resourceStagingDirectory;
|
||||
var excelOutputSource = Path.Combine(extractedRoot, "ExcelOutput");
|
||||
if (!Directory.Exists(excelOutputSource))
|
||||
throw new DirectoryNotFoundException($"ExcelOutput directory was not found in resource package: {excelOutputSource}");
|
||||
|
||||
var excelOutputTarget = Path.Combine(resourceTargetDirectory, "ExcelOutput");
|
||||
Directory.CreateDirectory(excelOutputTarget);
|
||||
CopyDirectory(excelOutputSource, excelOutputTarget);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<CETCompat>false</CETCompat>
|
||||
<RootNamespace>MikuSB.MikuSB</RootNamespace>
|
||||
<AssemblyName>MikuSB</AssemblyName>
|
||||
<ApplicationIcon>Source\Kiana.ico</ApplicationIcon>
|
||||
<ApplicationIcon>Source\Snowbreak.ico</ApplicationIcon>
|
||||
<SatelliteResourceLanguages>false</SatelliteResourceLanguages>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
Projects="..\MikuSB.Updater\MikuSB.Updater.csproj"
|
||||
Targets="Restore;Publish"
|
||||
RemoveProperties="PublishProfile"
|
||||
Properties="Configuration=$(Configuration);RuntimeIdentifier=$(RuntimeIdentifier);SelfContained=true;PublishSingleFile=true;PublishDir=$(_UpdaterPublishDir)" />
|
||||
Properties="Configuration=$(Configuration);RuntimeIdentifier=$(RuntimeIdentifier);SelfContained=false;PublishSingleFile=true;PublishDir=$(_UpdaterPublishDir)" />
|
||||
|
||||
<Copy
|
||||
SourceFiles="$(_UpdaterPublishDir)MikuSB.Updater.exe"
|
||||
|
||||
@@ -7,6 +7,7 @@ using MikuSB.GameServer.Server.CallGS;
|
||||
using MikuSB.GameServer.Server.Packet;
|
||||
using MikuSB.Internationalization;
|
||||
using MikuSB.MikuSB.Tool;
|
||||
using MikuSB.MikuSB.Update;
|
||||
using MikuSB.Proto;
|
||||
using MikuSB.SdkServer;
|
||||
using MikuSB.TcpSharp;
|
||||
@@ -146,6 +147,7 @@ public class LoaderManager : MikuSB
|
||||
// Load the game data
|
||||
try
|
||||
{
|
||||
await UpdateService.EnsureResourcesPresentAsync();
|
||||
Logger.Info(I18NManager.Translate("Server.ServerInfo.LoadingItem", I18NManager.Translate("Word.GameData")));
|
||||
ResourceManager.LoadGameData();
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<_TargetId>Folder</_TargetId>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<SelfContained>true</SelfContained>
|
||||
<SelfContained>false</SelfContained>
|
||||
<PublishSingleFile>false</PublishSingleFile>
|
||||
<PublishReadyToRun>true</PublishReadyToRun>
|
||||
<PublishTrimmed>false</PublishTrimmed>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 422 KiB |
BIN
MikuSB/Source/Snowbreak.ico
Normal file
BIN
MikuSB/Source/Snowbreak.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 264 KiB |
@@ -1,6 +1,7 @@
|
||||
using System.Diagnostics;
|
||||
using System.Net;
|
||||
using System.Net.Http.Headers;
|
||||
using System.IO.Compression;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using MikuSB.Util;
|
||||
@@ -12,10 +13,20 @@ public static class UpdateService
|
||||
private static readonly Logger Logger = new("Updater");
|
||||
private static readonly bool UpdateEnabled = true;
|
||||
private static readonly bool AskBeforeUpdate = true;
|
||||
private static readonly string RepositoryOwner = "DevilProMT";
|
||||
private static readonly string RepositoryOwner = "MikuLeaks";
|
||||
private static readonly string RepositoryName = "MikuSB";
|
||||
private static readonly string AssetName = "MikuSB-win-x64.zip";
|
||||
private static readonly int TimeoutSeconds = 5;
|
||||
private static readonly int ReleaseCheckTimeoutSeconds = 10;
|
||||
private static readonly int PackageDownloadTimeoutSeconds = 300;
|
||||
private static readonly int ResourceDownloadTimeoutSeconds = 300;
|
||||
private static readonly int ChecksumDownloadTimeoutSeconds = 30;
|
||||
private static readonly string ResourceArchiveUrl =
|
||||
"https://github.com/Kei-Luna/MikuSB-Resource/archive/refs/heads/main.zip";
|
||||
private static readonly string[] RequiredResourceFiles =
|
||||
[
|
||||
"card.json",
|
||||
"weapon.json"
|
||||
];
|
||||
|
||||
public static async Task<bool> TryStartSelfUpdateAsync()
|
||||
{
|
||||
@@ -42,8 +53,9 @@ public static class UpdateService
|
||||
Logger.Info($"Current build version: {BuildVersion.Current}");
|
||||
|
||||
using var client = CreateHttpClient();
|
||||
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(Math.Max(1, TimeoutSeconds)));
|
||||
var release = await GetLatestReleaseAsync(client, cts.Token);
|
||||
using var releaseCts =
|
||||
new CancellationTokenSource(TimeSpan.FromSeconds(Math.Max(1, ReleaseCheckTimeoutSeconds)));
|
||||
var release = await GetLatestReleaseAsync(client, releaseCts.Token);
|
||||
if (release == null)
|
||||
return false;
|
||||
|
||||
@@ -70,14 +82,18 @@ public static class UpdateService
|
||||
|
||||
var packagePath = Path.Combine(tempRoot, asset.Name);
|
||||
Logger.Info($"Downloading update {release.TagName}.");
|
||||
await DownloadFileAsync(client, asset.DownloadUrl, packagePath, cts.Token);
|
||||
await DownloadFileAsync(client, asset.DownloadUrl, packagePath, PackageDownloadTimeoutSeconds);
|
||||
|
||||
var resourcePackagePath = Path.Combine(tempRoot, "MikuSB-Resource-main.zip");
|
||||
Logger.Info("Downloading resource package.");
|
||||
await DownloadFileAsync(client, ResourceArchiveUrl, resourcePackagePath, ResourceDownloadTimeoutSeconds);
|
||||
|
||||
var checksumAsset = release.Assets.FirstOrDefault(x =>
|
||||
string.Equals(x.Name, AssetName + ".sha256", StringComparison.OrdinalIgnoreCase));
|
||||
if (checksumAsset != null)
|
||||
{
|
||||
var checksumPath = Path.Combine(tempRoot, checksumAsset.Name);
|
||||
await DownloadFileAsync(client, checksumAsset.DownloadUrl, checksumPath, cts.Token);
|
||||
await DownloadFileAsync(client, checksumAsset.DownloadUrl, checksumPath, ChecksumDownloadTimeoutSeconds);
|
||||
VerifySha256(packagePath, checksumPath);
|
||||
}
|
||||
|
||||
@@ -90,7 +106,9 @@ public static class UpdateService
|
||||
ArgumentList =
|
||||
{
|
||||
"--package", packagePath,
|
||||
"--resource-package", resourcePackagePath,
|
||||
"--target", AppContext.BaseDirectory,
|
||||
"--resource-target", Path.Combine(AppContext.BaseDirectory, ConfigManager.Config.Path.ResourcePath),
|
||||
"--restart", Path.Combine(AppContext.BaseDirectory, "MikuSB.exe"),
|
||||
"--pid", Environment.ProcessId.ToString()
|
||||
}
|
||||
@@ -112,6 +130,15 @@ public static class UpdateService
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task EnsureResourcesPresentAsync()
|
||||
{
|
||||
if (!AreRequiredResourcesPresent())
|
||||
{
|
||||
Logger.Warn("Required resources are missing. Downloading resource package.");
|
||||
await DownloadAndInstallResourcesAsync();
|
||||
}
|
||||
}
|
||||
|
||||
private static string StageUpdaterExecutable()
|
||||
{
|
||||
var sourceDirectory = AppContext.BaseDirectory;
|
||||
@@ -131,6 +158,44 @@ public static class UpdateService
|
||||
return stagedUpdaterPath;
|
||||
}
|
||||
|
||||
private static bool AreRequiredResourcesPresent()
|
||||
{
|
||||
var excelOutputPath = Path.Combine(AppContext.BaseDirectory, ConfigManager.Config.Path.ResourcePath, "ExcelOutput");
|
||||
if (!Directory.Exists(excelOutputPath))
|
||||
return false;
|
||||
|
||||
return RequiredResourceFiles.All(fileName => File.Exists(Path.Combine(excelOutputPath, fileName)));
|
||||
}
|
||||
|
||||
private static async Task DownloadAndInstallResourcesAsync()
|
||||
{
|
||||
using var client = CreateHttpClient();
|
||||
var tempRoot = Path.Combine(Path.GetTempPath(), "MikuSB", "resources", Guid.NewGuid().ToString("N"));
|
||||
Directory.CreateDirectory(tempRoot);
|
||||
|
||||
var resourcePackagePath = Path.Combine(tempRoot, "MikuSB-Resource-main.zip");
|
||||
await DownloadFileAsync(client, ResourceArchiveUrl, resourcePackagePath, ResourceDownloadTimeoutSeconds);
|
||||
InstallResourcesFromArchive(resourcePackagePath,
|
||||
Path.Combine(AppContext.BaseDirectory, ConfigManager.Config.Path.ResourcePath));
|
||||
}
|
||||
|
||||
private static void InstallResourcesFromArchive(string resourcePackagePath, string resourceTargetDirectory)
|
||||
{
|
||||
var resourceStagingDirectory = Path.Combine(Path.GetTempPath(), "MikuSB", "resource-staging", Guid.NewGuid().ToString("N"));
|
||||
Directory.CreateDirectory(resourceStagingDirectory);
|
||||
|
||||
ZipFile.ExtractToDirectory(resourcePackagePath, resourceStagingDirectory, overwriteFiles: true);
|
||||
|
||||
var extractedRoot = Directory.GetDirectories(resourceStagingDirectory).FirstOrDefault() ?? resourceStagingDirectory;
|
||||
var excelOutputSource = Path.Combine(extractedRoot, "ExcelOutput");
|
||||
if (!Directory.Exists(excelOutputSource))
|
||||
throw new DirectoryNotFoundException($"ExcelOutput directory was not found in resource package: {excelOutputSource}");
|
||||
|
||||
var excelOutputTarget = Path.Combine(resourceTargetDirectory, "ExcelOutput");
|
||||
Directory.CreateDirectory(excelOutputTarget);
|
||||
CopyDirectory(excelOutputSource, excelOutputTarget);
|
||||
}
|
||||
|
||||
private static bool ConfirmUpdate(string latestVersion)
|
||||
{
|
||||
Console.Write($"New version found: {BuildVersion.Current} -> {latestVersion}. Update now? [Y/n]: ");
|
||||
@@ -152,7 +217,7 @@ public static class UpdateService
|
||||
{
|
||||
var client = new HttpClient
|
||||
{
|
||||
Timeout = TimeSpan.FromSeconds(Math.Max(1, TimeoutSeconds))
|
||||
Timeout = Timeout.InfiniteTimeSpan
|
||||
};
|
||||
|
||||
client.DefaultRequestHeaders.UserAgent.Add(
|
||||
@@ -189,14 +254,32 @@ public static class UpdateService
|
||||
HttpClient client,
|
||||
string downloadUrl,
|
||||
string destinationPath,
|
||||
CancellationToken cancellationToken)
|
||||
int timeoutSeconds)
|
||||
{
|
||||
using var response = await client.GetAsync(downloadUrl, HttpCompletionOption.ResponseHeadersRead, cancellationToken);
|
||||
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(Math.Max(1, timeoutSeconds)));
|
||||
using var response = await client.GetAsync(downloadUrl, HttpCompletionOption.ResponseHeadersRead, cts.Token);
|
||||
response.EnsureSuccessStatusCode();
|
||||
|
||||
await using var source = await response.Content.ReadAsStreamAsync(cancellationToken);
|
||||
await using var source = await response.Content.ReadAsStreamAsync(cts.Token);
|
||||
await using var destination = File.Create(destinationPath);
|
||||
await source.CopyToAsync(destination, cancellationToken);
|
||||
await source.CopyToAsync(destination, cts.Token);
|
||||
}
|
||||
|
||||
private static void CopyDirectory(string sourceDirectory, string targetDirectory)
|
||||
{
|
||||
foreach (var directory in Directory.GetDirectories(sourceDirectory, "*", SearchOption.AllDirectories))
|
||||
{
|
||||
var relativePath = Path.GetRelativePath(sourceDirectory, directory);
|
||||
Directory.CreateDirectory(Path.Combine(targetDirectory, relativePath));
|
||||
}
|
||||
|
||||
foreach (var file in Directory.GetFiles(sourceDirectory, "*", SearchOption.AllDirectories))
|
||||
{
|
||||
var relativePath = Path.GetRelativePath(sourceDirectory, file);
|
||||
var destinationPath = Path.Combine(targetDirectory, relativePath);
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(destinationPath)!);
|
||||
File.Copy(file, destinationPath, overwrite: true);
|
||||
}
|
||||
}
|
||||
|
||||
private static void VerifySha256(string packagePath, string checksumPath)
|
||||
|
||||
11020
Proto/Core.cs
Normal file
11020
Proto/Core.cs
Normal file
File diff suppressed because it is too large
Load Diff
302
Proto/Core.proto
302
Proto/Core.proto
@@ -1,302 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package Core;
|
||||
|
||||
option csharp_namespace = "MikuSB.Proto";
|
||||
|
||||
enum Sex {
|
||||
MALE = 0;
|
||||
FEMALE = 1;
|
||||
}
|
||||
|
||||
enum PlayerCoreAttribute {
|
||||
LEVEL = 0;
|
||||
EXP = 1;
|
||||
VIGOR = 2;
|
||||
CHARGED = 3;
|
||||
VIGOR_TIME = 4;
|
||||
}
|
||||
|
||||
enum MailStat {
|
||||
New = 0;
|
||||
Readed = 1;
|
||||
Geted = 2;
|
||||
Removed = 3;
|
||||
}
|
||||
|
||||
enum GlobalMailStat {
|
||||
Default = 0;
|
||||
Banned = 1;
|
||||
Deleted = 2;
|
||||
}
|
||||
|
||||
enum ChatType {
|
||||
SYSTEM = 0;
|
||||
WORLD = 1;
|
||||
FRIEND = 2;
|
||||
ONLINE = 3;
|
||||
}
|
||||
|
||||
message Empty {
|
||||
}
|
||||
|
||||
message SimpleBoolean {
|
||||
bool data = 1;
|
||||
}
|
||||
|
||||
message SimpleUint {
|
||||
uint64 data = 1;
|
||||
}
|
||||
|
||||
message SimpleString {
|
||||
string data = 1;
|
||||
}
|
||||
|
||||
message IDArray {
|
||||
repeated uint64 ids = 1;
|
||||
}
|
||||
|
||||
message StringArray {
|
||||
repeated string list = 1;
|
||||
}
|
||||
|
||||
message PlayerProfileArray {
|
||||
repeated PlayerProfile list = 1;
|
||||
}
|
||||
|
||||
message ChannelOpt {
|
||||
string channel = 1;
|
||||
repeated string subchannels = 2;
|
||||
}
|
||||
|
||||
message SimpleItem {
|
||||
uint32 G = 1;
|
||||
uint32 D = 2;
|
||||
uint32 P = 3;
|
||||
uint32 L = 4;
|
||||
uint32 Count = 5;
|
||||
}
|
||||
|
||||
message Enhance {
|
||||
uint32 level = 1;
|
||||
uint32 exp = 2;
|
||||
uint32 break = 3;
|
||||
uint32 evolue = 4;
|
||||
uint32 trust = 5;
|
||||
uint32 pro_level = 6;
|
||||
repeated uint64 spines = 11;
|
||||
repeated uint32 affixs = 12;
|
||||
}
|
||||
|
||||
message Item {
|
||||
uint64 id = 1;
|
||||
uint64 template = 2;
|
||||
uint32 count = 3;
|
||||
uint32 flag = 4;
|
||||
uint32 userdata = 5;
|
||||
uint32 expiration = 6;
|
||||
Enhance enhance = 7;
|
||||
map<uint32, uint64> slots = 8;
|
||||
}
|
||||
|
||||
message Lineup {
|
||||
uint32 index = 1;
|
||||
string name = 2;
|
||||
uint64 member1 = 3;
|
||||
uint64 member2 = 4;
|
||||
uint64 member3 = 5;
|
||||
}
|
||||
|
||||
message Player {
|
||||
uint64 pid = 1;
|
||||
string account = 2;
|
||||
string provider = 3;
|
||||
string channel = 4;
|
||||
string subchannel = 5;
|
||||
string name = 11;
|
||||
string sign = 12;
|
||||
Sex sex = 13;
|
||||
uint32 level = 14;
|
||||
uint32 exp = 15;
|
||||
uint32 vigor = 16;
|
||||
map<string, int32> money = 17;
|
||||
uint32 charged = 18;
|
||||
uint32 create_time = 31;
|
||||
uint32 last_login_time = 32;
|
||||
uint32 last_vigor_time = 33;
|
||||
uint64 item_id_alloc = 41;
|
||||
repeated Item items = 42;
|
||||
repeated Lineup solutions = 43;
|
||||
map<uint32, uint32> attrs = 44;
|
||||
map<uint32, string> str_attrs = 45;
|
||||
repeated uint64 show_items = 46;
|
||||
repeated uint32 show_attrs = 47;
|
||||
map<uint64, FriendPieces> friend_pieces = 48;
|
||||
uint64 last_pieces = 49;
|
||||
map<uint64, PlayerMail> mail_box = 50;
|
||||
uint32 last_global_mail_time = 51;
|
||||
uint64 last_person_mid = 52;
|
||||
repeated uint64 badges = 53;
|
||||
map<string, PlayerOrder> order_box = 60;
|
||||
repeated uint64 tags = 96;
|
||||
uint64 serial = 97;
|
||||
uint32 ban_type = 98;
|
||||
uint32 ban_expr = 99;
|
||||
}
|
||||
|
||||
message FriendPieces {
|
||||
uint64 index = 1;
|
||||
uint64 pid = 2;
|
||||
uint32 shape = 3;
|
||||
uint32 expr = 4;
|
||||
bool deleted = 5;
|
||||
}
|
||||
|
||||
message PlayerMail {
|
||||
uint64 mid = 1;
|
||||
MailStat stat = 2;
|
||||
uint32 time = 3;
|
||||
uint32 expiration = 4;
|
||||
}
|
||||
|
||||
message Mail {
|
||||
uint64 mid = 1;
|
||||
string title = 2;
|
||||
string message = 3;
|
||||
repeated SimpleItem attachments = 4;
|
||||
string sender = 5;
|
||||
uint64 pid = 6;
|
||||
uint32 time = 7;
|
||||
uint32 expiration = 8;
|
||||
uint32 life = 9;
|
||||
MailStat stat = 10;
|
||||
bool is_deleted = 99;
|
||||
}
|
||||
|
||||
message GlobalMail {
|
||||
uint64 mid = 1;
|
||||
string sender = 2;
|
||||
string title = 3;
|
||||
string message = 4;
|
||||
repeated SimpleItem attachments = 5;
|
||||
uint32 start_time = 6;
|
||||
uint32 end_time = 7;
|
||||
uint32 life = 8;
|
||||
uint32 expiration = 9;
|
||||
uint32 min_level = 10;
|
||||
uint32 max_level = 12;
|
||||
uint32 create_begin = 13;
|
||||
uint32 create_end = 14;
|
||||
repeated ChannelOpt channels = 15;
|
||||
GlobalMailStat stat = 99;
|
||||
}
|
||||
|
||||
message Order {
|
||||
string trade_no = 1;
|
||||
string third_trade_no = 2;
|
||||
uint64 pid = 3;
|
||||
string product_id = 4;
|
||||
uint32 product_quantity = 5;
|
||||
uint32 total_price = 6;
|
||||
uint32 paid_price = 7;
|
||||
string finish_time = 8;
|
||||
bool status = 9;
|
||||
bool refund_status = 10;
|
||||
string refund_time = 11;
|
||||
string subchannel = 12;
|
||||
string priceunit = 13;
|
||||
bool supplement_status = 14;
|
||||
string extendinfo = 15;
|
||||
}
|
||||
|
||||
message PlayerOrder {
|
||||
string trade_no = 1;
|
||||
string subchannel = 2;
|
||||
uint32 done_time = 3;
|
||||
uint32 refund_time = 4;
|
||||
bool is_unreal = 5;
|
||||
uint32 supplement = 6;
|
||||
}
|
||||
|
||||
message PlayerProfile {
|
||||
uint64 pid = 1;
|
||||
string account = 2;
|
||||
uint32 create_time = 3;
|
||||
string name = 4;
|
||||
string sign = 5;
|
||||
Sex sex = 6;
|
||||
uint32 level = 7;
|
||||
uint32 logout_time = 8;
|
||||
uint32 friend_count = 9;
|
||||
repeated Item show_items = 10;
|
||||
repeated uint32 show_attrs = 11;
|
||||
repeated Item badges = 12;
|
||||
repeated uint64 tags = 13;
|
||||
}
|
||||
|
||||
message ClientProfile {
|
||||
uint32 plat_id = 1;
|
||||
string version = 2;
|
||||
string os_version = 3;
|
||||
string os_hardware = 4;
|
||||
string telecom_oper = 5;
|
||||
string network = 6;
|
||||
uint32 screen_width = 7;
|
||||
uint32 screen_height = 8;
|
||||
float density = 9;
|
||||
string cpu_profile = 10;
|
||||
uint32 ram = 11;
|
||||
string gl_render = 12;
|
||||
string gl_version = 13;
|
||||
string device_id = 14;
|
||||
string resource_version = 15;
|
||||
string language = 16;
|
||||
}
|
||||
|
||||
message OnlinePlayer {
|
||||
uint64 pid = 1;
|
||||
string name = 2;
|
||||
uint64 face = 3;
|
||||
uint64 faceframe = 4;
|
||||
uint32 level = 5;
|
||||
Lineup lineup = 6;
|
||||
repeated Item items = 7;
|
||||
bool captain = 8;
|
||||
uint32 stateflag = 9;
|
||||
repeated uint32 girllovelevel = 10;
|
||||
map<uint32, uint32> attrs = 11;
|
||||
}
|
||||
|
||||
message OnlineEndData {
|
||||
uint64 pid = 1;
|
||||
string infodata = 2;
|
||||
uint32 status = 3;
|
||||
}
|
||||
|
||||
message AccountInfo {
|
||||
string account = 1;
|
||||
uint64 pid = 2;
|
||||
uint32 new_guide = 3;
|
||||
repeated uint32 error_info = 4;
|
||||
}
|
||||
|
||||
message ChatMsg {
|
||||
ChatType type = 1;
|
||||
uint32 channel_id = 2;
|
||||
uint64 sender = 3;
|
||||
uint64 recver = 4;
|
||||
uint32 time_stamp = 5;
|
||||
uint64 emoji = 11;
|
||||
string text = 12;
|
||||
PlayerProfile profile = 21;
|
||||
}
|
||||
|
||||
message CustomRoster {
|
||||
uint64 pid = 1;
|
||||
map<string, string> roster = 2;
|
||||
}
|
||||
|
||||
message GlobalAttrs {
|
||||
map<string, uint32> attrs = 1;
|
||||
map<string, string> str_attrs = 2;
|
||||
}
|
||||
10814
Proto/SnowBreak.cs
Normal file
10814
Proto/SnowBreak.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,381 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package snowbreak;
|
||||
|
||||
import "Core.proto";
|
||||
|
||||
option csharp_namespace = "MikuSB.Proto";
|
||||
|
||||
enum PF {
|
||||
NONE = 0;
|
||||
REQ_LOGIN = 1;
|
||||
RSP_LOGIN = 2;
|
||||
REQ_RECONNECT = 3;
|
||||
RSP_RECONNECT = 4;
|
||||
REQ_RENAME = 5;
|
||||
RSP_RENAME = 6;
|
||||
REQ_CALLGS = 7;
|
||||
RSP_CALLGS = 8;
|
||||
REQ_USEITEM = 9;
|
||||
RSP_USEITEM = 10;
|
||||
REQ_READMAIL = 11;
|
||||
RSP_READMAIL = 12;
|
||||
REQ_MAIL_ATTACHMENT = 13;
|
||||
RSP_MAIL_ATTACHMENT = 14;
|
||||
REQ_DELMAIL = 15;
|
||||
RSP_DELMAIL = 16;
|
||||
REQ_SET_NEWGUIDE = 17;
|
||||
RSP_SET_NEWGUIDE = 18;
|
||||
REQ_ACCOUNTINFO = 19;
|
||||
RSP_ACCOUNTINFO = 20;
|
||||
REQ_RESIGN = 23;
|
||||
RSP_RESIGN = 24;
|
||||
REQ_RECORD = 25;
|
||||
RSP_RECORD = 26;
|
||||
REQ_ADD_FRIENDREQ = 27;
|
||||
RSP_ADD_FRIENDREQ = 28;
|
||||
REQ_AGREE_FRIENDREQ = 29;
|
||||
RSP_AGREE_FRIENDREQ = 30;
|
||||
REQ_REFUSE_FRIENDREQ = 31;
|
||||
RSP_REFUSE_FRIENDREQ = 32;
|
||||
REQ_REMOVE_FRIEND = 33;
|
||||
RSP_REMOVE_FRIEND = 34;
|
||||
REQ_GIVE_FRIENDVIGOR = 35;
|
||||
RSP_GIVE_FRIENDVIGOR = 36;
|
||||
REQ_RECV_FRIENDVIGOR = 37;
|
||||
RSP_RECV_FRIENDVIGOR = 38;
|
||||
REQ_PLAYER_RECOMMEND = 39;
|
||||
RSP_PLAYER_RECOMMEND = 40;
|
||||
REQ_ADD_BLOCKLIST = 41;
|
||||
RSP_ADD_BLOCKLIST = 42;
|
||||
REQ_DEL_BLOCKLIST = 43;
|
||||
RSP_DEL_BLOCKLIST = 44;
|
||||
REQ_FIND_PLAYER = 45;
|
||||
RSP_FIND_PLAYER = 46;
|
||||
REQ_PLAYER_PROFILE = 47;
|
||||
RSP_PLAYER_PROFILE = 48;
|
||||
REQ_GET_VERSION = 49;
|
||||
RSP_GET_VERSION = 50;
|
||||
REQ_RANKLIST = 51;
|
||||
RSP_RANKLIST = 52;
|
||||
REQ_RANK = 53;
|
||||
RSP_RANK = 54;
|
||||
REQ_BLOCK_FRIENDREQ = 55;
|
||||
RSP_BLOCK_FRIENDREQ = 56;
|
||||
REQ_WORD_FILTER = 57;
|
||||
RSP_WORD_FILTER = 58;
|
||||
REQ_SET_CUSTOMROSTER = 59;
|
||||
RSP_SET_CUSTOMROSTER = 60;
|
||||
REQ_GLOBALCOUNTER = 61;
|
||||
RSP_GLOBALCOUNTER = 62;
|
||||
REQ_MATCH = 301;
|
||||
RSP_MATCH = 302;
|
||||
REQ_ONLINE_ROOM = 303;
|
||||
RSP_ONLINE_ROOM = 304;
|
||||
REQ_ONLINE_ROOM_START = 305;
|
||||
RSP_ONLINE_ROOM_START = 306;
|
||||
REQ_ONLINE_ROOM_EXIT = 307;
|
||||
RSP_ONLINE_ROOM_EXIT = 308;
|
||||
REQ_ONLINE_ROOM_INVITE = 309;
|
||||
RSP_ONLINE_ROOM_INVITE = 310;
|
||||
REQ_ONLINE_ROOM_ACCEPT = 311;
|
||||
RSP_ONLINE_ROOM_ACCEPT = 312;
|
||||
REQ_ONLINE_ROOM_UPDATE = 313;
|
||||
RSP_ONLINE_ROOM_UPDATE = 314;
|
||||
REQ_ONLINE_ROOM_RECONNECT = 315;
|
||||
RSP_ONLINE_ROOM_RECONNECT = 316;
|
||||
REQ_ONLINE_ROOM_CHATACCEPT = 317;
|
||||
RSP_ONLINE_ROOM_CHATACCEPT = 318;
|
||||
REQ_ONLINE_ROOM_UPDATEMAP = 319;
|
||||
RSP_ONLINE_ROOM_UPDATEMAP = 320;
|
||||
REQ_CHANGE_WORLD_CHANNEL = 321;
|
||||
RSP_CHANGE_WORLD_CHANNEL = 322;
|
||||
REQ_WORLD_CHAT = 323;
|
||||
RSP_WORLD_CHAT = 324;
|
||||
REQ_FRIEND_CHAT = 325;
|
||||
RSP_FRIEND_CHAT = 326;
|
||||
REQ_ONLINE_CHAT = 327;
|
||||
RSP_ONLINE_CHAT = 328;
|
||||
REQ_ONLINE_RECRUIT = 329;
|
||||
RSP_ONLINE_RECRUIT = 330;
|
||||
NTF_LOG = 1001;
|
||||
NTF_KICKOUT = 1002;
|
||||
NTF_BROADCAST = 1003;
|
||||
NTF_SYNCATTR = 1004;
|
||||
NTF_SYNCLINEUP = 1005;
|
||||
NTF_SYNC_NEW_MAIL = 1006;
|
||||
NTF_SYNC_DEL_MAIL = 1007;
|
||||
NTF_PLAYERMSG = 1008;
|
||||
NTF_LOGOUT = 1009;
|
||||
NTF_SCRIPT = 1010;
|
||||
NTF_SETATTR = 1011;
|
||||
NTF_SETSTRATTR = 1012;
|
||||
NTF_ONLINE_START = 1013;
|
||||
NTF_ONLINE_OVER = 1014;
|
||||
NTF_READITEM = 1015;
|
||||
NTF_UPDATE_FRIEND = 1016;
|
||||
NTF_DEL_FRIEND = 1017;
|
||||
NTF_FRIEND_REQ = 1018;
|
||||
NTF_FRIEND_VIGOR = 1019;
|
||||
NTF_BLACKLIST = 1020;
|
||||
NTF_GLOBALATTRS = 1021;
|
||||
NTF_ANTI_DATA = 1022;
|
||||
NTF_BLOCK_FRIENDREQ = 1023;
|
||||
NTF_CUSTOMROSTER = 1024;
|
||||
NTF_ONLINE_ROOMINFO = 1031;
|
||||
NTF_ONLINE_LOAD = 1032;
|
||||
NTF_ONLINE_KICKOUT = 1033;
|
||||
NTF_ONLINE_INVITE = 1034;
|
||||
NTF_ONLINE_STATE = 1035;
|
||||
NTF_WORLD_CHAT = 1041;
|
||||
NTF_FRIEND_CHAT = 1042;
|
||||
NTF_ONLINE_CHAT = 1043;
|
||||
NTF_ONLINE_RECRUIT = 1044;
|
||||
NTF_ONLINE_PLAYERCHEAT = 1045;
|
||||
REQ_ROOM_START = 2001;
|
||||
RSP_ROOM_START = 2002;
|
||||
NTF_ROOM_READY = 2003;
|
||||
NTF_ROOM_OVER = 2004;
|
||||
NTF_STOP_ROOM = 2005;
|
||||
NTF_ROOM_PLAYEREXIT = 2006;
|
||||
NTF_ROOM_PLAYERCHEAT = 2007;
|
||||
NTF_ROOM_PLAYERFINAL = 2008;
|
||||
}
|
||||
|
||||
message ReqLogin {
|
||||
string provider = 1;
|
||||
string token = 2;
|
||||
Core.ClientProfile client_profile = 3;
|
||||
}
|
||||
|
||||
message RspLogin {
|
||||
string session_id = 1;
|
||||
Core.Player data = 2;
|
||||
bool need_rename = 3;
|
||||
uint32 area_id = 4;
|
||||
int32 time_zone = 5;
|
||||
uint32 timestamp = 6;
|
||||
int32 certification = 7;
|
||||
map<string, uint32> global_attrs = 8;
|
||||
uint32 world_channel = 9;
|
||||
map<string, string> global_str_attrs = 10;
|
||||
uint32 error_code = 98;
|
||||
repeated uint32 error_info = 99;
|
||||
}
|
||||
|
||||
message ReqReconnect {
|
||||
uint64 pid = 1;
|
||||
string session_id = 2;
|
||||
uint32 world_channel = 3;
|
||||
string language = 4;
|
||||
}
|
||||
|
||||
message RspReconnect {
|
||||
string session_id = 1;
|
||||
Core.Player data = 2;
|
||||
bool need_rename = 3;
|
||||
int32 time_zone = 4;
|
||||
uint32 timestamp = 5;
|
||||
uint32 world_channel = 6;
|
||||
}
|
||||
|
||||
message ReqAccountInfo {
|
||||
string provider = 1;
|
||||
string token = 2;
|
||||
}
|
||||
|
||||
message ReqCallGS {
|
||||
string api = 1;
|
||||
string param = 2;
|
||||
uint32 clicknum = 3;
|
||||
repeated string dependent_params = 4;
|
||||
}
|
||||
|
||||
message ReqUseItem {
|
||||
uint64 id = 1;
|
||||
uint32 count = 2;
|
||||
}
|
||||
|
||||
message ReqOnlineCreateRoom {
|
||||
uint32 onlineid = 1;
|
||||
uint32 lineup_index = 2;
|
||||
}
|
||||
|
||||
message RspOnlineCreateRoom {
|
||||
uint32 onlineid = 1;
|
||||
uint32 lineup_index = 2;
|
||||
uint64 roomid = 3;
|
||||
repeated uint32 buffinfo = 4;
|
||||
}
|
||||
|
||||
message ReqOnlineAccept {
|
||||
uint64 otherid = 1;
|
||||
uint32 onlineid = 2;
|
||||
}
|
||||
|
||||
message ReqOnlineChatAccept {
|
||||
uint64 otherid = 1;
|
||||
uint32 onlineid = 2;
|
||||
uint64 roomid = 3;
|
||||
}
|
||||
|
||||
message ReqOnlineRecruit {
|
||||
uint64 room_id = 1;
|
||||
uint32 online_id = 2;
|
||||
}
|
||||
|
||||
message FriendVigor {
|
||||
uint64 pid = 1;
|
||||
bool have_vigor = 2;
|
||||
bool vigor_got = 3;
|
||||
bool return_vigor = 4;
|
||||
}
|
||||
|
||||
message FriendVigorList {
|
||||
repeated FriendVigor list = 1;
|
||||
}
|
||||
|
||||
message RankList {
|
||||
message ListItem {
|
||||
string member_name = 1;
|
||||
uint32 score = 2;
|
||||
string info = 3;
|
||||
}
|
||||
string rank_name = 1;
|
||||
repeated RankList.ListItem list = 2;
|
||||
}
|
||||
|
||||
message RankInfo {
|
||||
uint32 score = 1;
|
||||
uint32 rank = 2;
|
||||
uint32 sum = 3;
|
||||
string info = 4;
|
||||
}
|
||||
|
||||
message GlobalCounterInfo {
|
||||
string counter_name = 1;
|
||||
uint32 value = 2;
|
||||
}
|
||||
|
||||
message NtfLog {
|
||||
string action = 1;
|
||||
string detail = 2;
|
||||
}
|
||||
|
||||
message NtfBroadcast {
|
||||
string msg = 1;
|
||||
uint32 duration = 2;
|
||||
uint32 start_time = 3;
|
||||
uint32 end_time = 4;
|
||||
bool clean = 5;
|
||||
repeated Core.ChannelOpt channels = 6;
|
||||
}
|
||||
|
||||
message NtfSyncPlayer {
|
||||
string sign = 1;
|
||||
map<uint32, uint32> core = 2;
|
||||
map<uint32, uint32> custom = 3;
|
||||
map<uint32, string> custom_str = 4;
|
||||
repeated Core.Item items = 5;
|
||||
repeated uint64 show_items = 6;
|
||||
repeated uint32 show_attrs = 7;
|
||||
map<string, int32> money = 8;
|
||||
repeated Core.FriendPieces pieces = 9;
|
||||
repeated uint64 badges = 10;
|
||||
repeated uint64 tags = 11;
|
||||
}
|
||||
|
||||
message NtfSyncLineup {
|
||||
Core.Lineup lineup = 1;
|
||||
bool remove = 2;
|
||||
}
|
||||
|
||||
message NtfCallScript {
|
||||
string api = 1;
|
||||
string arg = 2;
|
||||
NtfSyncPlayer extra_sync = 3;
|
||||
}
|
||||
|
||||
message NtfSetAttr {
|
||||
uint32 gid = 1;
|
||||
uint32 sid = 2;
|
||||
uint32 val = 3;
|
||||
}
|
||||
|
||||
message NtfSetStrAttr {
|
||||
uint32 gid = 1;
|
||||
uint32 sid = 2;
|
||||
string val = 3;
|
||||
}
|
||||
|
||||
message NtfOnlineStart {
|
||||
uint64 room_id = 1;
|
||||
string room_addr = 2;
|
||||
}
|
||||
|
||||
message NtfOnlineRoom {
|
||||
uint64 room_id = 1;
|
||||
uint32 onlineid = 2;
|
||||
repeated Core.OnlinePlayer players = 3;
|
||||
bool bmatch = 4;
|
||||
repeated uint32 buffinfo = 5;
|
||||
}
|
||||
|
||||
message NtfOnlineInvite {
|
||||
uint64 room_id = 1;
|
||||
uint32 onlineid = 2;
|
||||
uint64 playerid = 3;
|
||||
string name = 4;
|
||||
uint64 face = 5;
|
||||
uint64 faceframe = 6;
|
||||
uint32 level = 7;
|
||||
}
|
||||
|
||||
message NtfOnlineRecruit {
|
||||
uint64 room_id = 1;
|
||||
uint32 online_id = 2;
|
||||
Core.PlayerProfile sender_profile = 3;
|
||||
}
|
||||
|
||||
message NtfOnlineState {
|
||||
uint64 room_id = 1;
|
||||
uint32 onlineid = 2;
|
||||
uint32 matchflag = 3;
|
||||
repeated uint64 players = 4;
|
||||
repeated uint32 stateflag = 5;
|
||||
uint64 nowtime = 6;
|
||||
uint64 levelid = 7;
|
||||
}
|
||||
|
||||
message ReqRoomStart {
|
||||
uint64 room_id = 1;
|
||||
bool is_reday = 2;
|
||||
string error = 3;
|
||||
}
|
||||
|
||||
message RspRoomStart {
|
||||
repeated Core.OnlinePlayer players = 1;
|
||||
repeated uint32 buffinfo = 2;
|
||||
uint32 pollingweek = 3;
|
||||
}
|
||||
|
||||
message NtfStopRoom {
|
||||
uint64 room_id = 1;
|
||||
string reason = 2;
|
||||
}
|
||||
|
||||
message NtfRoomOver {
|
||||
uint64 room_id = 1;
|
||||
repeated Core.OnlineEndData playerinfo = 2;
|
||||
}
|
||||
|
||||
message ReqAntiData {
|
||||
uint32 data_type = 1;
|
||||
bytes mtpData = 2;
|
||||
int32 plat_id = 4;
|
||||
}
|
||||
|
||||
message NtfRoomPlayerCheat {
|
||||
uint64 room_id = 1;
|
||||
uint64 playerid = 2;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
# MikuSB
|
||||
|
||||
Snowbreak: Containment Zone private server reimplementation written in C#.
|
||||
<strong>MikuSB</strong> is a server emulator of a certain dungeon anime game.
|
||||
`SdkServer`, `GameServer`, and an optional local HTTP/HTTPS proxy are started from a single `net9.0` application.
|
||||
|
||||
[Discord](https://discord.gg/aMwCu9JyUR)
|
||||
@@ -32,7 +32,7 @@ Snowbreak: Containment Zone private server reimplementation written in C#.
|
||||
|
||||
## Requirements
|
||||
|
||||
- .NET SDK 9.0
|
||||
- [.NET SDK 9.0](https://dotnet.microsoft.com/en-us/download/dotnet/9.0)
|
||||
|
||||
## Running
|
||||
|
||||
@@ -86,7 +86,6 @@ It is not intended for unauthorized access to, interference with, or commercial
|
||||
|
||||
## Legal Disclaimer
|
||||
MikuSB was developed for educational and research purposes.
|
||||
- This project is not affiliated with or endorsed by SEASUN GAMES PTE. LTD.
|
||||
- All trademarks, copyrights, and other intellectual property related to the original game and its associated franchise belong to their respective owners.
|
||||
- This repository does not include any copyrighted game assets, binaries, or master data.
|
||||
- Use this software at your own risk. The authors assume no responsibility for any damages or legal consequences resulting from its use.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# MikuSB
|
||||
|
||||
Snowbreak: Containment Zone 向けの C# 製プライベートサーバー再実装です。
|
||||
<strong>MikuSB</strong>は、あるダンジョンアニメゲームのサーバーエミュレーターです。
|
||||
`SdkServer`、`GameServer`、任意のローカル HTTP/HTTPS プロキシを 1 つの `net9.0` アプリとして起動します。
|
||||
|
||||
[Discord](https://discord.gg/aMwCu9JyUR)
|
||||
@@ -32,7 +32,7 @@ English documentation is available in [README.md](README.md).
|
||||
|
||||
## 要件
|
||||
|
||||
- .NET SDK 9.0
|
||||
- [.NET SDK 9.0](https://dotnet.microsoft.com/ja-jp/download/dotnet/9.0)
|
||||
|
||||
## 起動方法
|
||||
|
||||
@@ -87,7 +87,6 @@ dotnet build
|
||||
|
||||
## 法的免責事項
|
||||
MikuSBは教育および研究目的で開発されました。
|
||||
- このプロジェクトはSEASUN GAMES PTE. LTD. と一切関係が無く、承認も受けていません。
|
||||
- 元のゲーム及び関連フランチャイズに関するすべての商標、著作権知的財産権はそれぞれの所有者に帰属します。
|
||||
- このリポジトリには、著作権で保護されたゲームアセット、バイナリ、マスターデータは一切含まれていません。
|
||||
- 自己責任でご利用下さい。 著者は、本ソフトウェアによって生じるいかなる損害または法的結果についても一切責任を負いません。
|
||||
|
||||
@@ -1 +1 @@
|
||||
v=0.3
|
||||
v=1.1
|
||||
Reference in New Issue
Block a user