682 | | InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); |
683 | | InstanceMap::PlayerList::const_iterator i; |
684 | | for (i = PlayerList.begin(); i != PlayerList.end(); ++i) |
685 | | { |
686 | | if((*i)->isAlive()) |
687 | | pUnit->AddThreat(*i, 0.0f); |
688 | | } |
| 682 | Map::PlayerList const &PlayerList = map->GetPlayers(); |
| 683 | for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) |
| 684 | if (Player* i_pl = i->getSource()) |
| 685 | if (!i_pl->isAlive()) |
| 686 | pUnit->AddThreat(i_pl, 0.0f); |
| 721 | |
| 722 | void ScriptedAI::DoTeleportAll(float x, float y, float z, float o) |
| 723 | { |
| 724 | Map *map = m_creature->GetMap(); |
| 725 | if (!map->IsDungeon()) |
| 726 | return; |
| 727 | |
| 728 | Map::PlayerList const &PlayerList = map->GetPlayers(); |
| 729 | for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) |
| 730 | if (Player* i_pl = i->getSource()) |
| 731 | if (!i_pl->isAlive()) |
| 732 | i_pl->TeleportTo(m_creature->GetMapId(), x, y, z, o, TELE_TO_NOT_LEAVE_COMBAT); |
| 733 | } |
| 734 | |