mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 18:51:29 +00:00
[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:
parent
cb08c02537
commit
7abb02655d
@ -491,6 +491,7 @@ RULE_INT(Combat, FrontalStunImmunityRaces, 512, "Bitmask for Races than have fro
|
|||||||
RULE_BOOL(Combat, NPCsUseFrontalStunImmunityRaces, true, "Enable or disable NPCs using frontal stun immunity Races from Combat:FrontalStunImmunityRaces, true by default.")
|
RULE_BOOL(Combat, NPCsUseFrontalStunImmunityRaces, true, "Enable or disable NPCs using frontal stun immunity Races from Combat:FrontalStunImmunityRaces, true by default.")
|
||||||
RULE_BOOL(Combat, AssassinateOnlyHumanoids, true, "Enable or disable Assassinate only being allowed on Humanoids, true by default.")
|
RULE_BOOL(Combat, AssassinateOnlyHumanoids, true, "Enable or disable Assassinate only being allowed on Humanoids, true by default.")
|
||||||
RULE_BOOL(Combat, HeadshotOnlyHumanoids, true, "Enable or disable Headshot only being allowed on Humanoids, true by default.")
|
RULE_BOOL(Combat, HeadshotOnlyHumanoids, true, "Enable or disable Headshot only being allowed on Humanoids, true by default.")
|
||||||
|
RULE_BOOL(Combat, EnableWarriorShielding, true, "Enable or disable Warrior Shielding Ability (/shield), true by default.")
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(NPC)
|
RULE_CATEGORY(NPC)
|
||||||
|
|||||||
@ -12978,10 +12978,14 @@ void Client::Handle_OP_Shielding(const EQApplicationPacket *app)
|
|||||||
return;
|
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)) {
|
if (!p_timers.Expired(&database, timer, false)) {
|
||||||
uint32 remaining_time = p_timers.GetRemainingTime(timer);
|
auto remaining_time = p_timers.GetRemainingTime(timer);
|
||||||
Message(
|
Message(
|
||||||
Chat::White,
|
Chat::White,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
@ -12992,8 +12996,7 @@ void Client::Handle_OP_Shielding(const EQApplicationPacket *app)
|
|||||||
return;
|
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)) {
|
if (ShieldAbility(shield->target_id, 15, 12000, 50, 25, true, false)) {
|
||||||
p_timers.Start(timer, SHIELD_ABILITY_RECAST_TIME);
|
p_timers.Start(timer, SHIELD_ABILITY_RECAST_TIME);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user