mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-26 11:27:17 +00:00
updated based on Feb 2022 master updates
This commit is contained in:
+27
-23
@@ -968,8 +968,8 @@ void Bot::AI_Process_Raid()
|
|||||||
TriggerDefensiveProcs(tar, EQ::invslot::slotPrimary, false);
|
TriggerDefensiveProcs(tar, EQ::invslot::slotPrimary, false);
|
||||||
|
|
||||||
TEST_COMBATANTS();
|
TEST_COMBATANTS();
|
||||||
TryWeaponProc(p_item, tar, EQ::invslot::slotPrimary);
|
//TryWeaponProc(p_item, tar, EQ::invslot::slotPrimary);
|
||||||
|
TryCombatProcs(p_item, tar, EQ::invslot::slotPrimary);
|
||||||
// bool tripleSuccess = false;
|
// bool tripleSuccess = false;
|
||||||
|
|
||||||
TEST_COMBATANTS();
|
TEST_COMBATANTS();
|
||||||
@@ -1008,7 +1008,10 @@ void Bot::AI_Process_Raid()
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST_COMBATANTS();
|
TEST_COMBATANTS();
|
||||||
int32 ExtraAttackChanceBonus = (spellbonuses.ExtraAttackChance + itembonuses.ExtraAttackChance + aabonuses.ExtraAttackChance);
|
//int32 ExtraAttackChanceBonus = (spellbonuses.ExtraAttackChance + itembonuses.ExtraAttackChance + aabonuses.ExtraAttackChance);
|
||||||
|
auto ExtraAttackChanceBonus =
|
||||||
|
(spellbonuses.ExtraAttackChance[0] + itembonuses.ExtraAttackChance[0] +
|
||||||
|
aabonuses.ExtraAttackChance[0]);
|
||||||
if (ExtraAttackChanceBonus) {
|
if (ExtraAttackChanceBonus) {
|
||||||
|
|
||||||
if (p_item && p_item->GetItem()->IsType2HWeapon()) {
|
if (p_item && p_item->GetItem()->IsType2HWeapon()) {
|
||||||
@@ -1055,7 +1058,8 @@ void Bot::AI_Process_Raid()
|
|||||||
Attack(tar, EQ::invslot::slotSecondary); // Single attack with offhand
|
Attack(tar, EQ::invslot::slotSecondary); // Single attack with offhand
|
||||||
|
|
||||||
TEST_COMBATANTS();
|
TEST_COMBATANTS();
|
||||||
TryWeaponProc(s_item, tar, EQ::invslot::slotSecondary);
|
TryCombatProcs(s_item, tar, EQ::invslot::slotSecondary);
|
||||||
|
//TryWeaponProc(s_item, tar, EQ::invslot::slotSecondary);
|
||||||
|
|
||||||
TEST_COMBATANTS();
|
TEST_COMBATANTS();
|
||||||
if (CanThisClassDoubleAttack() && CheckBotDoubleAttack()) {
|
if (CanThisClassDoubleAttack() && CheckBotDoubleAttack()) {
|
||||||
@@ -1754,7 +1758,7 @@ bool Bot::AICastSpell_Raid(Mob* tar, uint8 iChance, uint32 iSpellTypes) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
// Can we cast this spell on this target?
|
// Can we cast this spell on this target?
|
||||||
if (!(spells[botSpell.SpellId].targettype == ST_GroupTeleport || spells[botSpell.SpellId].targettype == ST_Target || tar == this)
|
if (!(spells[botSpell.SpellId].target_type == ST_GroupTeleport || spells[botSpell.SpellId].target_type == ST_Target || tar == this)
|
||||||
&& !(tar->CanBuffStack(botSpell.SpellId, botLevel, true) >= 0))
|
&& !(tar->CanBuffStack(botSpell.SpellId, botLevel, true) >= 0))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1851,14 +1855,14 @@ bool Bot::AICastSpell_Raid(Mob* tar, uint8 iChance, uint32 iSpellTypes) {
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// can not cast buffs for your own pet only on another pet that isn't yours
|
// can not cast buffs for your own pet only on another pet that isn't yours
|
||||||
if ((spells[selectedBotSpell.SpellId].targettype == ST_Pet) && (tar != this->GetPet()))
|
if ((spells[selectedBotSpell.SpellId].target_type == ST_Pet) && (tar != this->GetPet()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Validate target
|
// Validate target
|
||||||
|
|
||||||
if (!((spells[selectedBotSpell.SpellId].targettype == ST_Target || spells[selectedBotSpell.SpellId].targettype == ST_Pet || tar == this ||
|
if (!((spells[selectedBotSpell.SpellId].target_type == ST_Target || spells[selectedBotSpell.SpellId].target_type == ST_Pet || tar == this ||
|
||||||
spells[selectedBotSpell.SpellId].targettype == ST_Group || spells[selectedBotSpell.SpellId].targettype == ST_GroupTeleport ||
|
spells[selectedBotSpell.SpellId].target_type == ST_Group || spells[selectedBotSpell.SpellId].target_type == ST_GroupTeleport ||
|
||||||
(botClass == BARD && spells[selectedBotSpell.SpellId].targettype == ST_AEBard))
|
(botClass == BARD && spells[selectedBotSpell.SpellId].target_type == ST_AEBard))
|
||||||
&& !tar->IsImmuneToSpell(selectedBotSpell.SpellId, this)
|
&& !tar->IsImmuneToSpell(selectedBotSpell.SpellId, this)
|
||||||
&& (tar->CanBuffStack(selectedBotSpell.SpellId, botLevel, true) >= 0))) {
|
&& (tar->CanBuffStack(selectedBotSpell.SpellId, botLevel, true) >= 0))) {
|
||||||
continue;
|
continue;
|
||||||
@@ -2126,7 +2130,7 @@ bool Bot::AICastSpell_Raid(Mob* tar, uint8 iChance, uint32 iSpellTypes) {
|
|||||||
|
|
||||||
if (CheckSpellRecastTimers(this, itr->SpellIndex))
|
if (CheckSpellRecastTimers(this, itr->SpellIndex))
|
||||||
{
|
{
|
||||||
if (!(!tar->IsImmuneToSpell(selectedBotSpell.SpellId, this) && (spells[selectedBotSpell.SpellId].buffduration < 1 || tar->CanBuffStack(selectedBotSpell.SpellId, botLevel, true) >= 0)))
|
if (!(!tar->IsImmuneToSpell(selectedBotSpell.SpellId, this) && (spells[selectedBotSpell.SpellId].buff_duration < 1 || tar->CanBuffStack(selectedBotSpell.SpellId, botLevel, true) >= 0)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
//short duration buffs or other buffs only to be cast during combat.
|
//short duration buffs or other buffs only to be cast during combat.
|
||||||
@@ -2164,14 +2168,14 @@ bool Bot::AICastSpell_Raid(Mob* tar, uint8 iChance, uint32 iSpellTypes) {
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// can not cast buffs for your own pet only on another pet that isn't yours
|
// can not cast buffs for your own pet only on another pet that isn't yours
|
||||||
if ((spells[selectedBotSpell.SpellId].targettype == ST_Pet) && (tar != this->GetPet()))
|
if ((spells[selectedBotSpell.SpellId].target_type == ST_Pet) && (tar != this->GetPet()))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Validate target
|
// Validate target
|
||||||
|
|
||||||
if (!((spells[selectedBotSpell.SpellId].targettype == ST_Target || spells[selectedBotSpell.SpellId].targettype == ST_Pet || tar == this ||
|
if (!((spells[selectedBotSpell.SpellId].target_type == ST_Target || spells[selectedBotSpell.SpellId].target_type == ST_Pet || tar == this ||
|
||||||
spells[selectedBotSpell.SpellId].targettype == ST_Group || spells[selectedBotSpell.SpellId].targettype == ST_GroupTeleport ||
|
spells[selectedBotSpell.SpellId].target_type == ST_Group || spells[selectedBotSpell.SpellId].target_type == ST_GroupTeleport ||
|
||||||
(botClass == BARD && spells[selectedBotSpell.SpellId].targettype == ST_AEBard))
|
(botClass == BARD && spells[selectedBotSpell.SpellId].target_type == ST_AEBard))
|
||||||
&& !tar->IsImmuneToSpell(selectedBotSpell.SpellId, this)
|
&& !tar->IsImmuneToSpell(selectedBotSpell.SpellId, this)
|
||||||
&& (tar->CanBuffStack(selectedBotSpell.SpellId, botLevel, true) >= 0))) {
|
&& (tar->CanBuffStack(selectedBotSpell.SpellId, botLevel, true) >= 0))) {
|
||||||
continue;
|
continue;
|
||||||
@@ -2366,9 +2370,9 @@ bool Bot::AICastSpell_Raid(Mob* tar, uint8 iChance, uint32 iSpellTypes) {
|
|||||||
continue;
|
continue;
|
||||||
if (!CheckSpellRecastTimers(this, iter.SpellIndex))
|
if (!CheckSpellRecastTimers(this, iter.SpellIndex))
|
||||||
continue;
|
continue;
|
||||||
if (spells[iter.SpellId].zonetype != -1 && zone->GetZoneType() != -1 && spells[iter.SpellId].zonetype != zone->GetZoneType()) // is this bit or index?
|
if (spells[iter.SpellId].zone_type != -1 && zone->GetZoneType() != -1 && spells[iter.SpellId].zone_type != zone->GetZoneType()) // is this bit or index?
|
||||||
continue;
|
continue;
|
||||||
if (spells[iter.SpellId].targettype != ST_Target)
|
if (spells[iter.SpellId].target_type != ST_Target)
|
||||||
continue;
|
continue;
|
||||||
if (tar->CanBuffStack(iter.SpellId, botLevel, true) < 0)
|
if (tar->CanBuffStack(iter.SpellId, botLevel, true) < 0)
|
||||||
continue;
|
continue;
|
||||||
@@ -2388,7 +2392,7 @@ bool Bot::AICastSpell_Raid(Mob* tar, uint8 iChance, uint32 iSpellTypes) {
|
|||||||
case BEASTLORD: {
|
case BEASTLORD: {
|
||||||
botSpell = GetBestBotSpellForDiseaseBasedSlow(this);
|
botSpell = GetBestBotSpellForDiseaseBasedSlow(this);
|
||||||
|
|
||||||
if (botSpell.SpellId == 0 || ((tar->GetMR() - 50) < (tar->GetDR() + spells[botSpell.SpellId].ResistDiff)))
|
if (botSpell.SpellId == 0 || ((tar->GetMR() - 50) < (tar->GetDR() + spells[botSpell.SpellId].resist_difficulty)))
|
||||||
botSpell = GetBestBotSpellForMagicBasedSlow(this);
|
botSpell = GetBestBotSpellForMagicBasedSlow(this);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2479,9 +2483,9 @@ bool Bot::AICastSpell_Raid(Mob* tar, uint8 iChance, uint32 iSpellTypes) {
|
|||||||
continue;
|
continue;
|
||||||
if (!CheckSpellRecastTimers(this, iter.SpellIndex))
|
if (!CheckSpellRecastTimers(this, iter.SpellIndex))
|
||||||
continue;
|
continue;
|
||||||
if (spells[iter.SpellId].zonetype != -1 && zone->GetZoneType() != -1 && spells[iter.SpellId].zonetype != zone->GetZoneType()) // is this bit or index?
|
if (spells[iter.SpellId].zone_type != -1 && zone->GetZoneType() != -1 && spells[iter.SpellId].zone_type != zone->GetZoneType()) // is this bit or index?
|
||||||
continue;
|
continue;
|
||||||
if (spells[iter.SpellId].targettype != ST_Target)
|
if (spells[iter.SpellId].target_type != ST_Target)
|
||||||
continue;
|
continue;
|
||||||
if (tar->CanBuffStack(iter.SpellId, botLevel, true) < 0)
|
if (tar->CanBuffStack(iter.SpellId, botLevel, true) < 0)
|
||||||
continue;
|
continue;
|
||||||
@@ -2506,9 +2510,9 @@ bool Bot::AICastSpell_Raid(Mob* tar, uint8 iChance, uint32 iSpellTypes) {
|
|||||||
continue;
|
continue;
|
||||||
if (!CheckSpellRecastTimers(this, iter.SpellIndex))
|
if (!CheckSpellRecastTimers(this, iter.SpellIndex))
|
||||||
continue;
|
continue;
|
||||||
if (spells[iter.SpellId].zonetype != -1 && zone->GetZoneType() != -1 && spells[iter.SpellId].zonetype != zone->GetZoneType()) // is this bit or index?
|
if (spells[iter.SpellId].zone_type != -1 && zone->GetZoneType() != -1 && spells[iter.SpellId].zone_type != zone->GetZoneType()) // is this bit or index?
|
||||||
continue;
|
continue;
|
||||||
switch (spells[iter.SpellId].targettype) {
|
switch (spells[iter.SpellId].target_type) {
|
||||||
case ST_AEBard:
|
case ST_AEBard:
|
||||||
case ST_AECaster:
|
case ST_AECaster:
|
||||||
case ST_GroupTeleport:
|
case ST_GroupTeleport:
|
||||||
@@ -2538,9 +2542,9 @@ bool Bot::AICastSpell_Raid(Mob* tar, uint8 iChance, uint32 iSpellTypes) {
|
|||||||
continue;
|
continue;
|
||||||
if (!CheckSpellRecastTimers(this, iter.SpellIndex))
|
if (!CheckSpellRecastTimers(this, iter.SpellIndex))
|
||||||
continue;
|
continue;
|
||||||
if (spells[iter.SpellId].zonetype != -1 && zone->GetZoneType() != -1 && spells[iter.SpellId].zonetype != zone->GetZoneType()) // is this bit or index?
|
if (spells[iter.SpellId].zone_type != -1 && zone->GetZoneType() != -1 && spells[iter.SpellId].zone_type != zone->GetZoneType()) // is this bit or index?
|
||||||
continue;
|
continue;
|
||||||
switch (spells[iter.SpellId].targettype) {
|
switch (spells[iter.SpellId].target_type) {
|
||||||
case ST_AEBard:
|
case ST_AEBard:
|
||||||
case ST_AECaster:
|
case ST_AECaster:
|
||||||
case ST_GroupTeleport:
|
case ST_GroupTeleport:
|
||||||
|
|||||||
Reference in New Issue
Block a user