fix: update normal atk.

This commit is contained in:
Tungdv
2025-10-08 19:32:05 +07:00
parent ddcc5c22d1
commit ff1e2dd89e
15 changed files with 1339 additions and 197 deletions
+41
View File
@@ -86,4 +86,45 @@ public static class EC_Utility
return $"{prefix}_{suffix}";
}
// Build pvp mask
public static byte glb_BuildPVPMask(bool bForceAttack)
{
byte byMask = 0;
if (bForceAttack)
byMask |= (byte)PVP_mask.GP_PVPMASK_FORCE;
//else
//{
// CECConfigs* pConfigs = g_pGame->GetConfigs();
// if (pConfigs->GetGameSettings().bAtk_Player)
// {
// byMask |= GP_PVPMASK_FORCE;
// if (pConfigs->GetGameSettings().bAtk_NoMafia)
// byMask |= GP_PVPMASK_NOMAFIA;
// if (pConfigs->GetGameSettings().bAtk_NoWhite)
// byMask |= GP_PVPMASK_NOWHITE;
// if (pConfigs->GetGameSettings().bAtk_NoAlliance)
// byMask |= GP_PVPMASK_NOALLIANCE;
// if (pConfigs->GetGameSettings().bAtk_NoForce)
// byMask |= GP_PVPMASK_NOFORCE;
// }
//}
return byMask;
}
public static T a_ClampFloor<T>(T x, T min) where T : IComparable<T>
{
return (x.CompareTo(min) < 0) ? min : x;
}
public static T a_Min<T>(T x, T y) where T : IComparable<T>
{
return (y.CompareTo(x) < 0) ? y : x;
}
}