*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:
1 parent
fb64da2182
commit
8d687761bc
4 files changed
+18
-4
No files matched your search
+9
-3
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user