Changeset 272 for trunk/src/bindings
- Timestamp:
- 11/22/08 00:35:41 (17 years ago)
- Location:
- trunk/src/bindings/scripts
- Files:
-
- 308 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bindings/scripts/ScriptMgr.cpp
r260 r272 18 18 19 19 //*** Global data *** 20 int num_db_scripts; 21 int num_sc_scripts; 20 int nrscripts; 22 21 Script *m_scripts[MAX_SCRIPTS]; 23 22 … … 48 47 // Text Maps 49 48 UNORDERED_MAP<int32, StringTextData> TextMap; 49 50 50 51 51 //*** End Global data *** … … 1181 1181 TRINITY_DLL_EXPORT 1182 1182 void ScriptsFree() 1183 { 1183 { 1184 1184 // Free Spell Summary 1185 1185 delete []SpellSummary; 1186 1186 1187 1187 // Free resources before library unload 1188 for(int i=0;i<n um_db_scripts;i++)1188 for(int i=0;i<nrscripts;i++) 1189 1189 delete m_scripts[i]; 1190 1190 1191 num_db_scripts = 0; 1192 num_sc_scripts = 0; 1191 nrscripts = 0; 1193 1192 } 1194 1193 … … 1241 1240 LoadDatabase(); 1242 1241 1243 num_db_scripts = GetScriptNames().size();1244 1245 1242 outstring_log("TSCR: Loading C++ scripts"); 1246 1243 barGoLink bar(1); … … 1248 1245 outstring_log(""); 1249 1246 1247 nrscripts = 0; 1250 1248 for(int i=0;i<MAX_SCRIPTS;i++) 1251 1249 m_scripts[i]=NULL; … … 1778 1776 // ------------------- 1779 1777 1780 outstring_log(">> Loaded %i C++ Scripts (of %i ScriptNames defined in Mangos database)", num_sc_scripts, num_db_scripts); 1778 outstring_log("TSCR: Loaded %u C++ Scripts", nrscripts); 1779 outstring_log(""); 1781 1780 } 1782 1781 … … 1850 1849 //*** Functions used internally *** 1851 1850 1852 void Script::RegisterSelf() 1853 { 1854 int id = GetScriptId(Name.c_str()); 1855 if (id != 0) 1856 { 1857 m_scripts[id] = this; 1858 ++num_sc_scripts; 1859 } else 1860 debug_log("SD2: RegisterSelf, but script named %s does not have ScriptName assigned in database.",(this)->Name.c_str()); 1851 TRINITY_DLL_EXPORT 1852 char const* ScriptsVersion() 1853 { 1854 return "Default Trinity scripting library"; 1855 } 1856 1857 Script* GetScriptByName(std::string Name) 1858 { 1859 if (Name.empty()) 1860 return NULL; 1861 1862 for(int i=0;i<MAX_SCRIPTS;i++) 1863 { 1864 if (m_scripts[i] && m_scripts[i]->Name == Name) 1865 return m_scripts[i]; 1866 } 1867 return NULL; 1861 1868 } 1862 1869 … … 1865 1872 1866 1873 TRINITY_DLL_EXPORT 1867 char const* ScriptsVersion()1868 {1869 return "Default Trinity scripting library";1870 }1871 TRINITY_DLL_EXPORT1872 1874 bool GossipHello ( Player * player, Creature *_Creature ) 1873 1875 { 1874 Script *tmpscript = m_scripts[_Creature->GetScriptId()];1876 Script *tmpscript = GetScriptByName(_Creature->GetScriptName()); 1875 1877 if (!tmpscript || !tmpscript->pGossipHello) return false; 1876 1878 … … 1884 1886 debug_log("TSCR: Gossip selection, sender: %d, action: %d",sender, action); 1885 1887 1886 Script *tmpscript = m_scripts[_Creature->GetScriptId()];1888 Script *tmpscript = GetScriptByName(_Creature->GetScriptName()); 1887 1889 if (!tmpscript || !tmpscript->pGossipSelect) return false; 1888 1890 … … 1896 1898 debug_log("TSCR: Gossip selection with code, sender: %d, action: %d",sender, action); 1897 1899 1898 Script *tmpscript = m_scripts[_Creature->GetScriptId()];1900 Script *tmpscript = GetScriptByName(_Creature->GetScriptName()); 1899 1901 if (!tmpscript || !tmpscript->pGossipSelectWithCode) return false; 1900 1902 … … 1906 1908 bool QuestAccept( Player *player, Creature *_Creature, Quest const *_Quest ) 1907 1909 { 1908 Script *tmpscript = m_scripts[_Creature->GetScriptId()];1910 Script *tmpscript = GetScriptByName(_Creature->GetScriptName()); 1909 1911 if (!tmpscript || !tmpscript->pQuestAccept) return false; 1910 1912 … … 1916 1918 bool QuestSelect( Player *player, Creature *_Creature, Quest const *_Quest ) 1917 1919 { 1918 Script *tmpscript = m_scripts[_Creature->GetScriptId()];1920 Script *tmpscript = GetScriptByName(_Creature->GetScriptName()); 1919 1921 if (!tmpscript || !tmpscript->pQuestSelect) return false; 1920 1922 … … 1926 1928 bool QuestComplete( Player *player, Creature *_Creature, Quest const *_Quest ) 1927 1929 { 1928 Script *tmpscript = m_scripts[_Creature->GetScriptId()];1930 Script *tmpscript = GetScriptByName(_Creature->GetScriptName()); 1929 1931 if (!tmpscript || !tmpscript->pQuestComplete) return false; 1930 1932 … … 1936 1938 bool ChooseReward( Player *player, Creature *_Creature, Quest const *_Quest, uint32 opt ) 1937 1939 { 1938 Script *tmpscript = m_scripts[_Creature->GetScriptId()];1940 Script *tmpscript = GetScriptByName(_Creature->GetScriptName()); 1939 1941 if (!tmpscript || !tmpscript->pChooseReward) return false; 1940 1942 … … 1946 1948 uint32 NPCDialogStatus( Player *player, Creature *_Creature ) 1947 1949 { 1948 Script *tmpscript = m_scripts[_Creature->GetScriptId()];1950 Script *tmpscript = GetScriptByName(_Creature->GetScriptName()); 1949 1951 if (!tmpscript || !tmpscript->pNPCDialogStatus) return 100; 1950 1952 … … 1956 1958 uint32 GODialogStatus( Player *player, GameObject *_GO ) 1957 1959 { 1958 Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId];1959 if 1960 Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName); 1961 if(!tmpscript || !tmpscript->pGODialogStatus) return 100; 1960 1962 1961 1963 player->PlayerTalkClass->ClearMenus(); … … 1966 1968 bool ItemHello( Player *player, Item *_Item, Quest const *_Quest ) 1967 1969 { 1968 Script *tmpscript = m_scripts[_Item->GetProto()->ScriptId];1970 Script *tmpscript = GetScriptByName(_Item->GetProto()->ScriptName); 1969 1971 if (!tmpscript || !tmpscript->pItemHello) return false; 1970 1972 … … 1976 1978 bool ItemQuestAccept( Player *player, Item *_Item, Quest const *_Quest ) 1977 1979 { 1978 Script *tmpscript = m_scripts[_Item->GetProto()->ScriptId];1980 Script *tmpscript = GetScriptByName(_Item->GetProto()->ScriptName); 1979 1981 if (!tmpscript || !tmpscript->pItemQuestAccept) return false; 1980 1982 … … 1986 1988 bool GOHello( Player *player, GameObject *_GO ) 1987 1989 { 1988 Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId];1990 Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName); 1989 1991 if (!tmpscript || !tmpscript->pGOHello) return false; 1990 1992 … … 1996 1998 bool GOQuestAccept( Player *player, GameObject *_GO, Quest const *_Quest ) 1997 1999 { 1998 Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId];2000 Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName); 1999 2001 if (!tmpscript || !tmpscript->pGOQuestAccept) return false; 2000 2002 … … 2006 2008 bool GOChooseReward( Player *player, GameObject *_GO, Quest const *_Quest, uint32 opt ) 2007 2009 { 2008 Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId];2010 Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName); 2009 2011 if (!tmpscript || !tmpscript->pGOChooseReward) return false; 2010 2012 … … 2016 2018 bool AreaTrigger( Player *player, AreaTriggerEntry * atEntry) 2017 2019 { 2018 Script *tmpscript = m_scripts[GetAreaTriggerScriptId(atEntry->id)]; 2020 Script *tmpscript = NULL; 2021 2022 tmpscript = GetScriptByName(GetAreaTriggerScriptNameById(atEntry->id)); 2019 2023 if (!tmpscript || !tmpscript->pAreaTrigger) return false; 2020 2024 … … 2025 2029 CreatureAI* GetAI(Creature *_Creature) 2026 2030 { 2027 Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 2031 Script *tmpscript = GetScriptByName(_Creature->GetScriptName()); 2032 2028 2033 if (!tmpscript || !tmpscript->GetAI) return NULL; 2029 2030 2034 return tmpscript->GetAI(_Creature); 2031 2035 } … … 2034 2038 bool ItemUse( Player *player, Item* _Item, SpellCastTargets const& targets) 2035 2039 { 2036 Script *tmpscript = m_scripts[_Item->GetProto()->ScriptId];2040 Script *tmpscript = GetScriptByName(_Item->GetProto()->ScriptName); 2037 2041 if (!tmpscript || !tmpscript->pItemUse) return false; 2038 2042 … … 2043 2047 bool ReceiveEmote( Player *player, Creature *_Creature, uint32 emote ) 2044 2048 { 2045 Script *tmpscript = m_scripts[_Creature->GetScriptId()];2049 Script *tmpscript = GetScriptByName(_Creature->GetScriptName()); 2046 2050 if (!tmpscript || !tmpscript->pReceiveEmote) return false; 2047 2051 … … 2052 2056 InstanceData* CreateInstanceData(Map *map) 2053 2057 { 2054 if (!map->IsDungeon()) return NULL; 2055 2056 Script *tmpscript = m_scripts[((InstanceMap*)map)->GetScriptId()]; 2057 if (!tmpscript || !tmpscript->GetInstanceData) return NULL; 2058 Script *tmpscript = NULL; 2059 2060 if (!map->IsDungeon()) return false; 2061 2062 tmpscript = GetScriptByName(((InstanceMap*)map)->GetScript()); 2063 if (!tmpscript || !tmpscript->GetInstanceData) return false; 2058 2064 2059 2065 return tmpscript->GetInstanceData(map); -
trunk/src/bindings/scripts/ScriptMgr.h
r260 r272 25 25 class WorldObject; 26 26 27 #define MAX_SCRIPTS 5000 //72 bytes each (approx 351kb)27 #define MAX_SCRIPTS 1000 //72 bytes each (approx 71kb) 28 28 #define VISIBLE_RANGE (166.0f) //MAX visible range (size of grid) 29 29 #define DEFAULT_TEXT "<Trinity Script Text Entry Missing!>" … … 32 32 { 33 33 Script() : 34 35 36 37 38 34 pGossipHello(NULL), pQuestAccept(NULL), pGossipSelect(NULL), pGossipSelectWithCode(NULL), 35 pQuestSelect(NULL), pQuestComplete(NULL), pNPCDialogStatus(NULL), pGODialogStatus(NULL), pChooseReward(NULL), 36 pItemHello(NULL), pGOHello(NULL), pAreaTrigger(NULL), pItemQuestAccept(NULL), pGOQuestAccept(NULL), 37 pGOChooseReward(NULL),pReceiveEmote(NULL),pItemUse(NULL), GetAI(NULL), GetInstanceData(NULL) 38 {} 39 39 40 40 std::string Name; 41 41 42 //Methods to be scripted43 44 45 bool (*pGossipSelect )(Player*, Creature*, uint32 , uint32);46 47 48 49 50 uint32 (*pGODialogStatus )(Player*, GameObject * _GO );51 52 53 54 55 56 57 bool (*pGOChooseReward )(Player*, GameObject*, Quest const*, uint32 );58 59 42 // Quest/gossip Methods to be scripted 43 bool (*pGossipHello )(Player*, Creature*); 44 bool (*pQuestAccept )(Player*, Creature*, Quest const* ); 45 bool (*pGossipSelect )(Player*, Creature*, uint32 , uint32 ); 46 bool (*pGossipSelectWithCode)(Player*, Creature*, uint32 , uint32 , const char* ); 47 bool (*pQuestSelect )(Player*, Creature*, Quest const* ); 48 bool (*pQuestComplete )(Player*, Creature*, Quest const* ); 49 uint32 (*pNPCDialogStatus )(Player*, Creature* ); 50 uint32 (*pGODialogStatus )(Player *player, GameObject * _GO ); 51 bool (*pChooseReward )(Player*, Creature*, Quest const*, uint32 ); 52 bool (*pItemHello )(Player*, Item*, Quest const* ); 53 bool (*pGOHello )(Player*, GameObject* ); 54 bool (*pAreaTrigger )(Player*, AreaTriggerEntry* ); 55 bool (*pItemQuestAccept )(Player*, Item *, Quest const* ); 56 bool (*pGOQuestAccept )(Player*, GameObject*, Quest const* ); 57 bool (*pGOChooseReward )(Player*, GameObject*_GO, Quest const*, uint32 ); 58 bool (*pReceiveEmote )(Player*, Creature*, uint32 ); 59 bool (*pItemUse )(Player*, Item*, SpellCastTargets const& ); 60 60 61 CreatureAI* (*GetAI)(Creature*); 62 InstanceData* (*GetInstanceData)(Map*); 61 CreatureAI* (*GetAI)(Creature*); 62 InstanceData* (*GetInstanceData)(Map*); 63 }; 63 64 64 void RegisterSelf();65 };65 extern int nrscripts; 66 extern Script *m_scripts[MAX_SCRIPTS]; 66 67 67 68 //Generic scripting text function -
trunk/src/bindings/scripts/include/sc_creature.cpp
r267 r272 74 74 void ScriptedAI::MoveInLineOfSight(Unit *who) 75 75 { 76 if(!m_creature->getVictim() && m_creature->canStartAttack(who)) 76 if(m_creature->getVictim() || !m_creature->IsHostileTo(who) || !who->isInAccessiblePlaceFor(m_creature)) 77 return; 78 79 if(!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE) 80 return; 81 82 if(!m_creature->IsWithinDistInMap(who, m_creature->GetAttackDistance(who)) || !m_creature->IsWithinLOSInMap(who)) 83 return; 84 85 if(m_creature->canAttack(who)) 86 //who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); 77 87 AttackStart(who); 78 88 } … … 670 680 } 671 681 672 Map::PlayerList const &PlayerList = map->GetPlayers(); 673 for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) 674 if (Player* i_pl = i->getSource()) 675 if (!i_pl->isAlive()) 676 pUnit->AddThreat(i_pl, 0.0f); 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 } 677 689 } 678 690 … … 709 721 ((Player*)pUnit)->TeleportTo(pUnit->GetMapId(), x, y, z, o, TELE_TO_NOT_LEAVE_COMBAT); 710 722 } 711 712 void ScriptedAI::DoTeleportAll(float x, float y, float z, float o)713 {714 Map *map = m_creature->GetMap();715 if (!map->IsDungeon())716 return;717 718 Map::PlayerList const &PlayerList = map->GetPlayers();719 for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)720 if (Player* i_pl = i->getSource())721 if (!i_pl->isAlive())722 i_pl->TeleportTo(m_creature->GetMapId(), x, y, z, o, TELE_TO_NOT_LEAVE_COMBAT);723 }724 725 723 726 724 Unit* ScriptedAI::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff) -
trunk/src/bindings/scripts/include/sc_creature.h
r257 r272 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);150 149 151 150 //Returns friendly unit with the most amount of hp missing from max hp -
trunk/src/bindings/scripts/scripts/areatrigger/areatrigger_scripts.cpp
r260 r272 41 41 newscript->Name="at_test"; 42 42 newscript->pAreaTrigger = ATtest; 43 newscript->RegisterSelf();43 m_scripts[nrscripts++] = newscript; 44 44 } -
trunk/src/bindings/scripts/scripts/boss/boss_emeriss.cpp
r260 r272 153 153 newscript->Name="boss_emeriss"; 154 154 newscript->GetAI = GetAI_boss_emeriss; 155 newscript->RegisterSelf();155 m_scripts[nrscripts++] = newscript; 156 156 } -
trunk/src/bindings/scripts/scripts/boss/boss_taerar.cpp
r260 r272 298 298 newscript->Name="boss_taerar"; 299 299 newscript->GetAI = GetAI_boss_taerar; 300 newscript->RegisterSelf();300 m_scripts[nrscripts++] = newscript; 301 301 302 302 newscript = new Script; 303 303 newscript->Name="boss_shade_of_taerar"; 304 304 newscript->GetAI = GetAI_boss_shadeoftaerar; 305 newscript->RegisterSelf();305 m_scripts[nrscripts++] = newscript; 306 306 } -
trunk/src/bindings/scripts/scripts/boss/boss_ysondre.cpp
r260 r272 238 238 newscript->Name="boss_ysondre"; 239 239 newscript->GetAI = GetAI_boss_ysondre; 240 newscript->RegisterSelf();240 m_scripts[nrscripts++] = newscript; 241 241 242 242 newscript = new Script; 243 243 newscript->Name="mob_dementeddruids"; 244 244 newscript->GetAI = GetAI_mob_dementeddruids; 245 newscript->RegisterSelf();245 m_scripts[nrscripts++] = newscript; 246 246 } -
trunk/src/bindings/scripts/scripts/creature/mob_event_ai.cpp
r269 r272 7 7 * This program is distributed in the hope that it will be useful, 8 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 10 * GNU General Public License for more details. 11 11 * 12 12 * You should have received a copy of the GNU General Public License 13 13 * along with this program; if not, write to the Free Software 14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 15 15 */ 16 16 … … 965 965 DoZoneInCombat(); 966 966 } 967 break;968 969 // TRINITY ONLY970 case ACTION_T_SET_ACTIVE:971 m_creature->setActive(param1 ? true : false);972 break;973 case ACTION_T_SET_AGGRESSIVE:974 m_creature->SetAggressive(param1 ? true : false);975 break;976 case ACTION_T_ATTACK_START_PULSE:977 AttackStart(m_creature->SelectNearestTarget((float)param1));978 967 break; 979 968 } … … 1204 1193 } 1205 1194 1206 // do we need this? 1207 //if (m_creature->isCivilian() && m_creature->IsNeutralToAll()) 1208 // return; 1209 1210 if(m_creature->canStartAttack(who)) 1211 AttackStart(who); 1195 if (m_creature->isCivilian() && m_creature->IsNeutralToAll()) 1196 return; 1197 1198 if (m_creature->canAttack(who) && who->isInAccessiblePlaceFor(m_creature) && m_creature->IsHostileTo(who)) 1199 { 1200 if (!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE) 1201 return; 1202 1203 float attackRadius = m_creature->GetAttackDistance(who); 1204 if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who)) 1205 { 1206 //if(who->HasStealthAura()) 1207 // who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); 1208 1209 //Begin melee attack if we are within range 1210 AttackStart(who); 1211 } 1212 } 1212 1213 } 1213 1214 … … 1292 1293 if (!((*i).Event.event_inverse_phase_mask & (1 << Phase))) 1293 1294 (*i).Time -= EventDiff; 1294 1295 1295 //Skip processing of events that have time remaining 1296 1296 continue; … … 1329 1329 if (Combat && MeleeEnabled) 1330 1330 DoMeleeAttackIfReady(); 1331 1332 1331 } 1333 1332 }; … … 1402 1401 newscript->Name="mob_eventai"; 1403 1402 newscript->GetAI = GetAI_Mob_EventAI; 1404 newscript->RegisterSelf();1403 m_scripts[nrscripts++] = newscript; 1405 1404 } -
trunk/src/bindings/scripts/scripts/creature/mob_event_ai.h
r269 r272 1 1 /* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> 2 3 2 * This program is free software licensed under GPL version 2 3 * Please see the included DOCS/LICENSE.TXT for more information */ 4 4 5 5 #ifndef SC_EVENTAI_H … … 77 77 ACTION_T_ZONE_COMBAT_PULSE = 38, //No Params 78 78 79 ACTION_T_SET_ACTIVE = 101, //Apply80 ACTION_T_SET_AGGRESSIVE = 102, //Apply81 ACTION_T_ATTACK_START_PULSE = 103, //Distance82 83 79 ACTION_T_END, 84 80 }; -
trunk/src/bindings/scripts/scripts/creature/mob_generic_creature.cpp
r260 r272 169 169 newscript->Name="generic_creature"; 170 170 newscript->GetAI = GetAI_generic_creature; 171 newscript->RegisterSelf();171 m_scripts[nrscripts++] = newscript; 172 172 } -
trunk/src/bindings/scripts/scripts/custom/custom_example.cpp
r260 r272 274 274 newscript->pGossipSelect = &GossipSelect_custom_example; 275 275 newscript->pReceiveEmote = &ReceiveEmote_custom_example; 276 newscript->RegisterSelf();277 } 276 m_scripts[nrscripts++] = newscript; 277 } -
trunk/src/bindings/scripts/scripts/custom/custom_gossip_codebox.cpp
r260 r272 78 78 newscript->pGossipSelect = &GossipSelect_custom_gossip_codebox; 79 79 newscript->pGossipSelectWithCode = &GossipSelectWithCode_custom_gossip_codebox; 80 newscript->RegisterSelf();80 m_scripts[nrscripts++] = newscript; 81 81 } -
trunk/src/bindings/scripts/scripts/custom/test.cpp
r260 r272 197 197 newscript->pGossipHello = &GossipHello_npc_test; 198 198 newscript->pGossipSelect = &GossipSelect_npc_test; 199 newscript->RegisterSelf();200 } 199 m_scripts[nrscripts++] = newscript; 200 } -
trunk/src/bindings/scripts/scripts/go/go_scripts.cpp
r260 r272 166 166 newscript->Name="go_northern_crystal_pylon"; 167 167 newscript->pGOHello = &GOHello_go_northern_crystal_pylon; 168 newscript->RegisterSelf();168 m_scripts[nrscripts++] = newscript; 169 169 170 170 newscript = new Script; 171 171 newscript->Name="go_eastern_crystal_pylon"; 172 172 newscript->pGOHello = &GOHello_go_eastern_crystal_pylon; 173 newscript->RegisterSelf();173 m_scripts[nrscripts++] = newscript; 174 174 175 175 newscript = new Script; 176 176 newscript->Name="go_western_crystal_pylon"; 177 177 newscript->pGOHello = &GOHello_go_western_crystal_pylon; 178 newscript->RegisterSelf();178 m_scripts[nrscripts++] = newscript; 179 179 180 180 newscript = new Script; 181 181 newscript->Name="go_barov_journal"; 182 182 newscript->pGOHello = &GOHello_go_barov_journal; 183 newscript->RegisterSelf();183 m_scripts[nrscripts++] = newscript; 184 184 185 185 newscript = new Script; 186 186 newscript->Name="go_field_repair_bot_74A"; 187 187 newscript->pGOHello = &GOHello_go_field_repair_bot_74A; 188 newscript->RegisterSelf();188 m_scripts[nrscripts++] = newscript; 189 189 190 190 newscript = new Script; 191 191 newscript->Name="go_orb_of_command"; 192 192 newscript->pGOHello = &GOHello_go_orb_of_command; 193 newscript->RegisterSelf();193 m_scripts[nrscripts++] = newscript; 194 194 195 195 newscript = new Script; 196 196 newscript->Name="go_tablet_of_madness"; 197 197 newscript->pGOHello = &GOHello_go_tablet_of_madness; 198 newscript->RegisterSelf();198 m_scripts[nrscripts++] = newscript; 199 199 200 200 newscript = new Script; 201 201 newscript->Name="go_tablet_of_the_seven"; 202 202 newscript->pGOHello = &GOHello_go_tablet_of_the_seven; 203 newscript->RegisterSelf();203 m_scripts[nrscripts++] = newscript; 204 204 205 205 newscript = new Script; 206 206 newscript->Name="go_teleporter"; 207 207 newscript->pGOHello = &GOHello_go_teleporter; 208 newscript->RegisterSelf();209 } 208 m_scripts[nrscripts++] = newscript; 209 } -
trunk/src/bindings/scripts/scripts/guard/guards.cpp
r260 r272 3981 3981 newscript->pGossipSelect = &GossipSelect_guard_azuremyst; 3982 3982 newscript->GetAI = GetAI_guard_azuremyst; 3983 newscript->RegisterSelf();3983 m_scripts[nrscripts++] = newscript; 3984 3984 3985 3985 newscript = new Script; … … 3988 3988 newscript->pGossipSelect = &GossipSelect_guard_bluffwatcher; 3989 3989 newscript->GetAI = GetAI_guard_bluffwatcher; 3990 newscript->RegisterSelf();3990 m_scripts[nrscripts++] = newscript; 3991 3991 3992 3992 newscript = new Script; 3993 3993 newscript->Name="guard_contested"; 3994 3994 newscript->GetAI = GetAI_guard_contested; 3995 newscript->RegisterSelf();3995 m_scripts[nrscripts++] = newscript; 3996 3996 3997 3997 newscript = new Script; … … 4000 4000 newscript->pGossipSelect = &GossipSelect_guard_darnassus; 4001 4001 newscript->GetAI = GetAI_guard_darnassus; 4002 newscript->RegisterSelf();4002 m_scripts[nrscripts++] = newscript; 4003 4003 4004 4004 newscript = new Script; … … 4007 4007 newscript->pGossipSelect = &GossipSelect_guard_dunmorogh; 4008 4008 newscript->GetAI = GetAI_guard_dunmorogh; 4009 newscript->RegisterSelf();4009 m_scripts[nrscripts++] = newscript; 4010 4010 4011 4011 newscript = new Script; … … 4014 4014 newscript->pGossipSelect = &GossipSelect_guard_durotar; 4015 4015 newscript->GetAI = GetAI_guard_durotar; 4016 newscript->RegisterSelf();4016 m_scripts[nrscripts++] = newscript; 4017 4017 4018 4018 newscript = new Script; … … 4021 4021 newscript->pGossipSelect = &GossipSelect_guard_elwynnforest; 4022 4022 newscript->GetAI = GetAI_guard_elwynnforest; 4023 newscript->RegisterSelf();4023 m_scripts[nrscripts++] = newscript; 4024 4024 4025 4025 newscript = new Script; … … 4028 4028 newscript->pGossipSelect = &GossipSelect_guard_eversong; 4029 4029 newscript->GetAI = GetAI_guard_eversong; 4030 newscript->RegisterSelf();4030 m_scripts[nrscripts++] = newscript; 4031 4031 4032 4032 newscript = new Script; … … 4035 4035 newscript->pGossipSelect = &GossipSelect_guard_exodar; 4036 4036 newscript->GetAI = GetAI_guard_exodar; 4037 newscript->RegisterSelf();4037 m_scripts[nrscripts++] = newscript; 4038 4038 4039 4039 newscript = new Script; … … 4042 4042 newscript->pGossipSelect = &GossipSelect_guard_ironforge; 4043 4043 newscript->GetAI = GetAI_guard_ironforge; 4044 newscript->RegisterSelf();4044 m_scripts[nrscripts++] = newscript; 4045 4045 4046 4046 newscript = new Script; … … 4049 4049 newscript->pGossipSelect = &GossipSelect_guard_mulgore; 4050 4050 newscript->GetAI = GetAI_guard_mulgore; 4051 newscript->RegisterSelf();4051 m_scripts[nrscripts++] = newscript; 4052 4052 4053 4053 newscript = new Script; … … 4057 4057 newscript->pReceiveEmote = &ReceiveEmote_guard_orgrimmar; 4058 4058 newscript->GetAI = GetAI_guard_orgrimmar; 4059 newscript->RegisterSelf();4059 m_scripts[nrscripts++] = newscript; 4060 4060 4061 4061 newscript = new Script; … … 4064 4064 newscript->pGossipSelect = &GossipSelect_guard_shattrath; 4065 4065 newscript->GetAI = GetAI_guard_shattrath; 4066 newscript->RegisterSelf();4066 m_scripts[nrscripts++] = newscript; 4067 4067 4068 4068 newscript = new Script; … … 4071 4071 newscript->pGossipHello = &GossipHello_guard_shattrath_aldor; 4072 4072 newscript->pGossipSelect = &GossipSelect_guard_shattrath_aldor; 4073 newscript->RegisterSelf();4073 m_scripts[nrscripts++] = newscript; 4074 4074 4075 4075 newscript = new Script; … … 4078 4078 newscript->pGossipHello = &GossipHello_guard_shattrath_scryer; 4079 4079 newscript->pGossipSelect = &GossipSelect_guard_shattrath_scryer; 4080 newscript->RegisterSelf();4080 m_scripts[nrscripts++] = newscript; 4081 4081 4082 4082 newscript = new Script; … … 4085 4085 newscript->pGossipSelect = &GossipSelect_guard_silvermoon; 4086 4086 newscript->GetAI = GetAI_guard_silvermoon; 4087 newscript->RegisterSelf();4087 m_scripts[nrscripts++] = newscript; 4088 4088 4089 4089 newscript = new Script; … … 4093 4093 newscript->pReceiveEmote = &ReceiveEmote_guard_stormwind; 4094 4094 newscript->GetAI = GetAI_guard_stormwind; 4095 newscript->RegisterSelf();4095 m_scripts[nrscripts++] = newscript; 4096 4096 4097 4097 newscript = new Script; … … 4100 4100 newscript->pGossipSelect = &GossipSelect_guard_teldrassil; 4101 4101 newscript->GetAI = GetAI_guard_teldrassil; 4102 newscript->RegisterSelf();4102 m_scripts[nrscripts++] = newscript; 4103 4103 4104 4104 newscript = new Script; … … 4107 4107 newscript->pGossipSelect = &GossipSelect_guard_tirisfal; 4108 4108 newscript->GetAI = GetAI_guard_tirisfal; 4109 newscript->RegisterSelf();4109 m_scripts[nrscripts++] = newscript; 4110 4110 4111 4111 newscript = new Script; … … 4114 4114 newscript->pGossipSelect = &GossipSelect_guard_undercity; 4115 4115 newscript->GetAI = GetAI_guard_undercity; 4116 newscript->RegisterSelf();4117 } 4116 m_scripts[nrscripts++] = newscript; 4117 } -
trunk/src/bindings/scripts/scripts/item/item_scripts.cpp
r260 r272 456 456 newscript->Name="item_area_52_special"; 457 457 newscript->pItemUse = ItemUse_item_area_52_special; 458 newscript->RegisterSelf();458 m_scripts[nrscripts++] = newscript; 459 459 460 460 newscript = new Script; 461 461 newscript->Name="item_arcane_charges"; 462 462 newscript->pItemUse = ItemUse_item_arcane_charges; 463 newscript->RegisterSelf();463 m_scripts[nrscripts++] = newscript; 464 464 465 465 newscript = new Script; 466 466 newscript->Name="item_attuned_crystal_cores"; 467 467 newscript->pItemUse = ItemUse_item_attuned_crystal_cores; 468 newscript->RegisterSelf();468 m_scripts[nrscripts++] = newscript; 469 469 470 470 newscript = new Script; 471 471 newscript->Name="item_blackwhelp_net"; 472 472 newscript->pItemUse = ItemUse_item_blackwhelp_net; 473 newscript->RegisterSelf();473 m_scripts[nrscripts++] = newscript; 474 474 475 475 newscript = new Script; 476 476 newscript->Name="item_disciplinary_rod"; 477 477 newscript->pItemUse = ItemUse_item_disciplinary_rod; 478 newscript->RegisterSelf();478 m_scripts[nrscripts++] = newscript; 479 479 480 480 newscript = new Script; 481 481 newscript->Name="item_draenei_fishing_net"; 482 482 newscript->pItemUse = ItemUse_item_draenei_fishing_net; 483 newscript->RegisterSelf();483 m_scripts[nrscripts++] = newscript; 484 484 485 485 newscript = new Script; 486 486 newscript->Name="item_nether_wraith_beacon"; 487 487 newscript->pItemUse = ItemUse_item_nether_wraith_beacon; 488 newscript->RegisterSelf();488 m_scripts[nrscripts++] = newscript; 489 489 490 490 newscript = new Script; 491 491 newscript->Name="item_flying_machine"; 492 492 newscript->pItemUse = ItemUse_item_flying_machine; 493 newscript->RegisterSelf();493 m_scripts[nrscripts++] = newscript; 494 494 495 495 newscript = new Script; 496 496 newscript->Name="item_gor_dreks_ointment"; 497 497 newscript->pItemUse = ItemUse_item_gor_dreks_ointment; 498 newscript->RegisterSelf();498 m_scripts[nrscripts++] = newscript; 499 499 500 500 newscript = new Script; 501 501 newscript->Name="item_muiseks_vessel"; 502 502 newscript->pItemUse = ItemUse_item_muiseks_vessel; 503 newscript->RegisterSelf();503 m_scripts[nrscripts++] = newscript; 504 504 505 505 newscript = new Script; 506 506 newscript->Name="item_razorthorn_flayer_gland"; 507 507 newscript->pItemUse = ItemUse_item_razorthorn_flayer_gland; 508 newscript->RegisterSelf();508 m_scripts[nrscripts++] = newscript; 509 509 510 510 newscript = new Script; 511 511 newscript->Name="item_tame_beast_rods"; 512 512 newscript->pItemUse = ItemUse_item_tame_beast_rods; 513 newscript->RegisterSelf();513 m_scripts[nrscripts++] = newscript; 514 514 515 515 newscript = new Script; 516 516 newscript->Name="item_protovoltaic_magneto_collector"; 517 517 newscript->pItemUse = ItemUse_item_protovoltaic_magneto_collector; 518 newscript->RegisterSelf();518 m_scripts[nrscripts++] = newscript; 519 519 520 520 newscript = new Script; 521 521 newscript->Name="item_soul_cannon"; 522 522 newscript->pItemUse = ItemUse_item_soul_cannon; 523 newscript->RegisterSelf();523 m_scripts[nrscripts++] = newscript; 524 524 525 525 newscript = new Script; 526 526 newscript->Name="item_sparrowhawk_net"; 527 527 newscript->pItemUse = ItemUse_item_sparrowhawk_net; 528 newscript->RegisterSelf();528 m_scripts[nrscripts++] = newscript; 529 529 530 530 newscript = new Script; 531 531 newscript->Name="item_voodoo_charm"; 532 532 newscript->pItemUse = ItemUse_item_voodoo_charm; 533 newscript->RegisterSelf();533 m_scripts[nrscripts++] = newscript; 534 534 535 535 newscript = new Script; 536 536 newscript->Name="item_vorenthals_presence"; 537 537 newscript->pItemUse = ItemUse_item_vorenthals_presence; 538 newscript->RegisterSelf();538 m_scripts[nrscripts++] = newscript; 539 539 540 540 newscript = new Script; 541 541 newscript->Name="item_yehkinyas_bramble"; 542 542 newscript->pItemUse = ItemUse_item_yehkinyas_bramble; 543 newscript->RegisterSelf();543 m_scripts[nrscripts++] = newscript; 544 544 545 545 newscript = new Script; 546 546 newscript->Name="item_zezzaks_shard"; 547 547 newscript->pItemUse = ItemUse_item_zezzak_shard; 548 newscript->RegisterSelf();549 } 548 m_scripts[nrscripts++] = newscript; 549 } -
trunk/src/bindings/scripts/scripts/item/item_test.cpp
r260 r272 39 39 newscript->Name="item_test"; 40 40 newscript->pItemUse = ItemUse_item_test; 41 newscript->RegisterSelf();41 m_scripts[nrscripts++] = newscript; 42 42 } -
trunk/src/bindings/scripts/scripts/npc/npc_innkeeper.cpp
r260 r272 141 141 newscript->pGossipHello = &GossipHello_npc_innkeeper; 142 142 newscript->pGossipSelect = &GossipSelect_npc_innkeeper; 143 newscript->RegisterSelf();143 m_scripts[nrscripts++] = newscript; 144 144 } -
trunk/src/bindings/scripts/scripts/npc/npc_professions.cpp
r260 r272 1178 1178 newscript->pGossipHello = &GossipHello_npc_prof_alchemy; 1179 1179 newscript->pGossipSelect = &GossipSelect_npc_prof_alchemy; 1180 newscript->RegisterSelf();1180 m_scripts[nrscripts++] = newscript; 1181 1181 1182 1182 newscript = new Script; … … 1184 1184 newscript->pGossipHello = &GossipHello_npc_prof_blacksmith; 1185 1185 newscript->pGossipSelect = &GossipSelect_npc_prof_blacksmith; 1186 newscript->RegisterSelf();1186 m_scripts[nrscripts++] = newscript; 1187 1187 1188 1188 newscript = new Script; … … 1190 1190 newscript->pGossipHello = &GossipHello_npc_prof_leather; 1191 1191 newscript->pGossipSelect = &GossipSelect_npc_prof_leather; 1192 newscript->RegisterSelf();1192 m_scripts[nrscripts++] = newscript; 1193 1193 1194 1194 newscript = new Script; … … 1196 1196 newscript->pGossipHello = &GossipHello_npc_prof_tailor; 1197 1197 newscript->pGossipSelect = &GossipSelect_npc_prof_tailor; 1198 newscript->RegisterSelf();1198 m_scripts[nrscripts++] = newscript; 1199 1199 1200 1200 /*newscript = new Script; … … 1202 1202 newscript->pGOHello = &GOHello_go_soothsaying_for_dummies; 1203 1203 //newscript->pGossipSelect = &GossipSelect_go_soothsaying_for_dummies; 1204 newscript->RegisterSelf();*/1205 } 1204 m_scripts[nrscripts++] = newscript;*/ 1205 } -
trunk/src/bindings/scripts/scripts/npc/npcs_special.cpp
r260 r272 836 836 newscript->pQuestAccept = &QuestAccept_npc_chicken_cluck; 837 837 newscript->pQuestComplete = &QuestComplete_npc_chicken_cluck; 838 newscript->RegisterSelf();838 m_scripts[nrscripts++] = newscript; 839 839 840 840 newscript = new Script; 841 841 newscript->Name="npc_dancing_flames"; 842 842 newscript->pReceiveEmote = &ReceiveEmote_npc_dancing_flames; 843 newscript->RegisterSelf();843 m_scripts[nrscripts++] = newscript; 844 844 845 845 newscript = new Script; 846 846 newscript->Name="npc_injured_patient"; 847 847 newscript->GetAI = GetAI_npc_injured_patient; 848 newscript->RegisterSelf();848 m_scripts[nrscripts++] = newscript; 849 849 850 850 newscript = new Script; … … 852 852 newscript->GetAI = GetAI_npc_doctor; 853 853 newscript->pQuestAccept = &QuestAccept_npc_doctor; 854 newscript->RegisterSelf();854 m_scripts[nrscripts++] = newscript; 855 855 856 856 newscript = new Script; 857 857 newscript->Name="npc_guardian"; 858 858 newscript->GetAI = GetAI_npc_guardian; 859 newscript->RegisterSelf();859 m_scripts[nrscripts++] = newscript; 860 860 861 861 newscript = new Script; … … 863 863 newscript->pGossipHello = &GossipHello_npc_mount_vendor; 864 864 newscript->pGossipSelect = &GossipSelect_npc_mount_vendor; 865 newscript->RegisterSelf();865 m_scripts[nrscripts++] = newscript; 866 866 867 867 newscript = new Script; … … 869 869 newscript->pGossipHello = &GossipHello_npc_rogue_trainer; 870 870 newscript->pGossipSelect = &GossipSelect_npc_rogue_trainer; 871 newscript->RegisterSelf();871 m_scripts[nrscripts++] = newscript; 872 872 873 873 newscript = new Script; … … 875 875 newscript->pGossipHello = &GossipHello_npc_sayge; 876 876 newscript->pGossipSelect = &GossipSelect_npc_sayge; 877 newscript->RegisterSelf();878 } 877 m_scripts[nrscripts++] = newscript; 878 } -
trunk/src/bindings/scripts/scripts/zone/alterac_mountains/alterac_mountains.cpp
r260 r272 59 59 newscript->Name="npc_ravenholdt"; 60 60 newscript->GetAI = GetAI_npc_ravenholdt; 61 newscript->RegisterSelf();61 m_scripts[nrscripts++] = newscript; 62 62 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp
r260 r272 349 349 newscript->Name="boss_exarch_maladaar"; 350 350 newscript->GetAI = GetAI_boss_exarch_maladaar; 351 newscript->RegisterSelf();351 m_scripts[nrscripts++] = newscript; 352 352 353 353 newscript = new Script; 354 354 newscript->Name="mob_avatar_of_martyred"; 355 355 newscript->GetAI = GetAI_mob_avatar_of_martyred; 356 newscript->RegisterSelf();356 m_scripts[nrscripts++] = newscript; 357 357 358 358 newscript = new Script; 359 359 newscript->Name="mob_stolen_soul"; 360 360 newscript->GetAI = GetAI_mob_stolen_soul; 361 newscript->RegisterSelf();361 m_scripts[nrscripts++] = newscript; 362 362 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp
r260 r272 272 272 newscript->Name="boss_nexusprince_shaffar"; 273 273 newscript->GetAI = GetAI_boss_nexusprince_shaffar; 274 newscript->RegisterSelf();274 m_scripts[nrscripts++] = newscript; 275 275 276 276 newscript = new Script; 277 277 newscript->Name="mob_ethereal_beacon"; 278 278 newscript->GetAI = GetAI_mob_ethereal_beacon; 279 newscript->RegisterSelf();279 m_scripts[nrscripts++] = newscript; 280 280 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_pandemonius.cpp
r260 r272 135 135 newscript->Name="boss_pandemonius"; 136 136 newscript->GetAI = GetAI_boss_pandemonius; 137 newscript->RegisterSelf();137 m_scripts[nrscripts++] = newscript; 138 138 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_darkweaver_syth.cpp
r260 r272 393 393 newscript->Name="boss_darkweaver_syth"; 394 394 newscript->GetAI = GetAI_boss_darkweaver_syth; 395 newscript->RegisterSelf();395 m_scripts[nrscripts++] = newscript; 396 396 397 397 newscript = new Script; 398 398 newscript->Name="mob_syth_fire"; 399 399 newscript->GetAI = GetAI_mob_syth_arcane; 400 newscript->RegisterSelf();400 m_scripts[nrscripts++] = newscript; 401 401 402 402 newscript = new Script; 403 403 newscript->Name="mob_syth_arcane"; 404 404 newscript->GetAI = GetAI_mob_syth_arcane; 405 newscript->RegisterSelf();405 m_scripts[nrscripts++] = newscript; 406 406 407 407 newscript = new Script; 408 408 newscript->Name="mob_syth_frost"; 409 409 newscript->GetAI = GetAI_mob_syth_frost; 410 newscript->RegisterSelf();410 m_scripts[nrscripts++] = newscript; 411 411 412 412 newscript = new Script; 413 413 newscript->Name="mob_syth_shadow"; 414 414 newscript->GetAI = GetAI_mob_syth_shadow; 415 newscript->RegisterSelf();416 } 415 m_scripts[nrscripts++] = newscript; 416 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_tailonking_ikiss.cpp
r260 r272 220 220 newscript->Name="boss_talon_king_ikiss"; 221 221 newscript->GetAI = GetAI_boss_talon_king_ikiss; 222 newscript->RegisterSelf();222 m_scripts[nrscripts++] = newscript; 223 223 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/instance_sethekk_halls.cpp
r260 r272 71 71 newscript->Name = "instance_sethekk_halls"; 72 72 newscript->GetInstanceData = GetInstanceData_instance_sethekk_halls; 73 newscript->RegisterSelf();73 m_scripts[nrscripts++] = newscript; 74 74 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp
r260 r272 195 195 newscript->Name="boss_ambassador_hellmaw"; 196 196 newscript->GetAI = GetAI_boss_ambassador_hellmaw; 197 newscript->RegisterSelf();197 m_scripts[nrscripts++] = newscript; 198 198 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp
r260 r272 174 174 newscript->Name="boss_blackheart_the_inciter"; 175 175 newscript->GetAI = GetAI_boss_blackheart_the_inciter; 176 newscript->RegisterSelf();176 m_scripts[nrscripts++] = newscript; 177 177 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp
r260 r272 221 221 if ( DrawnShadows_Timer < diff) 222 222 { 223 DoTeleportAll(VorpilPosition[0][0],VorpilPosition[0][1],VorpilPosition[0][2],0); 223 Map *map = m_creature->GetMap(); 224 if(map->IsDungeon()) 225 { 226 InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 227 for (InstanceMap::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) 228 { 229 if((*i)->isAlive()) 230 { 231 (*i)->TeleportTo(555,VorpilPosition[0][0],VorpilPosition[0][1],VorpilPosition[0][2],0); 232 } 233 } 234 } 224 235 m_creature->Relocate(VorpilPosition[0][0],VorpilPosition[0][1],VorpilPosition[0][2],0); 225 236 DoCast(m_creature,SPELL_DRAWN_SHADOWS,true); … … 364 375 newscript->Name="boss_grandmaster_vorpil"; 365 376 newscript->GetAI = GetAI_boss_grandmaster_vorpil; 366 newscript->RegisterSelf();377 m_scripts[nrscripts++] = newscript; 367 378 368 379 newscript = new Script; 369 380 newscript->Name="mob_voidtraveler"; 370 381 newscript->GetAI = GetAI_mob_voidtraveler; 371 newscript->RegisterSelf();382 m_scripts[nrscripts++] = newscript; 372 383 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_murmur.cpp
r260 r272 149 149 newscript->Name="boss_murmur"; 150 150 newscript->GetAI = GetAI_boss_murmur; 151 newscript->RegisterSelf();151 m_scripts[nrscripts++] = newscript; 152 152 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp
r260 r272 175 175 newscript->Name = "instance_shadow_labyrinth"; 176 176 newscript->GetInstanceData = GetInstanceData_instance_shadow_labyrinth; 177 newscript->RegisterSelf();177 m_scripts[nrscripts++] = newscript; 178 178 } -
trunk/src/bindings/scripts/scripts/zone/azshara/azshara.cpp
r260 r272 493 493 newscript->Name="mobs_spitelashes"; 494 494 newscript->GetAI = GetAI_mobs_spitelashes; 495 newscript->RegisterSelf();495 m_scripts[nrscripts++] = newscript; 496 496 497 497 newscript = new Script; … … 499 499 newscript->pGossipHello = &GossipHello_npc_loramus_thalipedes; 500 500 newscript->pGossipSelect = &GossipSelect_npc_loramus_thalipedes; 501 newscript->RegisterSelf();501 m_scripts[nrscripts++] = newscript; 502 502 503 503 newscript = new Script; … … 506 506 newscript->pGossipHello = &GossipHello_mob_rizzle_sprysprocket; 507 507 newscript->pGossipSelect = &GossipSelect_mob_rizzle_sprysprocket; 508 newscript->RegisterSelf();508 m_scripts[nrscripts++] = newscript; 509 509 510 510 newscript = new Script; 511 511 newscript->Name="mob_depth_charge"; 512 512 newscript->GetAI = GetAI_mob_depth_charge; 513 newscript->RegisterSelf();514 } 513 m_scripts[nrscripts++] = newscript; 514 } -
trunk/src/bindings/scripts/scripts/zone/azshara/boss_azuregos.cpp
r260 r272 150 150 newscript->Name="boss_azuregos"; 151 151 newscript->GetAI = GetAI_boss_azuregos; 152 newscript->RegisterSelf();152 m_scripts[nrscripts++] = newscript; 153 153 } -
trunk/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp
r260 r272 351 351 newscript->Name="npc_draenei_survivor"; 352 352 newscript->GetAI = GetAI_npc_draenei_survivor; 353 newscript->RegisterSelf();353 m_scripts[nrscripts++] = newscript; 354 354 355 355 newscript = new Script; … … 358 358 newscript->pGossipHello = &GossipHello_npc_engineer_spark_overgrind; 359 359 newscript->pGossipSelect = &GossipSelect_npc_engineer_spark_overgrind; 360 newscript->RegisterSelf();360 m_scripts[nrscripts++] = newscript; 361 361 362 362 newscript = new Script; 363 363 newscript->Name="npc_injured_draenei"; 364 364 newscript->GetAI = GetAI_npc_injured_draenei; 365 newscript->RegisterSelf();365 m_scripts[nrscripts++] = newscript; 366 366 367 367 newscript = new Script; … … 369 369 newscript->pGossipHello = &GossipHello_npc_susurrus; 370 370 newscript->pGossipSelect = &GossipSelect_npc_susurrus; 371 newscript->RegisterSelf();372 } 371 m_scripts[nrscripts++] = newscript; 372 } -
trunk/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp
r260 r272 370 370 newscript->pGossipHello = &GossipHello_npc_beaten_corpse; 371 371 newscript->pGossipSelect = &GossipSelect_npc_beaten_corpse; 372 newscript->RegisterSelf();372 m_scripts[nrscripts++] = newscript; 373 373 374 374 newscript = new Script; … … 376 376 newscript->pGossipHello = &GossipHello_npc_sputtervalve; 377 377 newscript->pGossipSelect = &GossipSelect_npc_sputtervalve; 378 newscript->RegisterSelf();378 m_scripts[nrscripts++] = newscript; 379 379 380 380 newscript = new Script; … … 382 382 newscript->GetAI = GetAI_npc_taskmaster_fizzule; 383 383 newscript->pReceiveEmote = &ReciveEmote_npc_taskmaster_fizzule; 384 newscript->RegisterSelf();384 m_scripts[nrscripts++] = newscript; 385 385 386 386 newscript = new Script; 387 387 newscript->Name="npc_twiggy_flathead"; 388 388 newscript->GetAI = GetAI_npc_twiggy_flathead; 389 newscript->RegisterSelf();390 } 389 m_scripts[nrscripts++] = newscript; 390 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/black_temple.cpp
r260 r272 65 65 newscript->pGossipHello = GossipHello_npc_spirit_of_olum; 66 66 newscript->pGossipSelect = GossipSelect_npc_spirit_of_olum; 67 newscript->RegisterSelf();67 m_scripts[nrscripts++] = newscript; 68 68 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_bloodboil.cpp
r260 r272 362 362 newscript->Name="boss_gurtogg_bloodboil"; 363 363 newscript->GetAI = GetAI_boss_gurtogg_bloodboil; 364 newscript->RegisterSelf();364 m_scripts[nrscripts++] = newscript; 365 365 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp
r260 r272 2248 2248 newscript->Name = "boss_illidan_stormrage"; 2249 2249 newscript->GetAI = GetAI_boss_illidan_stormrage; 2250 newscript->RegisterSelf();2250 m_scripts[nrscripts++] = newscript; 2251 2251 2252 2252 newscript = new Script; … … 2255 2255 newscript->pGossipHello = GossipHello_npc_akama_at_illidan; 2256 2256 newscript->pGossipSelect = GossipSelect_npc_akama_at_illidan; 2257 newscript->RegisterSelf();2257 m_scripts[nrscripts++] = newscript; 2258 2258 2259 2259 newscript = new Script; 2260 2260 newscript->Name = "boss_maiev_shadowsong"; 2261 2261 newscript->GetAI = GetAI_boss_maiev; 2262 newscript->RegisterSelf();2262 m_scripts[nrscripts++] = newscript; 2263 2263 2264 2264 newscript = new Script; 2265 2265 newscript->Name = "mob_flame_of_azzinoth"; 2266 2266 newscript->GetAI = GetAI_mob_flame_of_azzinoth; 2267 newscript->RegisterSelf();2267 m_scripts[nrscripts++] = newscript; 2268 2268 2269 2269 newscript = new Script; 2270 2270 newscript->Name = "mob_blade_of_azzinoth"; 2271 2271 newscript->GetAI = GetAI_blade_of_azzinoth; 2272 newscript->RegisterSelf();2272 m_scripts[nrscripts++] = newscript; 2273 2273 2274 2274 newscript = new Script; 2275 2275 newscript->Name = "gameobject_cage_trap"; 2276 2276 newscript->pGOHello = GOHello_cage_trap; 2277 newscript->RegisterSelf();2277 m_scripts[nrscripts++] = newscript; 2278 2278 2279 2279 newscript = new Script; 2280 2280 newscript->Name="mob_cage_trap_trigger"; 2281 2281 newscript->GetAI = &GetAI_cage_trap_trigger; 2282 newscript->RegisterSelf();2282 m_scripts[nrscripts++] = newscript; 2283 2283 2284 2284 newscript = new Script; 2285 2285 newscript->Name = "mob_shadow_demon"; 2286 2286 newscript->GetAI = GetAI_shadow_demon; 2287 newscript->RegisterSelf();2287 m_scripts[nrscripts++] = newscript; 2288 2288 2289 2289 newscript = new Script; 2290 2290 newscript->Name="mob_demon_fire"; 2291 2291 newscript->GetAI = GetAI_demonfire; 2292 newscript->RegisterSelf();2292 m_scripts[nrscripts++] = newscript; 2293 2293 2294 2294 newscript = new Script; 2295 2295 newscript->Name = "mob_parasitic_shadowfiend"; 2296 2296 newscript->GetAI = GetAI_parasitic_shadowfiend; 2297 newscript->RegisterSelf();2297 m_scripts[nrscripts++] = newscript; 2298 2298 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_mother_shahraz.cpp
r260 r272 358 358 newscript->Name="boss_mother_shahraz"; 359 359 newscript->GetAI = GetAI_boss_shahraz; 360 newscript->RegisterSelf();360 m_scripts[nrscripts++] = newscript; 361 361 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_reliquary_of_souls.cpp
r260 r272 724 724 newscript->Name="boss_reliquary_of_souls"; 725 725 newscript->GetAI = GetAI_boss_reliquary_of_souls; 726 newscript->RegisterSelf();726 m_scripts[nrscripts++] = newscript; 727 727 728 728 newscript = new Script; 729 729 newscript->Name="boss_essence_of_suffering"; 730 730 newscript->GetAI = GetAI_boss_essence_of_suffering; 731 newscript->RegisterSelf();731 m_scripts[nrscripts++] = newscript; 732 732 733 733 newscript = new Script; 734 734 newscript->Name="boss_essence_of_desire"; 735 735 newscript->GetAI = GetAI_boss_essence_of_desire; 736 newscript->RegisterSelf();736 m_scripts[nrscripts++] = newscript; 737 737 738 738 newscript = new Script; 739 739 newscript->Name="boss_essence_of_anger"; 740 740 newscript->GetAI = GetAI_boss_essence_of_anger; 741 newscript->RegisterSelf();741 m_scripts[nrscripts++] = newscript; 742 742 743 743 newscript = new Script; 744 744 newscript->Name="npc_enslaved_soul"; 745 745 newscript->GetAI = GetAI_npc_enslaved_soul; 746 newscript->RegisterSelf();746 m_scripts[nrscripts++] = newscript; 747 747 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_shade_of_akama.cpp
r260 r272 797 797 newscript->Name="boss_shade_of_akama"; 798 798 newscript->GetAI = GetAI_boss_shade_of_akama; 799 newscript->RegisterSelf();799 m_scripts[nrscripts++] = newscript; 800 800 801 801 newscript = new Script; 802 802 newscript->Name="mob_ashtongue_channeler"; 803 803 newscript->GetAI = GetAI_mob_ashtongue_channeler; 804 newscript->RegisterSelf();804 m_scripts[nrscripts++] = newscript; 805 805 806 806 newscript = new Script; 807 807 newscript->Name="mob_ashtongue_sorcerer"; 808 808 newscript->GetAI = GetAI_mob_ashtongue_sorcerer; 809 newscript->RegisterSelf();809 m_scripts[nrscripts++] = newscript; 810 810 811 811 newscript = new Script; … … 814 814 newscript->pGossipHello = &GossipHello_npc_akama; 815 815 newscript->pGossipSelect = &GossipSelect_npc_akama; 816 newscript->RegisterSelf();816 m_scripts[nrscripts++] = newscript; 817 817 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp
r260 r272 237 237 newscript->Name="boss_supremus"; 238 238 newscript->GetAI = GetAI_boss_supremus; 239 newscript->RegisterSelf();239 m_scripts[nrscripts++] = newscript; 240 240 241 241 newscript = new Script; 242 242 newscript->Name="molten_flame"; 243 243 newscript->GetAI = GetAI_molten_flame; 244 newscript->RegisterSelf();244 m_scripts[nrscripts++] = newscript; 245 245 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp
r260 r272 576 576 newscript->Name = "mob_doom_blossom"; 577 577 newscript->GetAI = GetAI_mob_doom_blossom; 578 newscript->RegisterSelf();578 m_scripts[nrscripts++] = newscript; 579 579 580 580 newscript = new Script; 581 581 newscript->Name = "mob_shadowy_construct"; 582 582 newscript->GetAI = GetAI_mob_shadowy_construct; 583 newscript->RegisterSelf();583 m_scripts[nrscripts++] = newscript; 584 584 585 585 newscript = new Script; 586 586 newscript->Name="boss_teron_gorefiend"; 587 587 newscript->GetAI = GetAI_boss_teron_gorefiend; 588 newscript->RegisterSelf();588 m_scripts[nrscripts++] = newscript; 589 589 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_warlord_najentus.cpp
r260 r272 259 259 newscript->Name="boss_najentus"; 260 260 newscript->GetAI = GetAI_boss_najentus; 261 newscript->RegisterSelf();261 m_scripts[nrscripts++] = newscript; 262 262 263 263 newscript = new Script; 264 264 newscript->Name = "go_najentus_spine"; 265 265 newscript->pGOHello = &GOHello_go_najentus_spine; 266 newscript->RegisterSelf();266 m_scripts[nrscripts++] = newscript; 267 267 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/illidari_council.cpp
r260 r272 856 856 newscript->Name="mob_illidari_council"; 857 857 newscript->GetAI = GetAI_mob_illidari_council; 858 newscript->RegisterSelf();858 m_scripts[nrscripts++] = newscript; 859 859 860 860 newscript = new Script; 861 861 newscript->Name = "mob_blood_elf_council_voice_trigger"; 862 862 newscript->GetAI = GetAI_mob_blood_elf_council_voice_trigger; 863 newscript->RegisterSelf();863 m_scripts[nrscripts++] = newscript; 864 864 865 865 newscript = new Script; 866 866 newscript->Name="boss_gathios_the_shatterer"; 867 867 newscript->GetAI = GetAI_boss_gathios_the_shatterer; 868 newscript->RegisterSelf();868 m_scripts[nrscripts++] = newscript; 869 869 870 870 newscript = new Script; 871 871 newscript->Name="boss_lady_malande"; 872 872 newscript->GetAI = GetAI_boss_lady_malande; 873 newscript->RegisterSelf();873 m_scripts[nrscripts++] = newscript; 874 874 875 875 newscript = new Script; 876 876 newscript->Name="boss_veras_darkshadow"; 877 877 newscript->GetAI = GetAI_boss_veras_darkshadow; 878 newscript->RegisterSelf();878 m_scripts[nrscripts++] = newscript; 879 879 880 880 newscript = new Script; 881 881 newscript->Name="boss_high_nethermancer_zerevor"; 882 882 newscript->GetAI = GetAI_boss_high_nethermancer_zerevor; 883 newscript->RegisterSelf();883 m_scripts[nrscripts++] = newscript; 884 884 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/instance_black_temple.cpp
r260 r272 333 333 newscript->Name = "instance_black_temple"; 334 334 newscript->GetInstanceData = GetInstanceData_instance_black_temple; 335 newscript->RegisterSelf();335 m_scripts[nrscripts++] = newscript; 336 336 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp
r260 r272 222 222 newscript->Name="phalanx"; 223 223 newscript->GetAI = GetAI_mob_phalanx; 224 newscript->RegisterSelf();224 m_scripts[nrscripts++] = newscript; 225 225 226 226 newscript = new Script; … … 228 228 newscript->pGossipHello = &GossipHello_npc_kharan_mighthammer; 229 229 newscript->pGossipSelect = &GossipSelect_npc_kharan_mighthammer; 230 newscript->RegisterSelf();230 m_scripts[nrscripts++] = newscript; 231 231 232 232 newscript = new Script; … … 234 234 newscript->pGossipHello = &GossipHello_npc_lokhtos_darkbargainer; 235 235 newscript->pGossipSelect = &GossipSelect_npc_lokhtos_darkbargainer; 236 newscript->RegisterSelf();237 } 236 m_scripts[nrscripts++] = newscript; 237 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_ambassador_flamelash.cpp
r260 r272 103 103 newscript->Name="boss_ambassador_flamelash"; 104 104 newscript->GetAI = GetAI_boss_ambassador_flamelash; 105 newscript->RegisterSelf();105 m_scripts[nrscripts++] = newscript; 106 106 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_angerrel.cpp
r260 r272 88 88 newscript->Name="boss_angerrel"; 89 89 newscript->GetAI = GetAI_boss_angerrel; 90 newscript->RegisterSelf();90 m_scripts[nrscripts++] = newscript; 91 91 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_anubshiah.cpp
r260 r272 112 112 newscript->Name="boss_anubshiah"; 113 113 newscript->GetAI = GetAI_boss_anubshiah; 114 newscript->RegisterSelf();114 m_scripts[nrscripts++] = newscript; 115 115 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_doomrel.cpp
r260 r272 136 136 newscript->Name="boss_doomrel"; 137 137 newscript->GetAI = GetAI_boss_doomrel; 138 newscript->RegisterSelf();138 m_scripts[nrscripts++] = newscript; 139 139 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_doperel.cpp
r260 r272 88 88 newscript->Name="boss_doperel"; 89 89 newscript->GetAI = GetAI_boss_doperel; 90 newscript->RegisterSelf();90 m_scripts[nrscripts++] = newscript; 91 91 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp
r260 r272 101 101 newscript->Name="boss_emperor_dagran_thaurissan"; 102 102 newscript->GetAI = GetAI_boss_draganthaurissan; 103 newscript->RegisterSelf();103 m_scripts[nrscripts++] = newscript; 104 104 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_general_angerforge.cpp
r260 r272 164 164 newscript->Name="boss_general_angerforge"; 165 165 newscript->GetAI = GetAI_boss_general_angerforge; 166 newscript->RegisterSelf();166 m_scripts[nrscripts++] = newscript; 167 167 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_gloomrel.cpp
r260 r272 139 139 newscript->pGossipHello = &GossipHello_boss_gloomrel; 140 140 newscript->pGossipSelect = &GossipSelect_boss_gloomrel; 141 newscript->RegisterSelf();141 m_scripts[nrscripts++] = newscript; 142 142 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_gorosh_the_dervish.cpp
r260 r272 78 78 newscript->Name="boss_gorosh_the_dervish"; 79 79 newscript->GetAI = GetAI_boss_gorosh_the_dervish; 80 newscript->RegisterSelf();80 m_scripts[nrscripts++] = newscript; 81 81 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_grizzle.cpp
r260 r272 83 83 newscript->Name="boss_grizzle"; 84 84 newscript->GetAI = GetAI_boss_grizzle; 85 newscript->RegisterSelf();85 m_scripts[nrscripts++] = newscript; 86 86 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_haterel.cpp
r260 r272 102 102 newscript->Name="boss_haterel"; 103 103 newscript->GetAI = GetAI_boss_haterel; 104 newscript->RegisterSelf();104 m_scripts[nrscripts++] = newscript; 105 105 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_high_interrogator_gerstahn.cpp
r260 r272 102 102 newscript->Name="boss_high_interrogator_gerstahn"; 103 103 newscript->GetAI = GetAI_boss_high_interrogator_gerstahn; 104 newscript->RegisterSelf();104 m_scripts[nrscripts++] = newscript; 105 105 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_magmus.cpp
r260 r272 81 81 newscript->Name="boss_magmus"; 82 82 newscript->GetAI = GetAI_boss_magmus; 83 newscript->RegisterSelf();83 m_scripts[nrscripts++] = newscript; 84 84 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_moira_bronzebeard.cpp
r260 r272 96 96 newscript->Name="boss_moira_bronzebeard"; 97 97 newscript->GetAI = GetAI_boss_moira_bronzebeard; 98 newscript->RegisterSelf();98 m_scripts[nrscripts++] = newscript; 99 99 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_seethrel.cpp
r260 r272 112 112 newscript->Name="boss_seethrel"; 113 113 newscript->GetAI = GetAI_boss_seethrel; 114 newscript->RegisterSelf();114 m_scripts[nrscripts++] = newscript; 115 115 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_vilerel.cpp
r260 r272 98 98 newscript->Name="boss_vilerel"; 99 99 newscript->GetAI = GetAI_boss_vilerel; 100 newscript->RegisterSelf();100 m_scripts[nrscripts++] = newscript; 101 101 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_drakkisath.cpp
r260 r272 98 98 newscript->Name="boss_drakkisath"; 99 99 newscript->GetAI = GetAI_boss_drakkisath; 100 newscript->RegisterSelf();100 m_scripts[nrscripts++] = newscript; 101 101 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_gyth.cpp
r260 r272 202 202 newscript->Name="boss_gyth"; 203 203 newscript->GetAI = GetAI_boss_gyth; 204 newscript->RegisterSelf();204 m_scripts[nrscripts++] = newscript; 205 205 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_halycon.cpp
r260 r272 92 92 newscript->Name="boss_halycon"; 93 93 newscript->GetAI = GetAI_boss_halycon; 94 newscript->RegisterSelf();94 m_scripts[nrscripts++] = newscript; 95 95 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_highlord_omokk.cpp
r260 r272 128 128 newscript->Name="boss_highlord_omokk"; 129 129 newscript->GetAI = GetAI_boss_highlordomokk; 130 newscript->RegisterSelf();130 m_scripts[nrscripts++] = newscript; 131 131 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_mother_smolderweb.cpp
r260 r272 83 83 newscript->Name="boss_mother_smolderweb"; 84 84 newscript->GetAI = GetAI_boss_mothersmolderweb; 85 newscript->RegisterSelf();85 m_scripts[nrscripts++] = newscript; 86 86 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_overlord_wyrmthalak.cpp
r260 r272 124 124 newscript->Name="boss_overlord_wyrmthalak"; 125 125 newscript->GetAI = GetAI_boss_overlordwyrmthalak; 126 newscript->RegisterSelf();126 m_scripts[nrscripts++] = newscript; 127 127 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_pyroguard_emberseer.cpp
r260 r272 90 90 newscript->Name="boss_pyroguard_emberseer"; 91 91 newscript->GetAI = GetAI_boss_pyroguard_emberseer; 92 newscript->RegisterSelf();92 m_scripts[nrscripts++] = newscript; 93 93 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_quartermaster_zigris.cpp
r260 r272 82 82 newscript->Name="quartermaster_zigris"; 83 83 newscript->GetAI = GetAI_boss_quatermasterzigris; 84 newscript->RegisterSelf();84 m_scripts[nrscripts++] = newscript; 85 85 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_rend_blackhand.cpp
r260 r272 88 88 newscript->Name="boss_rend_blackhand"; 89 89 newscript->GetAI = GetAI_boss_rend_blackhand; 90 newscript->RegisterSelf();90 m_scripts[nrscripts++] = newscript; 91 91 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_shadow_hunter_voshgajin.cpp
r260 r272 92 92 newscript->Name="boss_shadow_hunter_voshgajin"; 93 93 newscript->GetAI = GetAI_boss_shadowvosh; 94 newscript->RegisterSelf();94 m_scripts[nrscripts++] = newscript; 95 95 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_the_beast.cpp
r260 r272 90 90 newscript->Name="boss_the_beast"; 91 91 newscript->GetAI = GetAI_boss_thebeast; 92 newscript->RegisterSelf();92 m_scripts[nrscripts++] = newscript; 93 93 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_warmaster_voone.cpp
r260 r272 118 118 newscript->Name="boss_warmaster_voone"; 119 119 newscript->GetAI = GetAI_boss_warmastervoone; 120 newscript->RegisterSelf();120 m_scripts[nrscripts++] = newscript; 121 121 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_broodlord_lashlayer.cpp
r260 r272 125 125 newscript->Name="boss_broodlord"; 126 126 newscript->GetAI = GetAI_boss_broodlord; 127 newscript->RegisterSelf();127 m_scripts[nrscripts++] = newscript; 128 128 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_chromaggus.cpp
r260 r272 311 311 newscript->Name="boss_chromaggus"; 312 312 newscript->GetAI = GetAI_boss_chromaggus; 313 newscript->RegisterSelf();313 m_scripts[nrscripts++] = newscript; 314 314 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_ebonroc.cpp
r260 r272 100 100 newscript->Name="boss_ebonroc"; 101 101 newscript->GetAI = GetAI_boss_ebonroc; 102 newscript->RegisterSelf();102 m_scripts[nrscripts++] = newscript; 103 103 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_firemaw.cpp
r260 r272 91 91 newscript->Name="boss_firemaw"; 92 92 newscript->GetAI = GetAI_boss_firemaw; 93 newscript->RegisterSelf();93 m_scripts[nrscripts++] = newscript; 94 94 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_flamegor.cpp
r260 r272 91 91 newscript->Name="boss_flamegor"; 92 92 newscript->GetAI = GetAI_boss_flamegor; 93 newscript->RegisterSelf();93 m_scripts[nrscripts++] = newscript; 94 94 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_nefarian.cpp
r260 r272 224 224 newscript->Name="boss_nefarian"; 225 225 newscript->GetAI = GetAI_boss_nefarian; 226 newscript->RegisterSelf();226 m_scripts[nrscripts++] = newscript; 227 227 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_razorgore.cpp
r260 r272 128 128 newscript->Name="boss_razorgore"; 129 129 newscript->GetAI = GetAI_boss_razorgore; 130 newscript->RegisterSelf();130 m_scripts[nrscripts++] = newscript; 131 131 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_vaelastrasz.cpp
r260 r272 258 258 newscript->pGossipHello = &GossipHello_boss_vael; 259 259 newscript->pGossipSelect = &GossipSelect_boss_vael; 260 newscript->RegisterSelf();261 } 260 m_scripts[nrscripts++] = newscript; 261 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_victor_nefarius.cpp
r260 r272 391 391 newscript->pGossipHello = &GossipHello_boss_victor_nefarius; 392 392 newscript->pGossipSelect = &GossipSelect_boss_victor_nefarius; 393 newscript->RegisterSelf();393 m_scripts[nrscripts++] = newscript; 394 394 } -
trunk/src/bindings/scripts/scripts/zone/blades_edge_mountains/blades_edge_mountains.cpp
r260 r272 407 407 newscript->Name="mobs_bladespire_ogre"; 408 408 newscript->GetAI = GetAI_mobs_bladespire_ogre; 409 newscript->RegisterSelf();409 m_scripts[nrscripts++] = newscript; 410 410 411 411 newscript = new Script; 412 412 newscript->Name="mobs_nether_drake"; 413 413 newscript->GetAI = GetAI_mobs_nether_drake; 414 newscript->RegisterSelf();414 m_scripts[nrscripts++] = newscript; 415 415 416 416 newscript = new Script; 417 417 newscript->Name="npc_daranelle"; 418 418 newscript->GetAI = GetAI_npc_daranelle; 419 newscript->RegisterSelf();419 m_scripts[nrscripts++] = newscript; 420 420 421 421 newscript = new Script; … … 423 423 newscript->pGossipHello = &GossipHello_npc_overseer_nuaar; 424 424 newscript->pGossipSelect = &GossipSelect_npc_overseer_nuaar; 425 newscript->RegisterSelf();425 m_scripts[nrscripts++] = newscript; 426 426 427 427 newscript = new Script; … … 429 429 newscript->pGossipHello = &GossipHello_npc_saikkal_the_elder; 430 430 newscript->pGossipSelect = &GossipSelect_npc_saikkal_the_elder; 431 newscript->RegisterSelf();431 m_scripts[nrscripts++] = newscript; 432 432 433 433 newscript = new Script; … … 435 435 newscript->pGossipHello = &GossipHello_npc_skyguard_handler_irena; 436 436 newscript->pGossipSelect = &GossipSelect_npc_skyguard_handler_irena; 437 newscript->RegisterSelf();438 } 437 m_scripts[nrscripts++] = newscript; 438 } -
trunk/src/bindings/scripts/scripts/zone/blasted_lands/blasted_lands.cpp
r260 r272 150 150 newscript->pGossipHello = &GossipHello_npc_deathly_usher; 151 151 newscript->pGossipSelect = &GossipSelect_npc_deathly_usher; 152 newscript->RegisterSelf();152 m_scripts[nrscripts++] = newscript; 153 153 154 154 newscript = new Script; … … 156 156 newscript->pGossipHello = &GossipHello_npc_fallen_hero_of_horde; 157 157 newscript->pGossipSelect = &GossipSelect_npc_fallen_hero_of_horde; 158 newscript->RegisterSelf();158 m_scripts[nrscripts++] = newscript; 159 159 } -
trunk/src/bindings/scripts/scripts/zone/blasted_lands/boss_kruul.cpp
r260 r272 179 179 newscript->Name="boss_kruul"; 180 180 newscript->GetAI = GetAI_boss_kruul; 181 newscript->RegisterSelf();181 m_scripts[nrscripts++] = newscript; 182 182 } -
trunk/src/bindings/scripts/scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp
r260 r272 132 132 newscript->Name="mob_webbed_creature"; 133 133 newscript->GetAI = GetAI_mob_webbed_creature; 134 newscript->RegisterSelf();134 m_scripts[nrscripts++] = newscript; 135 135 136 136 newscript = new Script; … … 138 138 newscript->pGossipHello = &GossipHello_npc_captured_sunhawk_agent; 139 139 newscript->pGossipSelect = &GossipSelect_npc_captured_sunhawk_agent; 140 newscript->RegisterSelf();140 m_scripts[nrscripts++] = newscript; 141 141 } -
trunk/src/bindings/scripts/scripts/zone/burning_steppes/burning_steppes.cpp
r260 r272 148 148 newscript->pGossipHello = &GossipHello_npc_ragged_john; 149 149 newscript->pGossipSelect = &GossipSelect_npc_ragged_john; 150 newscript->RegisterSelf();150 m_scripts[nrscripts++] = newscript; 151 151 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_aeonus.cpp
r260 r272 118 118 newscript->Name="boss_aeonus"; 119 119 newscript->GetAI = GetAI_boss_aeonus; 120 newscript->RegisterSelf();120 m_scripts[nrscripts++] = newscript; 121 121 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp
r260 r272 106 106 newscript->Name="boss_chrono_lord_deja"; 107 107 newscript->GetAI = GetAI_boss_chrono_lord_deja; 108 newscript->RegisterSelf();108 m_scripts[nrscripts++] = newscript; 109 109 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_temporus.cpp
r260 r272 140 140 newscript->Name="boss_temporus"; 141 141 newscript->GetAI = GetAI_boss_temporus; 142 newscript->RegisterSelf();142 m_scripts[nrscripts++] = newscript; 143 143 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_archimonde.cpp
r260 r272 770 770 newscript->Name="boss_archimonde"; 771 771 newscript->GetAI = GetAI_boss_archimonde; 772 newscript->RegisterSelf();772 m_scripts[nrscripts++] = newscript; 773 773 774 774 newscript = new Script; 775 775 newscript->Name = "mob_doomfire"; 776 776 newscript->GetAI = GetAI_mob_doomfire; 777 newscript->RegisterSelf();777 m_scripts[nrscripts++] = newscript; 778 778 779 779 newscript = new Script; 780 780 newscript->Name = "mob_doomfire_targetting"; 781 781 newscript->GetAI = GetAI_mob_doomfire_targetting; 782 newscript->RegisterSelf();782 m_scripts[nrscripts++] = newscript; 783 783 784 784 newscript = new Script; 785 785 newscript->Name = "mob_ancient_wisp"; 786 786 newscript->GetAI = GetAI_mob_ancient_wisp; 787 newscript->RegisterSelf();787 m_scripts[nrscripts++] = newscript; 788 788 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal.cpp
r260 r272 201 201 newscript->pGossipHello = &GossipHello_npc_jaina_proudmoore; 202 202 newscript->pGossipSelect = &GossipSelect_npc_jaina_proudmoore; 203 newscript->RegisterSelf();203 m_scripts[nrscripts++] = newscript; 204 204 205 205 newscript = new Script; … … 208 208 newscript->pGossipHello = &GossipHello_npc_thrall; 209 209 newscript->pGossipSelect = &GossipSelect_npc_thrall; 210 newscript->RegisterSelf();210 m_scripts[nrscripts++] = newscript; 211 211 212 212 newscript = new Script; … … 214 214 newscript->pGossipHello = &GossipHello_npc_tyrande_whisperwind; 215 215 newscript->pGossipSelect = &GossipSelect_npc_tyrande_whisperwind; 216 newscript->RegisterSelf();217 } 216 m_scripts[nrscripts++] = newscript; 217 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp
r270 r272 302 302 data << value; 303 303 304 map->SendToPlayers(&data);304 ((InstanceMap*)map)->SendToPlayers(&data); 305 305 306 306 // TODO: Uncomment and remove everything above this line only when the core patch for this is accepted -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/instance_hyjal.cpp
r270 r272 150 150 data << value; 151 151 152 instance->SendToPlayers(&data);152 ((InstanceMap*)instance)->SendToPlayers(&data); 153 153 } 154 154 … … 200 200 newscript->Name = "instance_hyjal"; 201 201 newscript->GetInstanceData = GetInstanceData_instance_mount_hyjal; 202 newscript->RegisterSelf();202 m_scripts[nrscripts++] = newscript; 203 203 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp
r260 r272 153 153 newscript->Name="boss_captain_skarloc"; 154 154 newscript->GetAI = GetAI_boss_captain_skarloc; 155 newscript->RegisterSelf();155 m_scripts[nrscripts++] = newscript; 156 156 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp
r260 r272 147 147 newscript->Name="boss_epoch_hunter"; 148 148 newscript->GetAI = GetAI_boss_epoch_hunter; 149 newscript->RegisterSelf();149 m_scripts[nrscripts++] = newscript; 150 150 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp
r260 r272 195 195 newscript->Name="go_barrel_old_hillsbrad"; 196 196 newscript->pGOHello = &GOHello_go_barrel_old_hillsbrad; 197 newscript->RegisterSelf();197 m_scripts[nrscripts++] = newscript; 198 198 199 199 newscript = new Script; 200 200 newscript->Name="boss_lieutenant_drake"; 201 201 newscript->GetAI = GetAI_boss_lieutenant_drake; 202 newscript->RegisterSelf();202 m_scripts[nrscripts++] = newscript; 203 203 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp
r260 r272 175 175 newscript->Name = "instance_old_hillsbrad"; 176 176 newscript->GetInstanceData = GetInstanceData_instance_old_hillsbrad; 177 newscript->RegisterSelf();177 m_scripts[nrscripts++] = newscript; 178 178 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp
r260 r272 894 894 newscript->pGossipHello = &GossipHello_npc_brazen; 895 895 newscript->pGossipSelect = &GossipSelect_npc_brazen; 896 newscript->RegisterSelf();896 m_scripts[nrscripts++] = newscript; 897 897 898 898 newscript = new Script; … … 900 900 newscript->pGossipHello = &GossipHello_npc_erozion; 901 901 newscript->pGossipSelect = &GossipSelect_npc_erozion; 902 newscript->RegisterSelf();902 m_scripts[nrscripts++] = newscript; 903 903 904 904 newscript = new Script; … … 907 907 newscript->pGossipSelect = &GossipSelect_npc_thrall_old_hillsbrad; 908 908 newscript->GetAI = GetAI_npc_thrall_old_hillsbrad; 909 newscript->RegisterSelf();909 m_scripts[nrscripts++] = newscript; 910 910 911 911 newscript = new Script; … … 913 913 newscript->pGossipHello = &GossipHello_npc_taretha; 914 914 newscript->pGossipSelect = &GossipSelect_npc_taretha; 915 newscript->RegisterSelf();916 } 915 m_scripts[nrscripts++] = newscript; 916 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp
r260 r272 745 745 newscript->Name="boss_fathomlord_karathress"; 746 746 newscript->GetAI = GetAI_boss_fathomlord_karathress; 747 newscript->RegisterSelf();747 m_scripts[nrscripts++] = newscript; 748 748 749 749 newscript = new Script; 750 750 newscript->Name="boss_fathomguard_sharkkis"; 751 751 newscript->GetAI = GetAI_boss_fathomguard_sharkkis; 752 newscript->RegisterSelf();752 m_scripts[nrscripts++] = newscript; 753 753 754 754 newscript = new Script; 755 755 newscript->Name="boss_fathomguard_tidalvess"; 756 756 newscript->GetAI = GetAI_boss_fathomguard_tidalvess; 757 newscript->RegisterSelf();757 m_scripts[nrscripts++] = newscript; 758 758 759 759 newscript = new Script; 760 760 newscript->Name="boss_fathomguard_caribdis"; 761 761 newscript->GetAI = GetAI_boss_fathomguard_caribdis; 762 newscript->RegisterSelf();762 m_scripts[nrscripts++] = newscript; 763 763 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp
r260 r272 383 383 newscript->Name="boss_hydross_the_unstable"; 384 384 newscript->GetAI = GetAI_boss_hydross_the_unstable; 385 newscript->RegisterSelf();385 m_scripts[nrscripts++] = newscript; 386 386 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp
r260 r272 251 251 //remove old tainted cores to prevent cheating in phase 2 252 252 Map *map = m_creature->GetMap(); 253 Map::PlayerList const &PlayerList = map->GetPlayers();254 for( Map::PlayerList::const_iterator i = PlayerList.begin();i != PlayerList.end(); ++i)255 { 256 if( Player* i_pl = i->getSource())253 InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 254 for(InstanceMap::PlayerList::const_iterator i = PlayerList.begin();i != PlayerList.end(); ++i) 255 { 256 if((*i)) 257 257 { 258 i_pl->DestroyItemCount(31088, 1, true);258 (*i)->DestroyItemCount(31088, 1, true); 259 259 } 260 260 } … … 1030 1030 newscript->Name="boss_lady_vashj"; 1031 1031 newscript->GetAI = GetAI_boss_lady_vashj; 1032 newscript->RegisterSelf();1032 m_scripts[nrscripts++] = newscript; 1033 1033 1034 1034 newscript = new Script; 1035 1035 newscript->Name="mob_enchanted_elemental"; 1036 1036 newscript->GetAI = GetAI_mob_enchanted_elemental; 1037 newscript->RegisterSelf();1037 m_scripts[nrscripts++] = newscript; 1038 1038 1039 1039 newscript = new Script; 1040 1040 newscript->Name="mob_tainted_elemental"; 1041 1041 newscript->GetAI = GetAI_mob_tainted_elemental; 1042 newscript->RegisterSelf();1042 m_scripts[nrscripts++] = newscript; 1043 1043 1044 1044 newscript = new Script; 1045 1045 newscript->Name="mob_toxic_sporebat"; 1046 1046 newscript->GetAI = GetAI_mob_toxic_sporebat; 1047 newscript->RegisterSelf();1047 m_scripts[nrscripts++] = newscript; 1048 1048 1049 1049 newscript = new Script; 1050 1050 newscript->Name="mob_coilfang_elite"; 1051 1051 newscript->GetAI = GetAI_mob_coilfang_elite; 1052 newscript->RegisterSelf();1052 m_scripts[nrscripts++] = newscript; 1053 1053 1054 1054 newscript = new Script; 1055 1055 newscript->Name="mob_coilfang_strider"; 1056 1056 newscript->GetAI = GetAI_mob_coilfang_strider; 1057 newscript->RegisterSelf();1057 m_scripts[nrscripts++] = newscript; 1058 1058 1059 1059 newscript = new Script; 1060 1060 newscript->Name="mob_shield_generator_channel"; 1061 1061 newscript->GetAI = GetAI_mob_shield_generator_channel; 1062 newscript->RegisterSelf();1062 m_scripts[nrscripts++] = newscript; 1063 1063 1064 1064 newscript = new Script; 1065 1065 newscript->Name="item_tainted_core"; 1066 1066 newscript->pItemUse = ItemUse_item_tainted_core; 1067 newscript->RegisterSelf();1067 m_scripts[nrscripts++] = newscript; 1068 1068 } 1069 1069 -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp
r260 r272 755 755 { 756 756 Map *map = m_creature->GetMap(); 757 Map::PlayerList const &PlayerList = map->GetPlayers();758 for( Map::PlayerList::const_iterator itr = PlayerList.begin();itr != PlayerList.end(); ++itr)757 InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 758 for(InstanceMap::PlayerList::const_iterator itr = PlayerList.begin();itr != PlayerList.end(); ++itr) 759 759 { 760 if (Player* i_pl = itr->getSource()) 761 { 762 bool isCasting = false; 763 for(uint8 i = 0; i < CURRENT_MAX_SPELL; ++i) 764 if(i_pl->m_currentSpells[i]) 765 isCasting = true; 766 767 if(isCasting) 768 { 769 DoCast(i_pl, SPELL_EARTHSHOCK); 770 break; 771 } 772 } 760 bool isCasting = false; 761 for(uint8 i = 0; i < CURRENT_MAX_SPELL; ++i) 762 if((*itr)->m_currentSpells[i]) 763 isCasting = true; 764 765 if(isCasting) 766 { 767 DoCast((*itr), SPELL_EARTHSHOCK); 768 break; 769 } 773 770 } 774 771 Earthshock_Timer = 8000 + rand()%7000; … … 805 802 newscript->Name="boss_leotheras_the_blind"; 806 803 newscript->GetAI = GetAI_boss_leotheras_the_blind; 807 newscript->RegisterSelf();804 m_scripts[nrscripts++] = newscript; 808 805 809 806 newscript = new Script; 810 807 newscript->Name="boss_leotheras_the_blind_demonform"; 811 808 newscript->GetAI = GetAI_boss_leotheras_the_blind_demonform; 812 newscript->RegisterSelf();809 m_scripts[nrscripts++] = newscript; 813 810 814 811 newscript = new Script; 815 812 newscript->Name="mob_greyheart_spellbinder"; 816 813 newscript->GetAI = GetAI_mob_greyheart_spellbinder; 817 newscript->RegisterSelf();814 m_scripts[nrscripts++] = newscript; 818 815 819 816 newscript = new Script; 820 817 newscript->Name="mob_inner_demon"; 821 818 newscript->GetAI = GetAI_mob_inner_demon; 822 newscript->RegisterSelf();819 m_scripts[nrscripts++] = newscript; 823 820 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp
r260 r272 168 168 newscript->Name="boss_the_lurker_below"; 169 169 newscript->GetAI = GetAI_boss_the_lurker_below; 170 newscript->RegisterSelf();170 m_scripts[nrscripts++] = newscript; 171 171 172 172 newscript = new Script; 173 173 newscript->Name="mob_coilfang_guardian"; 174 174 newscript->GetAI = GetAI_mob_coilfang_guardian; 175 newscript->RegisterSelf();175 m_scripts[nrscripts++] = newscript; 176 176 177 177 newscript = new Script; 178 178 newscript->Name="mob_coilfang_ambusher"; 179 179 newscript->GetAI = GetAI_mob_coilfang_ambusher; 180 newscript->RegisterSelf();180 m_scripts[nrscripts++] = newscript; 181 181 } 182 182 -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp
r260 r272 351 351 newscript->Name="boss_morogrim_tidewalker"; 352 352 newscript->GetAI = GetAI_boss_morogrim_tidewalker; 353 newscript->RegisterSelf();353 m_scripts[nrscripts++] = newscript; 354 354 355 355 newscript = new Script; 356 356 newscript->Name="mob_water_globule"; 357 357 newscript->GetAI = GetAI_mob_water_globule; 358 newscript->RegisterSelf();358 m_scripts[nrscripts++] = newscript; 359 359 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp
r260 r272 216 216 newscript->Name = "instance_serpent_shrine"; 217 217 newscript->GetInstanceData = GetInstanceData_instance_serpentshrine_cavern; 218 newscript->RegisterSelf();218 m_scripts[nrscripts++] = newscript; 219 219 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp
r260 r272 189 189 newscript->Name="boss_hydromancer_thespia"; 190 190 newscript->GetAI = GetAI_boss_thespiaAI; 191 newscript->RegisterSelf();191 m_scripts[nrscripts++] = newscript; 192 192 193 193 newscript = new Script; 194 194 newscript->Name="mob_coilfang_waterelemental"; 195 195 newscript->GetAI = GetAI_mob_coilfang_waterelementalAI; 196 newscript->RegisterSelf();196 m_scripts[nrscripts++] = newscript; 197 197 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp
r260 r272 272 272 newscript->Name="boss_mekgineer_steamrigger"; 273 273 newscript->GetAI = GetAI_boss_mekgineer_steamrigger; 274 newscript->RegisterSelf();274 m_scripts[nrscripts++] = newscript; 275 275 276 276 newscript = new Script; 277 277 newscript->Name="mob_steamrigger_mechanic"; 278 278 newscript->GetAI = GetAI_mob_steamrigger_mechanic; 279 newscript->RegisterSelf();279 m_scripts[nrscripts++] = newscript; 280 280 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp
r260 r272 227 227 newscript->Name="mob_naga_distiller"; 228 228 newscript->GetAI = GetAI_mob_naga_distiller; 229 newscript->RegisterSelf();229 m_scripts[nrscripts++] = newscript; 230 230 231 231 newscript = new Script; 232 232 newscript->Name="boss_warlord_kalithresh"; 233 233 newscript->GetAI = GetAI_boss_warlord_kalithresh; 234 newscript->RegisterSelf();234 m_scripts[nrscripts++] = newscript; 235 235 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/instance_steam_vault.cpp
r260 r272 167 167 newscript->Name = "instance_steam_vault"; 168 168 newscript->GetInstanceData = GetInstanceData_instance_steam_vault; 169 newscript->RegisterSelf();169 m_scripts[nrscripts++] = newscript; 170 170 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/underbog/boss_hungarfen.cpp
r260 r272 148 148 newscript->Name="boss_hungarfen"; 149 149 newscript->GetAI = GetAI_boss_hungarfen; 150 newscript->RegisterSelf();150 m_scripts[nrscripts++] = newscript; 151 151 152 152 newscript = new Script; 153 153 newscript->Name="mob_underbog_mushroom"; 154 154 newscript->GetAI = GetAI_mob_underbog_mushroom; 155 newscript->RegisterSelf();155 m_scripts[nrscripts++] = newscript; 156 156 } -
trunk/src/bindings/scripts/scripts/zone/dun_morogh/dun_morogh.cpp
r260 r272 95 95 newscript->Name="npc_narm_faulk"; 96 96 newscript->GetAI = GetAI_npc_narm_faulk; 97 newscript->RegisterSelf();97 m_scripts[nrscripts++] = newscript; 98 98 } -
trunk/src/bindings/scripts/scripts/zone/dustwallow_marsh/dustwallow_marsh.cpp
r260 r272 205 205 newscript->Name="mobs_risen_husk_spirit"; 206 206 newscript->GetAI = GetAI_mobs_risen_husk_spirit; 207 newscript->RegisterSelf();207 m_scripts[nrscripts++] = newscript; 208 208 209 209 newscript = new Script; 210 210 newscript->Name="npc_restless_apparition"; 211 211 newscript->pGossipHello = &GossipHello_npc_restless_apparition; 212 newscript->RegisterSelf();212 m_scripts[nrscripts++] = newscript; 213 213 214 214 newscript = new Script; … … 216 216 newscript->GetAI = GetAI_npc_deserter_agitator; 217 217 newscript->pGossipHello = &GossipHello_npc_deserter_agitator; 218 newscript->RegisterSelf();218 m_scripts[nrscripts++] = newscript; 219 219 220 220 newscript = new Script; … … 222 222 newscript->pGossipHello = &GossipHello_npc_lady_jaina_proudmoore; 223 223 newscript->pGossipSelect = &GossipSelect_npc_lady_jaina_proudmoore; 224 newscript->RegisterSelf();224 m_scripts[nrscripts++] = newscript; 225 225 226 226 newscript = new Script; … … 228 228 newscript->pGossipHello = &GossipHello_npc_nat_pagle; 229 229 newscript->pGossipSelect = &GossipSelect_npc_nat_pagle; 230 newscript->RegisterSelf();231 } 230 m_scripts[nrscripts++] = newscript; 231 } -
trunk/src/bindings/scripts/scripts/zone/eastern_plaguelands/eastern_plaguelands.cpp
r260 r272 159 159 newscript->Name="mobs_ghoul_flayer"; 160 160 newscript->GetAI = GetAI_mobs_ghoul_flayer; 161 newscript->RegisterSelf();161 m_scripts[nrscripts++] = newscript; 162 162 163 163 newscript = new Script; … … 165 165 newscript->pGossipHello = &GossipHello_npc_augustus_the_touched; 166 166 newscript->pGossipSelect = &GossipSelect_npc_augustus_the_touched; 167 newscript->RegisterSelf();167 m_scripts[nrscripts++] = newscript; 168 168 169 169 newscript = new Script; … … 171 171 newscript->GetAI = GetAI_npc_darrowshire_spirit; 172 172 newscript->pGossipHello = &GossipHello_npc_darrowshire_spirit; 173 newscript->RegisterSelf();173 m_scripts[nrscripts++] = newscript; 174 174 175 175 newscript = new Script; … … 177 177 newscript->pGossipHello = &GossipHello_npc_tirion_fordring; 178 178 newscript->pGossipSelect = &GossipSelect_npc_tirion_fordring; 179 newscript->RegisterSelf();179 m_scripts[nrscripts++] = newscript; 180 180 } -
trunk/src/bindings/scripts/scripts/zone/elwynn_forest/elwynn_forest.cpp
r260 r272 95 95 newscript->Name="npc_henze_faulk"; 96 96 newscript->GetAI = GetAI_npc_henze_faulk; 97 newscript->RegisterSelf();97 m_scripts[nrscripts++] = newscript; 98 98 } -
trunk/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp
r260 r272 153 153 newscript->Name="mobs_mana_tapped"; 154 154 newscript->GetAI = GetAI_mobs_mana_tapped; 155 newscript->RegisterSelf();155 m_scripts[nrscripts++] = newscript; 156 156 157 157 newscript = new Script; … … 160 160 newscript->pGossipHello = &GossipHello_npc_prospector_anvilward; 161 161 newscript->pGossipSelect = &GossipSelect_npc_prospector_anvilward; 162 newscript->RegisterSelf();162 m_scripts[nrscripts++] = newscript; 163 163 } -
trunk/src/bindings/scripts/scripts/zone/felwood/felwood.cpp
r260 r272 86 86 newscript->pGossipHello = &GossipHello_npcs_riverbreeze_and_silversky; 87 87 newscript->pGossipSelect = &GossipSelect_npcs_riverbreeze_and_silversky; 88 newscript->RegisterSelf();88 m_scripts[nrscripts++] = newscript; 89 89 } -
trunk/src/bindings/scripts/scripts/zone/feralas/feralas.cpp
r260 r272 77 77 newscript->pGossipHello = &GossipHello_npc_gregan_brewspewer; 78 78 newscript->pGossipSelect = &GossipSelect_npc_gregan_brewspewer; 79 newscript->RegisterSelf();79 m_scripts[nrscripts++] = newscript; 80 80 81 81 newscript = new Script; 82 82 newscript->Name="npc_screecher_spirit"; 83 83 newscript->pGossipHello = &GossipHello_npc_screecher_spirit; 84 newscript->RegisterSelf();84 m_scripts[nrscripts++] = newscript; 85 85 } -
trunk/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp
r260 r272 134 134 newscript->pGossipHello = &GossipHello_npc_blood_knight_dawnstar; 135 135 newscript->pGossipSelect = &GossipSelect_npc_blood_knight_dawnstar; 136 newscript->RegisterSelf();136 m_scripts[nrscripts++] = newscript; 137 137 138 138 newscript = new Script; … … 140 140 newscript->pGossipHello = &GossipHello_npc_budd_nedreck; 141 141 newscript->pGossipSelect = &GossipSelect_npc_budd_nedreck; 142 newscript->RegisterSelf();142 m_scripts[nrscripts++] = newscript; 143 143 144 144 newscript = new Script; … … 146 146 newscript->pGossipHello = &GossipHello_npc_rathis_tomber; 147 147 newscript->pGossipSelect = &GossipSelect_npc_rathis_tomber; 148 newscript->RegisterSelf();148 m_scripts[nrscripts++] = newscript; 149 149 150 150 newscript = new Script; 151 151 newscript->Name = "go_gilded_brazier"; 152 152 newscript->pGOHello = &GOHello_gilded_brazier; 153 newscript->RegisterSelf();153 m_scripts[nrscripts++] = newscript; 154 154 } -
trunk/src/bindings/scripts/scripts/zone/gruuls_lair/boss_gruul.cpp
r260 r272 301 301 newscript->Name="boss_gruul"; 302 302 newscript->GetAI = GetAI_boss_gruul; 303 newscript->RegisterSelf();303 m_scripts[nrscripts++] = newscript; 304 304 } -
trunk/src/bindings/scripts/scripts/zone/gruuls_lair/boss_high_king_maulgar.cpp
r260 r272 818 818 newscript->Name="boss_high_king_maulgar"; 819 819 newscript->GetAI = GetAI_boss_high_king_maulgar; 820 newscript->RegisterSelf();820 m_scripts[nrscripts++] = newscript; 821 821 822 822 newscript = new Script; 823 823 newscript->Name="boss_kiggler_the_crazed"; 824 824 newscript->GetAI = GetAI_boss_kiggler_the_crazed; 825 newscript->RegisterSelf();825 m_scripts[nrscripts++] = newscript; 826 826 827 827 newscript = new Script; 828 828 newscript->Name="boss_blindeye_the_seer"; 829 829 newscript->GetAI = GetAI_boss_blindeye_the_seer; 830 newscript->RegisterSelf();830 m_scripts[nrscripts++] = newscript; 831 831 832 832 newscript = new Script; 833 833 newscript->Name="boss_olm_the_summoner"; 834 834 newscript->GetAI = GetAI_boss_olm_the_summoner; 835 newscript->RegisterSelf();835 m_scripts[nrscripts++] = newscript; 836 836 837 837 newscript = new Script; 838 838 newscript->Name="boss_krosh_firehand"; 839 839 newscript->GetAI = GetAI_boss_krosh_firehand; 840 newscript->RegisterSelf();840 m_scripts[nrscripts++] = newscript; 841 841 } -
trunk/src/bindings/scripts/scripts/zone/gruuls_lair/instance_gruuls_lair.cpp
r260 r272 185 185 newscript->Name = "instance_gruuls_lair"; 186 186 newscript->GetInstanceData = GetInstanceData_instance_gruuls_lair; 187 newscript->RegisterSelf();187 m_scripts[nrscripts++] = newscript; 188 188 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_broggok.cpp
r260 r272 124 124 newscript->Name="boss_broggok"; 125 125 newscript->GetAI = GetAI_boss_broggokAI; 126 newscript->RegisterSelf();126 m_scripts[nrscripts++] = newscript; 127 127 128 128 newscript = new Script; 129 129 newscript->Name="mob_broggok_poisoncloud"; 130 130 newscript->GetAI = GetAI_mob_broggok_poisoncloudAI; 131 newscript->RegisterSelf();131 m_scripts[nrscripts++] = newscript; 132 132 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp
r260 r272 226 226 newscript->Name="boss_kelidan_the_breaker"; 227 227 newscript->GetAI = GetAI_boss_kelidan_the_breaker; 228 newscript->RegisterSelf();228 m_scripts[nrscripts++] = newscript; 229 229 230 230 newscript = new Script; 231 231 newscript->Name="mob_shadowmoon_channeler"; 232 232 newscript->GetAI = GetAI_mob_shadowmoon_channeler; 233 newscript->RegisterSelf();233 m_scripts[nrscripts++] = newscript; 234 234 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_the_maker.cpp
r260 r272 128 128 newscript->Name="boss_the_maker"; 129 129 newscript->GetAI = GetAI_boss_the_makerAI; 130 newscript->RegisterSelf();130 m_scripts[nrscripts++] = newscript; 131 131 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp
r260 r272 210 210 newscript->Name="boss_omor_the_unscarred"; 211 211 newscript->GetAI = GetAI_boss_omor_the_unscarredAI; 212 newscript->RegisterSelf();212 m_scripts[nrscripts++] = newscript; 213 213 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp
r260 r272 165 165 newscript->Name="boss_watchkeeper_gargolmar"; 166 166 newscript->GetAI = GetAI_boss_watchkeeper_gargolmarAI; 167 newscript->RegisterSelf();167 m_scripts[nrscripts++] = newscript; 168 168 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp
r260 r272 546 546 newscript->Name="boss_magtheridon"; 547 547 newscript->GetAI = GetAI_boss_magtheridon; 548 newscript->RegisterSelf();548 m_scripts[nrscripts++] = newscript; 549 549 550 550 newscript = new Script; 551 551 newscript->Name="mob_hellfire_channeler"; 552 552 newscript->GetAI = GetAI_mob_hellfire_channeler; 553 newscript->RegisterSelf();553 m_scripts[nrscripts++] = newscript; 554 554 555 555 newscript = new Script; 556 556 newscript->Name="go_manticron_cube"; 557 557 newscript->pGOHello = &GOHello_go_Manticron_Cube; 558 newscript->RegisterSelf();558 m_scripts[nrscripts++] = newscript; 559 559 560 560 newscript = new Script; 561 561 newscript->Name="mob_abyssal"; 562 562 newscript->GetAI = GetAI_mob_abyssalAI; 563 newscript->RegisterSelf();563 m_scripts[nrscripts++] = newscript; 564 564 565 565 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp
r260 r272 119 119 void SetData(uint32 type, uint32 data) 120 120 { 121 Player *player = GetPlayer(); 122 if(!player) return; 123 121 124 switch(type) 122 125 { … … 127 130 if(data != IN_PROGRESS) 128 131 { 129 if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID))132 if(GameObject *Door = GameObject::GetGameObject(*player, DoorGUID)) 130 133 Door->SetGoState(0); 131 134 } … … 140 143 for(std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i) 141 144 { 142 if(Creature *Channeler = instance->GetCreatureInMap(*i))145 if(Creature *Channeler = (Creature*)Unit::GetUnit(*player, *i)) 143 146 { 144 147 if(Channeler->isAlive()) … … 149 152 } 150 153 CageTimer = 0; 151 if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID))154 if(GameObject *Door = GameObject::GetGameObject(*player, DoorGUID)) 152 155 Door->SetGoState(0); 153 156 }break; … … 159 162 for(std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i) 160 163 { 161 Creature *Channeler = instance->GetCreatureInMap(*i);164 Creature *Channeler = (Creature*)Unit::GetUnit(*player, *i); 162 165 if(Channeler && Channeler->isAlive()) 163 166 { … … 168 171 } 169 172 // Release Magtheridon after two minutes. 170 Creature *Magtheridon = instance->GetCreatureInMap(MagtheridonGUID);173 Creature *Magtheridon = (Creature*)Unit::GetUnit(*player, MagtheridonGUID); 171 174 if(Magtheridon && Magtheridon->isAlive()) 172 175 { … … 174 177 CageTimer = 120000; 175 178 } 176 if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID))179 if(GameObject *Door = GameObject::GetGameObject(*player, DoorGUID)) 177 180 Door->SetGoState(1); 178 181 }break; … … 180 183 for(std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i) 181 184 { 182 Creature *Channeler = instance->GetCreatureInMap(*i);185 Unit *Channeler = Unit::GetUnit(*player, *i); 183 186 if(Channeler && Channeler->isAlive()) 184 187 { … … 195 198 for(std::set<uint64>::iterator i = ColumnGUID.begin(); i != ColumnGUID.end(); ++i) 196 199 { 197 if(GameObject *Column = instance->GetGameObjectInMap(*i))200 if(GameObject *Column = GameObject::GetGameObject(*player, *i)) 198 201 Column->SetGoState(!data); 199 202 } … … 211 214 } 212 215 216 Player* GetPlayer() 217 { 218 if(((InstanceMap*)instance)->GetPlayers().size()) 219 return ((InstanceMap*)instance)->GetPlayers().front(); 220 return NULL; 221 } 222 213 223 void AttackNearestTarget(Creature *creature) 214 224 { … … 216 226 float range; 217 227 Player* target = NULL; 218 Map::PlayerList const &PlayerList = instance->GetPlayers();219 Map::PlayerList::const_iterator i;228 InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)instance)->GetPlayers(); 229 InstanceMap::PlayerList::const_iterator i; 220 230 for(i = PlayerList.begin(); i != PlayerList.end(); ++i) 221 231 { 222 if(Player* i_pl = i->getSource()) 223 { 224 if(i_pl->isTargetableForAttack()) 225 { 226 range = i_pl->GetDistance(creature); 227 if(range < minRange) 228 { 229 minRange = range; 230 target = i_pl; 231 } 232 } 232 if((*i)->isTargetableForAttack()) 233 { 234 range = (*i)->GetDistance(creature); 235 if(range < minRange) 236 { 237 minRange = range; 238 target = *i; 239 } 233 240 } 234 241 } … … 242 249 if(CageTimer <= diff) 243 250 { 244 Creature *Magtheridon = instance->GetCreatureInMap(MagtheridonGUID); 245 if(Magtheridon && Magtheridon->isAlive()) 246 { 247 Magtheridon->clearUnitState(UNIT_STAT_STUNNED); 248 AttackNearestTarget(Magtheridon); 251 if(Player *player = GetPlayer()) 252 { 253 Creature *Magtheridon = (Creature*)Unit::GetUnit(*player, MagtheridonGUID); 254 if(Magtheridon && Magtheridon->isAlive()) 255 { 256 Magtheridon->clearUnitState(UNIT_STAT_STUNNED); 257 AttackNearestTarget(Magtheridon); 258 } 249 259 } 250 260 CageTimer = 0; … … 256 266 if(RespawnTimer <= diff) 257 267 { 258 for(std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i) 259 { 260 if(Creature *Channeler = instance->GetCreatureInMap(*i)) 261 { 262 if(Channeler->isAlive()) 263 Channeler->AI()->EnterEvadeMode(); 264 else 265 Channeler->Respawn(); 268 if(Player *player = GetPlayer()) 269 { 270 for(std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i) 271 { 272 if(Creature *Channeler = (Creature*)Unit::GetUnit(*player, *i)) 273 { 274 if(Channeler->isAlive()) 275 Channeler->AI()->EnterEvadeMode(); 276 else 277 Channeler->Respawn(); 278 } 266 279 } 267 280 } … … 283 296 newscript->Name = "instance_magtheridons_lair"; 284 297 newscript->GetInstanceData = GetInstanceData_instance_magtheridons_lair; 285 newscript->RegisterSelf();298 m_scripts[nrscripts++] = newscript; 286 299 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_nethekurse.cpp
r260 r272 445 445 newscript->Name="boss_grand_warlock_nethekurse"; 446 446 newscript->GetAI = GetAI_boss_grand_warlock_nethekurse; 447 newscript->RegisterSelf();447 m_scripts[nrscripts++] = newscript; 448 448 449 449 newscript = new Script; 450 450 newscript->Name="mob_fel_orc_convert"; 451 451 newscript->GetAI = GetAI_mob_fel_orc_convert; 452 newscript->RegisterSelf();452 m_scripts[nrscripts++] = newscript; 453 453 454 454 newscript = new Script; 455 455 newscript->Name="mob_lesser_shadow_fissure"; 456 456 newscript->GetAI = GetAI_mob_lesser_shadow_fissure; 457 newscript->RegisterSelf();457 m_scripts[nrscripts++] = newscript; 458 458 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp
r260 r272 395 395 newscript->Name="boss_warbringer_omrogg"; 396 396 newscript->GetAI = GetAI_boss_warbringer_omrogg; 397 newscript->RegisterSelf();397 m_scripts[nrscripts++] = newscript; 398 398 399 399 newscript = new Script; 400 400 newscript->Name="mob_omrogg_heads"; 401 401 newscript->GetAI = GetAI_mob_omrogg_heads; 402 newscript->RegisterSelf();402 m_scripts[nrscripts++] = newscript; 403 403 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp
r260 r272 111 111 newscript->Name = "instance_shattered_halls"; 112 112 newscript->GetInstanceData = GetInstanceData_instance_shattered_halls; 113 newscript->RegisterSelf();113 m_scripts[nrscripts++] = newscript; 114 114 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_peninsula/boss_doomlord_kazzak.cpp
r260 r272 138 138 newscript->Name="boss_doomlord_kazzak"; 139 139 newscript->GetAI = GetAI_boss_doomlordkazzak; 140 newscript->RegisterSelf();140 m_scripts[nrscripts++] = newscript; 141 141 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_peninsula/hellfire_peninsula.cpp
r271 r272 18 18 SDName: Hellfire_Peninsula 19 19 SD%Complete: 100 20 SDComment: Quest support: 9375,10129, 10146, 10162, 10163, 10340, 10346, 10347, 10382 (Special flight paths)20 SDComment: Quest support: 10129, 10146, 10162, 10163, 10340, 10346, 10347, 10382 (Special flight paths) 21 21 SDCategory: Hellfire Peninsula 22 22 EndScriptData */ … … 26 26 npc_gryphoneer_windbellow 27 27 npc_wing_commander_brack 28 npc_wounded_blood_elf29 28 EndContentData */ 30 29 31 30 #include "precompiled.h" 32 #include "../../npc/npc_escortAI.h"33 31 34 32 /*###### … … 163 161 164 162 /*###### 165 ## npc_wounded_blood_elf166 ######*/167 168 #define QUEST_THE_ROAD_TO_FALCON_WATCH 9375169 #define SAY1 "Thank you for agreeing to help. Now, let's get out of here $N."170 #define SAY2 "Over there! They're following us!"171 #define SAY3 "Allow me a moment to rest. The journey taxes what little strength I have."172 #define SAY4 "Did you hear something?"173 #define SAY5 "Falcon Watch, at last! Now, where's my... Oh no! My pack, it's missing! Where has -"174 #define SAYAGGRO "You won't keep me from getting to Falcon Watch!"175 176 struct TRINITY_DLL_DECL npc_wounded_blood_elfAI : public npc_escortAI177 {178 npc_wounded_blood_elfAI(Creature *c) : npc_escortAI(c) {Reset();}179 180 void WaypointReached(uint32 i)181 {182 Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);183 184 if (!player)185 return;186 187 switch (i)188 {189 190 case 0:191 DoSay(SAY1, LANG_UNIVERSAL, player);192 // Change faction, so mobs can attack193 m_creature->setFaction(1610);194 break;195 196 case 9:197 DoSay(SAY2, LANG_UNIVERSAL, player);198 // Spawn two Haal'eshi Talonguard199 {200 Creature* temp1 = m_creature->SummonCreature(16967, m_creature->GetPositionX()-15, m_creature->GetPositionY()-15, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);201 if (temp1) temp1->AI()->AttackStart(m_creature);202 Creature* temp2 = m_creature->SummonCreature(16967, m_creature->GetPositionX()-17, m_creature->GetPositionY()-17, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);203 if (temp2) temp2->AI()->AttackStart(m_creature);204 }205 break;206 207 case 13:208 DoSay(SAY3, LANG_UNIVERSAL, player);209 // NPC "should" kneel210 m_creature->HandleEmoteCommand(EMOTE_STATE_KNEEL);211 break;212 213 case 14:214 DoSay(SAY4, LANG_UNIVERSAL, player);215 // Spawn two Haal'eshi Windwalker216 {217 Creature* temp3 = m_creature->SummonCreature(16966, m_creature->GetPositionX()-15, m_creature->GetPositionY()-15, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);218 if (temp3) temp3->AI()->AttackStart(m_creature);219 Creature* temp4 = m_creature->SummonCreature(16966, m_creature->GetPositionX()-17, m_creature->GetPositionY()-17, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);220 if (temp4) temp4->AI()->AttackStart(m_creature);221 }222 break;223 224 case 27:225 DoSay(SAY5, LANG_UNIVERSAL, player);226 // Set faction back to normal227 m_creature->setFaction(1604);228 // Award quest credit229 if( PlayerGUID )230 {231 Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);232 if( player && player->GetTypeId() == TYPEID_PLAYER )233 ((Player*)player)->GroupEventHappens(9375,m_creature);234 }235 break;236 }237 }238 239 void Aggro(Unit* who)240 {241 DoSay(SAYAGGRO, LANG_UNIVERSAL, who);242 }243 244 void Reset() { }245 246 void JustDied(Unit* killer)247 // If NPC dies, Quest fail248 {249 if (PlayerGUID)250 {251 Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);252 if (player)253 ((Player*)player)->FailQuest(QUEST_THE_ROAD_TO_FALCON_WATCH);254 }255 }256 257 void UpdateAI(const uint32 diff)258 {259 npc_escortAI::UpdateAI(diff);260 }261 };262 263 bool QuestAccept_wounded_blood_elf(Player* player, Creature* creature, Quest const* quest)264 // Begin the escort quest265 {266 if (quest->GetQuestId() == QUEST_THE_ROAD_TO_FALCON_WATCH)267 {268 ((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());269 }270 return true;271 }272 273 CreatureAI* GetAI_npc_wounded_blood_elf(Creature *_Creature)274 {275 npc_wounded_blood_elfAI* thisAI = new npc_wounded_blood_elfAI(_Creature);276 277 thisAI->AddWaypoint(0, -1137.72, 4272.10, 14.04, 3000);278 thisAI->AddWaypoint(1, -1141.34, 4232.42, 14.63);279 thisAI->AddWaypoint(2, -1133.47, 4220.88, 11.78);280 thisAI->AddWaypoint(3, -1126.18, 4213.26, 13.51);281 thisAI->AddWaypoint(4, -1100.12, 4204.32, 16.41);282 thisAI->AddWaypoint(5, -1063.68, 4197.92, 15.51);283 thisAI->AddWaypoint(6, -1027.28, 4194.36, 15.52);284 thisAI->AddWaypoint(7, -995.68, 4189.59, 19.84);285 thisAI->AddWaypoint(8, -970.90, 4188.60, 24.61);286 thisAI->AddWaypoint(9, -961.93, 4193.34, 26.11, 80000); // Summon 1287 thisAI->AddWaypoint(10, -935.52, 4210.99, 31.98);288 thisAI->AddWaypoint(11, -913.42, 4218.27, 37.29);289 thisAI->AddWaypoint(12, -896.53, 4207.73, 43.23);290 thisAI->AddWaypoint(13, -868.49, 4194.77, 46.75, 17000); // Kneel and Rest Here291 thisAI->AddWaypoint(14, -852.83, 4198.29, 47.28, 80000); // Summon 2292 thisAI->AddWaypoint(15, -819.85, 4200.50, 46.37);293 thisAI->AddWaypoint(16, -791.92, 4201.96, 44.19);294 thisAI->AddWaypoint(17, -774.42, 4202.46, 47.41);295 thisAI->AddWaypoint(18, -762.90, 4202.17, 48.81);296 thisAI->AddWaypoint(19, -728.25, 4195.35, 50.68);297 thisAI->AddWaypoint(20, -713.58, 4192.07, 53.98);298 thisAI->AddWaypoint(21, -703.09, 4189.74, 56.96);299 thisAI->AddWaypoint(22, -693.70, 4185.43, 57.06);300 thisAI->AddWaypoint(23, -686.38, 4159.81, 60.26);301 thisAI->AddWaypoint(24, -679.88, 4147.04, 64.20);302 thisAI->AddWaypoint(25, -656.74, 4147.72, 64.11);303 thisAI->AddWaypoint(26, -652.22, 4137.50, 64.58);304 thisAI->AddWaypoint(27, -649.99, 4136.38, 64.63, 20000); // Award Quest Credit305 306 return (CreatureAI*)thisAI;307 }308 309 /*######310 163 ## 311 164 ######*/ … … 319 172 newscript->pGossipHello = &GossipHello_npc_wing_commander_dabiree; 320 173 newscript->pGossipSelect = &GossipSelect_npc_wing_commander_dabiree; 321 newscript->RegisterSelf();174 m_scripts[nrscripts++] = newscript; 322 175 323 176 newscript = new Script; … … 325 178 newscript->pGossipHello = &GossipHello_npc_gryphoneer_windbellow; 326 179 newscript->pGossipSelect = &GossipSelect_npc_gryphoneer_windbellow; 327 newscript->RegisterSelf();180 m_scripts[nrscripts++] = newscript; 328 181 329 182 newscript = new Script; … … 331 184 newscript->pGossipHello = &GossipHello_npc_wing_commander_brack; 332 185 newscript->pGossipSelect = &GossipSelect_npc_wing_commander_brack; 333 newscript->RegisterSelf(); 334 335 newscript = new Script; 336 newscript->Name="npc_wounded_blood_elf"; 337 newscript->GetAI = &GetAI_npc_wounded_blood_elf; 338 newscript->pQuestAccept = &QuestAccept_wounded_blood_elf; 339 newscript->RegisterSelf(); 186 m_scripts[nrscripts++] = newscript; 340 187 } -
trunk/src/bindings/scripts/scripts/zone/ironforge/ironforge.cpp
r260 r272 90 90 newscript->pGossipHello = &GossipHello_npc_royal_historian_archesonus; 91 91 newscript->pGossipSelect = &GossipSelect_npc_royal_historian_archesonus; 92 newscript->RegisterSelf();92 m_scripts[nrscripts++] = newscript; 93 93 } -
trunk/src/bindings/scripts/scripts/zone/isle_of_queldanas/isle_of_queldanas.cpp
r260 r272 141 141 newscript->pGossipHello = &GossipHello_npc_ayren_cloudbreaker; 142 142 newscript->pGossipSelect = &GossipSelect_npc_ayren_cloudbreaker; 143 newscript->RegisterSelf();143 m_scripts[nrscripts++] = newscript; 144 144 145 145 newscript = new Script; 146 146 newscript->Name="npc_converted_sentry"; 147 147 newscript->GetAI = GetAI_npc_converted_sentry; 148 newscript->RegisterSelf();148 m_scripts[nrscripts++] = newscript; 149 149 150 150 newscript = new Script; … … 152 152 newscript->pGossipHello = &GossipHello_npc_unrestrained_dragonhawk; 153 153 newscript->pGossipSelect = &GossipSelect_npc_unrestrained_dragonhawk; 154 newscript->RegisterSelf();154 m_scripts[nrscripts++] = newscript; 155 155 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/boss_curator.cpp
r260 r272 197 197 newscript->Name="boss_curator"; 198 198 newscript->GetAI = GetAI_boss_curator; 199 newscript->RegisterSelf();199 m_scripts[nrscripts++] = newscript; 200 200 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/boss_maiden_of_virtue.cpp
r260 r272 180 180 newscript->Name="boss_maiden_of_virtue"; 181 181 newscript->GetAI = GetAI_boss_maiden_of_virtue; 182 newscript->RegisterSelf();182 m_scripts[nrscripts++] = newscript; 183 183 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp
r260 r272 363 363 newscript->Name="boss_attumen"; 364 364 newscript->GetAI = GetAI_boss_attumen; 365 newscript->RegisterSelf();365 m_scripts[nrscripts++] = newscript; 366 366 367 367 newscript = new Script; 368 368 newscript->Name="boss_midnight"; 369 369 newscript->GetAI = GetAI_boss_midnight; 370 newscript->RegisterSelf();370 m_scripts[nrscripts++] = newscript; 371 371 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/boss_moroes.cpp
r260 r272 836 836 newscript->Name="boss_moroes"; 837 837 newscript->GetAI = GetAI_boss_moroes; 838 newscript->RegisterSelf();838 m_scripts[nrscripts++] = newscript; 839 839 840 840 newscript = new Script; 841 841 newscript->Name="boss_baroness_dorothea_millstipe"; 842 842 newscript->GetAI = GetAI_baroness_dorothea_millstipe; 843 newscript->RegisterSelf();843 m_scripts[nrscripts++] = newscript; 844 844 845 845 newscript = new Script; 846 846 newscript->Name="boss_baron_rafe_dreuger"; 847 847 newscript->GetAI = GetAI_baron_rafe_dreuger; 848 newscript->RegisterSelf();848 m_scripts[nrscripts++] = newscript; 849 849 850 850 newscript = new Script; 851 851 newscript->Name="boss_lady_catriona_von_indi"; 852 852 newscript->GetAI = GetAI_lady_catriona_von_indi; 853 newscript->RegisterSelf();853 m_scripts[nrscripts++] = newscript; 854 854 855 855 newscript = new Script; 856 856 newscript->Name="boss_lady_keira_berrybuck"; 857 857 newscript->GetAI = GetAI_lady_keira_berrybuck; 858 newscript->RegisterSelf();858 m_scripts[nrscripts++] = newscript; 859 859 860 860 newscript = new Script; 861 861 newscript->Name="boss_lord_robin_daris"; 862 862 newscript->GetAI = GetAI_lord_robin_daris; 863 newscript->RegisterSelf();863 m_scripts[nrscripts++] = newscript; 864 864 865 865 newscript = new Script; 866 866 newscript->Name="boss_lord_crispin_ference"; 867 867 newscript->GetAI = GetAI_lord_crispin_ference; 868 newscript->RegisterSelf();868 m_scripts[nrscripts++] = newscript; 869 869 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/boss_prince_malchezaar.cpp
r260 r272 667 667 newscript->Name="boss_malchezaar"; 668 668 newscript->GetAI = GetAI_boss_malchezaar; 669 newscript->RegisterSelf();669 m_scripts[nrscripts++] = newscript; 670 670 671 671 newscript = new Script; 672 672 newscript->Name="netherspite_infernal"; 673 673 newscript->GetAI = GetAI_netherspite_infernal; 674 newscript->RegisterSelf();674 m_scripts[nrscripts++] = newscript; 675 675 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/boss_shade_of_aran.cpp
r260 r272 655 655 newscript->Name="boss_shade_of_aran"; 656 656 newscript->GetAI = GetAI_boss_aran; 657 newscript->RegisterSelf();657 m_scripts[nrscripts++] = newscript; 658 658 659 659 newscript = new Script; 660 660 newscript->Name="mob_shadow_of_aran"; 661 661 newscript->GetAI = GetAI_shadow_of_aran; 662 newscript->RegisterSelf();662 m_scripts[nrscripts++] = newscript; 663 663 664 664 newscript = new Script; 665 665 newscript->Name="mob_aran_elemental"; 666 666 newscript->GetAI = GetAI_water_elemental; 667 newscript->RegisterSelf();667 m_scripts[nrscripts++] = newscript; 668 668 669 669 //newscript = new Script; 670 670 //newscript->Name="mob_aran_blizzard"; 671 671 //newscript->GetAI = GetAI_boss_aran; 672 // newscript->RegisterSelf();672 //m_scripts[nrscripts++] = newscript; 673 673 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/boss_terestian_illhoof.cpp
r260 r272 437 437 newscript->Name="boss_terestian_illhoof"; 438 438 newscript->GetAI = GetAI_boss_terestian_illhoof; 439 newscript->RegisterSelf();439 m_scripts[nrscripts++] = newscript; 440 440 441 441 newscript = new Script; 442 442 newscript->Name="mob_karazhan_imp"; 443 443 newscript->GetAI = GetAI_mob_karazhan_imp; 444 newscript->RegisterSelf();444 m_scripts[nrscripts++] = newscript; 445 445 446 446 newscript = new Script; 447 447 newscript->Name="mob_kilrek"; 448 448 newscript->GetAI = GetAI_mob_kilrek; 449 newscript->RegisterSelf();449 m_scripts[nrscripts++] = newscript; 450 450 451 451 newscript = new Script; 452 452 newscript->Name = "mob_demon_chain"; 453 453 newscript->GetAI = GetAI_mob_demon_chain; 454 newscript->RegisterSelf();454 m_scripts[nrscripts++] = newscript; 455 455 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp
r260 r272 1415 1415 newscript->GetAI = GetAI_boss_dorothee; 1416 1416 newscript->Name = "boss_dorothee"; 1417 newscript->RegisterSelf();1417 m_scripts[nrscripts++] = newscript; 1418 1418 1419 1419 newscript = new Script; 1420 1420 newscript->GetAI = GetAI_boss_strawman; 1421 1421 newscript->Name = "boss_strawman"; 1422 newscript->RegisterSelf();1422 m_scripts[nrscripts++] = newscript; 1423 1423 1424 1424 newscript = new Script; 1425 1425 newscript->GetAI = GetAI_boss_tinhead; 1426 1426 newscript->Name = "boss_tinhead"; 1427 newscript->RegisterSelf();1427 m_scripts[nrscripts++] = newscript; 1428 1428 1429 1429 newscript = new Script; 1430 1430 newscript->GetAI = GetAI_boss_roar; 1431 1431 newscript->Name = "boss_roar"; 1432 newscript->RegisterSelf();1432 m_scripts[nrscripts++] = newscript; 1433 1433 1434 1434 newscript = new Script; 1435 1435 newscript->GetAI = GetAI_boss_crone; 1436 1436 newscript->Name = "boss_crone"; 1437 newscript->RegisterSelf();1437 m_scripts[nrscripts++] = newscript; 1438 1438 1439 1439 newscript = new Script; 1440 1440 newscript->GetAI = GetAI_mob_tito; 1441 1441 newscript->Name = "mob_tito"; 1442 newscript->RegisterSelf();1442 m_scripts[nrscripts++] = newscript; 1443 1443 1444 1444 newscript = new Script; 1445 1445 newscript->GetAI = GetAI_mob_cyclone; 1446 1446 newscript->Name = "mob_cyclone"; 1447 newscript->RegisterSelf();1447 m_scripts[nrscripts++] = newscript; 1448 1448 1449 1449 // Hood … … 1452 1452 newscript->pGossipSelect = GossipSelect_npc_grandmother; 1453 1453 newscript->Name = "npc_grandmother"; 1454 newscript->RegisterSelf();1454 m_scripts[nrscripts++] = newscript; 1455 1455 1456 1456 newscript = new Script; 1457 1457 newscript->GetAI = GetAI_boss_bigbadwolf; 1458 1458 newscript->Name = "boss_bigbadwolf"; 1459 newscript->RegisterSelf();1459 m_scripts[nrscripts++] = newscript; 1460 1460 1461 1461 // Romeo And Juliet … … 1463 1463 newscript->GetAI = GetAI_boss_julianne; 1464 1464 newscript->Name = "boss_julianne"; 1465 newscript->RegisterSelf();1465 m_scripts[nrscripts++] = newscript; 1466 1466 1467 1467 newscript = new Script; 1468 1468 newscript->GetAI = GetAI_boss_romulo; 1469 1469 newscript->Name = "boss_romulo"; 1470 newscript->RegisterSelf();1471 } 1470 m_scripts[nrscripts++] = newscript; 1471 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp
r260 r272 250 250 newscript->Name = "instance_karazhan"; 251 251 newscript->GetInstanceData = GetInstanceData_instance_karazhan; 252 newscript->RegisterSelf();252 m_scripts[nrscripts++] = newscript; 253 253 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/karazhan.cpp
r260 r272 286 286 if(!map->IsDungeon()) return; 287 287 288 Map::PlayerList const &PlayerList = map->GetPlayers();289 if(PlayerList. isEmpty())288 InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 289 if(PlayerList.empty()) 290 290 return; 291 291 292 292 RaidWiped = true; 293 for( Map::PlayerList::const_iterator i = PlayerList.begin();i != PlayerList.end(); ++i)293 for(InstanceMap::PlayerList::const_iterator i = PlayerList.begin();i != PlayerList.end(); ++i) 294 294 { 295 if (i->getSource()->isAlive() && !i->getSource()->isGameMaster())295 if((*i)->isAlive() && !(*i)->isGameMaster()) 296 296 { 297 297 RaidWiped = false; … … 461 461 newscript->pGossipHello = GossipHello_npc_barnes; 462 462 newscript->pGossipSelect = GossipSelect_npc_barnes; 463 newscript->RegisterSelf();463 m_scripts[nrscripts++] = newscript; 464 464 465 465 newscript = new Script; … … 467 467 newscript->pGossipHello = GossipHello_npc_berthold; 468 468 newscript->pGossipSelect = GossipSelect_npc_berthold; 469 newscript->RegisterSelf();470 } 469 m_scripts[nrscripts++] = newscript; 470 } -
trunk/src/bindings/scripts/scripts/zone/loch_modan/loch_modan.cpp
r260 r272 88 88 newscript->pGossipHello = &GossipHello_npc_mountaineer_pebblebitty; 89 89 newscript->pGossipSelect = &GossipSelect_npc_mountaineer_pebblebitty; 90 newscript->RegisterSelf();90 m_scripts[nrscripts++] = newscript; 91 91 } -
trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_felblood_kaelthas.cpp
r260 r272 232 232 m_creature->Relocate(KaelLocations[0][0], KaelLocations[0][1], LOCATION_Z, 0); 233 233 Map *map = m_creature->GetMap(); 234 Map::PlayerList const &PlayerList = map->GetPlayers();235 Map::PlayerList::const_iterator i;234 InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 235 InstanceMap::PlayerList::const_iterator i; 236 236 for (i = PlayerList.begin(); i != PlayerList.end(); ++i) 237 237 { 238 if (Player* i_pl = i->getSource())239 if(i_pl->isAlive())240 241 i_pl->CastSpell(i_pl, SPELL_TELEPORT_CENTER, true);242 243 i_pl->TeleportTo(m_creature->GetMapId(),x,y,LOCATION_Z,i_pl->GetOrientation());244 238 //if(!(*i)->isGameMaster()) 239 if((*i) && (*i)->isAlive()) 240 { 241 (*i)->CastSpell((*i), SPELL_TELEPORT_CENTER, true); 242 m_creature->GetNearPoint(m_creature,x,y,z,5,5,0); 243 (*i)->TeleportTo(m_creature->GetMapId(),x,y,LOCATION_Z,(*i)->GetOrientation()); 244 } 245 245 } 246 246 DoCast(m_creature, SPELL_TELEPORT_CENTER, true); … … 250 250 { 251 251 Map *map = m_creature->GetMap(); 252 Map::PlayerList const &PlayerList = map->GetPlayers();253 Map::PlayerList::const_iterator i;252 InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 253 InstanceMap::PlayerList::const_iterator i; 254 254 for (i = PlayerList.begin(); i != PlayerList.end(); ++i) 255 { 256 if (Player* i_pl = i->getSource()) 257 if(i_pl->isAlive()) 255 { 256 if((*i) && (*i)->isAlive()) 258 257 // Knockback into the air 259 i_pl->CastSpell(i_pl, SPELL_GRAVITY_LAPSE_DOT, true, 0, 0, m_creature->GetGUID());258 (*i)->CastSpell((*i), SPELL_GRAVITY_LAPSE_DOT, true, 0, 0, m_creature->GetGUID()); 260 259 } 261 260 } … … 264 263 { 265 264 Map *map = m_creature->GetMap(); 266 Map::PlayerList const &PlayerList = map->GetPlayers();267 Map::PlayerList::const_iterator i;265 InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 266 InstanceMap::PlayerList::const_iterator i; 268 267 for (i = PlayerList.begin(); i != PlayerList.end(); ++i) 269 { 270 if (Player* i_pl = i->getSource())268 { 269 if((*i) && (*i)->isAlive()) 271 270 { 272 if(i_pl->isAlive()) 273 { 274 // Also needs an exception in spell system. 275 i_pl->CastSpell(i_pl, SPELL_GRAVITY_LAPSE_FLY, true, 0, 0, m_creature->GetGUID()); 276 // Use packet hack 277 WorldPacket data(12); 278 data.SetOpcode(SMSG_MOVE_SET_CAN_FLY); 279 data.append(i_pl->GetPackGUID()); 280 data << uint32(0); 281 i_pl->SendMessageToSet(&data, true); 282 i_pl->SetSpeed(MOVE_FLY, 2.0f); 283 } 271 // Also needs an exception in spell system. 272 (*i)->CastSpell((*i), SPELL_GRAVITY_LAPSE_FLY, true, 0, 0, m_creature->GetGUID()); 273 // Use packet hack 274 WorldPacket data(12); 275 data.SetOpcode(SMSG_MOVE_SET_CAN_FLY); 276 data.append((*i)->GetPackGUID()); 277 data << uint32(0); 278 (*i)->SendMessageToSet(&data, true); 279 (*i)->SetSpeed(MOVE_FLY, 2.0f); 284 280 } 285 281 } … … 289 285 { 290 286 Map *map = m_creature->GetMap(); 291 Map::PlayerList const &PlayerList = map->GetPlayers();292 Map::PlayerList::const_iterator i;287 InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 288 InstanceMap::PlayerList::const_iterator i; 293 289 for (i = PlayerList.begin(); i != PlayerList.end(); ++i) 294 290 { 295 if( Player* i_pl = i->getSource())291 if((*i)) 296 292 { 297 i_pl->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_FLY);298 i_pl->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_DOT);293 (*i)->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_FLY); 294 (*i)->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_DOT); 299 295 WorldPacket data(12); 300 296 data.SetOpcode(SMSG_MOVE_UNSET_CAN_FLY); 301 data.append( i_pl->GetPackGUID());297 data.append((*i)->GetPackGUID()); 302 298 data << uint32(0); 303 i_pl->SendMessageToSet(&data, true);299 (*i)->SendMessageToSet(&data, true); 304 300 } 305 301 } … … 762 758 newscript->Name = "boss_felblood_kaelthas"; 763 759 newscript->GetAI = GetAI_boss_felblood_kaelthas; 764 newscript->RegisterSelf();760 m_scripts[nrscripts++] = newscript; 765 761 766 762 newscript = new Script; 767 763 newscript->Name = "mob_arcane_sphere"; 768 764 newscript->GetAI = GetAI_mob_arcane_sphere; 769 newscript->RegisterSelf();765 m_scripts[nrscripts++] = newscript; 770 766 771 767 newscript = new Script; 772 768 newscript->Name="mob_felkael_phoenix"; 773 769 newscript->GetAI = GetAI_mob_felkael_phoenix; 774 newscript->RegisterSelf();770 m_scripts[nrscripts++] = newscript; 775 771 776 772 newscript = new Script; 777 773 newscript->Name="mob_felkael_phoenix_egg"; 778 774 newscript->GetAI = GetAI_mob_felkael_phoenix_egg; 779 newscript->RegisterSelf();775 m_scripts[nrscripts++] = newscript; 780 776 781 777 newscript = new Script; 782 778 newscript->Name="mob_felkael_flamestrike"; 783 779 newscript->GetAI = GetAI_mob_felkael_flamestrike; 784 newscript->RegisterSelf();780 m_scripts[nrscripts++] = newscript; 785 781 786 782 newscript = new Script; 787 783 newscript->Name="go_kael_orb"; 788 784 newscript->pGOHello = &GOHello_go_kael_orb; 789 newscript->RegisterSelf();785 m_scripts[nrscripts++] = newscript; 790 786 791 787 newscript = new Script; 792 788 newscript->Name="go_movie_orb"; 793 789 newscript->pGOHello = &GOHello_go_movie_orb; 794 newscript->RegisterSelf();790 m_scripts[nrscripts++] = newscript; 795 791 } -
trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_priestess_delrissa.cpp
r260 r272 1356 1356 newscript->Name="boss_priestess_delrissa"; 1357 1357 newscript->GetAI = GetAI_boss_priestess_delrissa; 1358 newscript->RegisterSelf();1358 m_scripts[nrscripts++] = newscript; 1359 1359 1360 1360 newscript = new Script; 1361 1361 newscript->Name="boss_kagani_nightstrike"; 1362 1362 newscript->GetAI = GetAI_boss_kagani_nightstrike; 1363 newscript->RegisterSelf();1363 m_scripts[nrscripts++] = newscript; 1364 1364 1365 1365 newscript = new Script; 1366 1366 newscript->Name="boss_ellris_duskhallow"; 1367 1367 newscript->GetAI = GetAI_ellris_duskhallow; 1368 newscript->RegisterSelf();1368 m_scripts[nrscripts++] = newscript; 1369 1369 1370 1370 newscript = new Script; 1371 1371 newscript->Name="boss_eramas_brightblaze"; 1372 1372 newscript->GetAI = GetAI_eramas_brightblaze; 1373 newscript->RegisterSelf();1373 m_scripts[nrscripts++] = newscript; 1374 1374 1375 1375 newscript = new Script; 1376 1376 newscript->Name="boss_yazzai"; 1377 1377 newscript->GetAI = GetAI_yazzai; 1378 newscript->RegisterSelf();1378 m_scripts[nrscripts++] = newscript; 1379 1379 1380 1380 newscript = new Script; 1381 1381 newscript->Name="boss_warlord_salaris"; 1382 1382 newscript->GetAI = GetAI_warlord_salaris; 1383 newscript->RegisterSelf();1383 m_scripts[nrscripts++] = newscript; 1384 1384 1385 1385 newscript = new Script; 1386 1386 newscript->Name="boss_garaxxas"; 1387 1387 newscript->GetAI = GetAI_garaxxas; 1388 newscript->RegisterSelf();1388 m_scripts[nrscripts++] = newscript; 1389 1389 1390 1390 newscript = new Script; 1391 1391 newscript->Name="boss_apoko"; 1392 1392 newscript->GetAI = GetAI_apoko; 1393 newscript->RegisterSelf();1393 m_scripts[nrscripts++] = newscript; 1394 1394 1395 1395 newscript = new Script; 1396 1396 newscript->Name="boss_zelfan"; 1397 1397 newscript->GetAI = GetAI_zelfan; 1398 newscript->RegisterSelf();1398 m_scripts[nrscripts++] = newscript; 1399 1399 1400 1400 /*newscript = new Script; 1401 1401 newscript->Name="mob_high_explosive_sheep"; 1402 1402 newscript->GetAI = GetAI_mob_high_explosive_sheep; 1403 newscript->RegisterSelf();*/1403 m_scripts[nrscripts++] = newscript;*/ 1404 1404 1405 1405 /*newscript = new Script; 1406 1406 newscript->Name="mob_fizzle"; 1407 1407 newscript->GetAI = GetAI_mob_fizzle; 1408 newscript->RegisterSelf();*/1408 m_scripts[nrscripts++] = newscript;*/ 1409 1409 1410 1410 /*newscript = new Script; 1411 1411 newscript->Name="mob_sliver"; 1412 1412 newscript->GetAI = GetAI_mob_sliver; 1413 newscript->RegisterSelf();*/1413 m_scripts[nrscripts++] = newscript;*/ 1414 1414 } -
trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_selin_fireheart.cpp
r260 r272 404 404 newscript->Name="boss_selin_fireheart"; 405 405 newscript->GetAI = GetAI_boss_selin_fireheart; 406 newscript->RegisterSelf();406 m_scripts[nrscripts++] = newscript; 407 407 408 408 newscript = new Script; 409 409 newscript->Name="mob_fel_crystal"; 410 410 newscript->GetAI = GetAI_mob_fel_crystal; 411 newscript->RegisterSelf();411 m_scripts[nrscripts++] = newscript; 412 412 } -
trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_vexallus.cpp
r260 r272 239 239 newscript->Name="boss_vexallus"; 240 240 newscript->GetAI = GetAI_boss_vexallus; 241 newscript->RegisterSelf();241 m_scripts[nrscripts++] = newscript; 242 242 243 243 newscript = new Script; 244 244 newscript->Name="mob_pure_energy"; 245 245 newscript->GetAI = GetAI_mob_pure_energy; 246 newscript->RegisterSelf();246 m_scripts[nrscripts++] = newscript; 247 247 } -
trunk/src/bindings/scripts/scripts/zone/magisters_terrace/instance_magisters_terrace.cpp
r260 r272 250 250 newscript->Name = "instance_magisters_terrace"; 251 251 newscript->GetInstanceData = GetInstanceData_instance_magisters_terrace; 252 newscript->RegisterSelf();252 m_scripts[nrscripts++] = newscript; 253 253 } -
trunk/src/bindings/scripts/scripts/zone/maraudon/boss_celebras_the_cursed.cpp
r260 r272 94 94 newscript->Name="celebras_the_cursed"; 95 95 newscript->GetAI = GetAI_celebras_the_cursed; 96 newscript->RegisterSelf();96 m_scripts[nrscripts++] = newscript; 97 97 } -
trunk/src/bindings/scripts/scripts/zone/maraudon/boss_landslide.cpp
r260 r272 91 91 newscript->Name="boss_landslide"; 92 92 newscript->GetAI = GetAI_boss_landslide; 93 newscript->RegisterSelf();93 m_scripts[nrscripts++] = newscript; 94 94 } -
trunk/src/bindings/scripts/scripts/zone/maraudon/boss_noxxion.cpp
r260 r272 146 146 newscript->Name="boss_noxxion"; 147 147 newscript->GetAI = GetAI_boss_noxxion; 148 newscript->RegisterSelf();148 m_scripts[nrscripts++] = newscript; 149 149 } -
trunk/src/bindings/scripts/scripts/zone/maraudon/boss_princess_theradras.cpp
r260 r272 105 105 newscript->Name="boss_princess_theradras"; 106 106 newscript->GetAI = GetAI_boss_ptheradras; 107 newscript->RegisterSelf();107 m_scripts[nrscripts++] = newscript; 108 108 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_baron_geddon.cpp
r260 r272 102 102 newscript->Name="boss_baron_geddon"; 103 103 newscript->GetAI = GetAI_boss_baron_geddon; 104 newscript->RegisterSelf();104 m_scripts[nrscripts++] = newscript; 105 105 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_garr.cpp
r260 r272 141 141 newscript->Name="boss_garr"; 142 142 newscript->GetAI = GetAI_boss_garr; 143 newscript->RegisterSelf();143 m_scripts[nrscripts++] = newscript; 144 144 145 145 newscript = new Script; 146 146 newscript->Name="mob_firesworn"; 147 147 newscript->GetAI = GetAI_mob_firesworn; 148 newscript->RegisterSelf();148 m_scripts[nrscripts++] = newscript; 149 149 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_gehennas.cpp
r260 r272 88 88 newscript->Name="boss_gehennas"; 89 89 newscript->GetAI = GetAI_boss_gehennas; 90 newscript->RegisterSelf();90 m_scripts[nrscripts++] = newscript; 91 91 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_golemagg.cpp
r260 r272 193 193 newscript->Name="boss_golemagg"; 194 194 newscript->GetAI = GetAI_boss_golemagg; 195 newscript->RegisterSelf();195 m_scripts[nrscripts++] = newscript; 196 196 197 197 newscript = new Script; 198 198 newscript->Name="mob_core_rager"; 199 199 newscript->GetAI = GetAI_mob_core_rager; 200 newscript->RegisterSelf();200 m_scripts[nrscripts++] = newscript; 201 201 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_lucifron.cpp
r260 r272 87 87 newscript->Name="boss_lucifron"; 88 88 newscript->GetAI = GetAI_boss_lucifron; 89 newscript->RegisterSelf();89 m_scripts[nrscripts++] = newscript; 90 90 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_magmadar.cpp
r260 r272 94 94 newscript->Name="boss_magmadar"; 95 95 newscript->GetAI = GetAI_boss_magmadar; 96 newscript->RegisterSelf();96 m_scripts[nrscripts++] = newscript; 97 97 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_majordomo_executus.cpp
r260 r272 130 130 newscript->Name="boss_majordomo"; 131 131 newscript->GetAI = GetAI_boss_majordomo; 132 newscript->RegisterSelf();132 m_scripts[nrscripts++] = newscript; 133 133 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_ragnaros.cpp
r260 r272 314 314 newscript->Name="boss_ragnaros"; 315 315 newscript->GetAI = GetAI_boss_ragnaros; 316 newscript->RegisterSelf();316 m_scripts[nrscripts++] = newscript; 317 317 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_shazzrah.cpp
r260 r272 118 118 newscript->Name="boss_shazzrah"; 119 119 newscript->GetAI = GetAI_boss_shazzrah; 120 newscript->RegisterSelf();120 m_scripts[nrscripts++] = newscript; 121 121 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_sulfuron_harbinger.cpp
r260 r272 207 207 newscript->Name="boss_sulfuron"; 208 208 newscript->GetAI = GetAI_boss_sulfuron; 209 newscript->RegisterSelf();209 m_scripts[nrscripts++] = newscript; 210 210 211 211 newscript = new Script; 212 212 newscript->Name="mob_flamewaker_priest"; 213 213 newscript->GetAI = GetAI_mob_flamewaker_priest; 214 newscript->RegisterSelf();214 m_scripts[nrscripts++] = newscript; 215 215 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/instance_molten_core.cpp
r260 r272 254 254 newscript->Name="instance_molten_core"; 255 255 newscript->GetInstanceData = &GetInstance_instance_molten_core; 256 newscript->RegisterSelf();256 m_scripts[nrscripts++] = newscript; 257 257 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/molten_core.cpp
r260 r272 85 85 newscript->Name="mob_ancient_core_hound"; 86 86 newscript->GetAI = GetAI_mob_ancient_core_hound; 87 newscript->RegisterSelf();87 m_scripts[nrscripts++] = newscript; 88 88 } -
trunk/src/bindings/scripts/scripts/zone/moonglade/moonglade.cpp
r260 r272 546 546 newscript->pGossipHello = &GossipHello_npc_bunthen_plainswind; 547 547 newscript->pGossipSelect = &GossipSelect_npc_bunthen_plainswind; 548 newscript->RegisterSelf();548 m_scripts[nrscripts++] = newscript; 549 549 550 550 newscript = new Script; … … 552 552 newscript->pGossipHello = &GossipHello_npc_great_bear_spirit; 553 553 newscript->pGossipSelect = &GossipSelect_npc_great_bear_spirit; 554 newscript->RegisterSelf();554 m_scripts[nrscripts++] = newscript; 555 555 556 556 newscript = new Script; … … 558 558 newscript->pGossipHello = &GossipHello_npc_silva_filnaveth; 559 559 newscript->pGossipSelect = &GossipSelect_npc_silva_filnaveth; 560 newscript->RegisterSelf();560 m_scripts[nrscripts++] = newscript; 561 561 562 562 newscript = new Script; 563 563 newscript->Name="npc_clintar_dreamwalker"; 564 564 newscript->pQuestAccept = &QuestAccept_npc_clintar_dreamwalker; 565 newscript->RegisterSelf();565 m_scripts[nrscripts++] = newscript; 566 566 567 567 newscript = new Script; 568 568 newscript->Name="npc_clintar_spirit"; 569 569 newscript->GetAI = GetAI_npc_clintar_spirit; 570 newscript->RegisterSelf();571 } 570 m_scripts[nrscripts++] = newscript; 571 } -
trunk/src/bindings/scripts/scripts/zone/mulgore/mulgore.cpp
r260 r272 61 61 newscript->pGossipHello = &GossipHello_npc_skorn_whitecloud; 62 62 newscript->pGossipSelect = &GossipSelect_npc_skorn_whitecloud; 63 newscript->RegisterSelf();63 m_scripts[nrscripts++] = newscript; 64 64 } -
trunk/src/bindings/scripts/scripts/zone/nagrand/nagrand.cpp
r260 r272 632 632 newscript->Name="mob_shattered_rumbler"; 633 633 newscript->GetAI = GetAI_mob_shattered_rumbler; 634 newscript->RegisterSelf();634 m_scripts[nrscripts++] = newscript; 635 635 636 636 newscript = new Script; … … 639 639 newscript->pGossipHello = &GossipHello_mob_lump; 640 640 newscript->pGossipSelect = &GossipSelect_mob_lump; 641 newscript->RegisterSelf();641 m_scripts[nrscripts++] = newscript; 642 642 643 643 newscript = new Script; 644 644 newscript->Name="mob_sunspring_villager"; 645 645 newscript->GetAI = GetAI_mob_sunspring_villager; 646 newscript->RegisterSelf();646 m_scripts[nrscripts++] = newscript; 647 647 648 648 newscript = new Script; … … 651 651 newscript->pGossipSelect = &GossipSelect_npc_altruis_the_sufferer; 652 652 newscript->pQuestAccept = &QuestAccept_npc_altruis_the_sufferer; 653 newscript->RegisterSelf();653 m_scripts[nrscripts++] = newscript; 654 654 655 655 newscript = new Script; … … 657 657 newscript->pGossipHello = &GossipHello_npc_greatmother_geyah; 658 658 newscript->pGossipSelect = &GossipSelect_npc_greatmother_geyah; 659 newscript->RegisterSelf();659 m_scripts[nrscripts++] = newscript; 660 660 661 661 newscript = new Script; … … 663 663 newscript->pGossipHello = &GossipHello_npc_lantresor_of_the_blade; 664 664 newscript->pGossipSelect = &GossipSelect_npc_lantresor_of_the_blade; 665 newscript->RegisterSelf();665 m_scripts[nrscripts++] = newscript; 666 666 667 667 newscript = new Script; 668 668 newscript->Name="npc_creditmarker_visit_with_ancestors"; 669 669 newscript->GetAI = GetAI_npc_creditmarker_visit_with_ancestors; 670 newscript->RegisterSelf();670 m_scripts[nrscripts++] = newscript; 671 671 672 672 newscript = new Script; 673 673 newscript->Name="mob_sparrowhawk"; 674 674 newscript->GetAI = GetAI_mob_sparrowhawk; 675 newscript->RegisterSelf();676 } 675 m_scripts[nrscripts++] = newscript; 676 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_anubrekhan.cpp
r260 r272 209 209 newscript->Name="boss_anubrekhan"; 210 210 newscript->GetAI = GetAI_boss_anubrekhan; 211 newscript->RegisterSelf();211 m_scripts[nrscripts++] = newscript; 212 212 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_faerlina.cpp
r260 r272 198 198 newscript->Name="boss_faerlina"; 199 199 newscript->GetAI = GetAI_boss_faerlina; 200 newscript->RegisterSelf();200 m_scripts[nrscripts++] = newscript; 201 201 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_gluth.cpp
r260 r272 171 171 newscript->Name="boss_gluth"; 172 172 newscript->GetAI = GetAI_boss_gluth; 173 newscript->RegisterSelf();173 m_scripts[nrscripts++] = newscript; 174 174 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_highlord_mograine.cpp
r260 r272 175 175 newscript->Name="boss_highlord_mograine"; 176 176 newscript->GetAI = GetAI_boss_highlord_mograine; 177 newscript->RegisterSelf();177 m_scripts[nrscripts++] = newscript; 178 178 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_kelthuzad.cpp
r260 r272 538 538 newscript->Name="boss_kelthuzad"; 539 539 newscript->GetAI = GetAI_boss_kelthuzadAI; 540 newscript->RegisterSelf();540 m_scripts[nrscripts++] = newscript; 541 541 */ 542 542 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_lady_blaumeux.cpp
r260 r272 144 144 newscript->Name="boss_lady_blaumeux"; 145 145 newscript->GetAI = GetAI_boss_lady_blaumeux; 146 newscript->RegisterSelf();146 m_scripts[nrscripts++] = newscript; 147 147 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_loatheb.cpp
r260 r272 213 213 newscript->Name="boss_loatheb"; 214 214 newscript->GetAI = GetAI_boss_loatheb; 215 newscript->RegisterSelf();215 m_scripts[nrscripts++] = newscript; 216 216 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_maexxna.cpp
r260 r272 238 238 newscript->Name="boss_maexxna"; 239 239 newscript->GetAI = GetAI_boss_maexxna; 240 newscript->RegisterSelf();240 m_scripts[nrscripts++] = newscript; 241 241 242 242 newscript = new Script; 243 243 newscript->Name="mob_webwrap"; 244 244 newscript->GetAI = GetAI_mob_webwrap; 245 newscript->RegisterSelf();245 m_scripts[nrscripts++] = newscript; 246 246 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_noth.cpp
r260 r272 177 177 newscript->Name="boss_noth"; 178 178 newscript->GetAI = GetAI_boss_noth; 179 newscript->RegisterSelf();179 m_scripts[nrscripts++] = newscript; 180 180 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_patchwerk.cpp
r260 r272 157 157 newscript->Name="boss_patchwerk"; 158 158 newscript->GetAI = GetAI_boss_patchwerk; 159 newscript->RegisterSelf();159 m_scripts[nrscripts++] = newscript; 160 160 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_razuvious.cpp
r260 r272 164 164 newscript->Name="boss_razuvious"; 165 165 newscript->GetAI = GetAI_boss_razuvious; 166 newscript->RegisterSelf();166 m_scripts[nrscripts++] = newscript; 167 167 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_sapphiron.cpp
r260 r272 196 196 newscript->Name="boss_sapphiron"; 197 197 newscript->GetAI = GetAI_boss_sapphiron; 198 newscript->RegisterSelf();198 m_scripts[nrscripts++] = newscript; 199 199 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_sir_zeliek.cpp
r260 r272 143 143 newscript->Name="boss_sir_zeliek"; 144 144 newscript->GetAI = GetAI_boss_sir_zeliek; 145 newscript->RegisterSelf();145 m_scripts[nrscripts++] = newscript; 146 146 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_thane_korthazz.cpp
r260 r272 144 144 newscript->Name="boss_thane_korthazz"; 145 145 newscript->GetAI = GetAI_boss_thane_korthazz; 146 newscript->RegisterSelf();146 m_scripts[nrscripts++] = newscript; 147 147 } -
trunk/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp
r271 r272 391 391 392 392 /*###### 393 ## mob_phase_hunter394 ######*/395 396 #define SUMMONED_MOB 19595397 #define EMOTE_WEAK "is very weak"398 399 // Spells400 #define SPELL_PHASE_SLIP 36574401 #define SPELL_MANA_BURN 13321402 403 struct TRINITY_DLL_DECL mob_phase_hunterAI : public ScriptedAI404 {405 406 mob_phase_hunterAI(Creature *c) : ScriptedAI(c) {Reset();}407 408 bool Weak;409 int WeakPercent;410 uint32 PlayerGUID;411 uint32 Health;412 uint32 Level;413 uint32 PhaseSlipVulnerabilityTimer;414 uint32 ManaBurnTimer;415 416 void Reset()417 {418 Weak = false;419 WeakPercent = 25 + (rand()%16); // 25-40420 PlayerGUID = 0;421 ManaBurnTimer = 5000 + (rand()%3 * 1000); // 5-8 sec cd422 }423 424 void Aggro(Unit *who)425 {426 PlayerGUID = who->GetGUID();427 }428 429 void UpdateAI(const uint32 diff)430 {431 432 Player* target = NULL;433 target = ((Player*)Unit::GetUnit((*m_creature), PlayerGUID));434 435 if(!target)436 return;437 438 if(m_creature->HasAuraType(SPELL_AURA_MOD_DECREASE_SPEED) || m_creature->hasUnitState(UNIT_STAT_ROOT)) // if the mob is rooted/slowed by spells eg.: Entangling Roots, Frost Nova, Hamstring, Crippling Poison, etc. => remove it439 DoCast(m_creature, SPELL_PHASE_SLIP);440 if(ManaBurnTimer < diff) // cast Mana Burn441 {442 if(target->GetCreateMana() > 0)443 {444 DoCast(target, SPELL_MANA_BURN);445 ManaBurnTimer = 8000 + (rand()%10 * 1000); // 8-18 sec cd446 }447 }448 else ManaBurnTimer -= diff;449 450 if(!Weak && m_creature->GetHealth() < (m_creature->GetMaxHealth() / 100 * WeakPercent) && target->GetQuestStatus(10190) == QUEST_STATUS_INCOMPLETE) // start: support for quest 10190451 {452 DoTextEmote(EMOTE_WEAK, 0);453 Weak = true;454 }455 if(Weak && m_creature->HasAura(34219, 0))456 {457 Health = m_creature->GetHealth(); // get the normal mob's data458 Level = m_creature->getLevel();459 460 m_creature->AttackStop(); // delete the normal mob461 m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);462 m_creature->RemoveCorpse();463 464 Creature* DrainedPhaseHunter = NULL;465 466 if(!DrainedPhaseHunter)467 DrainedPhaseHunter = m_creature->SummonCreature(SUMMONED_MOB, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); // summon the mob468 469 if(DrainedPhaseHunter)470 {471 DrainedPhaseHunter->SetLevel(Level); // set the summoned mob's data472 DrainedPhaseHunter->SetHealth(Health);473 DrainedPhaseHunter->AI()->AttackStart(target);474 }475 } // end: support for quest 10190476 }477 478 };479 480 CreatureAI* GetAI_mob_phase_hunter(Creature *_Creature)481 {482 return new mob_phase_hunterAI (_Creature);483 }484 485 /*######486 393 ## 487 394 ######*/ … … 494 401 newscript->Name="go_manaforge_control_console"; 495 402 newscript->pGOHello = &GOHello_go_manaforge_control_console; 496 newscript->RegisterSelf();403 m_scripts[nrscripts++] = newscript; 497 404 498 405 newscript = new Script; 499 406 newscript->Name="npc_manaforge_control_console"; 500 407 newscript->GetAI = GetAI_npc_manaforge_control_console; 501 newscript->RegisterSelf();408 m_scripts[nrscripts++] = newscript; 502 409 503 410 newscript = new Script; … … 505 412 newscript->pGossipHello = &GossipHello_npc_protectorate_nether_drake; 506 413 newscript->pGossipSelect = &GossipSelect_npc_protectorate_nether_drake; 507 newscript->RegisterSelf();414 m_scripts[nrscripts++] = newscript; 508 415 509 416 newscript = new Script; … … 511 418 newscript->pGossipHello = &GossipHello_npc_veronia; 512 419 newscript->pGossipSelect = &GossipSelect_npc_veronia; 513 newscript->RegisterSelf(); 514 515 newscript = new Script; 516 newscript->Name = "mob_phase_hunter"; 517 newscript->GetAI = GetAI_mob_phase_hunter; 518 newscript->RegisterSelf(); 519 } 420 m_scripts[nrscripts++] = newscript; 421 } -
trunk/src/bindings/scripts/scripts/zone/onyxias_lair/boss_onyxia.cpp
r260 r272 230 230 newscript->Name="boss_onyxia"; 231 231 newscript->GetAI = GetAI_boss_onyxiaAI; 232 newscript->RegisterSelf();232 m_scripts[nrscripts++] = newscript; 233 233 } -
trunk/src/bindings/scripts/scripts/zone/orgrimmar/orgrimmar.cpp
r260 r272 248 248 newscript->pGossipHello = &GossipHello_npc_neeru_fireblade; 249 249 newscript->pGossipSelect = &GossipSelect_npc_neeru_fireblade; 250 newscript->RegisterSelf();250 m_scripts[nrscripts++] = newscript; 251 251 252 252 newscript = new Script; … … 255 255 newscript->pQuestAccept = &QuestAccept_npc_shenthul; 256 256 newscript->pReceiveEmote = &ReciveEmote_npc_shenthul; 257 newscript->RegisterSelf();257 m_scripts[nrscripts++] = newscript; 258 258 259 259 newscript = new Script; … … 262 262 newscript->pGossipHello = &GossipHello_npc_thrall_warchief; 263 263 newscript->pGossipSelect = &GossipSelect_npc_thrall_warchief; 264 newscript->RegisterSelf();265 } 264 m_scripts[nrscripts++] = newscript; 265 } -
trunk/src/bindings/scripts/scripts/zone/razorfen_downs/boss_amnennar_the_coldbringer.cpp
r260 r272 137 137 newscript->Name="boss_amnennar_the_coldbringer"; 138 138 newscript->GetAI = GetAI_boss_amnennar_the_coldbringer; 139 newscript->RegisterSelf();139 m_scripts[nrscripts++] = newscript; 140 140 } -
trunk/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_ayamiss.cpp
r260 r272 104 104 newscript->Name="boss_ayamiss"; 105 105 newscript->GetAI = GetAI_boss_ayamiss; 106 newscript->RegisterSelf();106 m_scripts[nrscripts++] = newscript; 107 107 } -
trunk/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_kurinnaxx.cpp
r260 r272 90 90 newscript->Name="boss_kurinnaxx"; 91 91 newscript->GetAI = GetAI_boss_kurinnaxx; 92 newscript->RegisterSelf();92 m_scripts[nrscripts++] = newscript; 93 93 } -
trunk/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_moam.cpp
r260 r272 114 114 newscript->Name="boss_moam"; 115 115 newscript->GetAI = GetAI_boss_moam; 116 newscript->RegisterSelf();116 m_scripts[nrscripts++] = newscript; 117 117 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_arcanist_doan.cpp
r260 r272 168 168 newscript->Name="boss_arcanist_doan"; 169 169 newscript->GetAI = GetAI_boss_arcanist_doan; 170 newscript->RegisterSelf();170 m_scripts[nrscripts++] = newscript; 171 171 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_azshir_the_sleepless.cpp
r260 r272 94 94 newscript->Name="boss_azshir_the_sleepless"; 95 95 newscript->GetAI = GetAI_boss_azshir_the_sleepless; 96 newscript->RegisterSelf();96 m_scripts[nrscripts++] = newscript; 97 97 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_bloodmage_thalnos.cpp
r260 r272 133 133 newscript->Name="boss_bloodmage_thalnos"; 134 134 newscript->GetAI = GetAI_boss_bloodmage_thalnos; 135 newscript->RegisterSelf();135 m_scripts[nrscripts++] = newscript; 136 136 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_herod.cpp
r260 r272 194 194 newscript->Name="boss_herod"; 195 195 newscript->GetAI = GetAI_boss_herod; 196 newscript->RegisterSelf();196 m_scripts[nrscripts++] = newscript; 197 197 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp
r260 r272 129 129 newscript->Name="boss_high_inquisitor_fairbanks"; 130 130 newscript->GetAI = GetAI_boss_high_inquisitor_fairbanks; 131 newscript->RegisterSelf();131 m_scripts[nrscripts++] = newscript; 132 132 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_high_inquisitor_whitemane.cpp
r260 r272 174 174 newscript->Name="boss_high_inquisitor_whitemane"; 175 175 newscript->GetAI = GetAI_boss_high_inquisitor_whitemane; 176 newscript->RegisterSelf();176 m_scripts[nrscripts++] = newscript; 177 177 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_houndmaster_loksey.cpp
r260 r272 75 75 newscript->Name="boss_houndmaster_loksey"; 76 76 newscript->GetAI = GetAI_boss_houndmaster_loksey; 77 newscript->RegisterSelf();77 m_scripts[nrscripts++] = newscript; 78 78 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_interrogator_vishas.cpp
r260 r272 110 110 newscript->Name="boss_interrogator_vishas"; 111 111 newscript->GetAI = GetAI_boss_interrogator_vishas; 112 newscript->RegisterSelf();112 m_scripts[nrscripts++] = newscript; 113 113 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_scarlet_commander_mograine.cpp
r260 r272 157 157 newscript->Name="boss_scarlet_commander_mograine"; 158 158 newscript->GetAI = GetAI_boss_scarlet_commander_mograine; 159 newscript->RegisterSelf();159 m_scripts[nrscripts++] = newscript; 160 160 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_scorn.cpp
r260 r272 97 97 newscript->Name="boss_scorn"; 98 98 newscript->GetAI = GetAI_boss_scorn; 99 newscript->RegisterSelf();99 m_scripts[nrscripts++] = newscript; 100 100 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_darkmaster_gandling.cpp
r260 r272 189 189 newscript->Name="boss_darkmaster_gandling"; 190 190 newscript->GetAI = GetAI_boss_darkmaster_gandling; 191 newscript->RegisterSelf();191 m_scripts[nrscripts++] = newscript; 192 192 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_death_knight_darkreaver.cpp
r260 r272 56 56 newscript->Name="boss_death_knight_darkreaver"; 57 57 newscript->GetAI = GetAI_boss_death_knight_darkreaver; 58 newscript->RegisterSelf();58 m_scripts[nrscripts++] = newscript; 59 59 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_doctor_theolen_krastinov.cpp
r260 r272 105 105 newscript->Name="boss_doctor_theolen_krastinov"; 106 106 newscript->GetAI = GetAI_boss_theolenkrastinov; 107 newscript->RegisterSelf();107 m_scripts[nrscripts++] = newscript; 108 108 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_illucia_barov.cpp
r260 r272 113 113 newscript->Name="boss_illucia_barov"; 114 114 newscript->GetAI = GetAI_boss_illuciabarov; 115 newscript->RegisterSelf();115 m_scripts[nrscripts++] = newscript; 116 116 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_instructor_malicia.cpp
r260 r272 149 149 newscript->Name="boss_instructor_malicia"; 150 150 newscript->GetAI = GetAI_boss_instructormalicia; 151 newscript->RegisterSelf();151 m_scripts[nrscripts++] = newscript; 152 152 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_jandice_barov.cpp
r260 r272 213 213 newscript->Name="boss_jandice_barov"; 214 214 newscript->GetAI = GetAI_boss_jandicebarov; 215 newscript->RegisterSelf();215 m_scripts[nrscripts++] = newscript; 216 216 217 217 newscript = new Script; 218 218 newscript->Name="mob_illusionofjandicebarov"; 219 219 newscript->GetAI = GetAI_mob_illusionofjandicebarov; 220 newscript->RegisterSelf();220 m_scripts[nrscripts++] = newscript; 221 221 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_kormok.cpp
r260 r272 152 152 newscript->Name="boss_kormok"; 153 153 newscript->GetAI = GetAI_boss_kormok; 154 newscript->RegisterSelf();154 m_scripts[nrscripts++] = newscript; 155 155 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_lord_alexei_barov.cpp
r260 r272 95 95 newscript->Name="boss_lord_alexei_barov"; 96 96 newscript->GetAI = GetAI_boss_lordalexeibarov; 97 newscript->RegisterSelf();97 m_scripts[nrscripts++] = newscript; 98 98 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_lorekeeper_polkelt.cpp
r260 r272 110 110 newscript->Name="boss_lorekeeper_polkelt"; 111 111 newscript->GetAI = GetAI_boss_lorekeeperpolkelt; 112 newscript->RegisterSelf();112 m_scripts[nrscripts++] = newscript; 113 113 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_ras_frostwhisper.cpp
r260 r272 122 122 newscript->Name="boss_boss_ras_frostwhisper"; 123 123 newscript->GetAI = GetAI_boss_rasfrost; 124 newscript->RegisterSelf();124 m_scripts[nrscripts++] = newscript; 125 125 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_the_ravenian.cpp
r260 r272 115 115 newscript->Name="boss_the_ravenian"; 116 116 newscript->GetAI = GetAI_boss_theravenian; 117 newscript->RegisterSelf();117 m_scripts[nrscripts++] = newscript; 118 118 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_vectus.cpp
r260 r272 92 92 newscript->Name="boss_vectus"; 93 93 newscript->GetAI = GetAI_boss_vectus; 94 newscript->RegisterSelf();94 m_scripts[nrscripts++] = newscript; 95 95 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/instance_scholomance.cpp
r260 r272 99 99 newscript->Name = "instance_scholomance"; 100 100 newscript->GetInstanceData = GetInstanceData_instance_scholomance; 101 newscript->RegisterSelf();101 m_scripts[nrscripts++] = newscript; 102 102 } -
trunk/src/bindings/scripts/scripts/zone/searing_gorge/searing_gorge.cpp
r260 r272 144 144 newscript->pGossipHello = &GossipHello_npc_kalaran_windblade; 145 145 newscript->pGossipSelect = &GossipSelect_npc_kalaran_windblade; 146 newscript->RegisterSelf();146 m_scripts[nrscripts++] = newscript; 147 147 148 148 newscript = new Script; … … 150 150 newscript->pGossipHello = &GossipHello_npc_lothos_riftwaker; 151 151 newscript->pGossipSelect = &GossipSelect_npc_lothos_riftwaker; 152 newscript->RegisterSelf();152 m_scripts[nrscripts++] = newscript; 153 153 154 154 newscript = new Script; … … 156 156 newscript->pGossipHello = &GossipHello_npc_zamael_lunthistle; 157 157 newscript->pGossipSelect = &GossipSelect_npc_zamael_lunthistle; 158 newscript->RegisterSelf();158 m_scripts[nrscripts++] = newscript; 159 159 } -
trunk/src/bindings/scripts/scripts/zone/shadowfang_keep/instance_shadowfang_keep.cpp
r260 r272 149 149 newscript->Name = "instance_shadowfang_keep"; 150 150 newscript->GetInstanceData = GetInstanceData_instance_shadowfang_keep; 151 newscript->RegisterSelf();151 m_scripts[nrscripts++] = newscript; 152 152 } -
trunk/src/bindings/scripts/scripts/zone/shadowfang_keep/shadowfang_keep.cpp
r260 r272 114 114 newscript->pGossipSelect = &GossipSelect_npc_shadowfang_prisoner; 115 115 newscript->GetAI = GetAI_npc_shadowfang_prisoner; 116 newscript->RegisterSelf();116 m_scripts[nrscripts++] = newscript; 117 117 } -
trunk/src/bindings/scripts/scripts/zone/shadowmoon_valley/boss_doomwalker.cpp
r260 r272 213 213 newscript->Name="boss_doomwalker"; 214 214 newscript->GetAI = GetAI_boss_doomwalker; 215 newscript->RegisterSelf();215 m_scripts[nrscripts++] = newscript; 216 216 } -
trunk/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp
r260 r272 1107 1107 newscript->Name = "mob_mature_netherwing_drake"; 1108 1108 newscript->GetAI = GetAI_mob_mature_netherwing_drake; 1109 newscript->RegisterSelf();1109 m_scripts[nrscripts++] = newscript; 1110 1110 1111 1111 newscript = new Script; 1112 1112 newscript->Name = "mob_enslaved_netherwing_drake"; 1113 1113 newscript->GetAI = GetAI_mob_enslaved_netherwing_drake; 1114 newscript->RegisterSelf();1114 m_scripts[nrscripts++] = newscript; 1115 1115 1116 1116 newscript = new Script; 1117 1117 newscript->Name = "mob_dragonmaw_peon"; 1118 1118 newscript->GetAI = GetAI_mob_dragonmaw_peon; 1119 newscript->RegisterSelf();1119 m_scripts[nrscripts++] = newscript; 1120 1120 1121 1121 newscript = new Script; … … 1123 1123 newscript->pGossipHello = &GossipHello_npc_drake_dealer_hurlunk; 1124 1124 newscript->pGossipSelect = &GossipSelect_npc_drake_dealer_hurlunk; 1125 newscript->RegisterSelf();1125 m_scripts[nrscripts++] = newscript; 1126 1126 1127 1127 newscript = new Script; 1128 1128 newscript->Name="npc_invis_legion_teleporter"; 1129 1129 newscript->GetAI = GetAI_npc_invis_legion_teleporter; 1130 newscript->RegisterSelf();1130 m_scripts[nrscripts++] = newscript; 1131 1131 1132 1132 newscript = new Script; … … 1134 1134 newscript->pGossipHello = &GossipHello_npcs_flanis_swiftwing_and_kagrosh; 1135 1135 newscript->pGossipSelect = &GossipSelect_npcs_flanis_swiftwing_and_kagrosh; 1136 newscript->RegisterSelf();1136 m_scripts[nrscripts++] = newscript; 1137 1137 1138 1138 newscript = new Script; … … 1140 1140 newscript->pGossipHello = &GossipHello_npc_murkblood_overseer; 1141 1141 newscript->pGossipSelect = &GossipSelect_npc_murkblood_overseer; 1142 newscript->RegisterSelf();1142 m_scripts[nrscripts++] = newscript; 1143 1143 1144 1144 newscript = new Script; … … 1146 1146 newscript->pGossipHello = &GossipHello_npc_neltharaku; 1147 1147 newscript->pGossipSelect = &GossipSelect_npc_neltharaku; 1148 newscript->RegisterSelf();1148 m_scripts[nrscripts++] = newscript; 1149 1149 1150 1150 newscript = new Script; 1151 1151 newscript->Name = "npc_karynaku"; 1152 1152 newscript->pQuestAccept = &QuestAccept_npc_karynaku; 1153 newscript->RegisterSelf();1153 m_scripts[nrscripts++] = newscript; 1154 1154 1155 1155 newscript = new Script; … … 1157 1157 newscript->pGossipHello = &GossipHello_npc_oronok_tornheart; 1158 1158 newscript->pGossipSelect = &GossipSelect_npc_oronok_tornheart; 1159 newscript->RegisterSelf();1159 m_scripts[nrscripts++] = newscript; 1160 1160 1161 1161 newscript = new Script; … … 1163 1163 newscript->GetAI = GetAI_Overlord_Morghor; 1164 1164 newscript->pQuestAccept = &QuestAccept_Overlord_Morghor; 1165 newscript->RegisterSelf();1165 m_scripts[nrscripts++] = newscript; 1166 1166 1167 1167 newscript = new Script; 1168 1168 newscript->Name = "npc_lord_illidan_stormrage"; 1169 1169 newscript->GetAI = GetAI_Lord_Illidan; 1170 newscript->RegisterSelf();1170 m_scripts[nrscripts++] = newscript; 1171 1171 1172 1172 newscript = new Script; … … 1175 1175 newscript->pGossipHello = &GossipHello_npc_yarzill_fly; 1176 1176 newscript->pGossipSelect = &GossipSelect_npc_yarzill_fly; 1177 newscript->RegisterSelf();1178 } 1177 m_scripts[nrscripts++] = newscript; 1178 } -
trunk/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp
r260 r272 415 415 newscript->pGossipHello = &GossipHello_npc_raliq_the_drunk; 416 416 newscript->pGossipSelect = &GossipSelect_npc_raliq_the_drunk; 417 newscript->RegisterSelf();417 m_scripts[nrscripts++] = newscript; 418 418 419 419 newscript = new Script; … … 421 421 newscript->GetAI = GetAI_npc_salsalabim; 422 422 newscript->pGossipHello = &GossipHello_npc_salsalabim; 423 newscript->RegisterSelf();423 m_scripts[nrscripts++] = newscript; 424 424 425 425 newscript = new Script; … … 427 427 newscript->pGossipHello = &GossipHello_npc_shattrathflaskvendors; 428 428 newscript->pGossipSelect = &GossipSelect_npc_shattrathflaskvendors; 429 newscript->RegisterSelf();429 m_scripts[nrscripts++] = newscript; 430 430 431 431 newscript = new Script; … … 433 433 newscript->pGossipHello = &GossipHello_npc_zephyr; 434 434 newscript->pGossipSelect = &GossipSelect_npc_zephyr; 435 newscript->RegisterSelf();435 m_scripts[nrscripts++] = newscript; 436 436 437 437 newscript = new Script; 438 438 newscript->Name="npc_kservant"; 439 439 newscript->GetAI = GetAI_npc_kservantAI; 440 newscript->RegisterSelf();441 } 440 m_scripts[nrscripts++] = newscript; 441 } -
trunk/src/bindings/scripts/scripts/zone/silithus/silithus.cpp
r260 r272 146 146 newscript->pGossipHello = &GossipHello_npcs_rutgar_and_frankal; 147 147 newscript->pGossipSelect = &GossipSelect_npcs_rutgar_and_frankal; 148 newscript->RegisterSelf();148 m_scripts[nrscripts++] = newscript; 149 149 } -
trunk/src/bindings/scripts/scripts/zone/silvermoon/silvermoon_city.cpp
r260 r272 100 100 newscript->Name="npc_blood_knight_stillblade"; 101 101 newscript->GetAI = GetAI_npc_blood_knight_stillblade; 102 newscript->RegisterSelf();102 m_scripts[nrscripts++] = newscript; 103 103 } -
trunk/src/bindings/scripts/scripts/zone/silverpine_forest/silverpine_forest.cpp
r260 r272 97 97 newscript->pGossipSelect = &GossipSelect_npc_astor_hadren; 98 98 newscript->GetAI = GetAI_npc_astor_hadren; 99 newscript->RegisterSelf();99 m_scripts[nrscripts++] = newscript; 100 100 } -
trunk/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp
r260 r272 77 77 newscript->pGossipHello = &GossipHello_npc_braug_dimspirit; 78 78 newscript->pGossipSelect = &GossipSelect_npc_braug_dimspirit; 79 newscript->RegisterSelf();79 m_scripts[nrscripts++] = newscript; 80 80 } -
trunk/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp
r260 r272 246 246 newscript->pGossipHello = &GossipHello_npc_archmage_malin; 247 247 newscript->pGossipSelect = &GossipSelect_npc_archmage_malin; 248 newscript->RegisterSelf();248 m_scripts[nrscripts++] = newscript; 249 249 250 250 newscript = new Script; … … 252 252 newscript->GetAI = GetAI_npc_bartleby; 253 253 newscript->pQuestAccept = &QuestAccept_npc_bartleby; 254 newscript->RegisterSelf();254 m_scripts[nrscripts++] = newscript; 255 255 256 256 newscript = new Script; … … 258 258 newscript->GetAI = GetAI_npc_dashel_stonefist; 259 259 newscript->pQuestAccept = &QuestAccept_npc_dashel_stonefist; 260 newscript->RegisterSelf();260 m_scripts[nrscripts++] = newscript; 261 261 262 262 newscript = new Script; 263 263 newscript->Name = "npc_general_marcus_jonathan"; 264 264 newscript->pReceiveEmote = &ReceiveEmote_npc_general_marcus_jonathan; 265 newscript->RegisterSelf();265 m_scripts[nrscripts++] = newscript; 266 266 267 267 newscript = new Script; … … 269 269 newscript->pGossipHello = &GossipHello_npc_lady_katrana_prestor; 270 270 newscript->pGossipSelect = &GossipSelect_npc_lady_katrana_prestor; 271 newscript->RegisterSelf();272 } 271 m_scripts[nrscripts++] = newscript; 272 } -
trunk/src/bindings/scripts/scripts/zone/stranglethorn_vale/stranglethorn_vale.cpp
r260 r272 104 104 newscript->Name = "mob_yenniku"; 105 105 newscript->GetAI = GetAI_mob_yenniku; 106 newscript->RegisterSelf();106 m_scripts[nrscripts++] = newscript; 107 107 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_baron_rivendare.cpp
r260 r272 212 212 newscript->Name="boss_baron_rivendare"; 213 213 newscript->GetAI = GetAI_boss_baron_rivendare; 214 newscript->RegisterSelf();214 m_scripts[nrscripts++] = newscript; 215 215 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_baroness_anastari.cpp
r260 r272 121 121 newscript->Name="boss_baroness_anastari"; 122 122 newscript->GetAI = GetAI_boss_baroness_anastari; 123 newscript->RegisterSelf();123 m_scripts[nrscripts++] = newscript; 124 124 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_cannon_master_willey.cpp
r260 r272 218 218 newscript->Name="boss_cannon_master_willey"; 219 219 newscript->GetAI = GetAI_boss_cannon_master_willey; 220 newscript->RegisterSelf();220 m_scripts[nrscripts++] = newscript; 221 221 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_dathrohan_balnazzar.cpp
r260 r272 313 313 newscript->Name="boss_dathrohan_balnazzar"; 314 314 newscript->GetAI = GetAI_boss_dathrohan_balnazzar; 315 newscript->RegisterSelf();315 m_scripts[nrscripts++] = newscript; 316 316 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_magistrate_barthilas.cpp
r260 r272 111 111 newscript->Name="boss_magistrate_barthilas"; 112 112 newscript->GetAI = GetAI_boss_magistrate_barthilas; 113 newscript->RegisterSelf();113 m_scripts[nrscripts++] = newscript; 114 114 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_maleki_the_pallid.cpp
r260 r272 116 116 newscript->Name="boss_maleki_the_pallid"; 117 117 newscript->GetAI = GetAI_boss_maleki_the_pallid; 118 newscript->RegisterSelf();118 m_scripts[nrscripts++] = newscript; 119 119 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_nerubenkan.cpp
r260 r272 135 135 newscript->Name="boss_nerubenkan"; 136 136 newscript->GetAI = GetAI_boss_nerubenkan; 137 newscript->RegisterSelf();137 m_scripts[nrscripts++] = newscript; 138 138 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_order_of_silver_hand.cpp
r260 r272 158 158 newscript->Name="boss_silver_hand_bosses"; 159 159 newscript->GetAI = GetAI_boss_silver_hand_bossesAI; 160 newscript->RegisterSelf();160 m_scripts[nrscripts++] = newscript; 161 161 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_postmaster_malown.cpp
r260 r272 141 141 newscript->Name="boss_postmaster_malown"; 142 142 newscript->GetAI = GetAI_boss_postmaster_malown; 143 newscript->RegisterSelf();143 m_scripts[nrscripts++] = newscript; 144 144 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_ramstein_the_gorger.cpp
r260 r272 89 89 newscript->Name="boss_ramstein_the_gorger"; 90 90 newscript->GetAI = GetAI_boss_ramstein_the_gorger; 91 newscript->RegisterSelf();91 m_scripts[nrscripts++] = newscript; 92 92 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_timmy_the_cruel.cpp
r260 r272 97 97 newscript->Name="boss_timmy_the_cruel"; 98 98 newscript->GetAI = GetAI_boss_timmy_the_cruel; 99 newscript->RegisterSelf();99 m_scripts[nrscripts++] = newscript; 100 100 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/instance_stratholme.cpp
r260 r272 74 74 newscript->Name = "instance_stratholme"; 75 75 newscript->GetInstanceData = GetInstanceData_instance_stratholme; 76 newscript->RegisterSelf();76 m_scripts[nrscripts++] = newscript; 77 77 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/stratholme.cpp
r260 r272 311 311 newscript->Name="mob_freed_soul"; 312 312 newscript->GetAI = GetAI_mob_freed_soul; 313 newscript->RegisterSelf();313 m_scripts[nrscripts++] = newscript; 314 314 315 315 newscript = new Script; 316 316 newscript->Name="mob_restless_soul"; 317 317 newscript->GetAI = GetAI_mob_restless_soul; 318 newscript->RegisterSelf();318 m_scripts[nrscripts++] = newscript; 319 319 320 320 newscript = new Script; … … 322 322 newscript->GetAI = GetAI_mobs_spectral_ghostly_citizen; 323 323 newscript->pReceiveEmote = &ReciveEmote_mobs_spectral_ghostly_citizen; 324 newscript->RegisterSelf();324 m_scripts[nrscripts++] = newscript; 325 325 326 326 newscript = new Script; 327 327 newscript->Name="mob_mindless_skeleton"; 328 328 newscript->GetAI = GetAI_mob_mindless_skeleton; 329 newscript->RegisterSelf();329 m_scripts[nrscripts++] = newscript; 330 330 331 331 newscript = new Script; 332 332 newscript->Name="mob_thuzadin_acolyte"; 333 333 newscript->GetAI = GetAI_mob_thuzadin_acolyte; 334 newscript->RegisterSelf();335 } 334 m_scripts[nrscripts++] = newscript; 335 } -
trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_brutallus.cpp
r260 r272 179 179 newscript->Name="boss_brutallus"; 180 180 newscript->GetAI = GetAI_boss_brutallus; 181 newscript->RegisterSelf();181 m_scripts[nrscripts++] = newscript; 182 182 } -
trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_eredar_twins.cpp
r260 r272 762 762 newscript->Name="boss_sacrolash"; 763 763 newscript->GetAI = GetAI_boss_sacrolash; 764 newscript->RegisterSelf();764 m_scripts[nrscripts++] = newscript; 765 765 766 766 newscript = new Script; 767 767 newscript->Name="boss_alythess"; 768 768 newscript->GetAI = GetAI_boss_alythess; 769 newscript->RegisterSelf();769 m_scripts[nrscripts++] = newscript; 770 770 771 771 newscript = new Script; 772 772 newscript->Name="mob_shadow_image"; 773 773 newscript->GetAI = GetAI_mob_shadow_image; 774 newscript->RegisterSelf();774 m_scripts[nrscripts++] = newscript; 775 775 } -
trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_felmyst.cpp
r260 r272 296 296 break; 297 297 case 2: 298 if( Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true))298 if(Player* target = SelectRandomPlayer(150)) 299 299 { 300 300 Creature* Vapor = m_creature->SummonCreature(MOB_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000); … … 312 312 DespawnSummons(MOB_VAPOR_TRAIL); 313 313 //m_creature->CastSpell(m_creature, SPELL_VAPOR_SELECT); need core support 314 if( Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true))314 if(Player* target = SelectRandomPlayer(150)) 315 315 { 316 316 //target->CastSpell(target, SPELL_VAPOR_SUMMON, true); need core support … … 331 331 break; 332 332 case 5: 333 if( Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true))333 if(Player* target = SelectRandomPlayer(150)) 334 334 { 335 335 BreathX = target->GetPositionX(); … … 434 434 break; 435 435 case EVENT_ENCAPSULATE: 436 if(Unit* target = Select Unit(SELECT_TARGET_RANDOM, 0, 150, true))436 if(Unit* target = SelectRandomPlayer(150)) 437 437 { 438 438 m_creature->CastSpell(target, SPELL_ENCAPSULATE_CHANNEL, false); … … 516 516 } 517 517 } 518 519 Player* SelectRandomPlayer(float range = 0.0f) 520 { 521 Map *map = m_creature->GetMap(); 522 if (!map->IsDungeon()) return NULL; 523 524 InstanceMap::PlayerList PlayerList = ((InstanceMap*)map)->GetPlayers(); 525 InstanceMap::PlayerList::iterator i; 526 while(PlayerList.size()) 527 { 528 i = PlayerList.begin(); 529 advance(i, rand()%PlayerList.size()); 530 if((range == 0.0f || m_creature->IsWithinDistInMap(*i, range)) 531 && (*i)->isTargetableForAttack()) 532 return *i; 533 else 534 PlayerList.erase(i); 535 } 536 return NULL; 537 } 518 538 }; 519 539 … … 575 595 newscript->Name="boss_felmyst"; 576 596 newscript->GetAI = GetAI_boss_felmyst; 577 newscript->RegisterSelf();597 m_scripts[nrscripts++] = newscript; 578 598 579 599 newscript = new Script; 580 600 newscript->Name="mob_felmyst_vapor"; 581 601 newscript->GetAI = GetAI_mob_felmyst_vapor; 582 newscript->RegisterSelf();602 m_scripts[nrscripts++] = newscript; 583 603 584 604 newscript = new Script; 585 605 newscript->Name="mob_felmyst_trail"; 586 606 newscript->GetAI = GetAI_mob_felmyst_trail; 587 newscript->RegisterSelf();607 m_scripts[nrscripts++] = newscript; 588 608 } -
trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp
r260 r272 369 369 Map *map = m_creature->GetMap(); 370 370 if(!map->IsDungeon()) return; 371 Map::PlayerList const &PlayerList = map->GetPlayers(); 372 Map::PlayerList::const_iterator i; 373 for(i = PlayerList.begin(); i != PlayerList.end(); ++i) 374 if(Player* i_pl = i->getSource()) 375 if(i_pl->HasAura(AURA_SPECTRAL_REALM,0)) 376 i_pl->RemoveAurasDueToSpell(AURA_SPECTRAL_REALM); 371 InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 372 InstanceMap::PlayerList::const_iterator i; 373 for (i = PlayerList.begin(); i != PlayerList.end(); ++i) 374 { 375 if((*i)->HasAura(AURA_SPECTRAL_REALM,0)) 376 (*i)->RemoveAurasDueToSpell(AURA_SPECTRAL_REALM); 377 } 377 378 } 378 379 … … 681 682 newscript->Name="boss_kalecgos"; 682 683 newscript->GetAI = GetAI_boss_kalecgos; 683 newscript->RegisterSelf();684 m_scripts[nrscripts++] = newscript; 684 685 685 686 newscript = new Script; 686 687 newscript->Name="boss_sathrovarr"; 687 688 newscript->GetAI = GetAI_boss_Sathrovarr; 688 newscript->RegisterSelf();689 m_scripts[nrscripts++] = newscript; 689 690 690 691 newscript = new Script; 691 692 newscript->Name="boss_kalec"; 692 693 newscript->GetAI = GetAI_boss_kalec; 693 newscript->RegisterSelf();694 m_scripts[nrscripts++] = newscript; 694 695 695 696 newscript = new Script; 696 697 newscript->Name="kalocegos_teleporter"; 697 698 newscript->pGOHello = &GOkalocegos_teleporter; 698 newscript->RegisterSelf();699 m_scripts[nrscripts++] = newscript; 699 700 } -
trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp
r260 r272 193 193 newscript->Name = "instance_sunwell_plateau"; 194 194 newscript->GetInstanceData = GetInstanceData_instance_sunwell_plateau; 195 newscript->RegisterSelf();195 m_scripts[nrscripts++] = newscript; 196 196 } -
trunk/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp
r260 r272 375 375 newscript->Name="mob_aquementas"; 376 376 newscript->GetAI = GetAI_mob_aquementas; 377 newscript->RegisterSelf();377 m_scripts[nrscripts++] = newscript; 378 378 379 379 newscript = new Script; 380 380 newscript->Name="npc_custodian_of_time"; 381 381 newscript->GetAI = GetAI_npc_custodian_of_time; 382 newscript->RegisterSelf();382 m_scripts[nrscripts++] = newscript; 383 383 384 384 newscript = new Script; … … 386 386 newscript->pGossipHello = &GossipHello_npc_marin_noggenfogger; 387 387 newscript->pGossipSelect = &GossipSelect_npc_marin_noggenfogger; 388 newscript->RegisterSelf();388 m_scripts[nrscripts++] = newscript; 389 389 390 390 newscript = new Script; … … 393 393 newscript->pGossipSelect = &GossipSelect_npc_steward_of_time; 394 394 newscript->pQuestAccept = &QuestAccept_npc_steward_of_time; 395 newscript->RegisterSelf();395 m_scripts[nrscripts++] = newscript; 396 396 397 397 newscript = new Script; … … 399 399 newscript->pGossipHello = &GossipHello_npc_stone_watcher_of_norgannon; 400 400 newscript->pGossipSelect = &GossipSelect_npc_stone_watcher_of_norgannon; 401 newscript->RegisterSelf();402 } 401 m_scripts[nrscripts++] = newscript; 402 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/arcatraz.cpp
r260 r272 576 576 newscript->Name="npc_millhouse_manastorm"; 577 577 newscript->GetAI = GetAI_npc_millhouse_manastorm; 578 newscript->RegisterSelf();578 m_scripts[nrscripts++] = newscript; 579 579 580 580 newscript = new Script; 581 581 newscript->Name="npc_warden_mellichar"; 582 582 newscript->GetAI = GetAI_npc_warden_mellichar; 583 newscript->RegisterSelf();583 m_scripts[nrscripts++] = newscript; 584 584 585 585 newscript = new Script; 586 586 newscript->Name="mob_zerekethvoidzone"; 587 587 newscript->GetAI = GetAI_mob_zerekethvoidzoneAI; 588 newscript->RegisterSelf();588 m_scripts[nrscripts++] = newscript; 589 589 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp
r260 r272 368 368 newscript->Name="boss_harbinger_skyriss"; 369 369 newscript->GetAI = GetAI_boss_harbinger_skyriss; 370 newscript->RegisterSelf();370 m_scripts[nrscripts++] = newscript; 371 371 372 372 newscript = new Script; 373 373 newscript->Name="boss_harbinger_skyriss_illusion"; 374 374 newscript->GetAI = GetAI_boss_harbinger_skyriss_illusion; 375 newscript->RegisterSelf();375 m_scripts[nrscripts++] = newscript; 376 376 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/instance_arcatraz.cpp
r260 r272 221 221 newscript->Name = "instance_arcatraz"; 222 222 newscript->GetInstanceData = GetInstanceData_instance_arcatraz; 223 newscript->RegisterSelf();223 m_scripts[nrscripts++] = newscript; 224 224 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_high_botanist_freywinn.cpp
r260 r272 212 212 newscript->Name="boss_high_botanist_freywinn"; 213 213 newscript->GetAI = GetAI_boss_high_botanist_freywinn; 214 newscript->RegisterSelf();214 m_scripts[nrscripts++] = newscript; 215 215 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_laj.cpp
r260 r272 195 195 newscript->Name="boss_laj"; 196 196 newscript->GetAI = GetAI_boss_laj; 197 newscript->RegisterSelf();197 m_scripts[nrscripts++] = newscript; 198 198 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_warp_splinter.cpp
r260 r272 294 294 newscript->Name="boss_warp_splinter"; 295 295 newscript->GetAI = GetAI_boss_warp_splinter; 296 newscript->RegisterSelf();296 m_scripts[nrscripts++] = newscript; 297 297 298 298 newscript = new Script; 299 299 newscript->Name="mob_warp_splinter_treant"; 300 300 newscript->GetAI = GetAI_mob_treant; 301 newscript->RegisterSelf();301 m_scripts[nrscripts++] = newscript; 302 302 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_alar.cpp
r260 r272 506 506 newscript->Name="boss_alar"; 507 507 newscript->GetAI = GetAI_boss_alar; 508 newscript->RegisterSelf();508 m_scripts[nrscripts++] = newscript; 509 509 510 510 newscript = new Script; 511 511 newscript->Name="mob_ember_of_alar"; 512 512 newscript->GetAI = GetAI_mob_ember_of_alar; 513 newscript->RegisterSelf();513 m_scripts[nrscripts++] = newscript; 514 514 515 515 newscript = new Script; 516 516 newscript->Name="mob_flame_patch_alar"; 517 517 newscript->GetAI = GetAI_mob_flame_patch_alar; 518 newscript->RegisterSelf();518 m_scripts[nrscripts++] = newscript; 519 519 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_astromancer.cpp
r260 r272 537 537 newscript->Name="boss_high_astromancer_solarian"; 538 538 newscript->GetAI = GetAI_boss_high_astromancer_solarian; 539 newscript->RegisterSelf();539 m_scripts[nrscripts++] = newscript; 540 540 541 541 newscript = new Script; 542 542 newscript->Name="mob_solarium_priest"; 543 543 newscript->GetAI = GetAI_mob_solarium_priest; 544 newscript->RegisterSelf();544 m_scripts[nrscripts++] = newscript; 545 545 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp
r260 r272 1582 1582 newscript->Name="boss_kaelthas"; 1583 1583 newscript->GetAI = GetAI_boss_kaelthas; 1584 newscript->RegisterSelf();1584 m_scripts[nrscripts++] = newscript; 1585 1585 1586 1586 newscript = new Script; 1587 1587 newscript->Name="boss_thaladred_the_darkener"; 1588 1588 newscript->GetAI = GetAI_boss_thaladred_the_darkener; 1589 newscript->RegisterSelf();1589 m_scripts[nrscripts++] = newscript; 1590 1590 1591 1591 newscript = new Script; 1592 1592 newscript->Name="boss_lord_sanguinar"; 1593 1593 newscript->GetAI = GetAI_boss_lord_sanguinar; 1594 newscript->RegisterSelf();1594 m_scripts[nrscripts++] = newscript; 1595 1595 1596 1596 newscript = new Script; 1597 1597 newscript->Name="boss_grand_astromancer_capernian"; 1598 1598 newscript->GetAI = GetAI_boss_grand_astromancer_capernian; 1599 newscript->RegisterSelf();1599 m_scripts[nrscripts++] = newscript; 1600 1600 1601 1601 newscript = new Script; 1602 1602 newscript->Name="boss_master_engineer_telonicus"; 1603 1603 newscript->GetAI = GetAI_boss_master_engineer_telonicus; 1604 newscript->RegisterSelf();1604 m_scripts[nrscripts++] = newscript; 1605 1605 1606 1606 newscript = new Script; 1607 1607 newscript->Name= "mob_kael_flamestrike"; 1608 1608 newscript->GetAI = GetAI_mob_kael_flamestrike; 1609 newscript->RegisterSelf();1609 m_scripts[nrscripts++] = newscript; 1610 1610 1611 1611 newscript = new Script; 1612 1612 newscript->Name="mob_phoenix"; 1613 1613 newscript->GetAI = GetAI_mob_phoenix; 1614 newscript->RegisterSelf();1614 m_scripts[nrscripts++] = newscript; 1615 1615 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp
r260 r272 196 196 newscript->Name="boss_void_reaver"; 197 197 newscript->GetAI = GetAI_boss_void_reaver; 198 newscript->RegisterSelf();198 m_scripts[nrscripts++] = newscript; 199 199 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/instance_the_eye.cpp
r260 r272 173 173 newscript->Name = "instance_the_eye"; 174 174 newscript->GetInstanceData = GetInstanceData_instance_the_eye; 175 newscript->RegisterSelf();175 m_scripts[nrscripts++] = newscript; 176 176 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/the_eye.cpp
r260 r272 95 95 newscript->Name="mob_crystalcore_devastator"; 96 96 newscript->GetAI = GetAI_mob_crystalcore_devastator; 97 newscript->RegisterSelf();97 m_scripts[nrscripts++] = newscript; 98 98 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp
r260 r272 158 158 newscript->Name="boss_gatewatcher_iron_hand"; 159 159 newscript->GetAI = GetAI_boss_gatewatcher_iron_hand; 160 newscript->RegisterSelf();160 m_scripts[nrscripts++] = newscript; 161 161 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp
r260 r272 278 278 newscript->Name="boss_nethermancer_sepethrea"; 279 279 newscript->GetAI = GetAI_boss_nethermancer_sepethrea; 280 newscript->RegisterSelf();280 m_scripts[nrscripts++] = newscript; 281 281 282 282 newscript = new Script; 283 283 newscript->Name="mob_ragin_flames"; 284 284 newscript->GetAI = GetAI_mob_ragin_flames; 285 newscript->RegisterSelf();285 m_scripts[nrscripts++] = newscript; 286 286 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp
r263 r272 298 298 newscript->Name="boss_pathaleon_the_calculator"; 299 299 newscript->GetAI = GetAI_boss_pathaleon_the_calculator; 300 newscript->RegisterSelf();300 m_scripts[nrscripts++] = newscript; 301 301 302 302 newscript = new Script; 303 303 newscript->Name="mob_nether_wraith"; 304 304 newscript->GetAI = GetAI_mob_nether_wraith; 305 newscript->RegisterSelf();305 m_scripts[nrscripts++] = newscript; 306 306 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/instance_mechanar.cpp
r263 r272 87 87 newscript->Name = "instance_mechanar"; 88 88 newscript->GetInstanceData = GetInstanceData_instance_mechanar; 89 newscript->RegisterSelf();89 m_scripts[nrscripts++] = newscript; 90 90 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_bug_trio.cpp
r260 r272 335 335 newscript->Name="boss_kri"; 336 336 newscript->GetAI = GetAI_boss_kri; 337 newscript->RegisterSelf();337 m_scripts[nrscripts++] = newscript; 338 338 339 339 newscript = new Script; 340 340 newscript->Name="boss_vem"; 341 341 newscript->GetAI = GetAI_boss_vem; 342 newscript->RegisterSelf();342 m_scripts[nrscripts++] = newscript; 343 343 344 344 newscript = new Script; 345 345 newscript->Name="boss_yauj"; 346 346 newscript->GetAI = GetAI_boss_yauj; 347 newscript->RegisterSelf();347 m_scripts[nrscripts++] = newscript; 348 348 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp
r260 r272 578 578 if(!map->IsDungeon()) return; 579 579 580 Map::PlayerList const &PlayerList = map->GetPlayers(); 581 for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) 582 { 583 if (Player* i_pl = i->getSource()) 580 InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 581 for (InstanceMap::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) 582 { 583 //Play random sound to the zone 584 switch (rand()%8) 584 585 { 585 //Play random sound to the zone 586 switch (rand()%8) 587 { 588 case 0: i_pl->SendPlaySound(RND_WISPER_1, true); break; 589 case 1: i_pl->SendPlaySound(RND_WISPER_2, true); break; 590 case 2: i_pl->SendPlaySound(RND_WISPER_3, true); break; 591 case 3: i_pl->SendPlaySound(RND_WISPER_4, true); break; 592 case 4: i_pl->SendPlaySound(RND_WISPER_5, true); break; 593 case 5: i_pl->SendPlaySound(RND_WISPER_6, true); break; 594 case 6: i_pl->SendPlaySound(RND_WISPER_7, true); break; 595 case 7: i_pl->SendPlaySound(RND_WISPER_8, true); break; 596 } 586 case 0: (*i)->SendPlaySound(RND_WISPER_1, true); break; 587 case 1: (*i)->SendPlaySound(RND_WISPER_2, true); break; 588 case 2: (*i)->SendPlaySound(RND_WISPER_3, true); break; 589 case 3: (*i)->SendPlaySound(RND_WISPER_4, true); break; 590 case 4: (*i)->SendPlaySound(RND_WISPER_5, true); break; 591 case 5: (*i)->SendPlaySound(RND_WISPER_6, true); break; 592 case 6: (*i)->SendPlaySound(RND_WISPER_7, true); break; 593 case 7: (*i)->SendPlaySound(RND_WISPER_8, true); break; 597 594 } 598 595 } … … 1330 1327 newscript->Name="boss_eye_of_cthun"; 1331 1328 newscript->GetAI = GetAI_eye_of_cthun; 1332 newscript->RegisterSelf();1329 m_scripts[nrscripts++] = newscript; 1333 1330 1334 1331 newscript = new Script; 1335 1332 newscript->Name="boss_cthun"; 1336 1333 newscript->GetAI = GetAI_cthun; 1337 newscript->RegisterSelf();1334 m_scripts[nrscripts++] = newscript; 1338 1335 1339 1336 newscript = new Script; 1340 1337 newscript->Name="mob_eye_tentacle"; 1341 1338 newscript->GetAI = GetAI_eye_tentacle; 1342 newscript->RegisterSelf();1339 m_scripts[nrscripts++] = newscript; 1343 1340 1344 1341 newscript = new Script; 1345 1342 newscript->Name="mob_claw_tentacle"; 1346 1343 newscript->GetAI = GetAI_claw_tentacle; 1347 newscript->RegisterSelf();1344 m_scripts[nrscripts++] = newscript; 1348 1345 1349 1346 newscript = new Script; 1350 1347 newscript->Name="mob_giant_claw_tentacle"; 1351 1348 newscript->GetAI = GetAI_giant_claw_tentacle; 1352 newscript->RegisterSelf();1349 m_scripts[nrscripts++] = newscript; 1353 1350 1354 1351 newscript = new Script; 1355 1352 newscript->Name="mob_giant_eye_tentacle"; 1356 1353 newscript->GetAI = GetAI_giant_eye_tentacle; 1357 newscript->RegisterSelf();1354 m_scripts[nrscripts++] = newscript; 1358 1355 1359 1356 newscript = new Script; 1360 1357 newscript->Name="mob_giant_flesh_tentacle"; 1361 1358 newscript->GetAI = GetAI_flesh_tentacle; 1362 newscript->RegisterSelf();1359 m_scripts[nrscripts++] = newscript; 1363 1360 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_fankriss.cpp
r260 r272 187 187 newscript->Name="boss_fankriss"; 188 188 newscript->GetAI = GetAI_boss_fankriss; 189 newscript->RegisterSelf();189 m_scripts[nrscripts++] = newscript; 190 190 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_huhuran.cpp
r260 r272 140 140 newscript->Name="boss_huhuran"; 141 141 newscript->GetAI = GetAI_boss_huhuran; 142 newscript->RegisterSelf();142 m_scripts[nrscripts++] = newscript; 143 143 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_ouro.cpp
r260 r272 137 137 newscript->Name="boss_ouro"; 138 138 newscript->GetAI = GetAI_boss_ouro; 139 newscript->RegisterSelf();139 m_scripts[nrscripts++] = newscript; 140 140 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_sartura.cpp
r260 r272 260 260 newscript->Name="boss_sartura"; 261 261 newscript->GetAI = GetAI_boss_sartura; 262 newscript->RegisterSelf();262 m_scripts[nrscripts++] = newscript; 263 263 264 264 newscript = new Script; 265 265 newscript->Name="mob_sartura_royal_guard"; 266 266 newscript->GetAI = GetAI_mob_sartura_royal_guard; 267 newscript->RegisterSelf();267 m_scripts[nrscripts++] = newscript; 268 268 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_skeram.cpp
r260 r272 311 311 newscript->Name="boss_skeram"; 312 312 newscript->GetAI = GetAI_boss_skeram; 313 newscript->RegisterSelf();313 m_scripts[nrscripts++] = newscript; 314 314 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_twinemperors.cpp
r260 r272 690 690 newscript->Name="boss_veknilash"; 691 691 newscript->GetAI = GetAI_boss_veknilash; 692 newscript->RegisterSelf();692 m_scripts[nrscripts++] = newscript; 693 693 694 694 newscript = new Script; 695 695 newscript->Name="boss_veklor"; 696 696 newscript->GetAI = GetAI_boss_veklor; 697 newscript->RegisterSelf();697 m_scripts[nrscripts++] = newscript; 698 698 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp
r260 r272 162 162 newscript->Name = "instance_temple_of_ahnqiraj"; 163 163 newscript->GetInstanceData = GetInstanceData_instance_temple_of_ahnqiraj; 164 newscript->RegisterSelf();164 m_scripts[nrscripts++] = newscript; 165 165 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp
r260 r272 310 310 newscript->Name="mob_anubisath_sentinel"; 311 311 newscript->GetAI = GetAI_mob_anubisath_sentinelAI; 312 newscript->RegisterSelf();312 m_scripts[nrscripts++] = newscript; 313 313 } 314 314 -
trunk/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp
r260 r272 369 369 newscript->Name="mob_unkor_the_ruthless"; 370 370 newscript->GetAI = GetAI_mob_unkor_the_ruthless; 371 newscript->RegisterSelf();371 m_scripts[nrscripts++] = newscript; 372 372 373 373 newscript = new Script; 374 374 newscript->Name="mob_infested_root_walker"; 375 375 newscript->GetAI = GetAI_mob_infested_root_walker; 376 newscript->RegisterSelf();376 m_scripts[nrscripts++] = newscript; 377 377 378 378 newscript = new Script; 379 379 newscript->Name="mob_rotting_forest_rager"; 380 380 newscript->GetAI = GetAI_mob_rotting_forest_rager; 381 newscript->RegisterSelf();381 m_scripts[nrscripts++] = newscript; 382 382 383 383 newscript = new Script; 384 384 newscript->Name="mob_netherweb_victim"; 385 385 newscript->GetAI = GetAI_mob_netherweb_victim; 386 newscript->RegisterSelf();386 m_scripts[nrscripts++] = newscript; 387 387 388 388 newscript = new Script; … … 390 390 newscript->pGossipHello = &GossipHello_npc_floon; 391 391 newscript->pGossipSelect = &GossipSelect_npc_floon; 392 newscript->RegisterSelf();392 m_scripts[nrscripts++] = newscript; 393 393 394 394 newscript = new Script; … … 396 396 newscript->pGossipHello = &GossipHello_npc_skyguard_handler_deesak; 397 397 newscript->pGossipSelect = &GossipSelect_npc_skyguard_handler_deesak; 398 newscript->RegisterSelf();399 } 398 m_scripts[nrscripts++] = newscript; 399 } -
trunk/src/bindings/scripts/scripts/zone/thunder_bluff/thunder_bluff.cpp
r260 r272 133 133 newscript->pGossipHello = &GossipHello_npc_cairne_bloodhoof; 134 134 newscript->pGossipSelect = &GossipSelect_npc_cairne_bloodhoof; 135 newscript->RegisterSelf();135 m_scripts[nrscripts++] = newscript; 136 136 } -
trunk/src/bindings/scripts/scripts/zone/tirisfal_glades/tirisfal_glades.cpp
r260 r272 85 85 newscript->GetAI = GetAI_npc_calvin_montague; 86 86 newscript->pQuestAccept = &QuestAccept_npc_calvin_montague; 87 newscript->RegisterSelf();87 m_scripts[nrscripts++] = newscript; 88 88 } -
trunk/src/bindings/scripts/scripts/zone/uldaman/boss_ironaya.cpp
r260 r272 104 104 newscript->Name="boss_ironaya"; 105 105 newscript->GetAI = GetAI_boss_ironaya; 106 newscript->RegisterSelf();106 m_scripts[nrscripts++] = newscript; 107 107 } -
trunk/src/bindings/scripts/scripts/zone/uldaman/uldaman.cpp
r260 r272 178 178 newscript->Name="mob_jadespine_basilisk"; 179 179 newscript->GetAI = GetAI_mob_jadespine_basilisk; 180 newscript->RegisterSelf();180 m_scripts[nrscripts++] = newscript; 181 181 182 182 newscript = new Script; … … 184 184 newscript->pGossipHello = &GossipHello_npc_lore_keeper_of_norgannon; 185 185 newscript->pGossipSelect = &GossipSelect_npc_lore_keeper_of_norgannon; 186 newscript->RegisterSelf();186 m_scripts[nrscripts++] = newscript; 187 187 } -
trunk/src/bindings/scripts/scripts/zone/undercity/undercity.cpp
r260 r272 246 246 newscript->GetAI = GetAI_npc_lady_sylvanas_windrunner; 247 247 newscript->pChooseReward = &ChooseReward_npc_lady_sylvanas_windrunner; 248 newscript->RegisterSelf();248 m_scripts[nrscripts++] = newscript; 249 249 250 250 newscript = new Script; 251 251 newscript->Name="npc_highborne_lamenter"; 252 252 newscript->GetAI = GetAI_npc_highborne_lamenter; 253 newscript->RegisterSelf();253 m_scripts[nrscripts++] = newscript; 254 254 255 255 newscript = new Script; … … 257 257 newscript->pGossipHello = &GossipHello_npc_parqual_fintallas; 258 258 newscript->pGossipSelect = &GossipSelect_npc_parqual_fintallas; 259 newscript->RegisterSelf();260 } 259 m_scripts[nrscripts++] = newscript; 260 } -
trunk/src/bindings/scripts/scripts/zone/western_plaguelands/western_plaguelands.cpp
r260 r272 168 168 newscript->pGossipHello = &GossipHello_npcs_dithers_and_arbington; 169 169 newscript->pGossipSelect = &GossipSelect_npcs_dithers_and_arbington; 170 newscript->RegisterSelf();170 m_scripts[nrscripts++] = newscript; 171 171 172 172 newscript = new Script; 173 173 newscript->Name="npc_the_scourge_cauldron"; 174 174 newscript->GetAI = GetAI_npc_the_scourge_cauldron; 175 newscript->RegisterSelf();175 m_scripts[nrscripts++] = newscript; 176 176 } -
trunk/src/bindings/scripts/scripts/zone/winterspring/winterspring.cpp
r260 r272 142 142 newscript->pGossipHello = &GossipHello_npc_lorax; 143 143 newscript->pGossipSelect = &GossipSelect_npc_lorax; 144 newscript->RegisterSelf();144 m_scripts[nrscripts++] = newscript; 145 145 146 146 newscript = new Script; … … 148 148 newscript->pGossipHello = &GossipHello_npc_rivern_frostwind; 149 149 newscript->pGossipSelect = &GossipSelect_npc_rivern_frostwind; 150 newscript->RegisterSelf();150 m_scripts[nrscripts++] = newscript; 151 151 152 152 newscript = new Script; … … 154 154 newscript->pGossipHello = &GossipHello_npc_witch_doctor_mauari; 155 155 newscript->pGossipSelect = &GossipSelect_npc_witch_doctor_mauari; 156 newscript->RegisterSelf();156 m_scripts[nrscripts++] = newscript; 157 157 } -
trunk/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp
r260 r272 262 262 newscript->pGossipHello = &GossipHello_npcs_ashyen_and_keleth; 263 263 newscript->pGossipSelect = &GossipSelect_npcs_ashyen_and_keleth; 264 newscript->RegisterSelf();264 m_scripts[nrscripts++] = newscript; 265 265 266 266 newscript = new Script; … … 268 268 newscript->pGossipHello = &GossipHello_npc_cooshcoosh; 269 269 newscript->pGossipSelect = &GossipSelect_npc_cooshcoosh; 270 newscript->RegisterSelf();270 m_scripts[nrscripts++] = newscript; 271 271 272 272 newscript = new Script; … … 274 274 newscript->pGossipHello = &GossipHello_npc_elder_kuruti; 275 275 newscript->pGossipSelect = &GossipSelect_npc_elder_kuruti; 276 newscript->RegisterSelf();276 m_scripts[nrscripts++] = newscript; 277 277 278 278 newscript = new Script; … … 280 280 newscript->pGossipHello = &GossipHello_npc_mortog_steamhead; 281 281 newscript->pGossipSelect = &GossipSelect_npc_mortog_steamhead; 282 newscript->RegisterSelf();283 } 282 m_scripts[nrscripts++] = newscript; 283 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/boss_akilzon.cpp
r270 r272 170 170 data << uint32(weather) << (float)grade << uint8(0); 171 171 172 map->SendToPlayers(&data);172 ((InstanceMap*)map)->SendToPlayers(&data); 173 173 } 174 174 … … 462 462 newscript->Name="boss_akilzon"; 463 463 newscript->GetAI = GetAI_boss_akilzon; 464 newscript->RegisterSelf();464 m_scripts[nrscripts++] = newscript; 465 465 466 466 newscript = new Script; 467 467 newscript->Name="mob_akilzon_eagle"; 468 468 newscript->GetAI = GetAI_mob_soaring_eagle; 469 newscript->RegisterSelf();469 m_scripts[nrscripts++] = newscript; 470 470 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/boss_halazzi.cpp
r260 r272 395 395 newscript->Name="boss_halazzi"; 396 396 newscript->GetAI = GetAI_boss_halazziAI; 397 newscript->RegisterSelf();397 m_scripts[nrscripts++] = newscript; 398 398 399 399 newscript = new Script; 400 400 newscript->Name="mob_halazzi_lynx"; 401 401 newscript->GetAI = GetAI_boss_spiritlynxAI; 402 newscript->RegisterSelf();402 m_scripts[nrscripts++] = newscript; 403 403 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/boss_hexlord.cpp
r260 r272 372 372 if(SiphonSoul_Timer < diff) 373 373 { 374 Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 70, true);374 Player* target = SelectRandomPlayer(50); 375 375 Unit *trigger = DoSpawnCreature(MOB_TEMP_TRIGGER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 30000); 376 376 if(!target || !trigger) EnterEvadeMode(); … … 436 436 m_creature->CastSpell(target, PlayerAbility[PlayerClass][random].spell, false); 437 437 } 438 439 Player* SelectRandomPlayer(float range = 0.0f, bool alive = true) 440 { 441 Map *map = m_creature->GetMap(); 442 if (!map->IsDungeon()) return NULL; 443 444 InstanceMap::PlayerList PlayerList = ((InstanceMap*)map)->GetPlayers(); 445 InstanceMap::PlayerList::iterator i; 446 while(PlayerList.size()) 447 { 448 i = PlayerList.begin(); 449 advance(i, rand()%PlayerList.size()); 450 if((range == 0.0f || m_creature->IsWithinDistInMap(*i, range)) 451 && (!alive || (*i)->isAlive())) 452 return *i; 453 else 454 PlayerList.erase(i); 455 } 456 return NULL; 457 } 438 458 }; 439 459 … … 869 889 newscript->Name="boss_hexlord_malacrass"; 870 890 newscript->GetAI = GetAI_boss_hex_lord_malacrass; 871 newscript->RegisterSelf();891 m_scripts[nrscripts++] = newscript; 872 892 873 893 newscript = new Script; 874 894 newscript->Name="boss_thurg"; 875 895 newscript->GetAI = GetAI_boss_thurg; 876 newscript->RegisterSelf();896 m_scripts[nrscripts++] = newscript; 877 897 878 898 newscript = new Script; 879 899 newscript->Name="boss_gazakroth"; 880 900 newscript->GetAI = GetAI_boss_gazakroth; 881 newscript->RegisterSelf();901 m_scripts[nrscripts++] = newscript; 882 902 883 903 newscript = new Script; 884 904 newscript->Name="boss_lord_raadan"; 885 905 newscript->GetAI = GetAI_boss_lord_raadan; 886 newscript->RegisterSelf();906 m_scripts[nrscripts++] = newscript; 887 907 888 908 newscript = new Script; 889 909 newscript->Name="boss_darkheart"; 890 910 newscript->GetAI = GetAI_boss_darkheart; 891 newscript->RegisterSelf();911 m_scripts[nrscripts++] = newscript; 892 912 893 913 newscript = new Script; 894 914 newscript->Name="boss_slither"; 895 915 newscript->GetAI = GetAI_boss_slither; 896 newscript->RegisterSelf();916 m_scripts[nrscripts++] = newscript; 897 917 898 918 newscript = new Script; 899 919 newscript->Name="boss_fenstalker"; 900 920 newscript->GetAI = GetAI_boss_fenstalker; 901 newscript->RegisterSelf();921 m_scripts[nrscripts++] = newscript; 902 922 903 923 newscript = new Script; 904 924 newscript->Name="boss_koragg"; 905 925 newscript->GetAI = GetAI_boss_koragg; 906 newscript->RegisterSelf();926 m_scripts[nrscripts++] = newscript; 907 927 908 928 newscript = new Script; 909 929 newscript->Name="boss_alyson_antille"; 910 930 newscript->GetAI = GetAI_boss_alyson_antille; 911 newscript->RegisterSelf();931 m_scripts[nrscripts++] = newscript; 912 932 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/boss_janalai.cpp
r260 r272 398 398 Map *map = m_creature->GetMap(); 399 399 if(!map->IsDungeon()) return; 400 Map::PlayerList const &PlayerList = map->GetPlayers(); 401 for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) 402 { 403 if (Player* i_pl = i->getSource()) 404 if(i_pl->isAlive()) 405 DoTeleportPlayer(i_pl, JanalainPos[0][0]-5+rand()%10, JanalainPos[0][1]-5+rand()%10, JanalainPos[0][2], 0); 400 InstanceMap::PlayerList const &PlayerList =((InstanceMap*)map)->GetPlayers(); 401 for(InstanceMap::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) 402 { 403 if((*i)->isAlive()) 404 DoTeleportPlayer(*i, JanalainPos[0][0]-5+rand()%10, JanalainPos[0][1]-5+rand()%10, JanalainPos[0][2], 0); 406 405 } 407 406 //m_creature->CastSpell(Temp, SPELL_SUMMON_PLAYERS, true); // core bug, spell does not work if too far … … 707 706 newscript->Name="boss_janalai"; 708 707 newscript->GetAI = GetAI_boss_janalaiAI; 709 newscript->RegisterSelf();708 m_scripts[nrscripts++] = newscript; 710 709 711 710 newscript = new Script; 712 711 newscript->Name="mob_janalai_firebomb"; 713 712 newscript->GetAI = GetAI_mob_jandalai_firebombAI; 714 newscript->RegisterSelf();713 m_scripts[nrscripts++] = newscript; 715 714 716 715 newscript = new Script; 717 716 newscript->Name="mob_janalai_hatcher"; 718 717 newscript->GetAI = GetAI_mob_amanishi_hatcherAI; 719 newscript->RegisterSelf();718 m_scripts[nrscripts++] = newscript; 720 719 721 720 newscript = new Script; 722 721 newscript->Name="mob_janalai_hatchling"; 723 722 newscript->GetAI = GetAI_mob_hatchlingAI; 724 newscript->RegisterSelf();723 m_scripts[nrscripts++] = newscript; 725 724 726 725 newscript = new Script; 727 726 newscript->Name="mob_janalai_egg"; 728 727 newscript->GetAI = GetAI_mob_eggAI; 729 newscript->RegisterSelf();728 m_scripts[nrscripts++] = newscript; 730 729 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp
r260 r272 301 301 newscript->Name="boss_nalorakk"; 302 302 newscript->GetAI = GetAI_boss_nalorakk; 303 newscript->RegisterSelf();303 m_scripts[nrscripts++] = newscript; 304 304 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/boss_zuljin.cpp
r260 r272 630 630 newscript->Name="boss_zuljin"; 631 631 newscript->GetAI = GetAI_boss_zuljin; 632 newscript->RegisterSelf();632 m_scripts[nrscripts++] = newscript; 633 633 634 634 newscript = new Script; 635 635 newscript->Name="do_nothing"; 636 636 newscript->GetAI = GetAI_do_nothing; 637 newscript->RegisterSelf();637 m_scripts[nrscripts++] = newscript; 638 638 639 639 newscript = new Script; 640 640 newscript->Name="mob_zuljin_vortex"; 641 641 newscript->GetAI = GetAI_feather_vortexAI; 642 newscript->RegisterSelf();642 m_scripts[nrscripts++] = newscript; 643 643 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/instance_zulaman.cpp
r270 r272 140 140 void OpenDoor(uint64 DoorGUID, bool open) 141 141 { 142 if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID)) 143 Door->SetUInt32Value(GAMEOBJECT_STATE, open ? 0 : 1); 142 if(((InstanceMap*)instance)->GetPlayers().size()) 143 if(Player* first = ((InstanceMap*)instance)->GetPlayers().front()) 144 if(GameObject *Door = GameObject::GetGameObject(*first, DoorGUID)) 145 Door->SetUInt32Value(GAMEOBJECT_STATE, open ? 0 : 1); 144 146 } 145 147 146 148 void SummonHostage(uint8 num) 147 149 { 148 if(!QuestMinute) 149 return; 150 151 Map::PlayerList const &PlayerList = instance->GetPlayers(); 152 if (PlayerList.isEmpty()) 153 return; 154 155 Map::PlayerList::const_iterator i = PlayerList.begin(); 156 if(Player* i_pl = i->getSource()) 157 { 158 if(Unit* Hostage = i_pl->SummonCreature(HostageInfo[num].npc, HostageInfo[num].x, HostageInfo[num].y, HostageInfo[num].z, HostageInfo[num].o, TEMPSUMMON_DEAD_DESPAWN, 0)) 159 { 160 Hostage->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); 161 Hostage->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); 162 } 163 } 150 if(QuestMinute && ((InstanceMap*)instance)->GetPlayers().size()) 151 if(Player* first = ((InstanceMap*)instance)->GetPlayers().front()) 152 if(Unit* Hostage = first->SummonCreature(HostageInfo[num].npc, HostageInfo[num].x, HostageInfo[num].y, HostageInfo[num].z, HostageInfo[num].o, TEMPSUMMON_DEAD_DESPAWN, 0)) 153 { 154 Hostage->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); 155 Hostage->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); 156 } 164 157 } 165 158 … … 177 170 WorldPacket data(SMSG_UPDATE_WORLD_STATE, 8); 178 171 data << field << value; 179 instance->SendToPlayers(&data);172 ((InstanceMap*)instance)->SendToPlayers(&data); 180 173 } 181 174 … … 329 322 newscript->Name = "instance_zulaman"; 330 323 newscript->GetInstanceData = GetInstanceData_instance_zulaman; 331 newscript->RegisterSelf();324 m_scripts[nrscripts++] = newscript; 332 325 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/zulaman.cpp
r260 r272 172 172 newscript->Name="npc_forest_frog"; 173 173 newscript->GetAI = GetAI_npc_forest_frog; 174 newscript->RegisterSelf();174 m_scripts[nrscripts++] = newscript; 175 175 176 176 newscript = new Script; … … 179 179 newscript->pGossipHello = GossipHello_npc_zulaman_hostage; 180 180 newscript->pGossipSelect = GossipSelect_npc_zulaman_hostage; 181 newscript->RegisterSelf();181 m_scripts[nrscripts++] = newscript; 182 182 } -
trunk/src/bindings/scripts/scripts/zone/zulfarrak/zulfarrak.cpp
r260 r272 214 214 newscript->pGossipHello = &GossipHello_npc_sergeant_bly; 215 215 newscript->pGossipSelect = &GossipSelect_npc_sergeant_bly; 216 newscript->RegisterSelf();216 m_scripts[nrscripts++] = newscript; 217 217 218 218 newscript = new Script; … … 221 221 newscript->pGossipHello = &GossipHello_npc_weegli_blastfuse; 222 222 newscript->pGossipSelect = &GossipSelect_npc_weegli_blastfuse; 223 newscript->RegisterSelf();224 } 223 m_scripts[nrscripts++] = newscript; 224 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_arlokk.cpp
r260 r272 208 208 newscript->Name="boss_arlokk"; 209 209 newscript->GetAI = GetAI_boss_arlokk; 210 newscript->RegisterSelf();210 m_scripts[nrscripts++] = newscript; 211 211 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_gahzranka.cpp
r260 r272 89 89 newscript->Name="boss_gahzranka"; 90 90 newscript->GetAI = GetAI_boss_gahzranka; 91 newscript->RegisterSelf();91 m_scripts[nrscripts++] = newscript; 92 92 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_grilek.cpp
r260 r272 89 89 newscript->Name="boss_grilek"; 90 90 newscript->GetAI = GetAI_boss_grilek; 91 newscript->RegisterSelf();91 m_scripts[nrscripts++] = newscript; 92 92 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_hakkar.cpp
r260 r272 253 253 newscript->Name="boss_hakkar"; 254 254 newscript->GetAI = GetAI_boss_hakkar; 255 newscript->RegisterSelf();255 m_scripts[nrscripts++] = newscript; 256 256 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_hazzarah.cpp
r260 r272 97 97 newscript->Name="boss_hazzarah"; 98 98 newscript->GetAI = GetAI_boss_hazzarah; 99 newscript->RegisterSelf();99 m_scripts[nrscripts++] = newscript; 100 100 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_jeklik.cpp
r260 r272 289 289 newscript->Name="boss_jeklik"; 290 290 newscript->GetAI = GetAI_boss_jeklik; 291 newscript->RegisterSelf();291 m_scripts[nrscripts++] = newscript; 292 292 293 293 newscript = new Script; 294 294 newscript->Name="mob_batrider"; 295 295 newscript->GetAI = GetAI_mob_batrider; 296 newscript->RegisterSelf();296 m_scripts[nrscripts++] = newscript; 297 297 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_jindo.cpp
r260 r272 259 259 newscript->Name="boss_jindo"; 260 260 newscript->GetAI = GetAI_boss_jindo; 261 newscript->RegisterSelf();261 m_scripts[nrscripts++] = newscript; 262 262 263 263 newscript = new Script; 264 264 newscript->Name="mob_healing_ward"; 265 265 newscript->GetAI = GetAI_mob_healing_ward; 266 newscript->RegisterSelf();266 m_scripts[nrscripts++] = newscript; 267 267 268 268 newscript = new Script; 269 269 newscript->Name="mob_shade_of_jindo"; 270 270 newscript->GetAI = GetAI_mob_shade_of_jindo; 271 newscript->RegisterSelf();272 } 271 m_scripts[nrscripts++] = newscript; 272 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_mandokir.cpp
r260 r272 303 303 newscript->Name="boss_mandokir"; 304 304 newscript->GetAI = GetAI_boss_mandokir; 305 newscript->RegisterSelf();305 m_scripts[nrscripts++] = newscript; 306 306 307 307 newscript = new Script; 308 308 newscript->Name="mob_ohgan"; 309 309 newscript->GetAI = GetAI_mob_ohgan; 310 newscript->RegisterSelf();310 m_scripts[nrscripts++] = newscript; 311 311 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_marli.cpp
r260 r272 245 245 newscript->Name="boss_marli"; 246 246 newscript->GetAI = GetAI_boss_marli; 247 newscript->RegisterSelf();247 m_scripts[nrscripts++] = newscript; 248 248 249 249 newscript = new Script; 250 250 newscript->Name="mob_spawn_of_marli"; 251 251 newscript->GetAI = GetAI_mob_spawn_of_marli; 252 newscript->RegisterSelf();252 m_scripts[nrscripts++] = newscript; 253 253 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_renataki.cpp
r260 r272 148 148 newscript->Name="boss_renataki"; 149 149 newscript->GetAI = GetAI_boss_renataki; 150 newscript->RegisterSelf();150 m_scripts[nrscripts++] = newscript; 151 151 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_thekal.cpp
r260 r272 532 532 newscript->Name="boss_thekal"; 533 533 newscript->GetAI = GetAI_boss_thekal; 534 newscript->RegisterSelf();534 m_scripts[nrscripts++] = newscript; 535 535 536 536 newscript = new Script; 537 537 newscript->Name="mob_zealot_lorkhan"; 538 538 newscript->GetAI = GetAI_mob_zealot_lorkhan; 539 newscript->RegisterSelf();539 m_scripts[nrscripts++] = newscript; 540 540 541 541 newscript = new Script; 542 542 newscript->Name="mob_zealot_zath"; 543 543 newscript->GetAI = GetAI_mob_zealot_zath; 544 newscript->RegisterSelf();544 m_scripts[nrscripts++] = newscript; 545 545 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_venoxis.cpp
r260 r272 197 197 newscript->Name="boss_venoxis"; 198 198 newscript->GetAI = GetAI_boss_venoxis; 199 newscript->RegisterSelf();199 m_scripts[nrscripts++] = newscript; 200 200 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_wushoolay.cpp
r260 r272 81 81 newscript->Name="boss_wushoolay"; 82 82 newscript->GetAI = GetAI_boss_wushoolay; 83 newscript->RegisterSelf();83 m_scripts[nrscripts++] = newscript; 84 84 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/instance_zulgurub.cpp
r260 r272 235 235 newscript->Name = "instance_zulgurub"; 236 236 newscript->GetInstanceData = GetInstanceData_instance_zulgurub; 237 newscript->RegisterSelf();237 m_scripts[nrscripts++] = newscript; 238 238 }