using System.Collections.Generic; public class PhantasmPavilionChatBubbleHandler : IPhantasmPavilionTabHandler { public string GetDescriptive(int id) { return ChatBubbleBoxConfig.Get(id).Descriptive; } public int GetExpireMinutes(int id) { return ChatBubbleBoxConfig.Get(id).ExpireMinutes; } public string GetImage(int id) { return ChatBubbleBoxConfig.Get(id).Icon; } public string GetName(int id) { return ChatBubbleBoxConfig.Get(id).Name; } public int GetSortNum(int id) { return ChatBubbleBoxConfig.Get(id).SortNum; } public List GetTableKeys() { return ChatBubbleBoxConfig.GetKeys(); } public int GetUnlockDefault(int id) { return ChatBubbleBoxConfig.Get(id).UnlockDefault; } public bool Has(int id) { return ChatBubbleBoxConfig.HasKey(id); } public void SendUsePack(int id) { PhantasmPavilionModel.Instance.SendCA230SetChatBubbleBox(id); } public bool TryGetEffectID(int id, out int effectID) { effectID = 0; return false; } public bool TryGetUnLockAttr(int id, out int[] lightAttrTypeArr, out int[] lightAttrValueArr) { lightAttrTypeArr = new int[0]; lightAttrValueArr = new int[0]; if (!ChatBubbleBoxConfig.HasKey(id)) return false; ChatBubbleBoxConfig config = ChatBubbleBoxConfig.Get(id); if (config.LightAttrType.IsNullOrEmpty() || config.LightAttrValue.IsNullOrEmpty() || config.LightAttrType.Length != config.LightAttrValue.Length) return false; lightAttrTypeArr = config.LightAttrType; lightAttrValueArr = config.LightAttrValue; return true; } public bool TryGetUnLockNeedItem(int id, out int itemId, out int count) { itemId = 0; count = 0; if (!ChatBubbleBoxConfig.HasKey(id)) return false; ChatBubbleBoxConfig config = ChatBubbleBoxConfig.Get(id); if (config.UnlockNeedItemList.IsNullOrEmpty()) return false; itemId = config.UnlockNeedItemList[0][0]; count = config.UnlockNeedItemList[0][1]; return true; } }