diff options
author | megamage <none@none> | 2009-04-25 18:46:07 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-25 18:46:07 -0500 |
commit | 94e25701ad1b00f2e68445659f5cb777731f4ddb (patch) | |
tree | 1f57e7f8d885c0522bffbf14f6f3e07b472b3c8e | |
parent | ec4031be35cca5b1ce180c399716d40eff3825ca (diff) |
*Fix the bug that neutural npc aggro players.
*Fix build.
--HG--
branch : trunk
-rw-r--r-- | src/game/Creature.cpp | 2 | ||||
-rw-r--r-- | src/game/SpellMgr.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 5d8df6de1de..95d652e04ef 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -1573,7 +1573,7 @@ bool Creature::IsWithinSightDist(Unit const* u) const bool Creature::canStartAttack(Unit const* who) const { - if(isCivilian() + if(isCivilian() || IsNeutralToAll() || !who->isInAccessiblePlaceFor(this) || !canFly() && GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE || !IsWithinDistInMap(who, GetAttackDistance(who))) diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 233ef09f4f5..dfb2184094d 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1222,7 +1222,7 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const* spellPr // Item cast can trigger only with spells with spellfamily if (procExtra & PROC_EX_INTERNAL_ITEM_CAST) { - if (!spellProcEvent->SpellFamilyName) + if (!spellProcEvent->spellFamilyName) return false; } // Check (if set) for school |