protected override void OnClickBringButton() { if (m_ElementLevel + 1 > m_MaxElementLevel) { InterfaceControler.GetInst().AddMsgBox(GameUtils.getString("ui_yingxiongqianghua_peiyang9"), this.gameObject.transform); return; } int id = m_NextTData.getConsumption(); int haveNum = -1; if (m_NextTData.getConsumption() == 1400000003)//圣灵之泉 不是道具 { haveNum = ObjectSelf.GetInstance().HeroMoney; } else { haveNum = GetIdInBagNum(id); } int needNum = m_NextTData.getNumber(); if (haveNum < needNum) { InterfaceControler.GetInst().AddMsgBox(GameUtils.getString("ui_yingxiongqianghua_peiyang8"), this.gameObject.transform); return; } CPeiyangHero chero = new CPeiyangHero(); chero.herokey = (int)m_HeroData.GUID.GUID_value; chero.slotnum = (byte)((int)ObjectSelf.GetInstance().CurBringType + 1); chero.isreset = (byte)0; IOControler.GetInstance().SendProtocol(chero); }
public void AddProperty(byte num) { CPeiyangHero chero = new CPeiyangHero(); chero.herokey = (int)obj.GetGuid().GUID_value; chero.slotnum = num; IOControler.GetInstance().SendProtocol(chero); }
private void ResetHandle(object data) { CPeiyangHero chero = new CPeiyangHero(); chero.herokey = (int)m_HeroData.GUID.GUID_value; chero.slotnum = (byte)((int)ObjectSelf.GetInstance().CurBringType + 1); chero.isreset = (byte)1; IOControler.GetInstance().SendProtocol(chero); }