diff options
| -rw-r--r-- | src/server/game/AI/CoreAI/UnitAI.cpp | 11 | ||||
| -rw-r--r-- | src/server/game/DataStores/DB2Structure.h | 1 | ||||
| -rw-r--r-- | src/server/game/DataStores/DBCEnums.h | 1 |
3 files changed, 2 insertions, 11 deletions
diff --git a/src/server/game/AI/CoreAI/UnitAI.cpp b/src/server/game/AI/CoreAI/UnitAI.cpp index a912ed21478..2dc80e7def3 100644 --- a/src/server/game/AI/CoreAI/UnitAI.cpp +++ b/src/server/game/AI/CoreAI/UnitAI.cpp @@ -63,24 +63,17 @@ void UnitAI::DoMeleeAttackIfReady() if (!me->IsWithinMeleeRange(victim)) return; - bool sparAttack = me->GetFactionTemplateEntry()->ShouldSparAttack() && victim->GetFactionTemplateEntry()->ShouldSparAttack(); //Make sure our attack is ready and we aren't currently casting before checking distance if (me->isAttackReady()) { - if (sparAttack) - me->FakeAttackerStateUpdate(victim); - else - me->AttackerStateUpdate(victim); + me->AttackerStateUpdate(victim); me->resetAttackTimer(); } if (me->haveOffhandWeapon() && me->isAttackReady(OFF_ATTACK)) { - if (sparAttack) - me->FakeAttackerStateUpdate(victim, OFF_ATTACK); - else - me->AttackerStateUpdate(victim, OFF_ATTACK); + me->AttackerStateUpdate(victim, OFF_ATTACK); me->resetAttackTimer(OFF_ATTACK); } diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h index 2abf0d78fd2..71958a94791 100644 --- a/src/server/game/DataStores/DB2Structure.h +++ b/src/server/game/DataStores/DB2Structure.h @@ -1096,7 +1096,6 @@ struct FactionTemplateEntry return EnemyGroup == 0 && FriendGroup == 0; } bool IsContestedGuardFaction() const { return (Flags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD) != 0; } - bool ShouldSparAttack() const { return (Flags & FACTION_TEMPLATE_ENEMY_SPAR) != 0; } }; struct GameObjectDisplayInfoEntry diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h index e1ff83ea337..dd180cbdfd6 100644 --- a/src/server/game/DataStores/DBCEnums.h +++ b/src/server/game/DataStores/DBCEnums.h @@ -675,7 +675,6 @@ enum class ExpectedStatType : uint8 enum FactionTemplateFlags { - FACTION_TEMPLATE_ENEMY_SPAR = 0x00000020, // guessed, sparring with enemies? FACTION_TEMPLATE_FLAG_PVP = 0x00000800, // flagged for PvP FACTION_TEMPLATE_FLAG_CONTESTED_GUARD = 0x00001000, // faction will attack players that were involved in PvP combats FACTION_TEMPLATE_FLAG_HOSTILE_BY_DEFAULT= 0x00002000 |
