1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-20 11:47:48 +00:00

Add some helper methods for Modifier and only update stats for the

visual modifiers.
This commit is contained in:
Yogurt 2019-05-27 16:26:10 -07:00
parent 3b451849ae
commit d0dca62a91

View file

@ -311,7 +311,7 @@ namespace FFXIVClassic_Map_Server.Actors
else else
modifiers.Add((Modifier)modifier, val); modifiers.Add((Modifier)modifier, val);
if (modifier <= 35) if (modifier >= 3 && modifier <= 35)
updateFlags |= ActorUpdateFlags.Stats; updateFlags |= ActorUpdateFlags.Stats;
} }
@ -338,6 +338,29 @@ namespace FFXIVClassic_Map_Server.Actors
SetMod(modifier, newVal); SetMod(modifier, newVal);
} }
public void MultiplyMod(Modifier modifier, double val)
{
MultiplyMod((uint)modifier, val);
}
public void MultiplyMod(uint modifier, double val)
{
double newVal = GetMod(modifier) * val;
SetMod(modifier, newVal);
}
public void DivideMod(Modifier modifier, double val)
{
DivideMod((uint)modifier, val);
}
public void DivideMod(uint modifier, double val)
{
double newVal = GetMod(modifier) / val;
SetMod(modifier, newVal);
}
public virtual void OnPath(Vector3 point) public virtual void OnPath(Vector3 point)
{ {
//lua.LuaEngine.CallLuaBattleFunction(this, "onPath", this, point); //lua.LuaEngine.CallLuaBattleFunction(this, "onPath", this, point);