Phase2.1 添加武器tag配置和数据表定义

This commit is contained in:
2026-09-27 18:21:26 +08:00
parent 4ac79f0101
commit e0488cc790
47 changed files with 1249 additions and 169 deletions
@@ -15,7 +15,7 @@ namespace SepCore.CustomUtility
public static Rarity SelectRarity(LevelDropConfig dropConfig)
{
float total = dropConfig.WhiteWeight + dropConfig.GreenWeight + dropConfig.BlueWeight + dropConfig.PurpleWeight + dropConfig.RedWeight;
float total = dropConfig.WhiteWeight + dropConfig.BlueWeight + dropConfig.PurpleWeight + dropConfig.RedWeight;
if (total <= 0f)
{
Log.Error("LevelDropConfig '{0}' has invalid total weight '{1}'.", dropConfig.Id, total);
@@ -25,8 +25,6 @@ namespace SepCore.CustomUtility
float roll = Random.Range(0f, total);
if (roll < dropConfig.WhiteWeight) return Rarity.White;
roll -= dropConfig.WhiteWeight;
if (roll < dropConfig.GreenWeight) return Rarity.Green;
roll -= dropConfig.GreenWeight;
if (roll < dropConfig.BlueWeight) return Rarity.Blue;
roll -= dropConfig.BlueWeight;
if (roll < dropConfig.PurpleWeight) return Rarity.Purple;