forked from Elfocrash/L2dotNET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFuncMDefMod.cs
More file actions
33 lines (29 loc) · 1.11 KB
/
Copy pathFuncMDefMod.cs
File metadata and controls
33 lines (29 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using L2dotNET.Models.Player;
using L2dotNET.Models.Player.Basic;
using static L2dotNET.Models.Inventory.Inventory;
namespace L2dotNET.Models.Stats.Funcs
{
public class FuncMDefMod : Func
{
public FuncMDefMod() : base(Stats.MagicDefence, 0x20, null)
{
}
public override void Calculate(Env env)
{
if (env.Character is L2Player player)
{
if (player.Inventory.GetPaperdollItem(PaperdollLfinger) != null)
env.SubValue(5);
if (player.Inventory.GetPaperdollItem(PaperdollRfinger) != null)
env.SubValue(5);
if (player.Inventory.GetPaperdollItem(PaperdollLear) != null)
env.SubValue(9);
if (player.Inventory.GetPaperdollItem(PaperdollRear) != null)
env.SubValue(9);
if (player.Inventory.GetPaperdollItem(PaperdollNeck) != null)
env.SubValue(13);
}
env.MulValue(Formulas.MenBonus[env.Character.CharacterStat.Men] * env.Character.GetLevelMod());
}
}
}