mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-24 20:02:27 +00:00
Fix Mob double/triple/quad check to work if a lower one isn't set
This commit is contained in:
parent
53a14381ba
commit
a503c1af97
@ -1141,30 +1141,26 @@ void Mob::AI_Process() {
|
|||||||
Attack(target, 13);
|
Attack(target, 13);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target)
|
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 = MakeRandomInt(0, 99);
|
int32 RandRoll = MakeRandomInt(0, 99);
|
||||||
if (CanThisClassDoubleAttack()
|
if ((CanThisClassDoubleAttack() || GetSpecialAbility(SPECATK_TRIPLE)
|
||||||
//check double attack, this is NOT the same rules that clients use...
|
|| GetSpecialAbility(SPECATK_QUAD))
|
||||||
&& RandRoll < (GetLevel() + NPCDualAttackModifier))
|
//check double attack, this is NOT the same rules that clients use...
|
||||||
{
|
&& RandRoll < (GetLevel() + NPCDualAttackModifier)) {
|
||||||
Attack(target, 13);
|
Attack(target, 13);
|
||||||
// lets see if we can do a triple attack with the main hand
|
// lets see if we can do a triple attack with the main hand
|
||||||
//pets are excluded from triple and quads...
|
//pets are excluded from triple and quads...
|
||||||
if (GetSpecialAbility(SPECATK_TRIPLE)
|
if ((GetSpecialAbility(SPECATK_TRIPLE) || GetSpecialAbility(SPECATK_QUAD))
|
||||||
&& !IsPet() && RandRoll < (GetLevel()+NPCTripleAttackModifier))
|
&& !IsPet() && RandRoll < (GetLevel() + NPCTripleAttackModifier)) {
|
||||||
{
|
|
||||||
Attack(target, 13);
|
Attack(target, 13);
|
||||||
// now lets check the quad attack
|
// now lets check the quad attack
|
||||||
if (GetSpecialAbility(SPECATK_QUAD)
|
if (GetSpecialAbility(SPECATK_QUAD)
|
||||||
&& RandRoll < (GetLevel() + NPCQuadAttackModifier))
|
&& RandRoll < (GetLevel() + NPCQuadAttackModifier)) {
|
||||||
{
|
|
||||||
Attack(target, 13);
|
Attack(target, 13);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1204,12 +1200,10 @@ void Mob::AI_Process() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (IsPet()) {
|
if (IsPet()) {
|
||||||
|
|
||||||
Mob *owner = GetOwner();
|
Mob *owner = GetOwner();
|
||||||
|
if (owner) {
|
||||||
if (owner){
|
int16 flurry_chance = owner->aabonuses.PetFlurry +
|
||||||
int16 flurry_chance = owner->aabonuses.PetFlurry + owner->spellbonuses.PetFlurry + owner->itembonuses.PetFlurry;
|
owner->spellbonuses.PetFlurry + owner->itembonuses.PetFlurry;
|
||||||
|
|
||||||
if (flurry_chance && (MakeRandomInt(0, 99) < flurry_chance))
|
if (flurry_chance && (MakeRandomInt(0, 99) < flurry_chance))
|
||||||
Flurry(nullptr);
|
Flurry(nullptr);
|
||||||
}
|
}
|
||||||
@ -1289,7 +1283,7 @@ void Mob::AI_Process() {
|
|||||||
if(cur > 0) {
|
if(cur > 0) {
|
||||||
opts.crit_flat = cur;
|
opts.crit_flat = cur;
|
||||||
}
|
}
|
||||||
|
|
||||||
AreaRampage(&opts);
|
AreaRampage(&opts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user