Ejemplo n.º 1
0
 public static void UpdateZhuLingZhuHunProps(GameClient client)
 {
     if (null != client.ClientData.MyWingData)
     {
         if (client.ClientData.MyWingData.WingID > 0)
         {
             ZhuLingZhuHunEffect e = ZhuLingZhuHunManager.GetEffect(Global.CalcOriginalOccupationID(client));
             if (e != null)
             {
                 double MaxAttackV   = 0.0;
                 double MinAttackV   = 0.0;
                 double MaxMAttackV  = 0.0;
                 double MinMAttackV  = 0.0;
                 double MaxDefenseV  = 0.0;
                 double MinDefenseV  = 0.0;
                 double MaxMDefenseV = 0.0;
                 double MinMDefenseV = 0.0;
                 double LifeV        = 0.0;
                 double HitV         = 0.0;
                 double DodgeV       = 0.0;
                 if (client.ClientData.MyWingData.Using == 1)
                 {
                     MaxAttackV   = (double)(e.MaxAttackV * client.ClientData.MyWingData.ZhuLingNum);
                     MaxMAttackV  = (double)(e.MaxMAttackV * client.ClientData.MyWingData.ZhuLingNum);
                     MaxDefenseV  = (double)(e.MaxDefenseV * client.ClientData.MyWingData.ZhuLingNum);
                     MaxMDefenseV = (double)(e.MaxMDefenseV * client.ClientData.MyWingData.ZhuLingNum);
                     LifeV        = (double)(e.LifeV * client.ClientData.MyWingData.ZhuLingNum);
                     HitV         = (double)(e.HitV * client.ClientData.MyWingData.ZhuLingNum);
                     DodgeV       = (double)(e.DodgeV * client.ClientData.MyWingData.ZhuLingNum);
                     double        AllAttribute    = e.AllAttribute;
                     SystemXmlItem baseXmlNodeSuit = WingPropsCacheManager.GetWingPropsCacheItem(Global.CalcOriginalOccupationID(client), client.ClientData.MyWingData.WingID);
                     SystemXmlItem baseXmlNodeStar = WingStarCacheManager.GetWingStarCacheItem(Global.CalcOriginalOccupationID(client), client.ClientData.MyWingData.WingID, client.ClientData.MyWingData.ForgeLevel);
                     if (baseXmlNodeSuit == null)
                     {
                         baseXmlNodeSuit = new SystemXmlItem();
                     }
                     if (baseXmlNodeStar == null)
                     {
                         baseXmlNodeStar = new SystemXmlItem();
                     }
                     MaxAttackV   += (baseXmlNodeSuit.GetDoubleValue("MaxAttackV") + baseXmlNodeStar.GetDoubleValue("MaxAttackV")) * (AllAttribute * (double)client.ClientData.MyWingData.ZhuHunNum);
                     MinAttackV   += (baseXmlNodeSuit.GetDoubleValue("MinAttackV") + baseXmlNodeStar.GetDoubleValue("MinAttackV")) * (AllAttribute * (double)client.ClientData.MyWingData.ZhuHunNum);
                     MaxMAttackV  += (baseXmlNodeSuit.GetDoubleValue("MaxMAttackV") + baseXmlNodeStar.GetDoubleValue("MaxMAttackV")) * (AllAttribute * (double)client.ClientData.MyWingData.ZhuHunNum);
                     MinMAttackV  += (baseXmlNodeSuit.GetDoubleValue("MinMAttackV") + baseXmlNodeStar.GetDoubleValue("MinMAttackV")) * (AllAttribute * (double)client.ClientData.MyWingData.ZhuHunNum);
                     MaxDefenseV  += (baseXmlNodeSuit.GetDoubleValue("MaxDefenseV") + baseXmlNodeStar.GetDoubleValue("MaxDefenseV")) * (AllAttribute * (double)client.ClientData.MyWingData.ZhuHunNum);
                     MinDefenseV  += (baseXmlNodeSuit.GetDoubleValue("MinDefenseV") + baseXmlNodeStar.GetDoubleValue("MinDefenseV")) * (AllAttribute * (double)client.ClientData.MyWingData.ZhuHunNum);
                     MaxMDefenseV += (baseXmlNodeSuit.GetDoubleValue("MaxMDefenseV") + baseXmlNodeStar.GetDoubleValue("MaxMDefenseV")) * (AllAttribute * (double)client.ClientData.MyWingData.ZhuHunNum);
                     MinMDefenseV += (baseXmlNodeSuit.GetDoubleValue("MinMDefenseV") + baseXmlNodeStar.GetDoubleValue("MinMDefenseV")) * (AllAttribute * (double)client.ClientData.MyWingData.ZhuHunNum);
                     LifeV        += (baseXmlNodeSuit.GetDoubleValue("MaxLifeV") + baseXmlNodeStar.GetDoubleValue("MaxLifeV")) * (AllAttribute * (double)client.ClientData.MyWingData.ZhuHunNum);
                     HitV         += (baseXmlNodeSuit.GetDoubleValue("HitV") + baseXmlNodeStar.GetDoubleValue("HitV")) * (AllAttribute * (double)client.ClientData.MyWingData.ZhuHunNum);
                     DodgeV       += (baseXmlNodeSuit.GetDoubleValue("Dodge") + baseXmlNodeStar.GetDoubleValue("Dodge")) * (AllAttribute * (double)client.ClientData.MyWingData.ZhuHunNum);
                 }
                 client.ClientData.PropsCacheManager.SetExtPropsSingle(new object[]
                 {
                     6,
                     8,
                     MaxAttackV
                 });
                 client.ClientData.PropsCacheManager.SetExtPropsSingle(new object[]
                 {
                     6,
                     7,
                     MinAttackV
                 });
                 client.ClientData.PropsCacheManager.SetExtPropsSingle(new object[]
                 {
                     6,
                     10,
                     MaxMAttackV
                 });
                 client.ClientData.PropsCacheManager.SetExtPropsSingle(new object[]
                 {
                     6,
                     9,
                     MinMAttackV
                 });
                 client.ClientData.PropsCacheManager.SetExtPropsSingle(new object[]
                 {
                     6,
                     4,
                     MaxDefenseV
                 });
                 client.ClientData.PropsCacheManager.SetExtPropsSingle(new object[]
                 {
                     6,
                     3,
                     MinDefenseV
                 });
                 client.ClientData.PropsCacheManager.SetExtPropsSingle(new object[]
                 {
                     6,
                     6,
                     MaxMDefenseV
                 });
                 client.ClientData.PropsCacheManager.SetExtPropsSingle(new object[]
                 {
                     6,
                     5,
                     MinMDefenseV
                 });
                 client.ClientData.PropsCacheManager.SetExtPropsSingle(new object[]
                 {
                     6,
                     18,
                     HitV
                 });
                 client.ClientData.PropsCacheManager.SetExtPropsSingle(new object[]
                 {
                     6,
                     13,
                     LifeV
                 });
                 client.ClientData.PropsCacheManager.SetExtPropsSingle(new object[]
                 {
                     6,
                     19,
                     DodgeV
                 });
             }
         }
     }
 }
