forked from SoDOff-Project/sodoff-mmo
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;
|
namespace sodoffmmo.Core;
|
||||||
internal static class Utils {
|
internal static class Utils {
|
||||||
public static bool VariablesValid(Client client) {
|
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.Default && client.PlayerData.PetAge < PetAge.Teen
|
||||||
|| client.PlayerData.GeometryType == PetGeometryType.Terror && client.PlayerData.PetAge < PetAge.Titan)) {
|
|| client.PlayerData.GeometryType == PetGeometryType.Terror && client.PlayerData.PetAge < PetAge.Titan)) {
|
||||||
NetworkObject obj = new NetworkObject();
|
NetworkObject obj = new NetworkObject();
|
||||||
|
@ -53,6 +53,8 @@ public class PlayerData {
|
|||||||
public PetGeometryType GeometryType { get; set; } = PetGeometryType.Default;
|
public PetGeometryType GeometryType { get; set; } = PetGeometryType.Default;
|
||||||
// raised pet age - set from Fp
|
// raised pet age - set from Fp
|
||||||
public PetAge PetAge { get; set; } = PetAge.Adult;
|
public PetAge PetAge { get; set; } = PetAge.Adult;
|
||||||
|
// raised pet mounted - set from Fp
|
||||||
|
public bool PetMounted { get; set; } = false;
|
||||||
// raised pet data
|
// raised pet data
|
||||||
public string Fp {
|
public string Fp {
|
||||||
get {
|
get {
|
||||||
@ -82,6 +84,9 @@ public class PlayerData {
|
|||||||
case "Ti": PetAge = PetAge.Titan; break;
|
case "Ti": PetAge = PetAge.Titan; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (keyValPairs.TryGetValue("U", out string userdata)) {
|
||||||
|
PetMounted = (userdata == "0");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private string fp = "";
|
private string fp = "";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user