public void RPC_DSTalkMsg(ulong planesId, string sender, sbyte channel, ulong targetId, string msg, RPC.DataReader hyperlink) { RPC.DataWriter data = new RPC.DataWriter(); var link = hyperlink.ReadDataReader(); data.Write(link.mHandle); var player = Planes.PlanesServerDataManager.Instance.FindPlayerInstance(targetId); if (null != player) { Planes.PlayerInstance.SendTalkMsg2Client(player, channel, sender, msg, data); } }
public void RPC_Say(ulong roleId, sbyte channel, string msg, RPC.DataReader hyperlink, RPC.RPCForwardInfo fwd) { RPC.DataWriter data = new RPC.DataWriter(); var link = hyperlink.ReadDataReader(); data.Write(link.mHandle); var role = GetRole(roleId); if (role == null) { return; } switch ((CSCommon.eSayChannel)channel) { case CSCommon.eSayChannel.WorldChannel: case CSCommon.eSayChannel.SystemChannel: SayToWorld(role, channel, msg, data); break; case CSCommon.eSayChannel.CampChannel: if (!SayToCamp(role, channel, msg, data)) { SayError(role, channel, "未加入国家", new RPC.DataWriter()); } break; case CSCommon.eSayChannel.GuildChannel: if (!SayToGuild(role, channel, msg, data)) { SayError(role, channel, "未加入帮派", new RPC.DataWriter()); } break; case CSCommon.eSayChannel.TeamChannel: if (!SayToTeam(role, channel, msg, data)) { SayError(role, channel, "未加入队伍", new RPC.DataWriter()); } break; } }