Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void SummonAdds()
- {
- Map::PlayerList const &players = me->GetMap()->GetPlayers();
- uint32 TeamInInstance = 0;
- if (!players.isEmpty())
- if (Player* pPlayer = players.begin()->getSource())
- TeamInInstance = pPlayer->GetTeam();
- if (getDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL)
- {
- if (TeamInInstance == HORDE)
- {
- uint8 random = urand(2,4);
- for (uint8 i = 0; i < random; ++i)
- {
- float x = float(irand(540, 640)); // Safe range is between 500 and 650
- float y = float(irand(-230, -195)); // Safe range is between -235 and -145
- float z = 391.5f; // Ground level
- me->SummonCreature(MOLE_MACHINE_TRIGGER, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN, 10000);
- }
- }
- else if (TeamInInstance == ALLIANCE)
- {
- uint8 random = 1;
- for (uint8 i = 0; i < random; ++i)
- {
- float x = float(irand(540, 640)); // Safe range is between 500 and 650
- float y = float(irand(-230, -195)); // Safe range is between -235 and -145
- float z = 391.5f; // Ground level
- me->SummonCreature(MOLE_MACHINE_TRIGGER, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN, 10000);
- }
- }
- }
- else if (getDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL)
- {
- if (TeamInInstance == HORDE)
- {
- uint8 random = urand(4,8);
- for (uint8 i = 0; i < random; ++i)
- {
- float x = float(irand(540, 640)); // Safe range is between 500 and 650
- float y = float(irand(-230, -195)); // Safe range is between -235 and -145
- float z = 391.5f; // Ground level
- me->SummonCreature(MOLE_MACHINE_TRIGGER, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN, 10000);
- }
- }
- else if (TeamInInstance == ALLIANCE)
- {
- uint8 random = 1;
- for (uint8 i = 0; i < random; ++i)
- {
- float x = float(irand(540, 640)); // Safe range is between 500 and 650
- float y = float(irand(-230, -195)); // Safe range is between -235 and -145
- float z = 391.5f; // Ground level
- me->SummonCreature(MOLE_MACHINE_TRIGGER, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN, 10000);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement