Advertisement
Guest User

Untitled

a guest
Sep 18th, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. case EVENT_TOMB_DEBUG:
  2. Map::PlayerList const &PlList = me->GetMap()->GetPlayers();
  3. for (Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i)
  4. if (Player* player = i->GetSource())
  5. {
  6. Position pos = player->GetPosition();
  7. if (player->HasAura(SPELL_ICE_TOMB_DAMAGE))
  8. {
  9. if (!player->FindNearestCreature(NPC_ICE_TOMB, 4.0f))
  10. {
  11. if (TempSummon* summon = me->SummonCreature(NPC_ICE_TOMB, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ() + 2.0f))
  12. {
  13. summon->AI()->SetGUID(player->GetGUID(), DATA_TRAPPED_PLAYER);
  14. if (!player->FindNearestGameObject(GO_ICE_BLOCK, 4.0f))
  15. {
  16. if (GameObject* go = summon->SummonGameObject(GO_ICE_BLOCK, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ() - 4.0f, pos.GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 0))
  17. {
  18. //go->SetSpellId(SPELL_ICE_TOMB_DAMAGE);
  19. summon->AddGameObject(go);
  20. }
  21. }
  22. }
  23. }
  24. }
  25. }
  26.  
  27. events.ScheduleEvent(EVENT_TOMB_DEBUG, 2000);
  28. break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement