diff options
author | ariel- <ariel-@users.noreply.github.com> | 2017-03-06 19:11:03 -0300 |
---|---|---|
committer | ariel- <ariel-@users.noreply.github.com> | 2017-03-07 01:30:41 -0300 |
commit | d20459f00efc1f70dae7e7dc8ac5756d8fef1323 (patch) | |
tree | 25f4c967b17724a9476f8d23254c530dc365b849 | |
parent | 3674356c9e1f3cc97528f3e198b92b30688091a8 (diff) |
Core/Creatures: disabled "automatic" monster sparring
- Faction template flags weren't correct.
Closes #19245
(cherry picked from commit b2fc4c65eda779f880d9fc126d8b7aaef8c2ab25)
-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 c7f118b9a50..86ebe8714d3 100644 --- a/src/server/game/AI/CoreAI/UnitAI.cpp +++ b/src/server/game/AI/CoreAI/UnitAI.cpp @@ -56,24 +56,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 b4534b63248..68acb111477 100644 --- a/src/server/game/DataStores/DB2Structure.h +++ b/src/server/game/DataStores/DB2Structure.h @@ -919,7 +919,6 @@ struct FactionTemplateEntry return EnemyMask == 0 && FriendMask == 0; } bool IsContestedGuardFaction() const { return (Flags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD) != 0; } - bool ShouldSparAttack() const { return (Flags & FACTION_TEMPLATE_ENEMY_SPAR) != 0; } }; struct GameObjectsEntry diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h index ebdf6eac626..63b52094dd9 100644 --- a/src/server/game/DataStores/DBCEnums.h +++ b/src/server/game/DataStores/DBCEnums.h @@ -581,7 +581,6 @@ enum SpawnMask 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 |