Advertisement
Guest User

Untitled

a guest
Aug 30th, 2015
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.00 KB | None | 0 0
  1. void SpawnStarters()
  2.         {
  3.             for (uint8 i = 0; i < 8; ++i)
  4.                 if (Map* map = sMapMgr->CreateBaseMap(startLocation[i].mapId))
  5.                 {
  6.                     TempSummon* summon = new TempSummon(NULL, me, false);
  7.                     if (!summon->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, PHASEMASK_NORMAL, NPC_STARTER, startLocation[i].pos.GetPositionX(), startLocation[i].pos.GetPositionY(), startLocation[i].pos.GetPositionZ(), startLocation[i].pos.GetOrientation(), nullptr, 0))
  8.                     {
  9.                         printf("nie mam summona \n");
  10.                         delete summon;
  11.                         continue;
  12.                     }
  13.  
  14.                     summon->SetHomePosition(startLocation[i].pos);
  15.  
  16.                     summon->InitStats(30000);
  17.                     map->AddToMap(summon->ToCreature());
  18.                     summon->InitSummon();
  19.                 }
  20.                 else
  21.                     printf("nie mam mapy \n");
  22.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement