Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.00 KB | None | 0 0
  1.  
  2.         void SummonAdds()
  3.         {
  4.             Map::PlayerList const &players = me->GetMap()->GetPlayers();
  5.             uint32 TeamInInstance = 0;
  6.  
  7.             if (!players.isEmpty())
  8.                 if (Player* pPlayer = players.begin()->getSource())
  9.                     TeamInInstance = pPlayer->GetTeam();
  10.  
  11.             if (getDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL)
  12.             {
  13.                 if (TeamInInstance == HORDE)
  14.                 {
  15.                     uint8 random = urand(2,4);
  16.  
  17.                     for (uint8 i = 0; i < random; ++i)
  18.                     {
  19.                         float x = float(irand(540, 640));       // Safe range is between 500 and 650
  20.                         float y = float(irand(-230, -195));     // Safe range is between -235 and -145
  21.                         float z = 391.5f;                       // Ground level
  22.                         me->SummonCreature(MOLE_MACHINE_TRIGGER, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN, 10000);
  23.                     }
  24.                 }
  25.                 else if (TeamInInstance == ALLIANCE)
  26.                 {
  27.                     uint8 random = 1;
  28.  
  29.                     for (uint8 i = 0; i < random; ++i)
  30.                     {
  31.                         float x = float(irand(540, 640));       // Safe range is between 500 and 650
  32.                         float y = float(irand(-230, -195));     // Safe range is between -235 and -145
  33.                         float z = 391.5f;                       // Ground level
  34.                         me->SummonCreature(MOLE_MACHINE_TRIGGER, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN, 10000);
  35.                     }
  36.                 }
  37.             }          
  38.             else if (getDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL)
  39.             {
  40.                 if (TeamInInstance == HORDE)
  41.                 {
  42.                     uint8 random = urand(4,8);
  43.  
  44.                     for (uint8 i = 0; i < random; ++i)
  45.                     {
  46.                         float x = float(irand(540, 640));       // Safe range is between 500 and 650
  47.                         float y = float(irand(-230, -195));     // Safe range is between -235 and -145
  48.                         float z = 391.5f;                       // Ground level
  49.                         me->SummonCreature(MOLE_MACHINE_TRIGGER, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN, 10000);
  50.                     }
  51.                 }
  52.                 else if (TeamInInstance == ALLIANCE)
  53.                 {
  54.                     uint8 random = 1;
  55.  
  56.                     for (uint8 i = 0; i < random; ++i)
  57.                     {
  58.                         float x = float(irand(540, 640));       // Safe range is between 500 and 650
  59.                         float y = float(irand(-230, -195));     // Safe range is between -235 and -145
  60.                         float z = 391.5f;                       // Ground level
  61.                         me->SummonCreature(MOLE_MACHINE_TRIGGER, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN, 10000);
  62.                     }
  63.                 }
  64.             }
  65.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement