示例#1
0
 private static bool Load(Dictionary <int, TotemInfo> consortiaLevel)
 {
     using (PlayerBussiness playerBussiness = new PlayerBussiness())
     {
         TotemInfo[] allTotem = playerBussiness.GetAllTotem();
         TotemInfo[] array    = allTotem;
         for (int i = 0; i < array.Length; i++)
         {
             TotemInfo totemInfo = array[i];
             if (!consortiaLevel.ContainsKey(totemInfo.ID))
             {
                 consortiaLevel.Add(totemInfo.ID, totemInfo);
             }
         }
     }
     return(true);
 }
示例#2
0
        public static int GetTotemProp(int id, string typeOf)
        {
            int num = 0;

            for (int ID = 10001; ID <= id; ++ID)
            {
                TotemInfo totemInfo = TotemMgr.FindTotemInfo(ID);
                switch (typeOf)
                {
                case "att":
                    num += totemInfo.AddAttack;
                    break;

                case "agi":
                    num += totemInfo.AddAgility;
                    break;

                case "def":
                    num += totemInfo.AddDefence;
                    break;

                case "luc":
                    num += totemInfo.AddLuck;
                    break;

                case "blo":
                    num += totemInfo.AddBlood;
                    break;

                case "dam":
                    num += totemInfo.AddDamage;
                    break;

                case "gua":
                    num += totemInfo.AddGuard;
                    break;
                }
            }
            return(num);
        }