Core/Creatures: disabled "automatic" monster sparring

- Faction template flags weren't correct.

Closes #19245
This commit is contained in:
ariel-
2017-03-06 19:11:03 -03:00
parent fb58e3f1b5
commit b2fc4c65ed
3 changed files with 2 additions and 11 deletions

View File

@@ -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);
}

View File

@@ -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

View File

@@ -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