mirror of
https://github.com/SoDOff-Project/sodoff-mmo.git
synced 2025-10-11 08:18:49 -07:00
add check for mount state in FP data
This commit is contained in:
parent
da480497af
commit
89191a53ff
@ -10,7 +10,7 @@ using sodoffmmo.Data;
|
||||
namespace sodoffmmo.Core;
|
||||
internal static class Utils {
|
||||
public static bool VariablesValid(Client client) {
|
||||
if (client.PlayerData.Fp != "" && (client.PlayerData.Mbf & 8) == 8
|
||||
if (client.PlayerData.Fp != "" && (client.PlayerData.PetMounted || (client.PlayerData.Mbf & 8) == 8)
|
||||
&& (client.PlayerData.GeometryType == PetGeometryType.Default && client.PlayerData.PetAge < PetAge.Teen
|
||||
|| client.PlayerData.GeometryType == PetGeometryType.Terror && client.PlayerData.PetAge < PetAge.Titan)) {
|
||||
NetworkObject obj = new NetworkObject();
|
||||
|
@ -53,6 +53,8 @@ public class PlayerData {
|
||||
public PetGeometryType GeometryType { get; set; } = PetGeometryType.Default;
|
||||
// raised pet age - set from Fp
|
||||
public PetAge PetAge { get; set; } = PetAge.Adult;
|
||||
// raised pet mounted - set from Fp
|
||||
public bool PetMounted { get; set; } = false;
|
||||
// raised pet data
|
||||
public string Fp {
|
||||
get {
|
||||
@ -82,6 +84,9 @@ public class PlayerData {
|
||||
case "Ti": PetAge = PetAge.Titan; break;
|
||||
}
|
||||
}
|
||||
if (keyValPairs.TryGetValue("U", out string userdata)) {
|
||||
PetMounted = (userdata == "0");
|
||||
}
|
||||
}
|
||||
}
|
||||
private string fp = "";
|
||||
|
Loading…
x
Reference in New Issue
Block a user