forked from Elfocrash/L2dotNET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFuncPDefMod.cs
More file actions
31 lines (28 loc) · 1.02 KB
/
Copy pathFuncPDefMod.cs
File metadata and controls
31 lines (28 loc) · 1.02 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
using L2dotNET.Models.Player;
using static L2dotNET.Models.Inventory.Inventory;
namespace L2dotNET.Models.Stats.Funcs
{
public class FuncPDefMod : Func
{
public FuncPDefMod() : base(Stats.PowerDefence, 0x20, null)
{
}
public override void Calculate(Env env)
{
if (env.Character is L2Player player)
{
if(player.Inventory.GetPaperdollItem(PaperdollHead) != null)
env.SubValue(12);
if (player.Inventory.GetPaperdollItem(PaperdollChest) != null)
env.SubValue(31);
if (player.Inventory.GetPaperdollItem(PaperdollLegs) != null)
env.SubValue(18);
if (player.Inventory.GetPaperdollItem(PaperdollGloves) != null)
env.SubValue(8);
if (player.Inventory.GetPaperdollItem(PaperdollFeet) != null)
env.SubValue(7);
}
env.MulValue(env.Character.GetLevelMod());
}
}
}