public static void SendReciveCoper(string name, long Coper,bool CoperType) { using(var packet = new InterPacket(InterHeader.ReciveCoper)) { packet.WriteString(name, 16); packet.WriteLong(Coper); packet.WriteBool(CoperType); WorldConnector.Instance.SendPacket(packet); } }
public static void SendWorldMessage(WorldMessageTypes type, string message, string to = "") { using (var packet = new InterPacket(InterHeader.Worldmsg)) { packet.WriteStringLen(message); packet.WriteByte((byte)type); packet.WriteBool(to != ""); if (to != "") { packet.WriteStringLen(to); } WorldConnector.Instance.SendPacket(packet); } }
public static void FunctionGetCharacterOnline(ZoneConnection pConnection, InterPacket pPacket) { long id; string charName; if(!pPacket.TryReadLong(out id) ||!pPacket.TryReadString(out charName, 16)) throw new InvalidPacketException(); bool isOnline = ClientManager.Instance.IsOnline(charName); using (InterPacket packet = new InterPacket(InterHeader.FunctionAnswer)) { packet.WriteLong(id); packet.WriteBool(isOnline); pConnection.SendPacket(packet); } }