*Fix the bug that neutural npc aggro players.
*Fix build. --HG-- branch : trunk
This commit is contained in:
@@ -1573,7 +1573,7 @@ bool Creature::IsWithinSightDist(Unit const* u) const
|
|||||||
|
|
||||||
bool Creature::canStartAttack(Unit const* who) const
|
bool Creature::canStartAttack(Unit const* who) const
|
||||||
{
|
{
|
||||||
if(isCivilian()
|
if(isCivilian() || IsNeutralToAll()
|
||||||
|| !who->isInAccessiblePlaceFor(this)
|
|| !who->isInAccessiblePlaceFor(this)
|
||||||
|| !canFly() && GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE
|
|| !canFly() && GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE
|
||||||
|| !IsWithinDistInMap(who, GetAttackDistance(who)))
|
|| !IsWithinDistInMap(who, GetAttackDistance(who)))
|
||||||
|
|||||||
@@ -1222,7 +1222,7 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const* spellPr
|
|||||||
// Item cast can trigger only with spells with spellfamily
|
// Item cast can trigger only with spells with spellfamily
|
||||||
if (procExtra & PROC_EX_INTERNAL_ITEM_CAST)
|
if (procExtra & PROC_EX_INTERNAL_ITEM_CAST)
|
||||||
{
|
{
|
||||||
if (!spellProcEvent->SpellFamilyName)
|
if (!spellProcEvent->spellFamilyName)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Check (if set) for school
|
// Check (if set) for school
|
||||||
|
|||||||
Reference in New Issue
Block a user