初级玩家

- 贡献度
- 0
- 金元
- 739
- 积分
- 74
- 精华
- 0
- 注册时间
- 2020-12-3
|
令牌购买:
1.删除门派低位检查,且不消耗令牌()
public void OnBuyClick()
{
if (this.selectItem == null)
{
return;
}
// if (this.selectItem.shopProto.level > this.menpaiLevel)
// {
// CommonTipView.Instance.ItemUseResultPop.ShowPop("您的门派阶位不够", 1f, 1f);
// return;
// }
if (this.selectItem.data.count <= 0)
{
CommonTipView.Instance.ItemUseResultPop.ShowPop("当期物品已经售空", 1f, 1f);
return;
}
this.menPaiBuyPanel.OnShow(this.selectItem);
}
删除令牌检查代码,删除令牌扣去代码
public void OnBuyItem()
{
// if (this.menPaiShopStoreView.menpaiLevel != 5 && !this.CheckBuy())
// {
// CommonTipView.Instance.ItemUseResultPop.ShowPop("您的令牌不足", 1f, 1f);
// return;
// }
this.menPaiShopStoreView.data.OnBuyItem(this.menpaiItem.data, this.curCount);
Item item = WorldManager.Instance.m_PlayerEntity.m_itemStorage.CreateAndAddByItemId(this.menpaiItem.data.item.m_pProtoId, this.curCount, true, 0, -1);
if (item != null)
{
item.CreateData(this.menpaiItem.data.item);
item.SetOverlap(this.curCount);
}
// if (this.menPaiShopStoreView.menpaiLevel != 5)
// {
// WorldManager.Instance.m_PlayerEntity.m_itemStorage.RemoveItem(this.menPaiShopStoreView.menPai.menpaidaibiItemId, this.shopProto.costItemCount * this.curCount, true);
// }
this.menpaiItem.OnInit(this.menpaiItem.data);
this.buyItemData.OnInit(this.menpaiItem.data);
if (!WorldManager.Instance.m_PlayerEntity.m_ShopBuyCountDic.ContainsKey(this.menPaiShopStoreView.entity.guid))
{
WorldManager.Instance.m_PlayerEntity.m_ShopBuyCountDic.Add(this.menPaiShopStoreView.entity.guid, this.curCount);
}
else
{
Dictionary<int, int> shopBuyCountDic = WorldManager.Instance.m_PlayerEntity.m_ShopBuyCountDic;
int guid = this.menPaiShopStoreView.entity.guid;
shopBuyCountDic[guid] += this.curCount;
}
if (this.menpaiItem.data.count <= 0)
{
this.OnHide();
}
this.menPaiShopStoreView.RefreshInfo();
this.OnRefreshInfo();
}
===================
|
|