Exemplo n.º 1
0
        public static TipShowData GetTip(string key)
        {
            TipData td = chickenDic[key];

            if (td.cat == 2 && key.Contains(","))
            {
                WeaponResConfigItem weapon = SingletonManager.Get <WeaponResourceConfigManager>().GetConfigById(td.id);

                if (weapon.Type == (int)EWeaponType_Config.PrimeWeapon)
                {
                    if (HasTip("w1"))
                    {
                        return(new TipShowData(td.cat, td.id, chickenDic["w1"].id, 1));
                    }
                    else if (HasTip("w2"))
                    {
                        return(new TipShowData(td.cat, td.id, chickenDic["w2"].id, 1));
                    }
                }
                else if (weapon.Type == (int)EWeaponType_Config.SubWeapon)
                {
                    if (HasTip("w3"))
                    {
                        return(new TipShowData(td.cat, td.id, chickenDic["w3"].id, 1));
                    }
                }
            }

            return(new TipShowData(td.cat, td.id, 0, td.count));
        }
Exemplo n.º 2
0
        public static void AddTip(string key, TipData tip)
        {
            if (chickenDic.ContainsKey(key))
            {
                chickenDic.Remove(key);
            }

            chickenDic.Add(key, tip);
        }