/// <summary> /// Sends MsgBox to creature's client. /// </summary> /// <param name="creature"></param> /// <param name="title"></param> /// <param name="buttons"></param> /// <param name="align"></param> /// <param name="format"></param> /// <param name="args"></param> public static void MsgBox(Creature creature, string title, MsgBoxButtons buttons, MsgBoxAlign align, string format, params object[] args) { var packet = new Packet(Op.MsgBox, creature.EntityId); packet.PutString(format, args); // Can be sent with the title enum as byte as well. packet.PutString(title); packet.PutByte((byte)buttons); packet.PutByte((byte)align); creature.Client.Send(packet); }
/// <summary> /// Sends MsgBox to creature's client. /// </summary> /// <param name="creature"></param> /// <param name="title"></param> /// <param name="buttons"></param> /// <param name="align"></param> /// <param name="format"></param> /// <param name="args"></param> public static void MsgBox(Creature creature, MsgBoxTitle title, MsgBoxButtons buttons, MsgBoxAlign align, string format, params object[] args) { MsgBox(creature, title.ToString(), MsgBoxButtons.Close, MsgBoxAlign.Center, format, args); }