mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 13:41:31 +00:00
Correct the definition of "quading"
If you would like your NPCs to use the old rules, turn Combat:UseLiveCombatRounds to false.
This commit is contained in:
parent
82fe15190b
commit
22efe33f9b
@ -448,6 +448,7 @@ RULE_BOOL(Combat, OneProcPerWeapon, true) //If enabled, One proc per weapon per
|
|||||||
RULE_BOOL(Combat, ProjectileDmgOnImpact, true) //If enabled, projectiles (ie arrows) will hit on impact, instead of instantly.
|
RULE_BOOL(Combat, ProjectileDmgOnImpact, true) //If enabled, projectiles (ie arrows) will hit on impact, instead of instantly.
|
||||||
RULE_BOOL(Combat, MeleePush, true) // enable melee push
|
RULE_BOOL(Combat, MeleePush, true) // enable melee push
|
||||||
RULE_INT(Combat, MeleePushChance, 50) // (NPCs) chance the target will be pushed. Made up, 100 actually isn't that bad
|
RULE_INT(Combat, MeleePushChance, 50) // (NPCs) chance the target will be pushed. Made up, 100 actually isn't that bad
|
||||||
|
RULE_BOOL(Combat, UseLiveCombatRounds, true) // turn this false if you don't want to worry about fixing up combat rounds for NPCs
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(NPC)
|
RULE_CATEGORY(NPC)
|
||||||
|
|||||||
@ -5120,6 +5120,18 @@ bool Client::CheckDualWield()
|
|||||||
|
|
||||||
void Mob::DoMainHandAttackRounds(Mob *target, ExtraAttackOptions *opts)
|
void Mob::DoMainHandAttackRounds(Mob *target, ExtraAttackOptions *opts)
|
||||||
{
|
{
|
||||||
|
if (!target)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (RuleB(Combat, UseLiveCombatRounds)) {
|
||||||
|
// A "quad" on live really is just a successful dual wield where both double attack
|
||||||
|
// The mobs that could triple lost the ability to when the triple attack skill was added in
|
||||||
|
Attack(target, MainPrimary, false, false, false, opts);
|
||||||
|
if (CanThisClassDoubleAttack() && CheckDoubleAttack())
|
||||||
|
Attack(target, MainPrimary, false, false, false, opts);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (IsNPC()) {
|
if (IsNPC()) {
|
||||||
int16 n_atk = CastToNPC()->GetNumberOfAttacks();
|
int16 n_atk = CastToNPC()->GetNumberOfAttacks();
|
||||||
if (n_atk <= 1) {
|
if (n_atk <= 1) {
|
||||||
@ -5133,26 +5145,23 @@ void Mob::DoMainHandAttackRounds(Mob *target, ExtraAttackOptions *opts)
|
|||||||
Attack(target, MainPrimary, false, false, false, opts);
|
Attack(target, MainPrimary, false, false, false, opts);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target) {
|
// we use this random value in three comparisons with different
|
||||||
// we use this random value in three comparisons with different
|
// thresholds, and if its truely random, then this should work
|
||||||
// thresholds, and if its truely random, then this should work
|
// out reasonably and will save us compute resources.
|
||||||
// out reasonably and will save us compute resources.
|
int32 RandRoll = zone->random.Int(0, 99);
|
||||||
int32 RandRoll = zone->random.Int(0, 99);
|
if ((CanThisClassDoubleAttack() || GetSpecialAbility(SPECATK_TRIPLE) || GetSpecialAbility(SPECATK_QUAD))
|
||||||
if ((CanThisClassDoubleAttack() || GetSpecialAbility(SPECATK_TRIPLE) || GetSpecialAbility(SPECATK_QUAD))
|
// check double attack, this is NOT the same rules that clients use...
|
||||||
// check double attack, this is NOT the same rules that clients use...
|
&&
|
||||||
&&
|
RandRoll < (GetLevel() + NPCDualAttackModifier)) {
|
||||||
RandRoll < (GetLevel() + NPCDualAttackModifier)) {
|
Attack(target, MainPrimary, false, false, false, opts);
|
||||||
|
// lets see if we can do a triple attack with the main hand
|
||||||
|
// pets are excluded from triple and quads...
|
||||||
|
if ((GetSpecialAbility(SPECATK_TRIPLE) || GetSpecialAbility(SPECATK_QUAD)) && !IsPet() &&
|
||||||
|
RandRoll < (GetLevel() + NPCTripleAttackModifier)) {
|
||||||
Attack(target, MainPrimary, false, false, false, opts);
|
Attack(target, MainPrimary, false, false, false, opts);
|
||||||
// lets see if we can do a triple attack with the main hand
|
// now lets check the quad attack
|
||||||
// pets are excluded from triple and quads...
|
if (GetSpecialAbility(SPECATK_QUAD) && RandRoll < (GetLevel() + NPCQuadAttackModifier)) {
|
||||||
if ((GetSpecialAbility(SPECATK_TRIPLE) || GetSpecialAbility(SPECATK_QUAD)) && !IsPet() &&
|
|
||||||
RandRoll < (GetLevel() + NPCTripleAttackModifier)) {
|
|
||||||
Attack(target, MainPrimary, false, false, false, opts);
|
Attack(target, MainPrimary, false, false, false, opts);
|
||||||
// now lets check the quad attack
|
|
||||||
if (GetSpecialAbility(SPECATK_QUAD) &&
|
|
||||||
RandRoll < (GetLevel() + NPCQuadAttackModifier)) {
|
|
||||||
Attack(target, MainPrimary, false, false, false, opts);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5166,11 +5175,8 @@ void Mob::DoOffHandAttackRounds(Mob *target, ExtraAttackOptions *opts)
|
|||||||
if (GetSpecialAbility(SPECATK_INNATE_DW) || GetEquipment(MaterialSecondary) != 0) {
|
if (GetSpecialAbility(SPECATK_INNATE_DW) || GetEquipment(MaterialSecondary) != 0) {
|
||||||
if (CheckDualWield()) {
|
if (CheckDualWield()) {
|
||||||
Attack(target, MainSecondary, false, false, false, opts);
|
Attack(target, MainSecondary, false, false, false, opts);
|
||||||
if (CanThisClassDoubleAttack() && GetLevel() > 35) {
|
if (CanThisClassDoubleAttack() && GetLevel() > 35 && CheckDoubleAttack())
|
||||||
if (CheckDoubleAttack()) {
|
Attack(target, MainSecondary, false, false, false, opts);
|
||||||
Attack(target, MainSecondary, false, false, false, opts);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user