高级玩家

- 贡献度
- 7
- 金元
- 3043
- 积分
- 332
- 精华
- 0
- 注册时间
- 2009-11-15
|
搜索RefreshArmourShop,修改代码如下:
public void RefreshArmourShop()
{
this.armourStock.items.Clear();
this.armourStock.money = UnityEngine.Random.Range(25000, 120000);
List<UIEquipmentInfo> equipmentByQuality = UIItemDatabase.Instance.GetEquipmentByQuality(UIItemQuality.Legendary);
for (int i = 0; i < equipmentByQuality.Count; i++)
{
this.armourStock.AddNewInventory(equipmentByQuality[i], 1, null);
}
}
UIItemQuality.Legendary就是传奇装备
UIItemQuality.Epic就是稀有装备
搜索RefreshFoodShop,修改代码如下:
public void RefreshFoodShop(List<CraftRecipe> recipeList, List<UIItemInfo> goodList)
{
this.foodStock.items.Clear();
this.foodStock.money = UnityEngine.Random.Range(3000, 10000);
List<UIItemInfo> list = UIItemDatabase.Instance.GetItemByTypeAndQuality(ItemType.Consumable, UIItemQuality.Legendary);
for (int i = 0; i < list.Count; i++)
{
this.foodStock.AddNewInventory(list[i], 100, null);
}
List<UIItemInfo> list2 = UIItemDatabase.Instance.GetItemByTypeAndQuality(ItemType.Consumable, UIItemQuality.Epic);
for (int j = 0; j < list2.Count; j++)
{
this.foodStock.AddNewInventory(list2[j], 100, null);
}
List<UIItemInfo> list3 = UIItemDatabase.Instance.GetItemByTypeAndQuality(ItemType.Consumable, UIItemQuality.Rare);
for (int k = 0; k < list3.Count; k++)
{
this.foodStock.AddNewInventory(list3[k], 100, null);
}
List<UIItemInfo> list4 = UIItemDatabase.Instance.GetItemByTypeAndQuality(ItemType.Consumable, UIItemQuality.Common);
for (int l = 0; l < list4.Count; l++)
{
this.foodStock.AddNewInventory(list4[l], 100, null);
}
}
好了,商店里什么都有了,剩下的就是钱的问题了 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
评分
-
2
查看全部评分
-
|