Changeset 257 for trunk/src/bindings/scripts/include
- Timestamp:
- 11/19/08 13:51:33 (17 years ago)
- Location:
- trunk/src/bindings/scripts/include
- Files:
-
- 2 modified
-
sc_creature.cpp (modified) (2 diffs)
-
sc_creature.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bindings/scripts/include/sc_creature.cpp
r229 r257 680 680 } 681 681 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); 689 687 } 690 688 … … 721 719 ((Player*)pUnit)->TeleportTo(pUnit->GetMapId(), x, y, z, o, TELE_TO_NOT_LEAVE_COMBAT); 722 720 } 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 723 735 724 736 Unit* ScriptedAI::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff) -
trunk/src/bindings/scripts/include/sc_creature.h
r203 r257 147 147 //Teleports a player without dropping threat (only teleports to same map) 148 148 void DoTeleportPlayer(Unit* pUnit, float x, float y, float z, float o); 149 void DoTeleportAll(float x, float y, float z, float o); 149 150 150 151 //Returns friendly unit with the most amount of hp missing from max hp
![(please configure the [header_logo] section in trac.ini)](/TrinityCore/trac.cgi/chrome/site/your_project_logo.png)