//购买金币请求 private void BuyGold(byte value) { MemoryStream msdata = new MemoryStream(); Module_3.write_3_43(msdata, value); AppNet.gameNet.send(msdata, 3, 43); }
//获得金币信息 public void GetGoldBuyInfo() { MemoryStream msdata = new MemoryStream(); Module_3.write_3_42(msdata); AppNet.gameNet.send(msdata, 3, 42); }
/// <summary> /// 主角血蓝变化 /// </summary> public void SendHeroHpAndMagic(uint hp, uint mp) { MemoryStream msdata = new MemoryStream(); Module_3.write_3_6(msdata, hp, mp); AppNet.gameNet.send(msdata, 3, 6); }
/** * 请求角色信息 */ // public void RequestRoleInfo() // { // MemoryStream msdata = new MemoryStream(); // Module_3.write_3_1(msdata); // AppNet.gameNet.send(msdata,3,1); // } /** * buff列表 */ public void RequestBuffList() { MemoryStream msdata = new MemoryStream(); Module_3.write_3_2(msdata); AppNet.gameNet.send(msdata, 3, 2); }
//购买体力 public void BuyVigour(byte type) { MemoryStream msdata = new MemoryStream(); Module_3.write_3_40(msdata, type); AppNet.gameNet.send(msdata, 3, 40); }
/** * 财富更新 */ public void UpdateMoney() { MemoryStream msdata = new MemoryStream(); Module_3.write_3_5(msdata); AppNet.gameNet.send(msdata, 3, 5); }
/** * 其他人信息(角色属性面板) */ public void RequestOtherRoleInfo(uint id) { MemoryStream msdata = new MemoryStream(); Module_3.write_3_3(msdata, id); AppNet.gameNet.send(msdata, 3, 3); }
/** * 复活 复活类型1使用钻石 2使用道具 3回城复活 * 复活 */ public void ReLife(byte type) { Log.info(this, "-ReLife()发送3-20复活协议,参数:" + type); MemoryStream msdata = new MemoryStream(); Module_3.write_3_20(msdata, type); AppNet.gameNet.send(msdata, 3, 20); }
/// <summary> /// 状态更新 /// </summary> public void SendStatuChange() { var msdata = new MemoryStream(); var statu = (byte)AppMap.Instance.me.Controller.StatuController.CurrentStatu; var x = (uint)(AppMap.Instance.me.Controller.transform.position.x * 1000); var y = (uint)(AppMap.Instance.me.Controller.transform.position.y * 1000); var dir = (byte)AppMap.Instance.me.CurDire; Module_3.write_3_44(msdata, statu, x, y, dir); //Log.info(this, "Statu:" + statu + "X" + x + "Y" + y + "Dir" + dir +""); AppNet.gameNet.send(msdata, 3, 44); }