*Add m_isAggressive. Only aggressive creatures will call AttackStart and MoveInLineOfSight.
*Set melee dmg school for summoned creatures. *Fix some compiling errors. --HG-- branch : trunk
This commit is contained in:
1 parent
182c997573
commit
2c95ee4b31
7 files changed
+23
-10
No files matched your search
+2
-1
@@ -8491,7 +8491,8 @@ void Unit::CombatStart(Unit* target)
|
||||
if(!target->IsStandState() && !target->hasUnitState(UNIT_STAT_STUNNED))
|
||||
target->SetStandState(PLAYER_STATE_NONE);
|
||||
|
||||
if(!target->isInCombat() && target->GetTypeId() != TYPEID_PLAYER && ((Creature*)target)->AI())
|
||||
if(!target->isInCombat() && target->GetTypeId() != TYPEID_PLAYER
|
||||
&& ((Creature*)target)->isAggressive() && ((Creature*)target)->AI())
|
||||
((Creature*)target)->AI()->AttackStart(this);
|
||||
|
||||
SetInCombatWith(target);
|
||||
|
||||
Reference in new issue
Block a user