*Creatures with the same faction should always be friendly to each other. This fix the bug that creatures with the same faction fight earch other.

*Allow "chain effect" when creatures call assistance.

--HG--
branch : trunk
This commit is contained in:
megamage committed 2008-11-23 13:58:06 -06:00
1 parent fb64da2182
commit 8d687761bc
4 files changed
+18 -4

No files matched your search

+9 -3
View File
@@ -8486,10 +8486,16 @@ void Unit::CombatStart(Unit* target)
if(!target->isInCombat() && target->GetTypeId() != TYPEID_PLAYER
&& ((Creature*)target)->isAggressive() && ((Creature*)target)->AI())
{
SetInCombatWith(target);
target->SetInCombatWith(this);
((Creature*)target)->AI()->AttackStart(this);
SetInCombatWith(target);
target->SetInCombatWith(this);
}
else
{
SetInCombatWith(target);
target->SetInCombatWith(this);
}
if(Player* attackedPlayer = target->GetCharmerOrOwnerPlayerOrPlayerItself())
SetContestedPvP(attackedPlayer);