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)
{

View File

@@ -37,15 +37,19 @@ namespace Campofinale.Resource
public static Dictionary<string, ItemTable> itemTable = new();
public static Dictionary<string, DomainDataTable> domainDataTable = new();
public static Dictionary<string, CollectionTable> collectionTable = new();
public static Dictionary<string, GachaCharPoolTable> gachaCharPoolTable = new();
public static Dictionary<string, CharBreakNodeTable> charBreakNodeTable = new();
public static Dictionary<string, EnemyAttributeTemplateTable> enemyAttributeTemplateTable = new();
public static Dictionary<string, CharLevelUpTable> charLevelUpTable = new();
public static Dictionary<string, ExpItemDataMap> expItemDataMap = new();
public static Dictionary<string, CharGrowthTable> charGrowthTable = new();
public static Dictionary<string, WeaponUpgradeTemplateTable> weaponUpgradeTemplateTable = new();
//Gacha
public static Dictionary<string, GachaCharPoolTable> gachaCharPoolTable = new();
public static Dictionary<string, GachaCharPoolContentTable> gachaCharPoolContentTable = new();
public static Dictionary<string, GachaCharPoolTypeTable> gachaCharPoolTypeTable = new();
public static Dictionary<string, GachaWeaponPoolTable> gachaWeaponPoolTable = new();
//
public static Dictionary<string, EnemyTable> enemyTable = new();
public static Dictionary<string, EquipTable> equipTable = new();
public static Dictionary<string, EquipSuitTable> equipSuitTable = new();
@@ -63,6 +67,8 @@ namespace Campofinale.Resource
public static Dictionary<int, ItemTypeTable> itemTypeTable = new(); //
public static Dictionary<string, SNSChatTable> snsChatTable = new();//
public static Dictionary<string, GiftItemTable> giftItemTable = new();
public static Dictionary<string, MissionDataTable> missionDataTable = new();
public static InteractiveTable interactiveTable = new(); //
public static List<LevelScene> levelDatas = new();
public static List<InteractiveData> interactiveData = new();

View File

@@ -0,0 +1,11 @@
namespace Campofinale.Resource.Table
{
[TableCfgType("TableCfg/GachaWeaponPoolTable.json", LoadPriority.LOW)]
public class GachaWeaponPoolTable
{
public string id;
public int type;
public List<string> upWeaponIds;
public List<string> closeTimes;
}
}