public override void onMPChanged(Int32 oldValue) { // Dbg.DEBUG_MSG(className + "::set_MP: " + old + " => " + v); Event.fireOut("set_MP", new object[] { this, MP, MP_Max }); }
public override void onHP_MaxChanged(Int32 oldValue) { // Dbg.DEBUG_MSG(className + "::set_HP_Max: " + old + " => " + v); Event.fireOut("set_HP_Max", new object[] { this, HP_Max, HP }); }
public override void onJump() { Dbg.DEBUG_MSG(className + "::onJump: " + id); Event.fireOut("otherAvatarOnJump", new object[] { this }); }
public override void onRemoveSkill(Int32 skillID) { Dbg.DEBUG_MSG(className + "::onRemoveSkill(" + skillID + ")"); Event.fireOut("onRemoveSkill", new object[] { this }); SkillBox.inst.remove(skillID); }
public virtual void onLeaveSpace() { Dbg.DEBUG_MSG(classtype + "::onLeaveSpace: " + id); inWorld = false; Event.fireOut("onLeaveSpace", new object[] { this }); }
public virtual void onEnterSpace() { Dbg.DEBUG_MSG(classtype + "::onEnterSpace(" + getDefinedPropterty("uid") + "): " + id); inWorld = true; Event.fireOut("onEnterSpace", new object[] { this }); }
public void recv() { if (socket_ == null || socket_.Connected == false) { throw new ArgumentException("invalid socket!"); } if (socket_.Poll(1000, SelectMode.SelectRead)) { if (socket_ == null || socket_.Connected == false) { Dbg.WARNING_MSG("invalid socket!"); return; } byte[] datas = new byte[MemoryStream.BUFFER_MAX]; int successReceiveBytes = 0; try { successReceiveBytes = socket_.Receive(datas, MemoryStream.BUFFER_MAX, 0); } catch (SocketException err) { if (err.ErrorCode == 10054 || err.ErrorCode == 10053) { Dbg.DEBUG_MSG(string.Format("NetworkInterface::recv(): disable connect!")); if (socket_ != null && socket_.Connected) { socket_.Close(); } socket_ = null; Event.fire("onDisableConnect", new object[] {}); } else { Dbg.ERROR_MSG(string.Format("NetworkInterface::recv(): socket error(" + err.ErrorCode + ")!")); } } if (successReceiveBytes > 0) { // Dbg.DEBUG_MSG(string.Format("NetworkInterface::recv(): size={0}!", successReceiveBytes)); } else if (successReceiveBytes == 0) { Dbg.DEBUG_MSG(string.Format("NetworkInterface::recv(): disable connect!")); if (socket_ != null && socket_.Connected) { socket_.Close(); } socket_ = null; } else { Dbg.ERROR_MSG(string.Format("NetworkInterface::recv(): socket error!")); } msgReader.process(datas, (MessageLength)successReceiveBytes); } }