diff options
author | megamage <none@none> | 2008-11-23 13:58:06 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-11-23 13:58:06 -0600 |
commit | 8d687761bcea04c9d9d4add8699df5e48ec0d546 (patch) | |
tree | a596417166e5e4d8f3b41ac1a233db0b1ace87d9 /src/shared/Database/DBCStructure.h | |
parent | fb64da2182ddb732c44ab102c670fe3abf23188d (diff) |
*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
Diffstat (limited to 'src/shared/Database/DBCStructure.h')
-rw-r--r-- | src/shared/Database/DBCStructure.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shared/Database/DBCStructure.h b/src/shared/Database/DBCStructure.h index a71f80ac8c7..ce72661066b 100644 --- a/src/shared/Database/DBCStructure.h +++ b/src/shared/Database/DBCStructure.h @@ -229,6 +229,8 @@ struct FactionTemplateEntry // helpers bool IsFriendlyTo(FactionTemplateEntry const& entry) const { + if(ID == entry.ID) + return true; if(enemyFaction1 == entry.faction || enemyFaction2 == entry.faction || enemyFaction3 == entry.faction || enemyFaction4 == entry.faction ) return false; if(friendFaction1 == entry.faction || friendFaction2 == entry.faction || friendFaction3 == entry.faction || friendFaction4 == entry.faction ) @@ -237,6 +239,8 @@ struct FactionTemplateEntry } bool IsHostileTo(FactionTemplateEntry const& entry) const { + if(ID == entry.ID) + return false; if(enemyFaction1 == entry.faction || enemyFaction2 == entry.faction || enemyFaction3 == entry.faction || enemyFaction4 == entry.faction ) return true; if(friendFaction1 == entry.faction || friendFaction2 == entry.faction || friendFaction3 == entry.faction || friendFaction4 == entry.faction ) |