コード例 #1
0
        /// <summary>
        /// Print item message.
        /// </summary>
        /// <param name="pricedItem">priced item.</param>
        public void PrintItemMessage(PricedItem pricedItem)
        {
            var payloadList = new List <Payload>();

            if (this.Configuration.UseChatColors)
            {
                payloadList.Add(new UIForegroundPayload(pricedItem.ChatColor));
            }

            if (this.Configuration.UseItemLinks)
            {
                payloadList.Add(new ItemPayload(pricedItem.ItemId, pricedItem.IsHQ));
                payloadList.Add(new TextPayload($"{(char)SeIconChar.LinkMarker}"));
                payloadList.Add(new TextPayload(" " + pricedItem.ItemName));
                payloadList.Add(RawPayload.LinkTerminator);
            }
            else
            {
                payloadList.Add(new TextPayload(pricedItem.ItemName));
            }

            payloadList.Add(new TextPayload(" " + (char)SeIconChar.ArrowRight + " " + pricedItem.Message));
            if (this.Configuration.UseChatColors)
            {
                payloadList.Add(new UIForegroundPayload(0));
            }
            if (this.Configuration.ChatChannel == XivChatType.None)
            {
                Chat.PluginPrint(payloadList);
            }
            else
            {
                Chat.PluginPrint(payloadList, this.Configuration.ChatChannel);
            }
        }
コード例 #2
0
 /// <summary>
 /// Send toast.
 /// </summary>
 /// <param name="pricedItem">priced Item.</param>
 public static void SendToast(PricedItem pricedItem)
 {
     Toast.ShowNormal(
         $"{pricedItem.ItemName} {(char)SeIconChar.ArrowRight} {pricedItem.Message}");
 }