mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-23 19:02:25 +00:00
[Feature] Add rule to allow /changepetname to function without being enabled by scripts.
This commit is contained in:
parent
8f4f8368df
commit
51f25ed779
@ -287,6 +287,7 @@ RULE_BOOL(Pets, LivelikeBreakCharmOnInvis, true, "Default: true will break charm
|
|||||||
RULE_BOOL(Pets, ClientPetsUseOwnerNameInLastName, true, "Disable this to keep client pet's last names from being owner_name's pet")
|
RULE_BOOL(Pets, ClientPetsUseOwnerNameInLastName, true, "Disable this to keep client pet's last names from being owner_name's pet")
|
||||||
RULE_BOOL(Pets, CanTakeNoDrop, false, "Setting whether anyone can give no-drop items to pets")
|
RULE_BOOL(Pets, CanTakeNoDrop, false, "Setting whether anyone can give no-drop items to pets")
|
||||||
RULE_INT(Pets, PetTauntRange, 150, "Range at which a pet will taunt targets.")
|
RULE_INT(Pets, PetTauntRange, 150, "Range at which a pet will taunt targets.")
|
||||||
|
RULE_BOOL(Pets, AlwaysAllowPetRename, false, "Enable this option to allow /changepetname to work without enabling a pet name change via scripts.")
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(GM)
|
RULE_CATEGORY(GM)
|
||||||
|
|||||||
@ -4705,6 +4705,10 @@ void Client::KeyRingList()
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Client::IsPetNameChangeAllowed() {
|
bool Client::IsPetNameChangeAllowed() {
|
||||||
|
if (RuleB(Pets, AlwaysAllowPetRename)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
DataBucketKey k = GetScopedBucketKeys();
|
DataBucketKey k = GetScopedBucketKeys();
|
||||||
k.key = "PetNameChangesAllowed";
|
k.key = "PetNameChangesAllowed";
|
||||||
|
|
||||||
|
|||||||
@ -821,7 +821,7 @@ void Client::CompleteConnect()
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (IsPetNameChangeAllowed()) {
|
if (IsPetNameChangeAllowed() && !RuleB(Pets, AlwaysAllowPetRename)) {
|
||||||
InvokeChangePetName(false);
|
InvokeChangePetName(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user