aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2017-03-06 19:11:03 -0300
committerariel- <ariel-@users.noreply.github.com>2017-03-06 19:11:03 -0300
commitb2fc4c65eda779f880d9fc126d8b7aaef8c2ab25 (patch)
tree7e9a98a5c6329f84af51c4270ffe5c07eb952573 /src
parentfb58e3f1b55260f79b78d9b27400d85c9d447703 (diff)
Core/Creatures: disabled "automatic" monster sparring
- Faction template flags weren't correct. Closes #19245
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/CoreAI/UnitAI.cpp11
-rw-r--r--src/server/game/DataStores/DBCEnums.h1
-rw-r--r--src/server/game/DataStores/DBCStructure.h1
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 69d4cc4c65d..4f0c05429d5 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/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h
index 08f015dcaf2..b8e429c0d14 100644
--- a/src/server/game/DataStores/DBCEnums.h
+++ b/src/server/game/DataStores/DBCEnums.h
@@ -314,7 +314,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
diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h
index 4943a433f8d..7dc8f91826c 100644
--- a/src/server/game/DataStores/DBCStructure.h
+++ b/src/server/game/DataStores/DBCStructure.h
@@ -684,7 +684,6 @@ struct FactionTemplateEntry
return hostileMask == 0 && friendlyMask == 0;
}
bool IsContestedGuardFaction() const { return (factionFlags & FACTION_TEMPLATE_FLAG_CONTESTED_GUARD) != 0; }
- bool ShouldSparAttack() const { return (factionFlags & FACTION_TEMPLATE_ENEMY_SPAR) != 0; }
};
struct GameObjectDisplayInfoEntry