Nexus: Hack for servers that allow two side groups to be able to kill the

faction-dependent npcs.

--HG--
branch : trunk
This commit is contained in:
Tartalo
2010-04-11 17:59:59 +02:00
parent c502f226cb
commit d5c1138a53
@@ -20,6 +20,11 @@
#define NUMBER_OF_ENCOUNTERS 4 #define NUMBER_OF_ENCOUNTERS 4
enum Factions
{
FACTION_HOSTILE_FOR_ALL = 16
};
struct instance_nexus : public ScriptedInstance struct instance_nexus : public ScriptedInstance
{ {
instance_nexus(Map *pMap) : ScriptedInstance(pMap) { Initialize(); } instance_nexus(Map *pMap) : ScriptedInstance(pMap) { Initialize(); }
@@ -64,30 +69,40 @@ struct instance_nexus : public ScriptedInstance
// Alliance npcs are spawned by default, if you are alliance, you will fight against horde npcs. // Alliance npcs are spawned by default, if you are alliance, you will fight against horde npcs.
case 26800: case 26800:
{ {
if (ServerAllowsTwoSideGroups())
pCreature->setFaction(FACTION_HOSTILE_FOR_ALL);
if (TeamInInstance == ALLIANCE) if (TeamInInstance == ALLIANCE)
pCreature->UpdateEntry(26799, HORDE); pCreature->UpdateEntry(26799, HORDE);
break; break;
} }
case 26802: case 26802:
{ {
if (ServerAllowsTwoSideGroups())
pCreature->setFaction(FACTION_HOSTILE_FOR_ALL);
if (TeamInInstance == ALLIANCE) if (TeamInInstance == ALLIANCE)
pCreature->UpdateEntry(26801, HORDE); pCreature->UpdateEntry(26801, HORDE);
break; break;
} }
case 26805: case 26805:
{ {
if (ServerAllowsTwoSideGroups())
pCreature->setFaction(FACTION_HOSTILE_FOR_ALL);
if (TeamInInstance == ALLIANCE) if (TeamInInstance == ALLIANCE)
pCreature->UpdateEntry(26803, HORDE); pCreature->UpdateEntry(26803, HORDE);
break; break;
} }
case 27949: case 27949:
{ {
if (ServerAllowsTwoSideGroups())
pCreature->setFaction(FACTION_HOSTILE_FOR_ALL);
if (TeamInInstance == ALLIANCE) if (TeamInInstance == ALLIANCE)
pCreature->UpdateEntry(27947, HORDE); pCreature->UpdateEntry(27947, HORDE);
break; break;
} }
case 26796: case 26796:
{ {
if (ServerAllowsTwoSideGroups())
pCreature->setFaction(FACTION_HOSTILE_FOR_ALL);
if (TeamInInstance == ALLIANCE) if (TeamInInstance == ALLIANCE)
pCreature->UpdateEntry(26798, HORDE); pCreature->UpdateEntry(26798, HORDE);
break; break;