mirror of
https://github.com/EggLinks/DanhengServer-OpenSource.git
synced 2026-01-02 12:16:03 +08:00
feat: equipment func & affix
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using EggLink.DanhengServer.Data;
|
||||
using EggLink.DanhengServer.Database.Avatar;
|
||||
using EggLink.DanhengServer.Database.Lineup;
|
||||
using EggLink.DanhengServer.Enums.GridFight;
|
||||
using EggLink.DanhengServer.GameServer.Game.GridFight;
|
||||
using EggLink.DanhengServer.GameServer.Game.GridFight.Component;
|
||||
using EggLink.DanhengServer.GameServer.Game.Player;
|
||||
@@ -37,16 +38,19 @@ public class BattleGridFightOptions(GridFightGameSectionInfo curSection, GridFig
|
||||
LineupType = (int)ExtraLineupType.LineupGridFight
|
||||
};
|
||||
|
||||
// set all avatars to full hp for battle
|
||||
foreach (var baseAvatarInfo in avatars.Concat(backAvatars))
|
||||
{
|
||||
baseAvatarInfo.SetCurHp(10000, true);
|
||||
}
|
||||
|
||||
// foreground avatars
|
||||
var formatted = avatars.Select(x =>
|
||||
x.ToBattleProto(
|
||||
new PlayerDataCollection(Player.Data, Player.InventoryManager!.Data, tempLineup),
|
||||
x is SpecialAvatarInfo ? AvatarType.AvatarTrialType : AvatarType.AvatarGridFightType)).ToList();
|
||||
|
||||
// background avatars
|
||||
var backFormatted = backAvatars.Select(x =>
|
||||
x.ToBattleProto(
|
||||
new PlayerDataCollection(Player.Data, Player.InventoryManager!.Data, tempLineup),
|
||||
@@ -54,6 +58,17 @@ public class BattleGridFightOptions(GridFightGameSectionInfo curSection, GridFig
|
||||
|
||||
proto.BattleAvatarList.Add(formatted.Take(4));
|
||||
|
||||
// affix buff
|
||||
foreach (var affix in LevelComponent.Affixes)
|
||||
{
|
||||
if (!GameData.GridFightAffixConfigData.TryGetValue(affix, out var affixConf) || affixConf.AffixRule != GridFightAffixRuleEnum.Mazebuff) continue;
|
||||
battle.Buffs.Add(new MazeBuff(35300000 + (int)affix, 1, -1) // TODO I WANNA READ FROM GAMEDATA, BUT IT SEEMS GAMEDATA IS WRONG
|
||||
{
|
||||
WaveFlag = -1
|
||||
});
|
||||
}
|
||||
|
||||
// monsters
|
||||
foreach (var wave in Encounter.MonsterWaves)
|
||||
{
|
||||
proto.MonsterWaveList.Add(new SceneMonsterWave
|
||||
@@ -62,7 +77,8 @@ public class BattleGridFightOptions(GridFightGameSectionInfo curSection, GridFig
|
||||
BattleWaveId = wave.Wave,
|
||||
MonsterParam = new SceneMonsterWaveParam
|
||||
{
|
||||
Level = 90
|
||||
EliteGroup = CurSection.EliteGroupId,
|
||||
DNEAMPLLFME = 5 // ?
|
||||
},
|
||||
MonsterList =
|
||||
{
|
||||
@@ -82,12 +98,14 @@ public class BattleGridFightOptions(GridFightGameSectionInfo curSection, GridFig
|
||||
});
|
||||
}
|
||||
|
||||
// battle events
|
||||
foreach (var role in RoleComponent.Data.Roles)
|
||||
{
|
||||
if (!GameData.GridFightRoleStarData.TryGetValue(role.RoleId << 4 | role.Tier, out var roleConf)) continue;
|
||||
battle.BattleEvents.TryAdd((int)roleConf.BEID, new BattleEventInstance((int)roleConf.BEID, 5000));
|
||||
}
|
||||
|
||||
// traits battle events
|
||||
foreach (var traitBeId in TraitComponent.Data.Traits
|
||||
.Select(x => GameData.GridFightTraitBasicInfoData.GetValueOrDefault(x.TraitId, new()))
|
||||
.SelectMany(x => x.BEIDList))
|
||||
@@ -95,6 +113,7 @@ public class BattleGridFightOptions(GridFightGameSectionInfo curSection, GridFig
|
||||
battle.BattleEvents.TryAdd((int)traitBeId, new BattleEventInstance((int)traitBeId, 5000));
|
||||
}
|
||||
|
||||
// penalty bonus rule id
|
||||
var ruleId = CurSection.Excel.PenaltyBonusRuleIDList.FirstOrDefault(0u);
|
||||
if (ruleId == 0)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,8 @@ public class GridFightBasicComponent(GridFightInstance inst) : BaseGridFightComp
|
||||
BuyLevelCost = 4,
|
||||
CurGold = 0,
|
||||
MaxInterest = 5,
|
||||
MaxLevel = 10
|
||||
MaxLevel = 10,
|
||||
OffFieldAvatarNum = 6
|
||||
};
|
||||
|
||||
#endregion
|
||||
@@ -146,7 +147,7 @@ public class GridFightBasicComponent(GridFightInstance inst) : BaseGridFightComp
|
||||
|
||||
public uint GetFieldCount()
|
||||
{
|
||||
return 4 + 6;
|
||||
return 4 + Data.OffFieldAvatarNum;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -166,8 +167,8 @@ public class GridFightBasicComponent(GridFightInstance inst) : BaseGridFightComp
|
||||
GridFightCurLevelExp = Data.LevelExp,
|
||||
GridFightLevelCost = Data.BuyLevelCost,
|
||||
GridFightMaxAvatarCount = 9,
|
||||
GridFightOffFieldMaxCount = 6,
|
||||
GridFightMaxFieldCount = Data.MaxAvatarNum,
|
||||
GridFightOffFieldMaxCount = Math.Min(9, Data.OffFieldAvatarNum),
|
||||
GridFightMaxFieldCount = Math.Min(13, Data.MaxAvatarNum),
|
||||
GridFightLineupHp = Data.CurHp,
|
||||
GridFightCurGold = Data.CurGold,
|
||||
GridFightMaxInterestGold = Data.MaxInterest,
|
||||
|
||||
@@ -193,7 +193,7 @@ public class GridFightItemsComponent(GridFightInstance inst) : BaseGridFightComp
|
||||
case GridFightDropType.Role:
|
||||
{
|
||||
syncs.AddRange(await roleComp.AddAvatar(item.DropItemId, item.DisplayValue.Tier, false, true,
|
||||
src, groupId, 0, param));
|
||||
src, groupId, 0, null, param));
|
||||
break;
|
||||
}
|
||||
case GridFightDropType.Item:
|
||||
@@ -450,7 +450,7 @@ public class GridFightItemsComponent(GridFightInstance inst) : BaseGridFightComp
|
||||
|
||||
(Retcode, List<BaseGridFightSyncData>) res = consumablesExcel.ConsumableRule switch
|
||||
{
|
||||
GridFightConsumeTypeEnum.Remove => HandleRemoveConsumable(target),
|
||||
GridFightConsumeTypeEnum.Remove => await HandleRemoveConsumable(target),
|
||||
GridFightConsumeTypeEnum.Roll => await HandleRollConsumable(target),
|
||||
GridFightConsumeTypeEnum.Upgrade => await HandleUpgradeConsumable(target),
|
||||
GridFightConsumeTypeEnum.Copy => await HandleCopyConsumable(target, consumablesExcel.ConsumableParamList),
|
||||
@@ -467,22 +467,31 @@ public class GridFightItemsComponent(GridFightInstance inst) : BaseGridFightComp
|
||||
return res.Item1;
|
||||
}
|
||||
|
||||
private (Retcode, List<BaseGridFightSyncData>) HandleRemoveConsumable(GridFightConsumableTargetInfo target)
|
||||
private async ValueTask<(Retcode, List<BaseGridFightSyncData>)> HandleRemoveConsumable(GridFightConsumableTargetInfo target)
|
||||
{
|
||||
List<BaseGridFightSyncData> syncs = [];
|
||||
|
||||
if (target.RemoveTypeTargetInfo == null) return (Retcode.RetReqParaInvalid, syncs);
|
||||
|
||||
var roleComp = Inst.GetComponent<GridFightRoleComponent>();
|
||||
var traitComp = Inst.GetComponent<GridFightTraitComponent>();
|
||||
var role = roleComp.Data.Roles.FirstOrDefault(x => x.UniqueId == target.RemoveTypeTargetInfo.DressRoleUniqueId);
|
||||
if (role == null) return (Retcode.RetGridFightRoleNotExist, syncs);
|
||||
|
||||
// unequip
|
||||
role.EquipmentIds.Clear();
|
||||
foreach (var roleEquipmentId in role.EquipmentIds.Clone())
|
||||
{
|
||||
role.EquipmentIds.Remove(roleEquipmentId); // safety
|
||||
|
||||
syncs.AddRange(await OnEquipmentUnEquipped(roleEquipmentId, role)); // check action
|
||||
}
|
||||
|
||||
// sync
|
||||
syncs.Add(new GridFightRoleUpdateSyncData(GridFightSrc.KGridFightSrcUseConsumable, role.Clone()));
|
||||
|
||||
// check trait
|
||||
await traitComp.CheckTrait();
|
||||
|
||||
return (Retcode.RetSucc, syncs);
|
||||
}
|
||||
|
||||
@@ -621,6 +630,222 @@ public class GridFightItemsComponent(GridFightInstance inst) : BaseGridFightComp
|
||||
|
||||
#endregion
|
||||
|
||||
#region Equipment Func
|
||||
|
||||
public async ValueTask<List<BaseGridFightSyncData>> OnEquipmentEquipped(uint uniqueId, GridFightRoleInfoPb role)
|
||||
{
|
||||
List<BaseGridFightSyncData> syncData = [];
|
||||
var basicComp = Inst.GetComponent<GridFightBasicComponent>();
|
||||
var roleComp = Inst.GetComponent<GridFightRoleComponent>();
|
||||
|
||||
// get info
|
||||
var equipment = Data.EquipmentItems.FirstOrDefault(x => x.UniqueId == uniqueId);
|
||||
if (equipment == null || !GameData.GridFightEquipmentData.TryGetValue(equipment.ItemId, out var itemConf)) return syncData;
|
||||
|
||||
switch (itemConf.EquipFunc)
|
||||
{
|
||||
case GridFightEquipFuncTypeEnum.AvatarMaxNumberAdd:
|
||||
{
|
||||
// add max avatar num
|
||||
basicComp.Data.MaxAvatarNum++;
|
||||
basicComp.Data.OffFieldAvatarNum++;
|
||||
|
||||
// sync
|
||||
syncData.Add(new GridFightMaxAvatarNumSyncData(GridFightSrc.KGridFightSrcEquipmentFunc, basicComp.Data, 0, uniqueId));
|
||||
syncData.Add(new GridFightMaxOffFieldCountSyncData(GridFightSrc.KGridFightSrcEquipmentFunc, basicComp.Data, 0, uniqueId));
|
||||
break;
|
||||
}
|
||||
case GridFightEquipFuncTypeEnum.CraftableThiefGlove:
|
||||
{
|
||||
// add random 2 craftable equipments to role
|
||||
var equipPool = GameData.GridFightEquipmentData.Values.Where(x =>
|
||||
x.EquipCategory == GridFightEquipCategoryEnum.Craftable && x.ID != equipment.ItemId).ToList();
|
||||
|
||||
for (var i = 0; i < 2; i++)
|
||||
{
|
||||
var equip = equipPool.RandomElement();
|
||||
// add equipment
|
||||
var res = await AddEquipment(equip.ID, GridFightSrc.KGridFightSrcEquipmentFunc, false, 0, uniqueId);
|
||||
if (res.Item1 == null) continue;
|
||||
|
||||
// sync
|
||||
syncData.AddRange(res.Item2);
|
||||
syncData.AddRange(await roleComp.DressRole(role.UniqueId, res.Item1.UniqueId,
|
||||
GridFightSrc.KGridFightSrcEquipmentFunc, false, 0, uniqueId));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case GridFightEquipFuncTypeEnum.RadiantThiefGlove:
|
||||
{
|
||||
// add random 2 radiant equipments to role
|
||||
var equipPool = GameData.GridFightEquipmentData.Values.Where(x =>
|
||||
x.EquipCategory == GridFightEquipCategoryEnum.Radiant && x.ID != equipment.ItemId).ToList();
|
||||
|
||||
for (var i = 0; i < 2; i++)
|
||||
{
|
||||
var equip = equipPool.RandomElement();
|
||||
// add equipment
|
||||
var res = await AddEquipment(equip.ID, GridFightSrc.KGridFightSrcEquipmentFunc, false, 0, uniqueId);
|
||||
if (res.Item1 == null) continue;
|
||||
|
||||
// sync
|
||||
syncData.AddRange(res.Item2);
|
||||
syncData.AddRange(await roleComp.DressRole(role.UniqueId, res.Item1.UniqueId,
|
||||
GridFightSrc.KGridFightSrcEquipmentFunc, false, 0, uniqueId));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return syncData;
|
||||
}
|
||||
|
||||
public async ValueTask<List<BaseGridFightSyncData>> OnEnterSection()
|
||||
{
|
||||
List<BaseGridFightSyncData> syncData = [];
|
||||
var roleComp = Inst.GetComponent<GridFightRoleComponent>();
|
||||
|
||||
// get info
|
||||
foreach (var role in roleComp.Data.Roles)
|
||||
{
|
||||
foreach (var uniqueId in role.EquipmentIds)
|
||||
{
|
||||
var equipment = Data.EquipmentItems.FirstOrDefault(x => x.UniqueId == uniqueId);
|
||||
if (equipment == null ||
|
||||
!GameData.GridFightEquipmentData.TryGetValue(equipment.ItemId, out var itemConf)) continue;
|
||||
|
||||
switch (itemConf.EquipFunc)
|
||||
{
|
||||
case GridFightEquipFuncTypeEnum.CraftableThiefGlove:
|
||||
{
|
||||
// remove old
|
||||
foreach (var uid in role.EquipmentIds.Clone())
|
||||
{
|
||||
if (uid == uniqueId) continue; // skip self
|
||||
var res = await RemoveEquipment(uid, GridFightSrc.KGridFightSrcEquipmentFunc, false,
|
||||
uniqueId);
|
||||
syncData.AddRange(res);
|
||||
}
|
||||
|
||||
// add random 2 craftable equipments to role
|
||||
var equipPool = GameData.GridFightEquipmentData.Values.Where(x =>
|
||||
x.EquipCategory == GridFightEquipCategoryEnum.Craftable && x.ID != equipment.ItemId).ToList();
|
||||
|
||||
for (var i = 0; i < 2; i++)
|
||||
{
|
||||
var equip = equipPool.RandomElement();
|
||||
// add equipment
|
||||
var res = await AddEquipment(equip.ID, GridFightSrc.KGridFightSrcEquipmentFunc, false, 0,
|
||||
uniqueId);
|
||||
if (res.Item1 == null) continue;
|
||||
|
||||
// sync
|
||||
syncData.AddRange(res.Item2);
|
||||
syncData.AddRange(await roleComp.DressRole(role.UniqueId, res.Item1.UniqueId,
|
||||
GridFightSrc.KGridFightSrcEquipmentFunc, false, 0, uniqueId));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case GridFightEquipFuncTypeEnum.RadiantThiefGlove:
|
||||
{
|
||||
// remove old
|
||||
foreach (var uid in role.EquipmentIds.Clone())
|
||||
{
|
||||
if (uid == uniqueId) continue; // skip self
|
||||
var res = await RemoveEquipment(uid, GridFightSrc.KGridFightSrcEquipmentFunc, false,
|
||||
uniqueId);
|
||||
syncData.AddRange(res);
|
||||
}
|
||||
|
||||
// add random 2 radiant equipments to role
|
||||
var equipPool = GameData.GridFightEquipmentData.Values.Where(x =>
|
||||
x.EquipCategory == GridFightEquipCategoryEnum.Radiant && x.ID != equipment.ItemId).ToList();
|
||||
|
||||
for (var i = 0; i < 2; i++)
|
||||
{
|
||||
var equip = equipPool.RandomElement();
|
||||
// add equipment
|
||||
var res = await AddEquipment(equip.ID, GridFightSrc.KGridFightSrcEquipmentFunc, false, 0,
|
||||
uniqueId);
|
||||
if (res.Item1 == null) continue;
|
||||
|
||||
// sync
|
||||
syncData.AddRange(res.Item2);
|
||||
syncData.AddRange(await roleComp.DressRole(role.UniqueId, res.Item1.UniqueId,
|
||||
GridFightSrc.KGridFightSrcEquipmentFunc, false, 0, uniqueId));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return syncData;
|
||||
}
|
||||
|
||||
public async ValueTask<List<BaseGridFightSyncData>> OnEquipmentUnEquipped(uint uniqueId, GridFightRoleInfoPb role)
|
||||
{
|
||||
List<BaseGridFightSyncData> syncData = [];
|
||||
var basicComp = Inst.GetComponent<GridFightBasicComponent>();
|
||||
var roleComp = Inst.GetComponent<GridFightRoleComponent>();
|
||||
|
||||
// get info
|
||||
var equipment = Data.EquipmentItems.FirstOrDefault(x => x.UniqueId == uniqueId);
|
||||
if (equipment == null || !GameData.GridFightEquipmentData.TryGetValue(equipment.ItemId, out var itemConf))
|
||||
return syncData;
|
||||
|
||||
switch (itemConf.EquipFunc)
|
||||
{
|
||||
case GridFightEquipFuncTypeEnum.AvatarMaxNumberAdd:
|
||||
{
|
||||
// decrease max avatar num
|
||||
basicComp.Data.MaxAvatarNum--;
|
||||
basicComp.Data.OffFieldAvatarNum--;
|
||||
|
||||
// if remove pos has avatar
|
||||
if (basicComp.Data.MaxAvatarNum < 13)
|
||||
{
|
||||
// check
|
||||
var targetRole = roleComp.Data.Roles.FirstOrDefault(x => x.Pos == basicComp.Data.MaxAvatarNum + 1);
|
||||
if (targetRole != null)
|
||||
{
|
||||
targetRole.Pos = roleComp.GetEmptyPos();
|
||||
syncData.Add(new GridFightRoleUpdateSyncData(GridFightSrc.KGridFightSrcNone, targetRole));
|
||||
}
|
||||
}
|
||||
|
||||
// sync
|
||||
syncData.Add(new GridFightMaxAvatarNumSyncData(GridFightSrc.KGridFightSrcEquipmentFunc, basicComp.Data,
|
||||
0, uniqueId));
|
||||
syncData.Add(new GridFightMaxOffFieldCountSyncData(GridFightSrc.KGridFightSrcEquipmentFunc,
|
||||
basicComp.Data, 0, uniqueId));
|
||||
break;
|
||||
}
|
||||
case GridFightEquipFuncTypeEnum.CraftableThiefGlove:
|
||||
case GridFightEquipFuncTypeEnum.RadiantThiefGlove:
|
||||
{
|
||||
// remove other equipments
|
||||
foreach (var uid in role.EquipmentIds.Clone())
|
||||
{
|
||||
if (uid == uniqueId) continue; // skip self
|
||||
|
||||
var res = await RemoveEquipment(uid, GridFightSrc.KGridFightSrcEquipmentFunc, false, uniqueId);
|
||||
syncData.AddRange(res);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return syncData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Serialization
|
||||
|
||||
public override GridFightGameInfo ToProto()
|
||||
|
||||
@@ -22,6 +22,8 @@ public class GridFightLevelComponent : BaseGridFightComponent
|
||||
public List<GridFightTraitDamageSttInfo> TraitDamageSttInfos { get; } = [];
|
||||
public List<GridFightPortalBuffInfo> PortalBuffs { get; } = [];
|
||||
public List<uint> Affixes { get; } = [];
|
||||
private uint CampMonsterEliteGroup { get; set; } = 1801;
|
||||
private uint MonsterEliteGroup { get; set; } = 1815;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -30,7 +32,7 @@ public class GridFightLevelComponent : BaseGridFightComponent
|
||||
public GridFightLevelComponent(GridFightInstance inst) : base(inst)
|
||||
{
|
||||
// TODO: randomly select a base route id
|
||||
List<uint> chapterIds = [1100];
|
||||
List<uint> chapterIds = [1400];
|
||||
List<GridFightCampExcel> campPool = GameData.GridFightCampData.Values.Where(x => x.BossBattleArea != 0).ToList();
|
||||
var route = GameData.GridFightStageRouteData[chapterIds.RandomElement()].Values;
|
||||
|
||||
@@ -44,12 +46,27 @@ public class GridFightLevelComponent : BaseGridFightComponent
|
||||
campPool.Remove(camp);
|
||||
|
||||
// create section infos
|
||||
Sections[(uint)chapterId] = [.. chapters.Select(x => new GridFightGameSectionInfo(x, camp))];
|
||||
Sections[(uint)chapterId] = [];
|
||||
|
||||
foreach (var sectionConf in chapters)
|
||||
{
|
||||
var eliteGroup =
|
||||
sectionConf.NodeType switch
|
||||
{
|
||||
GridFightNodeTypeEnum.Monster => Math.Max(1816, Math.Min(MonsterEliteGroup++, 1819)),
|
||||
GridFightNodeTypeEnum.Supply => 0u,
|
||||
_ => Math.Min(CampMonsterEliteGroup++, 1815)
|
||||
};
|
||||
|
||||
var section = new GridFightGameSectionInfo(sectionConf, camp, eliteGroup);
|
||||
|
||||
Sections[(uint)chapterId].Add(section);
|
||||
}
|
||||
}
|
||||
|
||||
if (!GameData.GridFightDivisionStageData.TryGetValue(Inst.DivisionId, out var divisionExcel)) return;
|
||||
|
||||
var affixIds = GameData.GridFightAffixConfigData.Keys.ToList();
|
||||
var affixIds = GameData.GridFightAffixConfigData.Keys.Where(x => x < 4000).ToList();
|
||||
foreach (var _ in divisionExcel.AffixChooseNumList)
|
||||
{
|
||||
var affixId = affixIds.RandomElement();
|
||||
@@ -156,6 +173,7 @@ public class GridFightLevelComponent : BaseGridFightComponent
|
||||
bool sendPacket = true, GridFightSrc src = GridFightSrc.KGridFightSrcBattleEnd)
|
||||
{
|
||||
var shopComp = Inst.GetComponent<GridFightShopComponent>();
|
||||
var itemsComp = Inst.GetComponent<GridFightItemsComponent>();
|
||||
var basicComp = Inst.GetComponent<GridFightBasicComponent>();
|
||||
|
||||
_curChapterId = (uint)Math.Min(Sections.Count, chapterId);
|
||||
@@ -187,6 +205,9 @@ public class GridFightLevelComponent : BaseGridFightComponent
|
||||
await shopComp.RefreshShop(true, false);
|
||||
syncs.AddRange(new GridFightShopSyncData(src, shopComp.Data, basicComp.Data.CurLevel));
|
||||
|
||||
// equipment
|
||||
syncs.AddRange(await itemsComp.OnEnterSection());
|
||||
|
||||
if (sendPacket)
|
||||
{
|
||||
await Inst.Player.SendPacket(new PacketGridFightSyncUpdateResultScNotify(syncs));
|
||||
@@ -399,10 +420,11 @@ public class GridFightGameSectionInfo
|
||||
public uint ChapterId { get; }
|
||||
public uint SectionId { get; }
|
||||
public uint BranchId { get; set; } = 1;
|
||||
public uint EliteGroupId { get; set; }
|
||||
public GridFightCampExcel MonsterCamp { get; set; }
|
||||
public List<GridFightGameEncounterInfo> Encounters { get; } = [];
|
||||
|
||||
public GridFightGameSectionInfo(GridFightStageRouteExcel excel, GridFightCampExcel camp)
|
||||
public GridFightGameSectionInfo(GridFightStageRouteExcel excel, GridFightCampExcel camp, uint eliteGroupId)
|
||||
{
|
||||
Excel = excel;
|
||||
ChapterId = excel.ChapterID;
|
||||
@@ -427,6 +449,8 @@ public class GridFightGameSectionInfo
|
||||
{
|
||||
Encounters.Add(new GridFightGameEncounterInfo(1, 1, this));
|
||||
}
|
||||
|
||||
EliteGroupId = eliteGroupId;
|
||||
}
|
||||
|
||||
public GridFightRouteInfo ToRouteInfo()
|
||||
|
||||
@@ -16,8 +16,24 @@ public class GridFightRoleComponent(GridFightInstance inst) : BaseGridFightCompo
|
||||
|
||||
#region Role
|
||||
|
||||
public uint GetEmptyPos()
|
||||
{
|
||||
var usedPos = Data.Roles.Select(x => x.Pos).Concat(Data.Forges.Select(x => x.Pos))
|
||||
.Concat(Data.Npcs.Select(x => x.Pos)).ToHashSet();
|
||||
|
||||
var pos = 0u;
|
||||
for (var i = PrepareAreaPos + 1; i <= PrepareAreaPos + 999; i++) // temp store area
|
||||
{
|
||||
if (usedPos.Contains(i)) continue;
|
||||
pos = i;
|
||||
break;
|
||||
}
|
||||
|
||||
return pos;
|
||||
}
|
||||
|
||||
public async ValueTask<List<BaseGridFightSyncData>> AddAvatar(uint roleId, uint tier = 1, bool sendPacket = true,
|
||||
bool checkMerge = true, GridFightSrc src = GridFightSrc.KGridFightSrcBuyGoods, uint syncGroup = 0, uint targetPos = 0, params uint[] param)
|
||||
bool checkMerge = true, GridFightSrc src = GridFightSrc.KGridFightSrcBuyGoods, uint syncGroup = 0, uint targetPos = 0, List<uint>? equipments = null, params uint[] param)
|
||||
{
|
||||
if (!GameData.GridFightRoleBasicInfoData.TryGetValue(roleId, out var excel)) return [];
|
||||
|
||||
@@ -46,7 +62,8 @@ public class GridFightRoleComponent(GridFightInstance inst) : BaseGridFightCompo
|
||||
RoleId = roleId,
|
||||
UniqueId = ++Data.CurUniqueId,
|
||||
Tier = tier,
|
||||
Pos = pos
|
||||
Pos = pos,
|
||||
EquipmentIds = { equipments ?? [] }
|
||||
};
|
||||
|
||||
foreach (var saved in excel.RoleSavedValueList)
|
||||
@@ -76,6 +93,7 @@ public class GridFightRoleComponent(GridFightInstance inst) : BaseGridFightCompo
|
||||
|
||||
public async ValueTask<List<BaseGridFightSyncData>> CheckIfMergeRole(bool sendPacket = false)
|
||||
{
|
||||
var itemsComp = Inst.GetComponent<GridFightItemsComponent>();
|
||||
List<BaseGridFightSyncData> syncs = [];
|
||||
bool hasMerged;
|
||||
uint groupId = 0;
|
||||
@@ -103,16 +121,33 @@ public class GridFightRoleComponent(GridFightInstance inst) : BaseGridFightCompo
|
||||
var roleId = mergeCandidates.Key.RoleId;
|
||||
var currentTier = mergeCandidates.Key.Tier;
|
||||
var toMerge = mergeCandidates.Take(3).ToList();
|
||||
|
||||
List<uint> equipments = [];
|
||||
|
||||
// remove merged roles
|
||||
foreach (var role in toMerge)
|
||||
{
|
||||
Data.Roles.Remove(role);
|
||||
syncs.Add(new GridFightRoleRemoveSyncData(GridFightSrc.KGridFightSrcMergeRole, role, groupId));
|
||||
|
||||
// unequip
|
||||
foreach (var u in role.EquipmentIds.Clone())
|
||||
{
|
||||
if (equipments.Count < 3)
|
||||
{
|
||||
// add
|
||||
equipments.Add(u);
|
||||
}
|
||||
else
|
||||
{
|
||||
// unequip
|
||||
syncs.AddRange(await itemsComp.OnEquipmentUnEquipped(u, role));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// add new merged role with tier + 1
|
||||
var addSyncs = await AddAvatar(roleId, currentTier + 1, false, false, GridFightSrc.KGridFightSrcMergeRole, groupId, toMerge.First().Pos);
|
||||
var addSyncs = await AddAvatar(roleId, currentTier + 1, false, false,
|
||||
GridFightSrc.KGridFightSrcMergeRole, groupId, toMerge.First().Pos, equipments);
|
||||
syncs.AddRange(addSyncs);
|
||||
|
||||
groupId++;
|
||||
@@ -130,6 +165,7 @@ public class GridFightRoleComponent(GridFightInstance inst) : BaseGridFightCompo
|
||||
|
||||
public async ValueTask<List<BaseGridFightSyncData>> SellAvatar(uint uniqueId, bool sendPacket = true)
|
||||
{
|
||||
var itemsComp = Inst.GetComponent<GridFightItemsComponent>();
|
||||
var role = Data.Roles.FirstOrDefault(x => x.UniqueId == uniqueId);
|
||||
if (role == null)
|
||||
{
|
||||
@@ -147,12 +183,18 @@ public class GridFightRoleComponent(GridFightInstance inst) : BaseGridFightCompo
|
||||
var basicComp = Inst.GetComponent<GridFightBasicComponent>();
|
||||
await basicComp.UpdateGoldNum((int)sellPrice, false, GridFightSrc.KGridFightSrcRecycleRole);
|
||||
|
||||
|
||||
List<BaseGridFightSyncData> syncs =
|
||||
[
|
||||
new GridFightRoleRemoveSyncData(GridFightSrc.KGridFightSrcRecycleRole, role),
|
||||
new GridFightGoldSyncData(GridFightSrc.KGridFightSrcRecycleRole, basicComp.Data)
|
||||
new GridFightGoldSyncData(GridFightSrc.KGridFightSrcNone, basicComp.Data)
|
||||
];
|
||||
|
||||
foreach (var u in role.EquipmentIds.Clone())
|
||||
{
|
||||
syncs.AddRange(await itemsComp.OnEquipmentUnEquipped(u, role));
|
||||
}
|
||||
|
||||
if (sendPacket)
|
||||
{
|
||||
await Inst.Player.SendPacket(new PacketGridFightSyncUpdateResultScNotify(syncs));
|
||||
@@ -184,13 +226,18 @@ public class GridFightRoleComponent(GridFightInstance inst) : BaseGridFightCompo
|
||||
|
||||
role.EquipmentIds.Add(equipmentUniqueId); // ensure no duplicates
|
||||
|
||||
var syncData = new GridFightRoleUpdateSyncData(src, role, 0, param);
|
||||
// handle action
|
||||
var res = await itemComp.OnEquipmentEquipped(equipmentUniqueId, role);
|
||||
|
||||
res.Add(new GridFightRoleUpdateSyncData(src, role, 0, param));
|
||||
if (sendPacket)
|
||||
{
|
||||
await Inst.Player.SendPacket(new PacketGridFightSyncUpdateResultScNotify(syncData));
|
||||
await Inst.Player.SendPacket(new PacketGridFightSyncUpdateResultScNotify(res));
|
||||
}
|
||||
|
||||
return [syncData];
|
||||
await Inst.GetComponent<GridFightTraitComponent>().CheckTrait();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public List<BaseAvatarInfo> GetForegroundAvatarInfos()
|
||||
|
||||
@@ -383,6 +383,7 @@ public static class GridFightTraitInfoPbExtensions
|
||||
var traitRoles = onGroundRoles.Where(x => GameData.GridFightRoleBasicInfoData
|
||||
.GetValueOrDefault(x.RoleId)?.TraitList.Contains(info.TraitId) == true).ToList();
|
||||
|
||||
List<GridFightRoleInfoPb> equipmentTraits = [];
|
||||
// check equipment traits
|
||||
foreach (var role in onGroundRoles.Except(traitRoles))
|
||||
{
|
||||
@@ -406,7 +407,7 @@ public static class GridFightTraitInfoPbExtensions
|
||||
if (equipmentExcel.EquipFuncParamList.Contains(info.TraitId))
|
||||
{
|
||||
// we can add this role directly becuz foreach has Except option
|
||||
traitRoles.Add(role);
|
||||
equipmentTraits.Add(role);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -419,17 +420,27 @@ public static class GridFightTraitInfoPbExtensions
|
||||
{
|
||||
TraitId = info.TraitId,
|
||||
TraitEffectLayer = info.TraitLayer,
|
||||
MemberList = { traitRoles.Select(x => new GridFightTraitMember
|
||||
MemberList =
|
||||
{
|
||||
GridUpdateSrc = GridFightTraitSrc.KGridFightTraitSrcRole,
|
||||
MemberRoleId = x.RoleId,
|
||||
MemberRoleUniqueId = x.UniqueId,
|
||||
MemberType = GridFightTraitMemberType.KGridFightTraitMemberRole
|
||||
}) },
|
||||
TraitEffectList = { info.Effects.Select(x => x.ToBattleInfo(roleComp))}
|
||||
traitRoles.Select(x => new GridFightTraitMember
|
||||
{
|
||||
GridUpdateSrc = GridFightTraitSrc.KGridFightTraitSrcRole,
|
||||
MemberRoleId = x.RoleId,
|
||||
MemberRoleUniqueId = x.UniqueId,
|
||||
MemberType = GridFightTraitMemberType.KGridFightTraitMemberRole
|
||||
}),
|
||||
equipmentTraits.Select(x => new GridFightTraitMember
|
||||
{
|
||||
GridUpdateSrc = GridFightTraitSrc.KGridFightTraitSrcEquip,
|
||||
MemberRoleId = x.RoleId,
|
||||
MemberRoleUniqueId = x.UniqueId,
|
||||
MemberType = GridFightTraitMemberType.KGridFightTraitMemberRole
|
||||
})
|
||||
},
|
||||
TraitEffectList = { info.Effects.Select(x => x.ToBattleInfo(roleComp)) }
|
||||
};
|
||||
|
||||
if (phainonRole != null && traitRoles.All(x => x.UniqueId != phainonRole.UniqueId))
|
||||
if (phainonRole != null && traitRoles.Concat(equipmentTraits).All(x => x.UniqueId != phainonRole.UniqueId))
|
||||
{
|
||||
res.MemberList.Add(new GridFightTraitMember
|
||||
{
|
||||
|
||||
@@ -338,7 +338,7 @@ public class GridFightInstance(PlayerInstance player, uint season, uint division
|
||||
|
||||
syncs.AddRange(await roleComp.AddAvatar(role.RoleId, 1, false,
|
||||
true,
|
||||
GridFightSrc.KGridFightSrcSelectSupply, 0, 0,
|
||||
GridFightSrc.KGridFightSrcSelectSupply, 0, 0, null,
|
||||
req.SupplyAction.SelectSupplyIndexes.ToArray()));
|
||||
|
||||
// add equipment
|
||||
|
||||
@@ -9,7 +9,7 @@ public class GridFightMaxAvatarNumSyncData(GridFightSrc src, GridFightBasicInfoP
|
||||
{
|
||||
return new GridFightSyncData
|
||||
{
|
||||
MaxBattleRoleNum = info.MaxAvatarNum
|
||||
MaxBattleRoleNum = Math.Min(13, info.MaxAvatarNum)
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using EggLink.DanhengServer.Proto;
|
||||
using EggLink.DanhengServer.Proto.ServerSide;
|
||||
|
||||
namespace EggLink.DanhengServer.GameServer.Game.GridFight.Sync;
|
||||
|
||||
public class GridFightMaxOffFieldCountSyncData(GridFightSrc src, GridFightBasicInfoPb info, uint groupId = 0, params uint[] syncParams) : BaseGridFightSyncData(src, groupId, syncParams)
|
||||
{
|
||||
public GridFightBasicInfoPb Info { get; set; } = info.Clone();
|
||||
public override GridFightSyncData ToProto()
|
||||
{
|
||||
return new GridFightSyncData
|
||||
{
|
||||
GridFightOffFieldMaxCount = Math.Min(9, Info.OffFieldAvatarNum)
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -34,62 +34,62 @@ namespace EggLink.DanhengServer.Proto.ServerSide {
|
||||
"cEl0ZW1QYiKKAQoTR3JpZEZpZ2h0R2FtZUluZm9QYhIQCghVbmlxdWVJZBgB",
|
||||
"IAEoDRISCgpEaXZpc2lvbklkGAIgASgNEhIKCklzT3ZlckxvY2sYAyABKAgS",
|
||||
"DgoGU2Vhc29uGAQgASgNEikKCkNvbXBvbmVudHMYBSADKAsyFS5HcmlkRmln",
|
||||
"aHRDb21wb25lbnRQYiLMAgoUR3JpZEZpZ2h0QmFzaWNJbmZvUGISDwoHQ3Vy",
|
||||
"aHRDb21wb25lbnRQYiLnAgoUR3JpZEZpZ2h0QmFzaWNJbmZvUGISDwoHQ3Vy",
|
||||
"R29sZBgBIAEoDRIQCghDdXJMZXZlbBgCIAEoDRIQCghMZXZlbEV4cBgDIAEo",
|
||||
"DRIUCgxCdXlMZXZlbENvc3QYBCABKA0SDQoFQ3VySHAYBSABKA0SFAoMTWF4",
|
||||
"QXZhdGFyTnVtGAYgASgNEhAKCENvbWJvTnVtGAcgASgNEhAKCExvY2tUeXBl",
|
||||
"GAggASgNEhIKCkxvY2tSZWFzb24YCSABKA0SEwoLTWF4SW50ZXJlc3QYCiAB",
|
||||
"KA0SFgoOVHJhY2tpbmdUcmFpdHMYCyADKA0SOgoSVHJhY2tpbmdFcXVpcG1l",
|
||||
"bnRzGAwgAygLMh4uR3JpZEZpZ2h0RXF1aXBtZW50VHJhY2tJbmZvUGISEQoJ",
|
||||
"R3VpZGVDb2RlGA0gASgJEhAKCE1heExldmVsGA4gASgNIlcKHUdyaWRGaWdo",
|
||||
"dEVxdWlwbWVudFRyYWNrSW5mb1BiEhAKCFByaW9yaXR5GAEgASgNEg4KBlJv",
|
||||
"bGVJZBgCIAEoDRIUCgxFcXVpcG1lbnRJZHMYAyADKA0i2AEKE0dyaWRGaWdo",
|
||||
"dFJvbGVJbmZvUGISDgoGUm9sZUlkGAEgASgNEgwKBFRpZXIYAiAB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3RvLlNlcnZlclNpZGViBnByb3RvMw=="));
|
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||
new pbr::FileDescriptor[] { },
|
||||
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
|
||||
@@ -97,7 +97,7 @@ namespace EggLink.DanhengServer.Proto.ServerSide {
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::EggLink.DanhengServer.Proto.ServerSide.GridFightShopItemPb), global::EggLink.DanhengServer.Proto.ServerSide.GridFightShopItemPb.Parser, new[]{ "RoleItem", "Cost", "SoldOut" }, new[]{ "ItemType" }, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::EggLink.DanhengServer.Proto.ServerSide.GridFightShopInfoPb), global::EggLink.DanhengServer.Proto.ServerSide.GridFightShopInfoPb.Parser, new[]{ "ShopLocked", "FreeRefreshCount", "RefreshCost", "ShopItems" }, null, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::EggLink.DanhengServer.Proto.ServerSide.GridFightGameInfoPb), global::EggLink.DanhengServer.Proto.ServerSide.GridFightGameInfoPb.Parser, new[]{ "UniqueId", "DivisionId", "IsOverLock", "Season", "Components" }, null, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::EggLink.DanhengServer.Proto.ServerSide.GridFightBasicInfoPb), global::EggLink.DanhengServer.Proto.ServerSide.GridFightBasicInfoPb.Parser, new[]{ "CurGold", "CurLevel", "LevelExp", "BuyLevelCost", "CurHp", "MaxAvatarNum", "ComboNum", "LockType", "LockReason", "MaxInterest", "TrackingTraits", "TrackingEquipments", "GuideCode", "MaxLevel" }, null, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::EggLink.DanhengServer.Proto.ServerSide.GridFightBasicInfoPb), global::EggLink.DanhengServer.Proto.ServerSide.GridFightBasicInfoPb.Parser, new[]{ "CurGold", "CurLevel", "LevelExp", "BuyLevelCost", "CurHp", "MaxAvatarNum", "ComboNum", "LockType", "LockReason", "MaxInterest", "TrackingTraits", "TrackingEquipments", "GuideCode", "MaxLevel", "OffFieldAvatarNum" }, null, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::EggLink.DanhengServer.Proto.ServerSide.GridFightEquipmentTrackInfoPb), global::EggLink.DanhengServer.Proto.ServerSide.GridFightEquipmentTrackInfoPb.Parser, new[]{ "Priority", "RoleId", "EquipmentIds" }, null, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::EggLink.DanhengServer.Proto.ServerSide.GridFightRoleInfoPb), global::EggLink.DanhengServer.Proto.ServerSide.GridFightRoleInfoPb.Parser, new[]{ "RoleId", "Tier", "Pos", "UniqueId", "SavedValues", "EquipmentIds" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::EggLink.DanhengServer.Proto.ServerSide.GridFightNpcInfoPb), global::EggLink.DanhengServer.Proto.ServerSide.GridFightNpcInfoPb.Parser, new[]{ "NpcId", "Pos", "UniqueId", "EquipmentIds" }, null, null, null, null),
|
||||
@@ -1322,6 +1322,7 @@ namespace EggLink.DanhengServer.Proto.ServerSide {
|
||||
trackingEquipments_ = other.trackingEquipments_.Clone();
|
||||
guideCode_ = other.guideCode_;
|
||||
maxLevel_ = other.maxLevel_;
|
||||
offFieldAvatarNum_ = other.offFieldAvatarNum_;
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
@@ -1497,6 +1498,18 @@ namespace EggLink.DanhengServer.Proto.ServerSide {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "OffFieldAvatarNum" field.</summary>
|
||||
public const int OffFieldAvatarNumFieldNumber = 15;
|
||||
private uint offFieldAvatarNum_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public uint OffFieldAvatarNum {
|
||||
get { return offFieldAvatarNum_; }
|
||||
set {
|
||||
offFieldAvatarNum_ = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
@@ -1526,6 +1539,7 @@ namespace EggLink.DanhengServer.Proto.ServerSide {
|
||||
if(!trackingEquipments_.Equals(other.trackingEquipments_)) return false;
|
||||
if (GuideCode != other.GuideCode) return false;
|
||||
if (MaxLevel != other.MaxLevel) return false;
|
||||
if (OffFieldAvatarNum != other.OffFieldAvatarNum) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
@@ -1547,6 +1561,7 @@ namespace EggLink.DanhengServer.Proto.ServerSide {
|
||||
hash ^= trackingEquipments_.GetHashCode();
|
||||
if (GuideCode.Length != 0) hash ^= GuideCode.GetHashCode();
|
||||
if (MaxLevel != 0) hash ^= MaxLevel.GetHashCode();
|
||||
if (OffFieldAvatarNum != 0) hash ^= OffFieldAvatarNum.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
@@ -1615,6 +1630,10 @@ namespace EggLink.DanhengServer.Proto.ServerSide {
|
||||
output.WriteRawTag(112);
|
||||
output.WriteUInt32(MaxLevel);
|
||||
}
|
||||
if (OffFieldAvatarNum != 0) {
|
||||
output.WriteRawTag(120);
|
||||
output.WriteUInt32(OffFieldAvatarNum);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
@@ -1675,6 +1694,10 @@ namespace EggLink.DanhengServer.Proto.ServerSide {
|
||||
output.WriteRawTag(112);
|
||||
output.WriteUInt32(MaxLevel);
|
||||
}
|
||||
if (OffFieldAvatarNum != 0) {
|
||||
output.WriteRawTag(120);
|
||||
output.WriteUInt32(OffFieldAvatarNum);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
@@ -1723,6 +1746,9 @@ namespace EggLink.DanhengServer.Proto.ServerSide {
|
||||
if (MaxLevel != 0) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MaxLevel);
|
||||
}
|
||||
if (OffFieldAvatarNum != 0) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeUInt32Size(OffFieldAvatarNum);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
@@ -1773,6 +1799,9 @@ namespace EggLink.DanhengServer.Proto.ServerSide {
|
||||
if (other.MaxLevel != 0) {
|
||||
MaxLevel = other.MaxLevel;
|
||||
}
|
||||
if (other.OffFieldAvatarNum != 0) {
|
||||
OffFieldAvatarNum = other.OffFieldAvatarNum;
|
||||
}
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
@@ -1845,6 +1874,10 @@ namespace EggLink.DanhengServer.Proto.ServerSide {
|
||||
MaxLevel = input.ReadUInt32();
|
||||
break;
|
||||
}
|
||||
case 120: {
|
||||
OffFieldAvatarNum = input.ReadUInt32();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1917,6 +1950,10 @@ namespace EggLink.DanhengServer.Proto.ServerSide {
|
||||
MaxLevel = input.ReadUInt32();
|
||||
break;
|
||||
}
|
||||
case 120: {
|
||||
OffFieldAvatarNum = input.ReadUInt32();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ message GridFightBasicInfoPb {
|
||||
repeated GridFightEquipmentTrackInfoPb TrackingEquipments = 12;
|
||||
string GuideCode = 13;
|
||||
uint32 MaxLevel = 14;
|
||||
uint32 OffFieldAvatarNum = 15;
|
||||
}
|
||||
|
||||
message GridFightEquipmentTrackInfoPb {
|
||||
|
||||
Reference in New Issue
Block a user