Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case EVENT_TOMB_DEBUG:
- Map::PlayerList const &PlList = me->GetMap()->GetPlayers();
- for (Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i)
- if (Player* player = i->GetSource())
- {
- Position pos = player->GetPosition();
- if (player->HasAura(SPELL_ICE_TOMB_DAMAGE))
- {
- if (!player->FindNearestCreature(NPC_ICE_TOMB, 4.0f))
- {
- if (TempSummon* summon = me->SummonCreature(NPC_ICE_TOMB, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ() + 2.0f))
- {
- summon->AI()->SetGUID(player->GetGUID(), DATA_TRAPPED_PLAYER);
- if (!player->FindNearestGameObject(GO_ICE_BLOCK, 4.0f))
- {
- 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))
- {
- //go->SetSpellId(SPELL_ICE_TOMB_DAMAGE);
- summon->AddGameObject(go);
- }
- }
- }
- }
- }
- }
- events.ScheduleEvent(EVENT_TOMB_DEBUG, 2000);
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement