mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
[Bots] Add Virtual Override for Bot::Attack (#2771)
This commit is contained in:
parent
886f80117c
commit
e010e41a83
18
zone/bot.cpp
18
zone/bot.cpp
@ -3375,7 +3375,7 @@ void Bot::AI_Process()
|
|||||||
TEST_COMBATANTS();
|
TEST_COMBATANTS();
|
||||||
if (attack_timer.Check()) { // Process primary weapon attacks
|
if (attack_timer.Check()) { // Process primary weapon attacks
|
||||||
|
|
||||||
Mob::Attack(tar, EQ::invslot::slotPrimary);
|
Attack(tar, EQ::invslot::slotPrimary);
|
||||||
|
|
||||||
TEST_COMBATANTS();
|
TEST_COMBATANTS();
|
||||||
TriggerDefensiveProcs(tar, EQ::invslot::slotPrimary, false);
|
TriggerDefensiveProcs(tar, EQ::invslot::slotPrimary, false);
|
||||||
@ -3389,19 +3389,19 @@ void Bot::AI_Process()
|
|||||||
if (CanThisClassDoubleAttack()) {
|
if (CanThisClassDoubleAttack()) {
|
||||||
|
|
||||||
if (CheckBotDoubleAttack()) {
|
if (CheckBotDoubleAttack()) {
|
||||||
Mob::Attack(tar, EQ::invslot::slotPrimary, true);
|
Attack(tar, EQ::invslot::slotPrimary, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_COMBATANTS();
|
TEST_COMBATANTS();
|
||||||
if (GetSpecialAbility(SPECATK_TRIPLE) && CheckBotDoubleAttack(true)) {
|
if (GetSpecialAbility(SPECATK_TRIPLE) && CheckBotDoubleAttack(true)) {
|
||||||
// tripleSuccess = true;
|
// tripleSuccess = true;
|
||||||
Mob::Attack(tar, EQ::invslot::slotPrimary, true);
|
Attack(tar, EQ::invslot::slotPrimary, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_COMBATANTS();
|
TEST_COMBATANTS();
|
||||||
// quad attack, does this belong here??
|
// quad attack, does this belong here??
|
||||||
if (GetSpecialAbility(SPECATK_QUAD) && CheckBotDoubleAttack(true)) {
|
if (GetSpecialAbility(SPECATK_QUAD) && CheckBotDoubleAttack(true)) {
|
||||||
Mob::Attack(tar, EQ::invslot::slotPrimary, true);
|
Attack(tar, EQ::invslot::slotPrimary, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3413,10 +3413,10 @@ void Bot::AI_Process()
|
|||||||
if (zone->random.Int(0, 100) < flurrychance) {
|
if (zone->random.Int(0, 100) < flurrychance) {
|
||||||
|
|
||||||
MessageString(Chat::NPCFlurry, YOU_FLURRY);
|
MessageString(Chat::NPCFlurry, YOU_FLURRY);
|
||||||
Mob::Attack(tar, EQ::invslot::slotPrimary, false);
|
Attack(tar, EQ::invslot::slotPrimary, false);
|
||||||
|
|
||||||
TEST_COMBATANTS();
|
TEST_COMBATANTS();
|
||||||
Mob::Attack(tar, EQ::invslot::slotPrimary, false);
|
Attack(tar, EQ::invslot::slotPrimary, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3429,7 +3429,7 @@ void Bot::AI_Process()
|
|||||||
if (p_item && p_item->GetItem()->IsType2HWeapon()) {
|
if (p_item && p_item->GetItem()->IsType2HWeapon()) {
|
||||||
|
|
||||||
if (zone->random.Int(0, 100) < ExtraAttackChanceBonus) {
|
if (zone->random.Int(0, 100) < ExtraAttackChanceBonus) {
|
||||||
Mob::Attack(tar, EQ::invslot::slotPrimary, false);
|
Attack(tar, EQ::invslot::slotPrimary, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3467,7 +3467,7 @@ void Bot::AI_Process()
|
|||||||
float random = zone->random.Real(0, 1);
|
float random = zone->random.Real(0, 1);
|
||||||
if (random < DualWieldProbability) { // Max 78% of DW
|
if (random < DualWieldProbability) { // Max 78% of DW
|
||||||
|
|
||||||
Mob::Attack(tar, EQ::invslot::slotSecondary); // Single attack with offhand
|
Attack(tar, EQ::invslot::slotSecondary); // Single attack with offhand
|
||||||
|
|
||||||
TEST_COMBATANTS();
|
TEST_COMBATANTS();
|
||||||
TryCombatProcs(s_item, tar, EQ::invslot::slotSecondary);
|
TryCombatProcs(s_item, tar, EQ::invslot::slotSecondary);
|
||||||
@ -3476,7 +3476,7 @@ void Bot::AI_Process()
|
|||||||
if (CanThisClassDoubleAttack() && CheckBotDoubleAttack()) {
|
if (CanThisClassDoubleAttack() && CheckBotDoubleAttack()) {
|
||||||
|
|
||||||
if (tar->GetHP() > -10) {
|
if (tar->GetHP() > -10) {
|
||||||
Mob::Attack(tar, EQ::invslot::slotSecondary); // Single attack with offhand
|
Attack(tar, EQ::invslot::slotSecondary); // Single attack with offhand
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -372,6 +372,9 @@ public:
|
|||||||
uint32* oSpellWillFinish = 0, uint32 item_slot = 0xFFFFFFFF, uint32 aa_id = 0);
|
uint32* oSpellWillFinish = 0, uint32 item_slot = 0xFFFFFFFF, uint32 aa_id = 0);
|
||||||
inline int64 GetFocusEffect(focusType type, uint16 spell_id, Mob *caster = nullptr, bool from_buff_tic = false) override
|
inline int64 GetFocusEffect(focusType type, uint16 spell_id, Mob *caster = nullptr, bool from_buff_tic = false) override
|
||||||
{ return Mob::GetFocusEffect(type, spell_id, caster, from_buff_tic); }
|
{ return Mob::GetFocusEffect(type, spell_id, caster, from_buff_tic); }
|
||||||
|
inline bool Attack(Mob* other, int Hand = EQ::invslot::slotPrimary, bool FromRiposte = false, bool IsStrikethrough = false,
|
||||||
|
bool IsFromSpell = false, ExtraAttackOptions *opts = nullptr) override
|
||||||
|
{ return Mob::Attack(other, Hand, FromRiposte, IsStrikethrough, IsFromSpell, opts); }
|
||||||
|
|
||||||
bool GetBotOwnerDataBuckets();
|
bool GetBotOwnerDataBuckets();
|
||||||
bool GetBotDataBuckets();
|
bool GetBotDataBuckets();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user