Ejemplo n.º 2
0
        public static void UpdateZhuLingZhuHunProps(GameClient client)
        {
            if (null == client.ClientData.MyWingData)
            {
                return;
            }
            if (client.ClientData.MyWingData.WingID <= 0)
            {
                return;
            }

            ZhuLingZhuHunEffect e = ZhuLingZhuHunManager.GetEffect(Global.CalcOriginalOccupationID(client));

            if (e == null)
            {
                return;
            }

            double MaxAttackV   = 0.0;
            double MinAttackV   = 0.0;
            double MaxMAttackV  = 0.0;
            double MinMAttackV  = 0.0;
            double MaxDefenseV  = 0.0;
            double MinDefenseV  = 0.0;
            double MaxMDefenseV = 0.0;
            double MinMDefenseV = 0.0;
            double LifeV        = 0.0;
            double HitV         = 0.0;
            double DodgeV       = 0.0;
            double AllAttribute = 0.0;

            if (client.ClientData.MyWingData.Using == 1)
            {
                MaxAttackV   = e.MaxAttackV * client.ClientData.MyWingData.ZhuLingNum;
                MaxMAttackV  = e.MaxMAttackV * client.ClientData.MyWingData.ZhuLingNum;
                MaxDefenseV  = e.MaxDefenseV * client.ClientData.MyWingData.ZhuLingNum;
                MaxMDefenseV = e.MaxMDefenseV * client.ClientData.MyWingData.ZhuLingNum;
                LifeV        = e.LifeV * client.ClientData.MyWingData.ZhuLingNum;
                HitV         = e.HitV * client.ClientData.MyWingData.ZhuLingNum;
                DodgeV       = e.DodgeV * client.ClientData.MyWingData.ZhuLingNum;
                AllAttribute = e.AllAttribute;

                SystemXmlItem baseXmlNodeSuit = WingPropsCacheManager.GetWingPropsCacheItem(Global.CalcOriginalOccupationID(client), client.ClientData.MyWingData.WingID);
                SystemXmlItem baseXmlNodeStar = WingStarCacheManager.GetWingStarCacheItem(Global.CalcOriginalOccupationID(client), client.ClientData.MyWingData.WingID, client.ClientData.MyWingData.ForgeLevel);
                if (baseXmlNodeSuit == null)
                {
                    baseXmlNodeSuit = new SystemXmlItem();
                }
                if (baseXmlNodeStar == null)
                {
                    baseXmlNodeStar = new SystemXmlItem();
                }

                // 注魂影响翅膀基础属性的百分比
                MaxAttackV   += (baseXmlNodeSuit.GetDoubleValue("MaxAttackV") + baseXmlNodeStar.GetDoubleValue("MaxAttackV")) * (AllAttribute * client.ClientData.MyWingData.ZhuHunNum);
                MinAttackV   += (baseXmlNodeSuit.GetDoubleValue("MinAttackV") + baseXmlNodeStar.GetDoubleValue("MinAttackV")) * (AllAttribute * client.ClientData.MyWingData.ZhuHunNum);
                MaxMAttackV  += (baseXmlNodeSuit.GetDoubleValue("MaxMAttackV") + baseXmlNodeStar.GetDoubleValue("MaxMAttackV")) * (AllAttribute * client.ClientData.MyWingData.ZhuHunNum);
                MinMAttackV  += (baseXmlNodeSuit.GetDoubleValue("MinMAttackV") + baseXmlNodeStar.GetDoubleValue("MinMAttackV")) * (AllAttribute * client.ClientData.MyWingData.ZhuHunNum);
                MaxDefenseV  += (baseXmlNodeSuit.GetDoubleValue("MaxDefenseV") + baseXmlNodeStar.GetDoubleValue("MaxDefenseV")) * (AllAttribute * client.ClientData.MyWingData.ZhuHunNum);
                MinDefenseV  += (baseXmlNodeSuit.GetDoubleValue("MinDefenseV") + baseXmlNodeStar.GetDoubleValue("MinDefenseV")) * (AllAttribute * client.ClientData.MyWingData.ZhuHunNum);
                MaxMDefenseV += (baseXmlNodeSuit.GetDoubleValue("MaxMDefenseV") + baseXmlNodeStar.GetDoubleValue("MaxMDefenseV")) * (AllAttribute * client.ClientData.MyWingData.ZhuHunNum);
                MinMDefenseV += (baseXmlNodeSuit.GetDoubleValue("MinMDefenseV") + baseXmlNodeStar.GetDoubleValue("MinMDefenseV")) * (AllAttribute * client.ClientData.MyWingData.ZhuHunNum);
                LifeV        += (baseXmlNodeSuit.GetDoubleValue("MaxLifeV") + baseXmlNodeStar.GetDoubleValue("MaxLifeV")) * (AllAttribute * client.ClientData.MyWingData.ZhuHunNum);
                HitV         += (baseXmlNodeSuit.GetDoubleValue("HitV") + baseXmlNodeStar.GetDoubleValue("HitV")) * (AllAttribute * client.ClientData.MyWingData.ZhuHunNum);
                DodgeV       += (baseXmlNodeSuit.GetDoubleValue("Dodge") + baseXmlNodeStar.GetDoubleValue("Dodge")) * (AllAttribute * client.ClientData.MyWingData.ZhuHunNum);
            }

            client.ClientData.PropsCacheManager.SetExtPropsSingle((int)PropsSystemTypes.ZhuLingZhuHunProps, (int)ExtPropIndexes.MaxAttack, MaxAttackV);
            client.ClientData.PropsCacheManager.SetExtPropsSingle((int)PropsSystemTypes.ZhuLingZhuHunProps, (int)ExtPropIndexes.MinAttack, MinAttackV);
            client.ClientData.PropsCacheManager.SetExtPropsSingle((int)PropsSystemTypes.ZhuLingZhuHunProps, (int)ExtPropIndexes.MaxMAttack, MaxMAttackV);
            client.ClientData.PropsCacheManager.SetExtPropsSingle((int)PropsSystemTypes.ZhuLingZhuHunProps, (int)ExtPropIndexes.MinMAttack, MinMAttackV);
            client.ClientData.PropsCacheManager.SetExtPropsSingle((int)PropsSystemTypes.ZhuLingZhuHunProps, (int)ExtPropIndexes.MaxDefense, MaxDefenseV);
            client.ClientData.PropsCacheManager.SetExtPropsSingle((int)PropsSystemTypes.ZhuLingZhuHunProps, (int)ExtPropIndexes.MinDefense, MinDefenseV);
            client.ClientData.PropsCacheManager.SetExtPropsSingle((int)PropsSystemTypes.ZhuLingZhuHunProps, (int)ExtPropIndexes.MaxMDefense, MaxMDefenseV);
            client.ClientData.PropsCacheManager.SetExtPropsSingle((int)PropsSystemTypes.ZhuLingZhuHunProps, (int)ExtPropIndexes.MinMDefense, MinMDefenseV);
            client.ClientData.PropsCacheManager.SetExtPropsSingle((int)PropsSystemTypes.ZhuLingZhuHunProps, (int)ExtPropIndexes.HitV, HitV);
            client.ClientData.PropsCacheManager.SetExtPropsSingle((int)PropsSystemTypes.ZhuLingZhuHunProps, (int)ExtPropIndexes.MaxLifeV, LifeV);
            client.ClientData.PropsCacheManager.SetExtPropsSingle((int)PropsSystemTypes.ZhuLingZhuHunProps, (int)ExtPropIndexes.Dodge, DodgeV);
        }