private void OnReq_StrengthEquip(MessageRecv obj) { System.IO.MemoryStream ms = new System.IO.MemoryStream(obj.Data); ReqStrengthEquip req = Serializer.Deserialize <ReqStrengthEquip>(ms); AckStrengthEquip ack = new AckStrengthEquip(); ack.TarEquip = req.TarEquip; ack.UseItems.AddRange(req.UseItems); NetworkManager.Instance.Send(MessageID.MSG_ACK_STRENGTHEN_EQUIP, ack, 0, 0); }
public void TryStrengthEquip(XEquip equip, List <XItem> list) { if (list.Count == 0) { GTItemHelper.ShowTip("请添加装备或者水晶"); return; } int addExpNum = EquipModule.Instance.GetStrengthenExpByMatList(list); if (!GTItemHelper.CheckItemEnongh(DEquip.EQUIP_STRENGTHEN_MONEY_ID_1, addExpNum)) { return; } ReqStrengthEquip req = new ReqStrengthEquip(); req.TarEquip = equip; req.UseItems.AddRange(list); NetworkManager.Instance.Send <ReqStrengthEquip>(MessageID.MSG_REQ_STRENGTHEN_EQUIP, req); }