static DHFormatter() { RefreshFormatForCurrentThread(); stringFormatter = new DBCHAR(); stringFormatter.Attributes.Add(new TrimAttribute('"')); boolFormatter = new DBBIT(); intFormatter = new DBINT(); }
public void showItemToolTip(HabProperties hpsItem, bool inventory) { UIRichTextEx.Default.ClearText(); if (hpsItem == null) { return; } UIRichTextEx.Default.AddTaggedText(DHFormatter.ToString(hpsItem.GetValue("Tip")), UIFonts.boldArial8, Color.White);//item.ID, UIFonts.boldArial8, Color.White); string gold = null; string mana = null; HabProperties hpsItemData; if (DHHELPER.IsNewVersionItem(hpsItem.name)) { hpsItemData = DHMpqDatabase.UnitSlkDatabase["UnitBalance"][hpsItem.name]; } else { hpsItemData = DHMpqDatabase.ItemSlkDatabase["ItemData"][hpsItem.name]; } bool pawnable = DHFormatter.ToBool(hpsItemData.GetValue("pawnable")); DBINT goldcost = new DBINT(hpsItemData.GetValue("goldcost")); //int goldcost = DHFormatter.ToInt(hpsItemData.GetValue("goldcost")); if ((inventory && !pawnable) == false) { gold = inventory ? (goldcost / 2) + "" : goldcost.Text; } ShowPrices(mana, gold); tipRTB.Rtf = UIRichTextEx.Default.CloseRtf(); UIRichTextEx.Default.ClearText(); UIRichTextEx.Default.AddTaggedText(DHFormatter.ToString(hpsItem.GetValue("UberTip")), UIFonts.boldArial8, Color.White);//item.description.Text, UIFonts.boldArial8, Color.White); ubertipRTB.Rtf = UIRichTextEx.Default.CloseRtf(); }
public void showItemToolTip(HabProperties hpsItem, bool inventory) { UIRichTextEx.Default.ClearText(); if (hpsItem == null) return; UIRichTextEx.Default.AddTaggedText(DHFormatter.ToString(hpsItem.GetValue("Tip")), UIFonts.boldArial8, Color.White);//item.ID, UIFonts.boldArial8, Color.White); string gold = null; string mana = null; HabProperties hpsItemData; if (DHHELPER.IsNewVersionItem(hpsItem.name)) hpsItemData = DHMpqDatabase.UnitSlkDatabase["UnitBalance"][hpsItem.name]; else hpsItemData = DHMpqDatabase.ItemSlkDatabase["ItemData"][hpsItem.name]; bool pawnable = DHFormatter.ToBool(hpsItemData.GetValue("pawnable")); DBINT goldcost = new DBINT(hpsItemData.GetValue("goldcost")); //int goldcost = DHFormatter.ToInt(hpsItemData.GetValue("goldcost")); if ((inventory && !pawnable) == false) gold = inventory ? (goldcost / 2) + "" : goldcost.Text; ShowPrices(mana, gold); tipRTB.Rtf = UIRichTextEx.Default.CloseRtf(); UIRichTextEx.Default.ClearText(); UIRichTextEx.Default.AddTaggedText(DHFormatter.ToString(hpsItem.GetValue("UberTip")), UIFonts.boldArial8, Color.White);//item.description.Text, UIFonts.boldArial8, Color.White); ubertipRTB.Rtf = UIRichTextEx.Default.CloseRtf(); }