[Feature] Bind Wound and Forage while mounted. (#2257)

During some point in the eras you were not able to Bind Wound or Forage when mounted. I am not sure if Live is still like this, so I added a rule with it disabled by default.
This commit is contained in:
Michael 2022-07-02 22:53:15 -04:00 committed by GitHub
parent 68d28bcd3e
commit 221d173c59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 2 deletions

View File

@ -158,6 +158,7 @@ RULE_BOOL(Character, OPClientUpdateVisualDebug, false, "Shows a pulse and forwar
RULE_BOOL(Character, AllowCrossClassTrainers, false, "If the value is true, a player can also train with other class Guildmasters.")
RULE_BOOL(Character, PetsUseReagents, true, "Conjuring pets consumes reagents")
RULE_BOOL(Character, DismountWater, true, "Dismount horses when entering water")
RULE_BOOL(Character, NoSkillsOnHorse, false, "Enabling this will prevent Bind Wound and Foraging while on a mount")
RULE_BOOL(Character, UseNoJunkFishing, false, "Disregards junk items when fishing")
RULE_BOOL(Character, SoftDeletes, true, "When characters are deleted in character select, they are only soft deleted")
RULE_INT(Character, DefaultGuild, 0, "If not 0, new characters placed into the guild # indicated")

View File

@ -3672,12 +3672,18 @@ void Client::Handle_OP_Bind_Wound(const EQApplicationPacket *app)
LogError("Size mismatch for Bind wound packet");
DumpPacket(app);
}
// Not allowed to forage while mounted
if (RuleB(Character, NoSkillsOnHorse) && GetHorseId()) {
MessageString(Chat::Skills, NO_SKILL_WHILE_MOUNTED);
return;
}
BindWound_Struct* bind_in = (BindWound_Struct*)app->pBuffer;
Mob* bindmob = entity_list.GetMob(bind_in->to);
if (!bindmob) {
LogError("Bindwound on non-exsistant mob from [{}]", GetName());
}
else {
} else {
LogDebug("BindWound in: to:\'[{}]\' from=\'[{}]\'", bindmob->GetName(), GetName());
BindWound(bindmob, true);
}
@ -6055,6 +6061,13 @@ void Client::Handle_OP_Forage(const EQApplicationPacket *app)
Message(Chat::Red, "Ability recovery time not yet met.");
return;
}
// Not allowed to forage while mounted
if (RuleB(Character, NoSkillsOnHorse) && GetHorseId()) {
MessageString(Chat::Skills, NO_SKILL_WHILE_MOUNTED);
return;
}
p_timers.Start(pTimerForaging, ForagingReuseTime - 1);
ForageItem();

View File

@ -478,6 +478,7 @@
#define NO_LONGER_HIDDEN 12337 //You are no longer hidden.
#define STOP_SNEAKING 12338 //You stop sneaking
#define NOT_IN_CONTROL 12368 //You do not have control of yourself right now.
#define NO_SKILL_WHILE_MOUNTED 12393 //You can not use this skill while on a mount.
#define STAND_TO_CAST 12441 //You must be standing to cast a spell.
#define ALREADY_CASTING 12442 //You are already casting a spell!
#define SHIMMERS_BRIEFLY 12444 //Your %1 shimmers briefly.