Exemple #1
0
        public override void Calculate(StatFunctionEnvironment statFuncEnv)
        {
            if (statFuncEnv.Character is L2Player player)
            {
                if (player.Inventory.GetPaperdollItem(PaperdollHead) != null)
                {
                    statFuncEnv.SubValue(12);
                }
                if (player.Inventory.GetPaperdollItem(PaperdollChest) != null)
                {
                    statFuncEnv.SubValue(31);
                }
                if (player.Inventory.GetPaperdollItem(PaperdollLegs) != null)
                {
                    statFuncEnv.SubValue(18);
                }
                if (player.Inventory.GetPaperdollItem(PaperdollGloves) != null)
                {
                    statFuncEnv.SubValue(8);
                }
                if (player.Inventory.GetPaperdollItem(PaperdollFeet) != null)
                {
                    statFuncEnv.SubValue(7);
                }
            }

            statFuncEnv.MulValue(statFuncEnv.Character.GetLevelMod());
        }
Exemple #2
0
        public override void Calculate(StatFunctionEnvironment statFuncEnv)
        {
            if (statFuncEnv.Character is L2Player player)
            {
                if (player.Inventory.GetPaperdollItem(PaperdollLfinger) != null)
                {
                    statFuncEnv.SubValue(5);
                }
                if (player.Inventory.GetPaperdollItem(PaperdollRfinger) != null)
                {
                    statFuncEnv.SubValue(5);
                }
                if (player.Inventory.GetPaperdollItem(PaperdollLear) != null)
                {
                    statFuncEnv.SubValue(9);
                }
                if (player.Inventory.GetPaperdollItem(PaperdollRear) != null)
                {
                    statFuncEnv.SubValue(9);
                }
                if (player.Inventory.GetPaperdollItem(PaperdollNeck) != null)
                {
                    statFuncEnv.SubValue(13);
                }
            }

            statFuncEnv.MulValue(Formulas.MenBonus[statFuncEnv.Character.CharacterStat.Men] * statFuncEnv.Character.GetLevelMod());
        }