Beispiel #1
0
 public static void SendScriptMethods(Client client, string ClassName)
 {
     TcpPacket packet = new TcpPacket("scriptmethods");
     EditorClass @class = classes.FindByName(ClassName);
     if (@class != null) {
         packet.AppendParameters(@class.Methods.Count.ToString(), ClassName);
         for (int i = 0; i < @class.Methods.Count; i++) {
             packet.StartParameterSegment();
             if (@class.Methods[i].Static) {
                 packet.AppendParameterSegment("[static] ");
             }
             if (!string.IsNullOrEmpty(@class.Methods[i].Type)) {
                 packet.AppendParameterSegment(@class.Methods[i].Type);
                 packet.AppendParameterSegment(" ");
             }
             packet.AppendParameterSegment(@class.Methods[i].Name);
             packet.EndParameterSegment();
         }
         packet.FinalizePacket();
         Messenger.SendDataTo(client, packet);
     }
 }