Ejemplo n.º 1
0
		public void SendCustomDialog(string msg, CustomDialogResponse callback)
		{
			if (msg == null)
				msg = "(null)";
			if (callback == null)
			{
				if (log.IsDebugEnabled)
					log.Debug(string.Format("(info dialog): {0}", msg));
			}
			else
			{
				if (log.IsDebugEnabled)
					log.Debug(string.Format("Accepting dialog: {0} {1}\n\"{2}\"", callback.Target, callback.Method, msg));
				callback(null, 1);
			}
		}
Ejemplo n.º 2
0
 public void SendCustomDialog(string msg, CustomDialogResponse callback)
 {
     if (msg == null)
     {
         msg = "(null)";
     }
     if (callback == null)
     {
         if (log.IsDebugEnabled)
         {
             log.Debug(string.Format("(info dialog): {0}", msg));
         }
     }
     else
     {
         if (log.IsDebugEnabled)
         {
             log.Debug(string.Format("Accepting dialog: {0} {1}\n\"{2}\"", callback.Target, callback.Method, msg));
         }
         callback(null, 1);
     }
 }
Ejemplo n.º 3
0
		public virtual void SendCustomDialog(string msg, CustomDialogResponse callback)
		{
			if (m_gameClient.Player == null)
				return;

			lock (m_gameClient.Player)
			{
				if (m_gameClient.Player.CustomDialogCallback != null)
					m_gameClient.Player.CustomDialogCallback(m_gameClient.Player, 0x00);
				m_gameClient.Player.CustomDialogCallback = callback;
			}

			using (var pak = new GSTCPPacketOut(GetPacketCode(eServerPackets.Dialog)))
			{
				pak.WriteByte(0x00);
				pak.WriteByte((byte) eDialogCode.CustomDialog);
				pak.WriteShort((ushort) m_gameClient.SessionID); //data1
				pak.WriteShort(0x01); //custom dialog!	  //data2
				pak.WriteShort(0x00); //data3
				pak.WriteShort(0x00);
				pak.WriteByte((byte) (callback == null ? 0x00 : 0x01)); //ok or yes/no response
				pak.WriteByte(0x01); // autowrap text
				if (msg.Length > 0)
					pak.WriteString(msg, msg.Length);
				pak.WriteByte(0x00);
				SendTCP(pak);
			}
		}
Ejemplo n.º 4
0
 public void SendCustomDialog(string msg, CustomDialogResponse callback, bool customFormat)
 {
 }                                                                                              //patch 0017
Ejemplo n.º 5
0
		public void SendCustomDialog(string msg, CustomDialogResponse callback)
		{
			if (SendCustomDialogMethod != null) SendCustomDialogMethod(this, msg, callback);
		}