XtGameKit/Doc/Item-Design-Rule.md

425 B

通用 Item 设计约定

核心原则

  • 全游戏可获得资源必须用 itemId 表示
  • 禁止在 Player 上新增 Gold/Diamond/Food/Wood 等独立货币字段
  • 发奖统一走 BagComponentSystem.AddItems
  • 扣费统一走 BagComponentSystem.RemoveItems

预留货币段

  • 1 = 金币
  • 2 = 钻石
  • 3 = PvP 币

统一结构

  • RewardEntry { itemId, count }
  • CostEntry { itemId, count }