+ //控制联盟部落对于生物是否可见
+ if (GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_ALLIANCEVISIBLE && pl->GetTeam() == HORDE)//creaute_template->flags_extra = 768仅联盟可见
+ return false;
+
+ if (GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_HORDEVISIBLE && pl->GetTeam() == ALLIANCE)//creaute_template->flags_extra = 1024仅部落可见
+ return false;
+
// Live player (or with not release body see live creatures or death creatures with corpse disappearing time > 0
if(pl->isAlive() || pl->GetDeathTimer() > 0)
{
diff --git a/src/game/Creature.h b/src/game/Creature.h
index dfbcb77..dc2e761 100644
--- a/src/game/Creature.h
+++ b/src/game/Creature.h
@@ -48,6 +48,8 @@ enum CreatureFlagsExtra
CREATURE_FLAG_EXTRA_NO_XP_AT_KILL = 0x00000040, // creature kill not provide XP
CREATURE_FLAG_EXTRA_INVISIBLE = 0x00000080, // creature is always invisible for player (mostly trigger creatures)
CREATURE_FLAG_EXTRA_NOT_TAUNTABLE = 0x00000100, // creature is immune to taunt auras and effect attack me
+ CREATURE_FLAG_EXTRA_ALLIANCEVISIBLE = 0x00000300, // 生物仅联盟可见(creaute_template->flags_extra)值为768
+ CREATURE_FLAG_EXTRA_HORDEVISIBLE = 0x00000400, // 生物仅部落可见(creaute_template->flags_extra)值为1024
};
// GCC have alternative #pragma pack(N) syntax and old gcc version not support pack(push,N), also any gcc version not support it at some platform