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
@@ -167,7 +167,7 @@ namespace SepCore.UI
if (goodsConfig.GoodsType == GoodsType.Prop)
{
PropConfig propConfig = GameEntry.Luban.Get<PropConfig>(goodsConfig.PropId);
PropConfig propConfig = GameEntry.Luban.Get<PropConfig>(goodsConfig.RefId);
int basePrice = propConfig.Price;
price = CalculateRandomizedPrice(basePrice, priceRandomPercent);
@@ -177,7 +177,7 @@ namespace SepCore.UI
}
else if (goodsConfig.GoodsType == GoodsType.Weapon)
{
WeaponConfig weaponConfig = GameEntry.Luban.Get<WeaponConfig>((int)goodsConfig.WeaponType);
WeaponConfig weaponConfig = GameEntry.Luban.Get<WeaponConfig>(goodsConfig.RefId);
int basePrice = weaponConfig.Price;
price = CalculateRandomizedPrice(basePrice, priceRandomPercent);
@@ -197,8 +197,7 @@ namespace SepCore.UI
_selections.Add(new ShopGoodsSelection
{
GoodsType = goodsConfig.GoodsType,
PropId = goodsConfig.PropId,
WeaponType = goodsConfig.WeaponType,
RefId = goodsConfig.RefId,
Price = price
});
@@ -253,14 +252,14 @@ namespace SepCore.UI
if (goods.GoodsType == GoodsType.Prop)
{
PropConfig propConfig = GameEntry.Luban.Get<PropConfig>(goods.PropId);
PropConfig propConfig = GameEntry.Luban.Get<PropConfig>(goods.RefId);
rarity = propConfig.Rarity;
return true;
}
if (goods.GoodsType == GoodsType.Weapon)
{
WeaponConfig weaponConfig = GameEntry.Luban.Get<WeaponConfig>((int)goods.WeaponType);
WeaponConfig weaponConfig = GameEntry.Luban.Get<WeaponConfig>(goods.RefId);
rarity = weaponConfig.Rarity;
return true;
}
@@ -285,7 +284,7 @@ namespace SepCore.UI
{
if (goods.GoodsType == GoodsType.Prop)
{
PropConfig propConfig = GameEntry.Luban.Get<PropConfig>(goods.PropId);
PropConfig propConfig = GameEntry.Luban.Get<PropConfig>(goods.RefId);
_player.AddProp(new PropItem(propConfig));
return new DisplayItemRawData
{
@@ -303,7 +302,7 @@ namespace SepCore.UI
return null;
}
WeaponConfig weaponConfig = GameEntry.Luban.Get<WeaponConfig>((int)goods.WeaponType);
WeaponConfig weaponConfig = GameEntry.Luban.Get<WeaponConfig>(goods.RefId);
int id = GameEntry.Entity.NextId();
var weaponData = EntityDataFactory.Create(id, weaponConfig, _player.Id, CampType.Player);
@@ -311,7 +310,7 @@ namespace SepCore.UI
if (weapon == null)
{
Log.Warning(
$"ShopFormUseCase::ApplyGoodsPurchase: Show weapon failed, weapon type id = {goods.WeaponType}");
$"ShopFormUseCase::ApplyGoodsPurchase: Show weapon failed, weapon type id = {goods.RefId}");
return null;
}