Advertisement
Rochet2

Untitled

Jan 6th, 2015
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "ScriptPCH.h"
  2.  
  3. class MageTable_SoulwellArena : public PlayerScript
  4. {
  5. public:
  6.     MageTable_SoulwellArena() : PlayerScript("MageTable_SoulwellArena") { }
  7.  
  8.     void OnUpdateZone(Player* player, uint32 zone, uint32 area)
  9.     {
  10.         uint32 entry = 0;
  11.         if (player->getClass() == CLASS_MAGE)
  12.             entry = 193061;
  13.         if (player->getClass() == CLASS_WARLOCK)
  14.             entry = 193169;
  15.  
  16.         if (!entry)
  17.             return;
  18.  
  19.         if (zone == 3698 ||
  20.             zone == 3702 ||
  21.             zone == 4378 ||
  22.             zone == 3968 ||
  23.             zone == 4406)
  24.         {
  25.             if (player->FindNearestGameObject(entry, SIZE_OF_GRIDS))
  26.                 return;
  27.  
  28.             float x, y, z, ang;
  29.             player->GetPosition(x, y, z, ang);
  30.             float rot2 = std::sin(ang / 2);
  31.             float rot3 = std::cos(ang / 2);
  32.  
  33.             player->SummonGameObject(entry, x, y, z, ang, 0, 0, rot2, rot3, 30);
  34.         }
  35.     }
  36. };
  37.  
  38. void AddSC_MageTable_SoulwellArena()
  39. {
  40.     new MageTable_SoulwellArena;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement