[Rules] Add Toggle for Warrior Shielding (#2496)

This adds a toggle to disable the Warrior shielding ability. This will not stop the client-side message from sending when you do not have a target, but it will keep the ability from doing anything.
This commit is contained in:
Kinglykrab
2022-10-22 15:59:52 -04:00
committed by GitHub
parent cb08c02537
commit 7abb02655d
2 changed files with 8 additions and 4 deletions
+7 -4
View File
@@ -12978,10 +12978,14 @@ void Client::Handle_OP_Shielding(const EQApplicationPacket *app)
return;
}
pTimerType timer = pTimerShieldAbility;
if (!RuleB(Combat, EnableWarriorShielding)) {
Message(Chat::White, "/shield is disabled.");
return;
}
pTimerType timer = pTimerShieldAbility;
if (!p_timers.Expired(&database, timer, false)) {
uint32 remaining_time = p_timers.GetRemainingTime(timer);
auto remaining_time = p_timers.GetRemainingTime(timer);
Message(
Chat::White,
fmt::format(
@@ -12992,8 +12996,7 @@ void Client::Handle_OP_Shielding(const EQApplicationPacket *app)
return;
}
Shielding_Struct* shield = (Shielding_Struct*)app->pBuffer;
auto shield = (Shielding_Struct*) app->pBuffer;
if (ShieldAbility(shield->target_id, 15, 12000, 50, 25, true, false)) {
p_timers.Start(timer, SHIELD_ABILITY_RECAST_TIME);
}