Added GachaWeaponPoolTable but weapons banners not work (idk why)

This commit is contained in:
AlessandroCH
2025-05-10 17:45:59 +02:00
parent 1bd767d9ce
commit 2e2469cf00
3 changed files with 61 additions and 2 deletions

View File

@@ -30,8 +30,50 @@ namespace Campofinale.Packets.Sc
WeaponGachaPool = new()
{
}
},
};
foreach(var item in gachaWeaponPoolTable)
{
(int fiveStarPity, int sixStarPity, GachaTransaction? lastSixStar, bool isFiftyFiftyLost)
PityInfo = client.gachaManager.GetCurrentPity(item.Value.id);
ScdGachaPoolInfo wPool = new ScdGachaPoolInfo()
{
GachaPoolId = item.Value.id,
IsClosed = false,
CloseTime = DateTime.UtcNow.AddDays(20).ToUnixTimestampMilliseconds() / 1000,
OpenTime = DateTime.UtcNow.ToUnixTimestampMilliseconds() / 1000,
PublicCloseReason = 0,
};
if (item.Value.closeTimes.Count == 0)
{
wPool.CloseTime = 0;
wPool.OpenTime = 0;
}
proto.WeaponGachaPool.GachaPoolInfos.Add(wPool);
proto.WeaponGachaPool.GachaPoolRoleDatas.Add(new ScdGachaPoolRoleData()
{
GachaPoolId = item.Value.id,
IsClosed = false,
PersonalCloseReason = 0,
SoftGuaranteeProgress = PityInfo.sixStarPity,
TotalPullCount = PityInfo.sixStarPity,
Star5SoftGuaranteeProgress = PityInfo.fiveStarPity,
HardGuaranteeProgress = PityInfo.sixStarPity,
});
proto.WeaponGachaPool.GachaPoolCategoryRoleDatas.Add(new ScdGachaPoolCategoryRoleData()
{
GachaPoolType = item.Value.type,
TotalPullCount = PityInfo.sixStarPity,
Star5SoftGuaranteeProgress = PityInfo.fiveStarPity,
SoftGuaranteeProgress = PityInfo.sixStarPity,
});
}
//TODO: Implement banner config for opentime etc
foreach (var item in gachaCharPoolTable)
{