Changeset 279 for trunk/src/bindings/scripts
- Timestamp:
- 11/22/08 00:36:22 (17 years ago)
- Location:
- trunk/src/bindings/scripts
- Files:
-
- 306 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bindings/scripts/ScriptMgr.cpp
r272 r279 18 18 19 19 //*** Global data *** 20 int nrscripts; 20 int num_db_scripts; 21 int num_sc_scripts; 21 22 Script *m_scripts[MAX_SCRIPTS]; 22 23 … … 47 48 // Text Maps 48 49 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 rscripts;i++)1188 for(int i=0;i<num_db_scripts;i++) 1189 1189 delete m_scripts[i]; 1190 1190 1191 nrscripts = 0; 1191 num_db_scripts = 0; 1192 num_sc_scripts = 0; 1192 1193 } 1193 1194 … … 1240 1241 LoadDatabase(); 1241 1242 1243 num_db_scripts = GetScriptNames().size(); 1244 1242 1245 outstring_log("TSCR: Loading C++ scripts"); 1243 1246 barGoLink bar(1); … … 1245 1248 outstring_log(""); 1246 1249 1247 nrscripts = 0;1248 1250 for(int i=0;i<MAX_SCRIPTS;i++) 1249 1251 m_scripts[i]=NULL; … … 1776 1778 // ------------------- 1777 1779 1778 outstring_log("TSCR: Loaded %u C++ Scripts", nrscripts); 1779 outstring_log(""); 1780 outstring_log(">> Loaded %i C++ Scripts (of %i ScriptNames defined in Mangos database)", num_sc_scripts, num_db_scripts); 1780 1781 } 1781 1782 … … 1849 1850 //*** Functions used internally *** 1850 1851 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; 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()); 1868 1861 } 1869 1862 … … 1872 1865 1873 1866 TRINITY_DLL_EXPORT 1867 char const* ScriptsVersion() 1868 { 1869 return "Default Trinity scripting library"; 1870 } 1871 TRINITY_DLL_EXPORT 1874 1872 bool GossipHello ( Player * player, Creature *_Creature ) 1875 1873 { 1876 Script *tmpscript = GetScriptByName(_Creature->GetScriptName());1874 Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 1877 1875 if (!tmpscript || !tmpscript->pGossipHello) return false; 1878 1876 … … 1886 1884 debug_log("TSCR: Gossip selection, sender: %d, action: %d",sender, action); 1887 1885 1888 Script *tmpscript = GetScriptByName(_Creature->GetScriptName());1886 Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 1889 1887 if (!tmpscript || !tmpscript->pGossipSelect) return false; 1890 1888 … … 1898 1896 debug_log("TSCR: Gossip selection with code, sender: %d, action: %d",sender, action); 1899 1897 1900 Script *tmpscript = GetScriptByName(_Creature->GetScriptName());1898 Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 1901 1899 if (!tmpscript || !tmpscript->pGossipSelectWithCode) return false; 1902 1900 … … 1908 1906 bool QuestAccept( Player *player, Creature *_Creature, Quest const *_Quest ) 1909 1907 { 1910 Script *tmpscript = GetScriptByName(_Creature->GetScriptName());1908 Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 1911 1909 if (!tmpscript || !tmpscript->pQuestAccept) return false; 1912 1910 … … 1918 1916 bool QuestSelect( Player *player, Creature *_Creature, Quest const *_Quest ) 1919 1917 { 1920 Script *tmpscript = GetScriptByName(_Creature->GetScriptName());1918 Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 1921 1919 if (!tmpscript || !tmpscript->pQuestSelect) return false; 1922 1920 … … 1928 1926 bool QuestComplete( Player *player, Creature *_Creature, Quest const *_Quest ) 1929 1927 { 1930 Script *tmpscript = GetScriptByName(_Creature->GetScriptName());1928 Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 1931 1929 if (!tmpscript || !tmpscript->pQuestComplete) return false; 1932 1930 … … 1938 1936 bool ChooseReward( Player *player, Creature *_Creature, Quest const *_Quest, uint32 opt ) 1939 1937 { 1940 Script *tmpscript = GetScriptByName(_Creature->GetScriptName());1938 Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 1941 1939 if (!tmpscript || !tmpscript->pChooseReward) return false; 1942 1940 … … 1948 1946 uint32 NPCDialogStatus( Player *player, Creature *_Creature ) 1949 1947 { 1950 Script *tmpscript = GetScriptByName(_Creature->GetScriptName());1948 Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 1951 1949 if (!tmpscript || !tmpscript->pNPCDialogStatus) return 100; 1952 1950 … … 1958 1956 uint32 GODialogStatus( Player *player, GameObject *_GO ) 1959 1957 { 1960 Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName);1961 if (!tmpscript || !tmpscript->pGODialogStatus) return 100;1958 Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId]; 1959 if (!tmpscript || !tmpscript->pGODialogStatus) return 100; 1962 1960 1963 1961 player->PlayerTalkClass->ClearMenus(); … … 1968 1966 bool ItemHello( Player *player, Item *_Item, Quest const *_Quest ) 1969 1967 { 1970 Script *tmpscript = GetScriptByName(_Item->GetProto()->ScriptName);1968 Script *tmpscript = m_scripts[_Item->GetProto()->ScriptId]; 1971 1969 if (!tmpscript || !tmpscript->pItemHello) return false; 1972 1970 … … 1978 1976 bool ItemQuestAccept( Player *player, Item *_Item, Quest const *_Quest ) 1979 1977 { 1980 Script *tmpscript = GetScriptByName(_Item->GetProto()->ScriptName);1978 Script *tmpscript = m_scripts[_Item->GetProto()->ScriptId]; 1981 1979 if (!tmpscript || !tmpscript->pItemQuestAccept) return false; 1982 1980 … … 1988 1986 bool GOHello( Player *player, GameObject *_GO ) 1989 1987 { 1990 Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName);1988 Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId]; 1991 1989 if (!tmpscript || !tmpscript->pGOHello) return false; 1992 1990 … … 1998 1996 bool GOQuestAccept( Player *player, GameObject *_GO, Quest const *_Quest ) 1999 1997 { 2000 Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName);1998 Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId]; 2001 1999 if (!tmpscript || !tmpscript->pGOQuestAccept) return false; 2002 2000 … … 2008 2006 bool GOChooseReward( Player *player, GameObject *_GO, Quest const *_Quest, uint32 opt ) 2009 2007 { 2010 Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName);2008 Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId]; 2011 2009 if (!tmpscript || !tmpscript->pGOChooseReward) return false; 2012 2010 … … 2018 2016 bool AreaTrigger( Player *player, AreaTriggerEntry * atEntry) 2019 2017 { 2020 Script *tmpscript = NULL; 2021 2022 tmpscript = GetScriptByName(GetAreaTriggerScriptNameById(atEntry->id)); 2018 Script *tmpscript = m_scripts[GetAreaTriggerScriptId(atEntry->id)]; 2023 2019 if (!tmpscript || !tmpscript->pAreaTrigger) return false; 2024 2020 … … 2029 2025 CreatureAI* GetAI(Creature *_Creature) 2030 2026 { 2031 Script *tmpscript = GetScriptByName(_Creature->GetScriptName()); 2032 2027 Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 2033 2028 if (!tmpscript || !tmpscript->GetAI) return NULL; 2029 2034 2030 return tmpscript->GetAI(_Creature); 2035 2031 } … … 2038 2034 bool ItemUse( Player *player, Item* _Item, SpellCastTargets const& targets) 2039 2035 { 2040 Script *tmpscript = GetScriptByName(_Item->GetProto()->ScriptName);2036 Script *tmpscript = m_scripts[_Item->GetProto()->ScriptId]; 2041 2037 if (!tmpscript || !tmpscript->pItemUse) return false; 2042 2038 … … 2047 2043 bool ReceiveEmote( Player *player, Creature *_Creature, uint32 emote ) 2048 2044 { 2049 Script *tmpscript = GetScriptByName(_Creature->GetScriptName());2045 Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 2050 2046 if (!tmpscript || !tmpscript->pReceiveEmote) return false; 2051 2047 … … 2056 2052 InstanceData* CreateInstanceData(Map *map) 2057 2053 { 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; 2054 if (!map->IsDungeon()) return NULL; 2055 2056 Script *tmpscript = m_scripts[((InstanceMap*)map)->GetScriptId()]; 2057 if (!tmpscript || !tmpscript->GetInstanceData) return NULL; 2064 2058 2065 2059 return tmpscript->GetInstanceData(map); -
trunk/src/bindings/scripts/ScriptMgr.h
r272 r279 25 25 class WorldObject; 26 26 27 #define MAX_SCRIPTS 1000 //72 bytes each (approx 71kb)27 #define MAX_SCRIPTS 5000 //72 bytes each (approx 351kb) 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 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 {}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 std::string Name;40 std::string Name; 41 41 42 // Quest/gossipMethods to be scripted43 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& );42 //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*, 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*, 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 64 void RegisterSelf(); 63 65 }; 64 65 extern int nrscripts;66 extern Script *m_scripts[MAX_SCRIPTS];67 66 68 67 //Generic scripting text function -
trunk/src/bindings/scripts/include/sc_creature.cpp
r272 r279 74 74 void ScriptedAI::MoveInLineOfSight(Unit *who) 75 75 { 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); 76 if(!m_creature->getVictim() && m_creature->canStartAttack(who)) 87 77 AttackStart(who); 88 78 } … … 680 670 } 681 671 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 } 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); 689 677 } 690 678 … … 721 709 ((Player*)pUnit)->TeleportTo(pUnit->GetMapId(), x, y, z, o, TELE_TO_NOT_LEAVE_COMBAT); 722 710 } 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 723 725 724 726 Unit* ScriptedAI::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff) -
trunk/src/bindings/scripts/include/sc_creature.h
r272 r279 147 147 //Teleports a player without dropping threat (only teleports to same map) 148 148 void DoTeleportPlayer(Unit* pUnit, float x, float y, float z, float o); 149 void DoTeleportAll(float x, float y, float z, float o); 149 150 150 151 //Returns friendly unit with the most amount of hp missing from max hp -
trunk/src/bindings/scripts/scripts/areatrigger/areatrigger_scripts.cpp
r272 r279 41 41 newscript->Name="at_test"; 42 42 newscript->pAreaTrigger = ATtest; 43 m_scripts[nrscripts++] = newscript;43 newscript->RegisterSelf(); 44 44 } -
trunk/src/bindings/scripts/scripts/boss/boss_emeriss.cpp
r272 r279 153 153 newscript->Name="boss_emeriss"; 154 154 newscript->GetAI = GetAI_boss_emeriss; 155 m_scripts[nrscripts++] = newscript;155 newscript->RegisterSelf(); 156 156 } -
trunk/src/bindings/scripts/scripts/boss/boss_taerar.cpp
r272 r279 298 298 newscript->Name="boss_taerar"; 299 299 newscript->GetAI = GetAI_boss_taerar; 300 m_scripts[nrscripts++] = newscript;300 newscript->RegisterSelf(); 301 301 302 302 newscript = new Script; 303 303 newscript->Name="boss_shade_of_taerar"; 304 304 newscript->GetAI = GetAI_boss_shadeoftaerar; 305 m_scripts[nrscripts++] = newscript;305 newscript->RegisterSelf(); 306 306 } -
trunk/src/bindings/scripts/scripts/boss/boss_ysondre.cpp
r272 r279 238 238 newscript->Name="boss_ysondre"; 239 239 newscript->GetAI = GetAI_boss_ysondre; 240 m_scripts[nrscripts++] = newscript;240 newscript->RegisterSelf(); 241 241 242 242 newscript = new Script; 243 243 newscript->Name="mob_dementeddruids"; 244 244 newscript->GetAI = GetAI_mob_dementeddruids; 245 m_scripts[nrscripts++] = newscript;245 newscript->RegisterSelf(); 246 246 } -
trunk/src/bindings/scripts/scripts/creature/mob_event_ai.cpp
r272 r279 1401 1401 newscript->Name="mob_eventai"; 1402 1402 newscript->GetAI = GetAI_Mob_EventAI; 1403 m_scripts[nrscripts++] = newscript;1403 newscript->RegisterSelf(); 1404 1404 } -
trunk/src/bindings/scripts/scripts/creature/mob_generic_creature.cpp
r272 r279 169 169 newscript->Name="generic_creature"; 170 170 newscript->GetAI = GetAI_generic_creature; 171 m_scripts[nrscripts++] = newscript;171 newscript->RegisterSelf(); 172 172 } -
trunk/src/bindings/scripts/scripts/custom/custom_example.cpp
r272 r279 274 274 newscript->pGossipSelect = &GossipSelect_custom_example; 275 275 newscript->pReceiveEmote = &ReceiveEmote_custom_example; 276 m_scripts[nrscripts++] = newscript;277 } 276 newscript->RegisterSelf(); 277 } -
trunk/src/bindings/scripts/scripts/custom/custom_gossip_codebox.cpp
r272 r279 78 78 newscript->pGossipSelect = &GossipSelect_custom_gossip_codebox; 79 79 newscript->pGossipSelectWithCode = &GossipSelectWithCode_custom_gossip_codebox; 80 m_scripts[nrscripts++] = newscript;80 newscript->RegisterSelf(); 81 81 } -
trunk/src/bindings/scripts/scripts/custom/test.cpp
r272 r279 197 197 newscript->pGossipHello = &GossipHello_npc_test; 198 198 newscript->pGossipSelect = &GossipSelect_npc_test; 199 m_scripts[nrscripts++] = newscript;200 } 199 newscript->RegisterSelf(); 200 } -
trunk/src/bindings/scripts/scripts/go/go_scripts.cpp
r272 r279 166 166 newscript->Name="go_northern_crystal_pylon"; 167 167 newscript->pGOHello = &GOHello_go_northern_crystal_pylon; 168 m_scripts[nrscripts++] = newscript;168 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;173 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;178 newscript->RegisterSelf(); 179 179 180 180 newscript = new Script; 181 181 newscript->Name="go_barov_journal"; 182 182 newscript->pGOHello = &GOHello_go_barov_journal; 183 m_scripts[nrscripts++] = newscript;183 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;188 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;193 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;198 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;203 newscript->RegisterSelf(); 204 204 205 205 newscript = new Script; 206 206 newscript->Name="go_teleporter"; 207 207 newscript->pGOHello = &GOHello_go_teleporter; 208 m_scripts[nrscripts++] = newscript;209 } 208 newscript->RegisterSelf(); 209 } -
trunk/src/bindings/scripts/scripts/guard/guards.cpp
r272 r279 3981 3981 newscript->pGossipSelect = &GossipSelect_guard_azuremyst; 3982 3982 newscript->GetAI = GetAI_guard_azuremyst; 3983 m_scripts[nrscripts++] = newscript;3983 newscript->RegisterSelf(); 3984 3984 3985 3985 newscript = new Script; … … 3988 3988 newscript->pGossipSelect = &GossipSelect_guard_bluffwatcher; 3989 3989 newscript->GetAI = GetAI_guard_bluffwatcher; 3990 m_scripts[nrscripts++] = newscript;3990 newscript->RegisterSelf(); 3991 3991 3992 3992 newscript = new Script; 3993 3993 newscript->Name="guard_contested"; 3994 3994 newscript->GetAI = GetAI_guard_contested; 3995 m_scripts[nrscripts++] = newscript;3995 newscript->RegisterSelf(); 3996 3996 3997 3997 newscript = new Script; … … 4000 4000 newscript->pGossipSelect = &GossipSelect_guard_darnassus; 4001 4001 newscript->GetAI = GetAI_guard_darnassus; 4002 m_scripts[nrscripts++] = newscript;4002 newscript->RegisterSelf(); 4003 4003 4004 4004 newscript = new Script; … … 4007 4007 newscript->pGossipSelect = &GossipSelect_guard_dunmorogh; 4008 4008 newscript->GetAI = GetAI_guard_dunmorogh; 4009 m_scripts[nrscripts++] = newscript;4009 newscript->RegisterSelf(); 4010 4010 4011 4011 newscript = new Script; … … 4014 4014 newscript->pGossipSelect = &GossipSelect_guard_durotar; 4015 4015 newscript->GetAI = GetAI_guard_durotar; 4016 m_scripts[nrscripts++] = newscript;4016 newscript->RegisterSelf(); 4017 4017 4018 4018 newscript = new Script; … … 4021 4021 newscript->pGossipSelect = &GossipSelect_guard_elwynnforest; 4022 4022 newscript->GetAI = GetAI_guard_elwynnforest; 4023 m_scripts[nrscripts++] = newscript;4023 newscript->RegisterSelf(); 4024 4024 4025 4025 newscript = new Script; … … 4028 4028 newscript->pGossipSelect = &GossipSelect_guard_eversong; 4029 4029 newscript->GetAI = GetAI_guard_eversong; 4030 m_scripts[nrscripts++] = newscript;4030 newscript->RegisterSelf(); 4031 4031 4032 4032 newscript = new Script; … … 4035 4035 newscript->pGossipSelect = &GossipSelect_guard_exodar; 4036 4036 newscript->GetAI = GetAI_guard_exodar; 4037 m_scripts[nrscripts++] = newscript;4037 newscript->RegisterSelf(); 4038 4038 4039 4039 newscript = new Script; … … 4042 4042 newscript->pGossipSelect = &GossipSelect_guard_ironforge; 4043 4043 newscript->GetAI = GetAI_guard_ironforge; 4044 m_scripts[nrscripts++] = newscript;4044 newscript->RegisterSelf(); 4045 4045 4046 4046 newscript = new Script; … … 4049 4049 newscript->pGossipSelect = &GossipSelect_guard_mulgore; 4050 4050 newscript->GetAI = GetAI_guard_mulgore; 4051 m_scripts[nrscripts++] = newscript;4051 newscript->RegisterSelf(); 4052 4052 4053 4053 newscript = new Script; … … 4057 4057 newscript->pReceiveEmote = &ReceiveEmote_guard_orgrimmar; 4058 4058 newscript->GetAI = GetAI_guard_orgrimmar; 4059 m_scripts[nrscripts++] = newscript;4059 newscript->RegisterSelf(); 4060 4060 4061 4061 newscript = new Script; … … 4064 4064 newscript->pGossipSelect = &GossipSelect_guard_shattrath; 4065 4065 newscript->GetAI = GetAI_guard_shattrath; 4066 m_scripts[nrscripts++] = newscript;4066 newscript->RegisterSelf(); 4067 4067 4068 4068 newscript = new Script; … … 4071 4071 newscript->pGossipHello = &GossipHello_guard_shattrath_aldor; 4072 4072 newscript->pGossipSelect = &GossipSelect_guard_shattrath_aldor; 4073 m_scripts[nrscripts++] = newscript;4073 newscript->RegisterSelf(); 4074 4074 4075 4075 newscript = new Script; … … 4078 4078 newscript->pGossipHello = &GossipHello_guard_shattrath_scryer; 4079 4079 newscript->pGossipSelect = &GossipSelect_guard_shattrath_scryer; 4080 m_scripts[nrscripts++] = newscript;4080 newscript->RegisterSelf(); 4081 4081 4082 4082 newscript = new Script; … … 4085 4085 newscript->pGossipSelect = &GossipSelect_guard_silvermoon; 4086 4086 newscript->GetAI = GetAI_guard_silvermoon; 4087 m_scripts[nrscripts++] = newscript;4087 newscript->RegisterSelf(); 4088 4088 4089 4089 newscript = new Script; … … 4093 4093 newscript->pReceiveEmote = &ReceiveEmote_guard_stormwind; 4094 4094 newscript->GetAI = GetAI_guard_stormwind; 4095 m_scripts[nrscripts++] = newscript;4095 newscript->RegisterSelf(); 4096 4096 4097 4097 newscript = new Script; … … 4100 4100 newscript->pGossipSelect = &GossipSelect_guard_teldrassil; 4101 4101 newscript->GetAI = GetAI_guard_teldrassil; 4102 m_scripts[nrscripts++] = newscript;4102 newscript->RegisterSelf(); 4103 4103 4104 4104 newscript = new Script; … … 4107 4107 newscript->pGossipSelect = &GossipSelect_guard_tirisfal; 4108 4108 newscript->GetAI = GetAI_guard_tirisfal; 4109 m_scripts[nrscripts++] = newscript;4109 newscript->RegisterSelf(); 4110 4110 4111 4111 newscript = new Script; … … 4114 4114 newscript->pGossipSelect = &GossipSelect_guard_undercity; 4115 4115 newscript->GetAI = GetAI_guard_undercity; 4116 m_scripts[nrscripts++] = newscript;4117 } 4116 newscript->RegisterSelf(); 4117 } -
trunk/src/bindings/scripts/scripts/item/item_scripts.cpp
r272 r279 456 456 newscript->Name="item_area_52_special"; 457 457 newscript->pItemUse = ItemUse_item_area_52_special; 458 m_scripts[nrscripts++] = newscript;458 newscript->RegisterSelf(); 459 459 460 460 newscript = new Script; 461 461 newscript->Name="item_arcane_charges"; 462 462 newscript->pItemUse = ItemUse_item_arcane_charges; 463 m_scripts[nrscripts++] = newscript;463 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;468 newscript->RegisterSelf(); 469 469 470 470 newscript = new Script; 471 471 newscript->Name="item_blackwhelp_net"; 472 472 newscript->pItemUse = ItemUse_item_blackwhelp_net; 473 m_scripts[nrscripts++] = newscript;473 newscript->RegisterSelf(); 474 474 475 475 newscript = new Script; 476 476 newscript->Name="item_disciplinary_rod"; 477 477 newscript->pItemUse = ItemUse_item_disciplinary_rod; 478 m_scripts[nrscripts++] = newscript;478 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;483 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;488 newscript->RegisterSelf(); 489 489 490 490 newscript = new Script; 491 491 newscript->Name="item_flying_machine"; 492 492 newscript->pItemUse = ItemUse_item_flying_machine; 493 m_scripts[nrscripts++] = newscript;493 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;498 newscript->RegisterSelf(); 499 499 500 500 newscript = new Script; 501 501 newscript->Name="item_muiseks_vessel"; 502 502 newscript->pItemUse = ItemUse_item_muiseks_vessel; 503 m_scripts[nrscripts++] = newscript;503 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;508 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;513 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;518 newscript->RegisterSelf(); 519 519 520 520 newscript = new Script; 521 521 newscript->Name="item_soul_cannon"; 522 522 newscript->pItemUse = ItemUse_item_soul_cannon; 523 m_scripts[nrscripts++] = newscript;523 newscript->RegisterSelf(); 524 524 525 525 newscript = new Script; 526 526 newscript->Name="item_sparrowhawk_net"; 527 527 newscript->pItemUse = ItemUse_item_sparrowhawk_net; 528 m_scripts[nrscripts++] = newscript;528 newscript->RegisterSelf(); 529 529 530 530 newscript = new Script; 531 531 newscript->Name="item_voodoo_charm"; 532 532 newscript->pItemUse = ItemUse_item_voodoo_charm; 533 m_scripts[nrscripts++] = newscript;533 newscript->RegisterSelf(); 534 534 535 535 newscript = new Script; 536 536 newscript->Name="item_vorenthals_presence"; 537 537 newscript->pItemUse = ItemUse_item_vorenthals_presence; 538 m_scripts[nrscripts++] = newscript;538 newscript->RegisterSelf(); 539 539 540 540 newscript = new Script; 541 541 newscript->Name="item_yehkinyas_bramble"; 542 542 newscript->pItemUse = ItemUse_item_yehkinyas_bramble; 543 m_scripts[nrscripts++] = newscript;543 newscript->RegisterSelf(); 544 544 545 545 newscript = new Script; 546 546 newscript->Name="item_zezzaks_shard"; 547 547 newscript->pItemUse = ItemUse_item_zezzak_shard; 548 m_scripts[nrscripts++] = newscript;549 } 548 newscript->RegisterSelf(); 549 } -
trunk/src/bindings/scripts/scripts/item/item_test.cpp
r272 r279 39 39 newscript->Name="item_test"; 40 40 newscript->pItemUse = ItemUse_item_test; 41 m_scripts[nrscripts++] = newscript;41 newscript->RegisterSelf(); 42 42 } -
trunk/src/bindings/scripts/scripts/npc/npc_innkeeper.cpp
r272 r279 141 141 newscript->pGossipHello = &GossipHello_npc_innkeeper; 142 142 newscript->pGossipSelect = &GossipSelect_npc_innkeeper; 143 m_scripts[nrscripts++] = newscript;143 newscript->RegisterSelf(); 144 144 } -
trunk/src/bindings/scripts/scripts/npc/npc_professions.cpp
r272 r279 1178 1178 newscript->pGossipHello = &GossipHello_npc_prof_alchemy; 1179 1179 newscript->pGossipSelect = &GossipSelect_npc_prof_alchemy; 1180 m_scripts[nrscripts++] = newscript;1180 newscript->RegisterSelf(); 1181 1181 1182 1182 newscript = new Script; … … 1184 1184 newscript->pGossipHello = &GossipHello_npc_prof_blacksmith; 1185 1185 newscript->pGossipSelect = &GossipSelect_npc_prof_blacksmith; 1186 m_scripts[nrscripts++] = newscript;1186 newscript->RegisterSelf(); 1187 1187 1188 1188 newscript = new Script; … … 1190 1190 newscript->pGossipHello = &GossipHello_npc_prof_leather; 1191 1191 newscript->pGossipSelect = &GossipSelect_npc_prof_leather; 1192 m_scripts[nrscripts++] = newscript;1192 newscript->RegisterSelf(); 1193 1193 1194 1194 newscript = new Script; … … 1196 1196 newscript->pGossipHello = &GossipHello_npc_prof_tailor; 1197 1197 newscript->pGossipSelect = &GossipSelect_npc_prof_tailor; 1198 m_scripts[nrscripts++] = newscript;1198 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;*/1205 } 1204 newscript->RegisterSelf();*/ 1205 } -
trunk/src/bindings/scripts/scripts/npc/npcs_special.cpp
r278 r279 893 893 newscript->pQuestAccept = &QuestAccept_npc_chicken_cluck; 894 894 newscript->pQuestComplete = &QuestComplete_npc_chicken_cluck; 895 m_scripts[nrscripts++] = newscript;895 newscript->RegisterSelf(); 896 896 897 897 newscript = new Script; 898 898 newscript->Name="npc_dancing_flames"; 899 899 newscript->pReceiveEmote = &ReceiveEmote_npc_dancing_flames; 900 m_scripts[nrscripts++] = newscript;900 newscript->RegisterSelf(); 901 901 902 902 newscript = new Script; 903 903 newscript->Name="npc_injured_patient"; 904 904 newscript->GetAI = GetAI_npc_injured_patient; 905 m_scripts[nrscripts++] = newscript;905 newscript->RegisterSelf(); 906 906 907 907 newscript = new Script; … … 909 909 newscript->GetAI = GetAI_npc_doctor; 910 910 newscript->pQuestAccept = &QuestAccept_npc_doctor; 911 m_scripts[nrscripts++] = newscript;911 newscript->RegisterSelf(); 912 912 913 913 newscript = new Script; 914 914 newscript->Name="npc_guardian"; 915 915 newscript->GetAI = GetAI_npc_guardian; 916 m_scripts[nrscripts++] = newscript;916 newscript->RegisterSelf(); 917 917 918 918 newscript = new Script; … … 920 920 newscript->pGossipHello = &GossipHello_npc_mount_vendor; 921 921 newscript->pGossipSelect = &GossipSelect_npc_mount_vendor; 922 m_scripts[nrscripts++] = newscript;922 newscript->RegisterSelf(); 923 923 924 924 newscript = new Script; … … 926 926 newscript->pGossipHello = &GossipHello_npc_rogue_trainer; 927 927 newscript->pGossipSelect = &GossipSelect_npc_rogue_trainer; 928 m_scripts[nrscripts++] = newscript;928 newscript->RegisterSelf(); 929 929 930 930 newscript = new Script; … … 932 932 newscript->pGossipHello = &GossipHello_npc_sayge; 933 933 newscript->pGossipSelect = &GossipSelect_npc_sayge; 934 m_scripts[nrscripts++] = newscript;934 newscript->RegisterSelf(); 935 935 936 936 newscript = new Script; 937 937 newscript->Name="npc_steam_tonk"; 938 938 newscript->GetAI = &GetAI_npc_steam_tonk; 939 m_scripts[nrscripts++] = newscript;939 newscript->RegisterSelf(); 940 940 941 941 newscript = new Script; 942 942 newscript->Name="npc_tonk_mine"; 943 943 newscript->GetAI = &GetAI_npc_tonk_mine; 944 m_scripts[nrscripts++] = newscript;945 } 944 newscript->RegisterSelf(); 945 } -
trunk/src/bindings/scripts/scripts/zone/alterac_mountains/alterac_mountains.cpp
r272 r279 59 59 newscript->Name="npc_ravenholdt"; 60 60 newscript->GetAI = GetAI_npc_ravenholdt; 61 m_scripts[nrscripts++] = newscript;61 newscript->RegisterSelf(); 62 62 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp
r272 r279 349 349 newscript->Name="boss_exarch_maladaar"; 350 350 newscript->GetAI = GetAI_boss_exarch_maladaar; 351 m_scripts[nrscripts++] = newscript;351 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;356 newscript->RegisterSelf(); 357 357 358 358 newscript = new Script; 359 359 newscript->Name="mob_stolen_soul"; 360 360 newscript->GetAI = GetAI_mob_stolen_soul; 361 m_scripts[nrscripts++] = newscript;361 newscript->RegisterSelf(); 362 362 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp
r272 r279 272 272 newscript->Name="boss_nexusprince_shaffar"; 273 273 newscript->GetAI = GetAI_boss_nexusprince_shaffar; 274 m_scripts[nrscripts++] = newscript;274 newscript->RegisterSelf(); 275 275 276 276 newscript = new Script; 277 277 newscript->Name="mob_ethereal_beacon"; 278 278 newscript->GetAI = GetAI_mob_ethereal_beacon; 279 m_scripts[nrscripts++] = newscript;279 newscript->RegisterSelf(); 280 280 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_pandemonius.cpp
r272 r279 135 135 newscript->Name="boss_pandemonius"; 136 136 newscript->GetAI = GetAI_boss_pandemonius; 137 m_scripts[nrscripts++] = newscript;137 newscript->RegisterSelf(); 138 138 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_darkweaver_syth.cpp
r272 r279 393 393 newscript->Name="boss_darkweaver_syth"; 394 394 newscript->GetAI = GetAI_boss_darkweaver_syth; 395 m_scripts[nrscripts++] = newscript;395 newscript->RegisterSelf(); 396 396 397 397 newscript = new Script; 398 398 newscript->Name="mob_syth_fire"; 399 399 newscript->GetAI = GetAI_mob_syth_arcane; 400 m_scripts[nrscripts++] = newscript;400 newscript->RegisterSelf(); 401 401 402 402 newscript = new Script; 403 403 newscript->Name="mob_syth_arcane"; 404 404 newscript->GetAI = GetAI_mob_syth_arcane; 405 m_scripts[nrscripts++] = newscript;405 newscript->RegisterSelf(); 406 406 407 407 newscript = new Script; 408 408 newscript->Name="mob_syth_frost"; 409 409 newscript->GetAI = GetAI_mob_syth_frost; 410 m_scripts[nrscripts++] = newscript;410 newscript->RegisterSelf(); 411 411 412 412 newscript = new Script; 413 413 newscript->Name="mob_syth_shadow"; 414 414 newscript->GetAI = GetAI_mob_syth_shadow; 415 m_scripts[nrscripts++] = newscript;416 } 415 newscript->RegisterSelf(); 416 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_tailonking_ikiss.cpp
r272 r279 220 220 newscript->Name="boss_talon_king_ikiss"; 221 221 newscript->GetAI = GetAI_boss_talon_king_ikiss; 222 m_scripts[nrscripts++] = newscript;222 newscript->RegisterSelf(); 223 223 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/instance_sethekk_halls.cpp
r272 r279 71 71 newscript->Name = "instance_sethekk_halls"; 72 72 newscript->GetInstanceData = GetInstanceData_instance_sethekk_halls; 73 m_scripts[nrscripts++] = newscript;73 newscript->RegisterSelf(); 74 74 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp
r272 r279 195 195 newscript->Name="boss_ambassador_hellmaw"; 196 196 newscript->GetAI = GetAI_boss_ambassador_hellmaw; 197 m_scripts[nrscripts++] = newscript;197 newscript->RegisterSelf(); 198 198 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp
r272 r279 174 174 newscript->Name="boss_blackheart_the_inciter"; 175 175 newscript->GetAI = GetAI_boss_blackheart_the_inciter; 176 m_scripts[nrscripts++] = newscript;176 newscript->RegisterSelf(); 177 177 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp
r272 r279 221 221 if ( DrawnShadows_Timer < diff) 222 222 { 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 } 223 DoTeleportAll(VorpilPosition[0][0],VorpilPosition[0][1],VorpilPosition[0][2],0); 235 224 m_creature->Relocate(VorpilPosition[0][0],VorpilPosition[0][1],VorpilPosition[0][2],0); 236 225 DoCast(m_creature,SPELL_DRAWN_SHADOWS,true); … … 375 364 newscript->Name="boss_grandmaster_vorpil"; 376 365 newscript->GetAI = GetAI_boss_grandmaster_vorpil; 377 m_scripts[nrscripts++] = newscript;366 newscript->RegisterSelf(); 378 367 379 368 newscript = new Script; 380 369 newscript->Name="mob_voidtraveler"; 381 370 newscript->GetAI = GetAI_mob_voidtraveler; 382 m_scripts[nrscripts++] = newscript;371 newscript->RegisterSelf(); 383 372 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_murmur.cpp
r272 r279 149 149 newscript->Name="boss_murmur"; 150 150 newscript->GetAI = GetAI_boss_murmur; 151 m_scripts[nrscripts++] = newscript;151 newscript->RegisterSelf(); 152 152 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp
r272 r279 175 175 newscript->Name = "instance_shadow_labyrinth"; 176 176 newscript->GetInstanceData = GetInstanceData_instance_shadow_labyrinth; 177 m_scripts[nrscripts++] = newscript;177 newscript->RegisterSelf(); 178 178 } -
trunk/src/bindings/scripts/scripts/zone/azshara/azshara.cpp
r272 r279 493 493 newscript->Name="mobs_spitelashes"; 494 494 newscript->GetAI = GetAI_mobs_spitelashes; 495 m_scripts[nrscripts++] = newscript;495 newscript->RegisterSelf(); 496 496 497 497 newscript = new Script; … … 499 499 newscript->pGossipHello = &GossipHello_npc_loramus_thalipedes; 500 500 newscript->pGossipSelect = &GossipSelect_npc_loramus_thalipedes; 501 m_scripts[nrscripts++] = newscript;501 newscript->RegisterSelf(); 502 502 503 503 newscript = new Script; … … 506 506 newscript->pGossipHello = &GossipHello_mob_rizzle_sprysprocket; 507 507 newscript->pGossipSelect = &GossipSelect_mob_rizzle_sprysprocket; 508 m_scripts[nrscripts++] = newscript;508 newscript->RegisterSelf(); 509 509 510 510 newscript = new Script; 511 511 newscript->Name="mob_depth_charge"; 512 512 newscript->GetAI = GetAI_mob_depth_charge; 513 m_scripts[nrscripts++] = newscript;514 } 513 newscript->RegisterSelf(); 514 } -
trunk/src/bindings/scripts/scripts/zone/azshara/boss_azuregos.cpp
r272 r279 150 150 newscript->Name="boss_azuregos"; 151 151 newscript->GetAI = GetAI_boss_azuregos; 152 m_scripts[nrscripts++] = newscript;152 newscript->RegisterSelf(); 153 153 } -
trunk/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp
r272 r279 351 351 newscript->Name="npc_draenei_survivor"; 352 352 newscript->GetAI = GetAI_npc_draenei_survivor; 353 m_scripts[nrscripts++] = newscript;353 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;360 newscript->RegisterSelf(); 361 361 362 362 newscript = new Script; 363 363 newscript->Name="npc_injured_draenei"; 364 364 newscript->GetAI = GetAI_npc_injured_draenei; 365 m_scripts[nrscripts++] = newscript;365 newscript->RegisterSelf(); 366 366 367 367 newscript = new Script; … … 369 369 newscript->pGossipHello = &GossipHello_npc_susurrus; 370 370 newscript->pGossipSelect = &GossipSelect_npc_susurrus; 371 m_scripts[nrscripts++] = newscript;372 } 371 newscript->RegisterSelf(); 372 } -
trunk/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp
r272 r279 370 370 newscript->pGossipHello = &GossipHello_npc_beaten_corpse; 371 371 newscript->pGossipSelect = &GossipSelect_npc_beaten_corpse; 372 m_scripts[nrscripts++] = newscript;372 newscript->RegisterSelf(); 373 373 374 374 newscript = new Script; … … 376 376 newscript->pGossipHello = &GossipHello_npc_sputtervalve; 377 377 newscript->pGossipSelect = &GossipSelect_npc_sputtervalve; 378 m_scripts[nrscripts++] = newscript;378 newscript->RegisterSelf(); 379 379 380 380 newscript = new Script; … … 382 382 newscript->GetAI = GetAI_npc_taskmaster_fizzule; 383 383 newscript->pReceiveEmote = &ReciveEmote_npc_taskmaster_fizzule; 384 m_scripts[nrscripts++] = newscript;384 newscript->RegisterSelf(); 385 385 386 386 newscript = new Script; 387 387 newscript->Name="npc_twiggy_flathead"; 388 388 newscript->GetAI = GetAI_npc_twiggy_flathead; 389 m_scripts[nrscripts++] = newscript;390 } 389 newscript->RegisterSelf(); 390 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/black_temple.cpp
r272 r279 65 65 newscript->pGossipHello = GossipHello_npc_spirit_of_olum; 66 66 newscript->pGossipSelect = GossipSelect_npc_spirit_of_olum; 67 m_scripts[nrscripts++] = newscript;67 newscript->RegisterSelf(); 68 68 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_bloodboil.cpp
r272 r279 362 362 newscript->Name="boss_gurtogg_bloodboil"; 363 363 newscript->GetAI = GetAI_boss_gurtogg_bloodboil; 364 m_scripts[nrscripts++] = newscript;364 newscript->RegisterSelf(); 365 365 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp
r272 r279 2248 2248 newscript->Name = "boss_illidan_stormrage"; 2249 2249 newscript->GetAI = GetAI_boss_illidan_stormrage; 2250 m_scripts[nrscripts++] = newscript;2250 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;2257 newscript->RegisterSelf(); 2258 2258 2259 2259 newscript = new Script; 2260 2260 newscript->Name = "boss_maiev_shadowsong"; 2261 2261 newscript->GetAI = GetAI_boss_maiev; 2262 m_scripts[nrscripts++] = newscript;2262 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;2267 newscript->RegisterSelf(); 2268 2268 2269 2269 newscript = new Script; 2270 2270 newscript->Name = "mob_blade_of_azzinoth"; 2271 2271 newscript->GetAI = GetAI_blade_of_azzinoth; 2272 m_scripts[nrscripts++] = newscript;2272 newscript->RegisterSelf(); 2273 2273 2274 2274 newscript = new Script; 2275 2275 newscript->Name = "gameobject_cage_trap"; 2276 2276 newscript->pGOHello = GOHello_cage_trap; 2277 m_scripts[nrscripts++] = newscript;2277 newscript->RegisterSelf(); 2278 2278 2279 2279 newscript = new Script; 2280 2280 newscript->Name="mob_cage_trap_trigger"; 2281 2281 newscript->GetAI = &GetAI_cage_trap_trigger; 2282 m_scripts[nrscripts++] = newscript;2282 newscript->RegisterSelf(); 2283 2283 2284 2284 newscript = new Script; 2285 2285 newscript->Name = "mob_shadow_demon"; 2286 2286 newscript->GetAI = GetAI_shadow_demon; 2287 m_scripts[nrscripts++] = newscript;2287 newscript->RegisterSelf(); 2288 2288 2289 2289 newscript = new Script; 2290 2290 newscript->Name="mob_demon_fire"; 2291 2291 newscript->GetAI = GetAI_demonfire; 2292 m_scripts[nrscripts++] = newscript;2292 newscript->RegisterSelf(); 2293 2293 2294 2294 newscript = new Script; 2295 2295 newscript->Name = "mob_parasitic_shadowfiend"; 2296 2296 newscript->GetAI = GetAI_parasitic_shadowfiend; 2297 m_scripts[nrscripts++] = newscript;2297 newscript->RegisterSelf(); 2298 2298 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_mother_shahraz.cpp
r272 r279 358 358 newscript->Name="boss_mother_shahraz"; 359 359 newscript->GetAI = GetAI_boss_shahraz; 360 m_scripts[nrscripts++] = newscript;360 newscript->RegisterSelf(); 361 361 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_reliquary_of_souls.cpp
r272 r279 724 724 newscript->Name="boss_reliquary_of_souls"; 725 725 newscript->GetAI = GetAI_boss_reliquary_of_souls; 726 m_scripts[nrscripts++] = newscript;726 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;731 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;736 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;741 newscript->RegisterSelf(); 742 742 743 743 newscript = new Script; 744 744 newscript->Name="npc_enslaved_soul"; 745 745 newscript->GetAI = GetAI_npc_enslaved_soul; 746 m_scripts[nrscripts++] = newscript;746 newscript->RegisterSelf(); 747 747 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_shade_of_akama.cpp
r272 r279 797 797 newscript->Name="boss_shade_of_akama"; 798 798 newscript->GetAI = GetAI_boss_shade_of_akama; 799 m_scripts[nrscripts++] = newscript;799 newscript->RegisterSelf(); 800 800 801 801 newscript = new Script; 802 802 newscript->Name="mob_ashtongue_channeler"; 803 803 newscript->GetAI = GetAI_mob_ashtongue_channeler; 804 m_scripts[nrscripts++] = newscript;804 newscript->RegisterSelf(); 805 805 806 806 newscript = new Script; 807 807 newscript->Name="mob_ashtongue_sorcerer"; 808 808 newscript->GetAI = GetAI_mob_ashtongue_sorcerer; 809 m_scripts[nrscripts++] = newscript;809 newscript->RegisterSelf(); 810 810 811 811 newscript = new Script; … … 814 814 newscript->pGossipHello = &GossipHello_npc_akama; 815 815 newscript->pGossipSelect = &GossipSelect_npc_akama; 816 m_scripts[nrscripts++] = newscript;816 newscript->RegisterSelf(); 817 817 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp
r272 r279 237 237 newscript->Name="boss_supremus"; 238 238 newscript->GetAI = GetAI_boss_supremus; 239 m_scripts[nrscripts++] = newscript;239 newscript->RegisterSelf(); 240 240 241 241 newscript = new Script; 242 242 newscript->Name="molten_flame"; 243 243 newscript->GetAI = GetAI_molten_flame; 244 m_scripts[nrscripts++] = newscript;244 newscript->RegisterSelf(); 245 245 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp
r272 r279 576 576 newscript->Name = "mob_doom_blossom"; 577 577 newscript->GetAI = GetAI_mob_doom_blossom; 578 m_scripts[nrscripts++] = newscript;578 newscript->RegisterSelf(); 579 579 580 580 newscript = new Script; 581 581 newscript->Name = "mob_shadowy_construct"; 582 582 newscript->GetAI = GetAI_mob_shadowy_construct; 583 m_scripts[nrscripts++] = newscript;583 newscript->RegisterSelf(); 584 584 585 585 newscript = new Script; 586 586 newscript->Name="boss_teron_gorefiend"; 587 587 newscript->GetAI = GetAI_boss_teron_gorefiend; 588 m_scripts[nrscripts++] = newscript;588 newscript->RegisterSelf(); 589 589 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_warlord_najentus.cpp
r272 r279 259 259 newscript->Name="boss_najentus"; 260 260 newscript->GetAI = GetAI_boss_najentus; 261 m_scripts[nrscripts++] = newscript;261 newscript->RegisterSelf(); 262 262 263 263 newscript = new Script; 264 264 newscript->Name = "go_najentus_spine"; 265 265 newscript->pGOHello = &GOHello_go_najentus_spine; 266 m_scripts[nrscripts++] = newscript;266 newscript->RegisterSelf(); 267 267 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/illidari_council.cpp
r272 r279 856 856 newscript->Name="mob_illidari_council"; 857 857 newscript->GetAI = GetAI_mob_illidari_council; 858 m_scripts[nrscripts++] = newscript;858 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;863 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;868 newscript->RegisterSelf(); 869 869 870 870 newscript = new Script; 871 871 newscript->Name="boss_lady_malande"; 872 872 newscript->GetAI = GetAI_boss_lady_malande; 873 m_scripts[nrscripts++] = newscript;873 newscript->RegisterSelf(); 874 874 875 875 newscript = new Script; 876 876 newscript->Name="boss_veras_darkshadow"; 877 877 newscript->GetAI = GetAI_boss_veras_darkshadow; 878 m_scripts[nrscripts++] = newscript;878 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;883 newscript->RegisterSelf(); 884 884 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/instance_black_temple.cpp
r272 r279 333 333 newscript->Name = "instance_black_temple"; 334 334 newscript->GetInstanceData = GetInstanceData_instance_black_temple; 335 m_scripts[nrscripts++] = newscript;335 newscript->RegisterSelf(); 336 336 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp
r272 r279 222 222 newscript->Name="phalanx"; 223 223 newscript->GetAI = GetAI_mob_phalanx; 224 m_scripts[nrscripts++] = newscript;224 newscript->RegisterSelf(); 225 225 226 226 newscript = new Script; … … 228 228 newscript->pGossipHello = &GossipHello_npc_kharan_mighthammer; 229 229 newscript->pGossipSelect = &GossipSelect_npc_kharan_mighthammer; 230 m_scripts[nrscripts++] = newscript;230 newscript->RegisterSelf(); 231 231 232 232 newscript = new Script; … … 234 234 newscript->pGossipHello = &GossipHello_npc_lokhtos_darkbargainer; 235 235 newscript->pGossipSelect = &GossipSelect_npc_lokhtos_darkbargainer; 236 m_scripts[nrscripts++] = newscript;237 } 236 newscript->RegisterSelf(); 237 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_ambassador_flamelash.cpp
r272 r279 103 103 newscript->Name="boss_ambassador_flamelash"; 104 104 newscript->GetAI = GetAI_boss_ambassador_flamelash; 105 m_scripts[nrscripts++] = newscript;105 newscript->RegisterSelf(); 106 106 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_angerrel.cpp
r272 r279 88 88 newscript->Name="boss_angerrel"; 89 89 newscript->GetAI = GetAI_boss_angerrel; 90 m_scripts[nrscripts++] = newscript;90 newscript->RegisterSelf(); 91 91 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_anubshiah.cpp
r272 r279 112 112 newscript->Name="boss_anubshiah"; 113 113 newscript->GetAI = GetAI_boss_anubshiah; 114 m_scripts[nrscripts++] = newscript;114 newscript->RegisterSelf(); 115 115 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_doomrel.cpp
r272 r279 136 136 newscript->Name="boss_doomrel"; 137 137 newscript->GetAI = GetAI_boss_doomrel; 138 m_scripts[nrscripts++] = newscript;138 newscript->RegisterSelf(); 139 139 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_doperel.cpp
r272 r279 88 88 newscript->Name="boss_doperel"; 89 89 newscript->GetAI = GetAI_boss_doperel; 90 m_scripts[nrscripts++] = newscript;90 newscript->RegisterSelf(); 91 91 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp
r272 r279 101 101 newscript->Name="boss_emperor_dagran_thaurissan"; 102 102 newscript->GetAI = GetAI_boss_draganthaurissan; 103 m_scripts[nrscripts++] = newscript;103 newscript->RegisterSelf(); 104 104 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_general_angerforge.cpp
r272 r279 164 164 newscript->Name="boss_general_angerforge"; 165 165 newscript->GetAI = GetAI_boss_general_angerforge; 166 m_scripts[nrscripts++] = newscript;166 newscript->RegisterSelf(); 167 167 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_gloomrel.cpp
r272 r279 139 139 newscript->pGossipHello = &GossipHello_boss_gloomrel; 140 140 newscript->pGossipSelect = &GossipSelect_boss_gloomrel; 141 m_scripts[nrscripts++] = newscript;141 newscript->RegisterSelf(); 142 142 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_gorosh_the_dervish.cpp
r272 r279 78 78 newscript->Name="boss_gorosh_the_dervish"; 79 79 newscript->GetAI = GetAI_boss_gorosh_the_dervish; 80 m_scripts[nrscripts++] = newscript;80 newscript->RegisterSelf(); 81 81 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_grizzle.cpp
r272 r279 83 83 newscript->Name="boss_grizzle"; 84 84 newscript->GetAI = GetAI_boss_grizzle; 85 m_scripts[nrscripts++] = newscript;85 newscript->RegisterSelf(); 86 86 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_haterel.cpp
r272 r279 102 102 newscript->Name="boss_haterel"; 103 103 newscript->GetAI = GetAI_boss_haterel; 104 m_scripts[nrscripts++] = newscript;104 newscript->RegisterSelf(); 105 105 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_high_interrogator_gerstahn.cpp
r272 r279 102 102 newscript->Name="boss_high_interrogator_gerstahn"; 103 103 newscript->GetAI = GetAI_boss_high_interrogator_gerstahn; 104 m_scripts[nrscripts++] = newscript;104 newscript->RegisterSelf(); 105 105 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_magmus.cpp
r272 r279 81 81 newscript->Name="boss_magmus"; 82 82 newscript->GetAI = GetAI_boss_magmus; 83 m_scripts[nrscripts++] = newscript;83 newscript->RegisterSelf(); 84 84 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_moira_bronzebeard.cpp
r272 r279 96 96 newscript->Name="boss_moira_bronzebeard"; 97 97 newscript->GetAI = GetAI_boss_moira_bronzebeard; 98 m_scripts[nrscripts++] = newscript;98 newscript->RegisterSelf(); 99 99 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_seethrel.cpp
r272 r279 112 112 newscript->Name="boss_seethrel"; 113 113 newscript->GetAI = GetAI_boss_seethrel; 114 m_scripts[nrscripts++] = newscript;114 newscript->RegisterSelf(); 115 115 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_vilerel.cpp
r272 r279 98 98 newscript->Name="boss_vilerel"; 99 99 newscript->GetAI = GetAI_boss_vilerel; 100 m_scripts[nrscripts++] = newscript;100 newscript->RegisterSelf(); 101 101 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_drakkisath.cpp
r272 r279 98 98 newscript->Name="boss_drakkisath"; 99 99 newscript->GetAI = GetAI_boss_drakkisath; 100 m_scripts[nrscripts++] = newscript;100 newscript->RegisterSelf(); 101 101 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_gyth.cpp
r272 r279 202 202 newscript->Name="boss_gyth"; 203 203 newscript->GetAI = GetAI_boss_gyth; 204 m_scripts[nrscripts++] = newscript;204 newscript->RegisterSelf(); 205 205 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_halycon.cpp
r272 r279 92 92 newscript->Name="boss_halycon"; 93 93 newscript->GetAI = GetAI_boss_halycon; 94 m_scripts[nrscripts++] = newscript;94 newscript->RegisterSelf(); 95 95 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_highlord_omokk.cpp
r272 r279 128 128 newscript->Name="boss_highlord_omokk"; 129 129 newscript->GetAI = GetAI_boss_highlordomokk; 130 m_scripts[nrscripts++] = newscript;130 newscript->RegisterSelf(); 131 131 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_mother_smolderweb.cpp
r272 r279 83 83 newscript->Name="boss_mother_smolderweb"; 84 84 newscript->GetAI = GetAI_boss_mothersmolderweb; 85 m_scripts[nrscripts++] = newscript;85 newscript->RegisterSelf(); 86 86 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_overlord_wyrmthalak.cpp
r272 r279 124 124 newscript->Name="boss_overlord_wyrmthalak"; 125 125 newscript->GetAI = GetAI_boss_overlordwyrmthalak; 126 m_scripts[nrscripts++] = newscript;126 newscript->RegisterSelf(); 127 127 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_pyroguard_emberseer.cpp
r272 r279 90 90 newscript->Name="boss_pyroguard_emberseer"; 91 91 newscript->GetAI = GetAI_boss_pyroguard_emberseer; 92 m_scripts[nrscripts++] = newscript;92 newscript->RegisterSelf(); 93 93 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_quartermaster_zigris.cpp
r272 r279 82 82 newscript->Name="quartermaster_zigris"; 83 83 newscript->GetAI = GetAI_boss_quatermasterzigris; 84 m_scripts[nrscripts++] = newscript;84 newscript->RegisterSelf(); 85 85 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_rend_blackhand.cpp
r272 r279 88 88 newscript->Name="boss_rend_blackhand"; 89 89 newscript->GetAI = GetAI_boss_rend_blackhand; 90 m_scripts[nrscripts++] = newscript;90 newscript->RegisterSelf(); 91 91 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_shadow_hunter_voshgajin.cpp
r272 r279 92 92 newscript->Name="boss_shadow_hunter_voshgajin"; 93 93 newscript->GetAI = GetAI_boss_shadowvosh; 94 m_scripts[nrscripts++] = newscript;94 newscript->RegisterSelf(); 95 95 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_the_beast.cpp
r272 r279 90 90 newscript->Name="boss_the_beast"; 91 91 newscript->GetAI = GetAI_boss_thebeast; 92 m_scripts[nrscripts++] = newscript;92 newscript->RegisterSelf(); 93 93 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_warmaster_voone.cpp
r272 r279 118 118 newscript->Name="boss_warmaster_voone"; 119 119 newscript->GetAI = GetAI_boss_warmastervoone; 120 m_scripts[nrscripts++] = newscript;120 newscript->RegisterSelf(); 121 121 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_broodlord_lashlayer.cpp
r272 r279 125 125 newscript->Name="boss_broodlord"; 126 126 newscript->GetAI = GetAI_boss_broodlord; 127 m_scripts[nrscripts++] = newscript;127 newscript->RegisterSelf(); 128 128 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_chromaggus.cpp
r272 r279 311 311 newscript->Name="boss_chromaggus"; 312 312 newscript->GetAI = GetAI_boss_chromaggus; 313 m_scripts[nrscripts++] = newscript;313 newscript->RegisterSelf(); 314 314 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_ebonroc.cpp
r272 r279 100 100 newscript->Name="boss_ebonroc"; 101 101 newscript->GetAI = GetAI_boss_ebonroc; 102 m_scripts[nrscripts++] = newscript;102 newscript->RegisterSelf(); 103 103 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_firemaw.cpp
r272 r279 91 91 newscript->Name="boss_firemaw"; 92 92 newscript->GetAI = GetAI_boss_firemaw; 93 m_scripts[nrscripts++] = newscript;93 newscript->RegisterSelf(); 94 94 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_flamegor.cpp
r272 r279 91 91 newscript->Name="boss_flamegor"; 92 92 newscript->GetAI = GetAI_boss_flamegor; 93 m_scripts[nrscripts++] = newscript;93 newscript->RegisterSelf(); 94 94 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_nefarian.cpp
r272 r279 224 224 newscript->Name="boss_nefarian"; 225 225 newscript->GetAI = GetAI_boss_nefarian; 226 m_scripts[nrscripts++] = newscript;226 newscript->RegisterSelf(); 227 227 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_razorgore.cpp
r272 r279 128 128 newscript->Name="boss_razorgore"; 129 129 newscript->GetAI = GetAI_boss_razorgore; 130 m_scripts[nrscripts++] = newscript;130 newscript->RegisterSelf(); 131 131 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_vaelastrasz.cpp
r272 r279 258 258 newscript->pGossipHello = &GossipHello_boss_vael; 259 259 newscript->pGossipSelect = &GossipSelect_boss_vael; 260 m_scripts[nrscripts++] = newscript;261 } 260 newscript->RegisterSelf(); 261 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_victor_nefarius.cpp
r272 r279 391 391 newscript->pGossipHello = &GossipHello_boss_victor_nefarius; 392 392 newscript->pGossipSelect = &GossipSelect_boss_victor_nefarius; 393 m_scripts[nrscripts++] = newscript;393 newscript->RegisterSelf(); 394 394 } -
trunk/src/bindings/scripts/scripts/zone/blades_edge_mountains/blades_edge_mountains.cpp
r272 r279 407 407 newscript->Name="mobs_bladespire_ogre"; 408 408 newscript->GetAI = GetAI_mobs_bladespire_ogre; 409 m_scripts[nrscripts++] = newscript;409 newscript->RegisterSelf(); 410 410 411 411 newscript = new Script; 412 412 newscript->Name="mobs_nether_drake"; 413 413 newscript->GetAI = GetAI_mobs_nether_drake; 414 m_scripts[nrscripts++] = newscript;414 newscript->RegisterSelf(); 415 415 416 416 newscript = new Script; 417 417 newscript->Name="npc_daranelle"; 418 418 newscript->GetAI = GetAI_npc_daranelle; 419 m_scripts[nrscripts++] = newscript;419 newscript->RegisterSelf(); 420 420 421 421 newscript = new Script; … … 423 423 newscript->pGossipHello = &GossipHello_npc_overseer_nuaar; 424 424 newscript->pGossipSelect = &GossipSelect_npc_overseer_nuaar; 425 m_scripts[nrscripts++] = newscript;425 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;431 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;438 } 437 newscript->RegisterSelf(); 438 } -
trunk/src/bindings/scripts/scripts/zone/blasted_lands/blasted_lands.cpp
r272 r279 150 150 newscript->pGossipHello = &GossipHello_npc_deathly_usher; 151 151 newscript->pGossipSelect = &GossipSelect_npc_deathly_usher; 152 m_scripts[nrscripts++] = newscript;152 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;158 newscript->RegisterSelf(); 159 159 } -
trunk/src/bindings/scripts/scripts/zone/blasted_lands/boss_kruul.cpp
r272 r279 179 179 newscript->Name="boss_kruul"; 180 180 newscript->GetAI = GetAI_boss_kruul; 181 m_scripts[nrscripts++] = newscript;181 newscript->RegisterSelf(); 182 182 } -
trunk/src/bindings/scripts/scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp
r272 r279 132 132 newscript->Name="mob_webbed_creature"; 133 133 newscript->GetAI = GetAI_mob_webbed_creature; 134 m_scripts[nrscripts++] = newscript;134 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;140 newscript->RegisterSelf(); 141 141 } -
trunk/src/bindings/scripts/scripts/zone/burning_steppes/burning_steppes.cpp
r272 r279 148 148 newscript->pGossipHello = &GossipHello_npc_ragged_john; 149 149 newscript->pGossipSelect = &GossipSelect_npc_ragged_john; 150 m_scripts[nrscripts++] = newscript;150 newscript->RegisterSelf(); 151 151 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_aeonus.cpp
r272 r279 118 118 newscript->Name="boss_aeonus"; 119 119 newscript->GetAI = GetAI_boss_aeonus; 120 m_scripts[nrscripts++] = newscript;120 newscript->RegisterSelf(); 121 121 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp
r272 r279 106 106 newscript->Name="boss_chrono_lord_deja"; 107 107 newscript->GetAI = GetAI_boss_chrono_lord_deja; 108 m_scripts[nrscripts++] = newscript;108 newscript->RegisterSelf(); 109 109 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_temporus.cpp
r272 r279 140 140 newscript->Name="boss_temporus"; 141 141 newscript->GetAI = GetAI_boss_temporus; 142 m_scripts[nrscripts++] = newscript;142 newscript->RegisterSelf(); 143 143 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_archimonde.cpp
r272 r279 770 770 newscript->Name="boss_archimonde"; 771 771 newscript->GetAI = GetAI_boss_archimonde; 772 m_scripts[nrscripts++] = newscript;772 newscript->RegisterSelf(); 773 773 774 774 newscript = new Script; 775 775 newscript->Name = "mob_doomfire"; 776 776 newscript->GetAI = GetAI_mob_doomfire; 777 m_scripts[nrscripts++] = newscript;777 newscript->RegisterSelf(); 778 778 779 779 newscript = new Script; 780 780 newscript->Name = "mob_doomfire_targetting"; 781 781 newscript->GetAI = GetAI_mob_doomfire_targetting; 782 m_scripts[nrscripts++] = newscript;782 newscript->RegisterSelf(); 783 783 784 784 newscript = new Script; 785 785 newscript->Name = "mob_ancient_wisp"; 786 786 newscript->GetAI = GetAI_mob_ancient_wisp; 787 m_scripts[nrscripts++] = newscript;787 newscript->RegisterSelf(); 788 788 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal.cpp
r272 r279 201 201 newscript->pGossipHello = &GossipHello_npc_jaina_proudmoore; 202 202 newscript->pGossipSelect = &GossipSelect_npc_jaina_proudmoore; 203 m_scripts[nrscripts++] = newscript;203 newscript->RegisterSelf(); 204 204 205 205 newscript = new Script; … … 208 208 newscript->pGossipHello = &GossipHello_npc_thrall; 209 209 newscript->pGossipSelect = &GossipSelect_npc_thrall; 210 m_scripts[nrscripts++] = newscript;210 newscript->RegisterSelf(); 211 211 212 212 newscript = new Script; … … 214 214 newscript->pGossipHello = &GossipHello_npc_tyrande_whisperwind; 215 215 newscript->pGossipSelect = &GossipSelect_npc_tyrande_whisperwind; 216 m_scripts[nrscripts++] = newscript;217 } 216 newscript->RegisterSelf(); 217 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/instance_hyjal.cpp
r272 r279 200 200 newscript->Name = "instance_hyjal"; 201 201 newscript->GetInstanceData = GetInstanceData_instance_mount_hyjal; 202 m_scripts[nrscripts++] = newscript;202 newscript->RegisterSelf(); 203 203 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp
r272 r279 153 153 newscript->Name="boss_captain_skarloc"; 154 154 newscript->GetAI = GetAI_boss_captain_skarloc; 155 m_scripts[nrscripts++] = newscript;155 newscript->RegisterSelf(); 156 156 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp
r272 r279 147 147 newscript->Name="boss_epoch_hunter"; 148 148 newscript->GetAI = GetAI_boss_epoch_hunter; 149 m_scripts[nrscripts++] = newscript;149 newscript->RegisterSelf(); 150 150 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp
r272 r279 195 195 newscript->Name="go_barrel_old_hillsbrad"; 196 196 newscript->pGOHello = &GOHello_go_barrel_old_hillsbrad; 197 m_scripts[nrscripts++] = newscript;197 newscript->RegisterSelf(); 198 198 199 199 newscript = new Script; 200 200 newscript->Name="boss_lieutenant_drake"; 201 201 newscript->GetAI = GetAI_boss_lieutenant_drake; 202 m_scripts[nrscripts++] = newscript;202 newscript->RegisterSelf(); 203 203 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp
r272 r279 175 175 newscript->Name = "instance_old_hillsbrad"; 176 176 newscript->GetInstanceData = GetInstanceData_instance_old_hillsbrad; 177 m_scripts[nrscripts++] = newscript;177 newscript->RegisterSelf(); 178 178 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp
r272 r279 894 894 newscript->pGossipHello = &GossipHello_npc_brazen; 895 895 newscript->pGossipSelect = &GossipSelect_npc_brazen; 896 m_scripts[nrscripts++] = newscript;896 newscript->RegisterSelf(); 897 897 898 898 newscript = new Script; … … 900 900 newscript->pGossipHello = &GossipHello_npc_erozion; 901 901 newscript->pGossipSelect = &GossipSelect_npc_erozion; 902 m_scripts[nrscripts++] = newscript;902 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;909 newscript->RegisterSelf(); 910 910 911 911 newscript = new Script; … … 913 913 newscript->pGossipHello = &GossipHello_npc_taretha; 914 914 newscript->pGossipSelect = &GossipSelect_npc_taretha; 915 m_scripts[nrscripts++] = newscript;916 } 915 newscript->RegisterSelf(); 916 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp
r272 r279 745 745 newscript->Name="boss_fathomlord_karathress"; 746 746 newscript->GetAI = GetAI_boss_fathomlord_karathress; 747 m_scripts[nrscripts++] = newscript;747 newscript->RegisterSelf(); 748 748 749 749 newscript = new Script; 750 750 newscript->Name="boss_fathomguard_sharkkis"; 751 751 newscript->GetAI = GetAI_boss_fathomguard_sharkkis; 752 m_scripts[nrscripts++] = newscript;752 newscript->RegisterSelf(); 753 753 754 754 newscript = new Script; 755 755 newscript->Name="boss_fathomguard_tidalvess"; 756 756 newscript->GetAI = GetAI_boss_fathomguard_tidalvess; 757 m_scripts[nrscripts++] = newscript;757 newscript->RegisterSelf(); 758 758 759 759 newscript = new Script; 760 760 newscript->Name="boss_fathomguard_caribdis"; 761 761 newscript->GetAI = GetAI_boss_fathomguard_caribdis; 762 m_scripts[nrscripts++] = newscript;762 newscript->RegisterSelf(); 763 763 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp
r272 r279 383 383 newscript->Name="boss_hydross_the_unstable"; 384 384 newscript->GetAI = GetAI_boss_hydross_the_unstable; 385 m_scripts[nrscripts++] = newscript;385 newscript->RegisterSelf(); 386 386 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp
r272 r279 251 251 //remove old tainted cores to prevent cheating in phase 2 252 252 Map *map = m_creature->GetMap(); 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))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()) 257 257 { 258 (*i)->DestroyItemCount(31088, 1, true);258 i_pl->DestroyItemCount(31088, 1, true); 259 259 } 260 260 } … … 1030 1030 newscript->Name="boss_lady_vashj"; 1031 1031 newscript->GetAI = GetAI_boss_lady_vashj; 1032 m_scripts[nrscripts++] = newscript;1032 newscript->RegisterSelf(); 1033 1033 1034 1034 newscript = new Script; 1035 1035 newscript->Name="mob_enchanted_elemental"; 1036 1036 newscript->GetAI = GetAI_mob_enchanted_elemental; 1037 m_scripts[nrscripts++] = newscript;1037 newscript->RegisterSelf(); 1038 1038 1039 1039 newscript = new Script; 1040 1040 newscript->Name="mob_tainted_elemental"; 1041 1041 newscript->GetAI = GetAI_mob_tainted_elemental; 1042 m_scripts[nrscripts++] = newscript;1042 newscript->RegisterSelf(); 1043 1043 1044 1044 newscript = new Script; 1045 1045 newscript->Name="mob_toxic_sporebat"; 1046 1046 newscript->GetAI = GetAI_mob_toxic_sporebat; 1047 m_scripts[nrscripts++] = newscript;1047 newscript->RegisterSelf(); 1048 1048 1049 1049 newscript = new Script; 1050 1050 newscript->Name="mob_coilfang_elite"; 1051 1051 newscript->GetAI = GetAI_mob_coilfang_elite; 1052 m_scripts[nrscripts++] = newscript;1052 newscript->RegisterSelf(); 1053 1053 1054 1054 newscript = new Script; 1055 1055 newscript->Name="mob_coilfang_strider"; 1056 1056 newscript->GetAI = GetAI_mob_coilfang_strider; 1057 m_scripts[nrscripts++] = newscript;1057 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;1062 newscript->RegisterSelf(); 1063 1063 1064 1064 newscript = new Script; 1065 1065 newscript->Name="item_tainted_core"; 1066 1066 newscript->pItemUse = ItemUse_item_tainted_core; 1067 m_scripts[nrscripts++] = newscript;1067 newscript->RegisterSelf(); 1068 1068 } 1069 1069 -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp
r272 r279 755 755 { 756 756 Map *map = m_creature->GetMap(); 757 InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers();758 for( InstanceMap::PlayerList::const_iterator itr = PlayerList.begin();itr != PlayerList.end(); ++itr)757 Map::PlayerList const &PlayerList = map->GetPlayers(); 758 for(Map::PlayerList::const_iterator itr = PlayerList.begin();itr != PlayerList.end(); ++itr) 759 759 { 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 } 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 } 770 773 } 771 774 Earthshock_Timer = 8000 + rand()%7000; … … 802 805 newscript->Name="boss_leotheras_the_blind"; 803 806 newscript->GetAI = GetAI_boss_leotheras_the_blind; 804 m_scripts[nrscripts++] = newscript;807 newscript->RegisterSelf(); 805 808 806 809 newscript = new Script; 807 810 newscript->Name="boss_leotheras_the_blind_demonform"; 808 811 newscript->GetAI = GetAI_boss_leotheras_the_blind_demonform; 809 m_scripts[nrscripts++] = newscript;812 newscript->RegisterSelf(); 810 813 811 814 newscript = new Script; 812 815 newscript->Name="mob_greyheart_spellbinder"; 813 816 newscript->GetAI = GetAI_mob_greyheart_spellbinder; 814 m_scripts[nrscripts++] = newscript;817 newscript->RegisterSelf(); 815 818 816 819 newscript = new Script; 817 820 newscript->Name="mob_inner_demon"; 818 821 newscript->GetAI = GetAI_mob_inner_demon; 819 m_scripts[nrscripts++] = newscript;822 newscript->RegisterSelf(); 820 823 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp
r272 r279 168 168 newscript->Name="boss_the_lurker_below"; 169 169 newscript->GetAI = GetAI_boss_the_lurker_below; 170 m_scripts[nrscripts++] = newscript;170 newscript->RegisterSelf(); 171 171 172 172 newscript = new Script; 173 173 newscript->Name="mob_coilfang_guardian"; 174 174 newscript->GetAI = GetAI_mob_coilfang_guardian; 175 m_scripts[nrscripts++] = newscript;175 newscript->RegisterSelf(); 176 176 177 177 newscript = new Script; 178 178 newscript->Name="mob_coilfang_ambusher"; 179 179 newscript->GetAI = GetAI_mob_coilfang_ambusher; 180 m_scripts[nrscripts++] = newscript;180 newscript->RegisterSelf(); 181 181 } 182 182 -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp
r272 r279 351 351 newscript->Name="boss_morogrim_tidewalker"; 352 352 newscript->GetAI = GetAI_boss_morogrim_tidewalker; 353 m_scripts[nrscripts++] = newscript;353 newscript->RegisterSelf(); 354 354 355 355 newscript = new Script; 356 356 newscript->Name="mob_water_globule"; 357 357 newscript->GetAI = GetAI_mob_water_globule; 358 m_scripts[nrscripts++] = newscript;358 newscript->RegisterSelf(); 359 359 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp
r272 r279 216 216 newscript->Name = "instance_serpent_shrine"; 217 217 newscript->GetInstanceData = GetInstanceData_instance_serpentshrine_cavern; 218 m_scripts[nrscripts++] = newscript;218 newscript->RegisterSelf(); 219 219 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp
r272 r279 189 189 newscript->Name="boss_hydromancer_thespia"; 190 190 newscript->GetAI = GetAI_boss_thespiaAI; 191 m_scripts[nrscripts++] = newscript;191 newscript->RegisterSelf(); 192 192 193 193 newscript = new Script; 194 194 newscript->Name="mob_coilfang_waterelemental"; 195 195 newscript->GetAI = GetAI_mob_coilfang_waterelementalAI; 196 m_scripts[nrscripts++] = newscript;196 newscript->RegisterSelf(); 197 197 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp
r272 r279 272 272 newscript->Name="boss_mekgineer_steamrigger"; 273 273 newscript->GetAI = GetAI_boss_mekgineer_steamrigger; 274 m_scripts[nrscripts++] = newscript;274 newscript->RegisterSelf(); 275 275 276 276 newscript = new Script; 277 277 newscript->Name="mob_steamrigger_mechanic"; 278 278 newscript->GetAI = GetAI_mob_steamrigger_mechanic; 279 m_scripts[nrscripts++] = newscript;279 newscript->RegisterSelf(); 280 280 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp
r272 r279 227 227 newscript->Name="mob_naga_distiller"; 228 228 newscript->GetAI = GetAI_mob_naga_distiller; 229 m_scripts[nrscripts++] = newscript;229 newscript->RegisterSelf(); 230 230 231 231 newscript = new Script; 232 232 newscript->Name="boss_warlord_kalithresh"; 233 233 newscript->GetAI = GetAI_boss_warlord_kalithresh; 234 m_scripts[nrscripts++] = newscript;234 newscript->RegisterSelf(); 235 235 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/instance_steam_vault.cpp
r272 r279 167 167 newscript->Name = "instance_steam_vault"; 168 168 newscript->GetInstanceData = GetInstanceData_instance_steam_vault; 169 m_scripts[nrscripts++] = newscript;169 newscript->RegisterSelf(); 170 170 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/underbog/boss_hungarfen.cpp
r272 r279 148 148 newscript->Name="boss_hungarfen"; 149 149 newscript->GetAI = GetAI_boss_hungarfen; 150 m_scripts[nrscripts++] = newscript;150 newscript->RegisterSelf(); 151 151 152 152 newscript = new Script; 153 153 newscript->Name="mob_underbog_mushroom"; 154 154 newscript->GetAI = GetAI_mob_underbog_mushroom; 155 m_scripts[nrscripts++] = newscript;155 newscript->RegisterSelf(); 156 156 } -
trunk/src/bindings/scripts/scripts/zone/dun_morogh/dun_morogh.cpp
r272 r279 95 95 newscript->Name="npc_narm_faulk"; 96 96 newscript->GetAI = GetAI_npc_narm_faulk; 97 m_scripts[nrscripts++] = newscript;97 newscript->RegisterSelf(); 98 98 } -
trunk/src/bindings/scripts/scripts/zone/dustwallow_marsh/dustwallow_marsh.cpp
r272 r279 205 205 newscript->Name="mobs_risen_husk_spirit"; 206 206 newscript->GetAI = GetAI_mobs_risen_husk_spirit; 207 m_scripts[nrscripts++] = newscript;207 newscript->RegisterSelf(); 208 208 209 209 newscript = new Script; 210 210 newscript->Name="npc_restless_apparition"; 211 211 newscript->pGossipHello = &GossipHello_npc_restless_apparition; 212 m_scripts[nrscripts++] = newscript;212 newscript->RegisterSelf(); 213 213 214 214 newscript = new Script; … … 216 216 newscript->GetAI = GetAI_npc_deserter_agitator; 217 217 newscript->pGossipHello = &GossipHello_npc_deserter_agitator; 218 m_scripts[nrscripts++] = newscript;218 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;224 newscript->RegisterSelf(); 225 225 226 226 newscript = new Script; … … 228 228 newscript->pGossipHello = &GossipHello_npc_nat_pagle; 229 229 newscript->pGossipSelect = &GossipSelect_npc_nat_pagle; 230 m_scripts[nrscripts++] = newscript;231 } 230 newscript->RegisterSelf(); 231 } -
trunk/src/bindings/scripts/scripts/zone/eastern_plaguelands/eastern_plaguelands.cpp
r272 r279 159 159 newscript->Name="mobs_ghoul_flayer"; 160 160 newscript->GetAI = GetAI_mobs_ghoul_flayer; 161 m_scripts[nrscripts++] = newscript;161 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;167 newscript->RegisterSelf(); 168 168 169 169 newscript = new Script; … … 171 171 newscript->GetAI = GetAI_npc_darrowshire_spirit; 172 172 newscript->pGossipHello = &GossipHello_npc_darrowshire_spirit; 173 m_scripts[nrscripts++] = newscript;173 newscript->RegisterSelf(); 174 174 175 175 newscript = new Script; … … 177 177 newscript->pGossipHello = &GossipHello_npc_tirion_fordring; 178 178 newscript->pGossipSelect = &GossipSelect_npc_tirion_fordring; 179 m_scripts[nrscripts++] = newscript;179 newscript->RegisterSelf(); 180 180 } -
trunk/src/bindings/scripts/scripts/zone/elwynn_forest/elwynn_forest.cpp
r272 r279 95 95 newscript->Name="npc_henze_faulk"; 96 96 newscript->GetAI = GetAI_npc_henze_faulk; 97 m_scripts[nrscripts++] = newscript;97 newscript->RegisterSelf(); 98 98 } -
trunk/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp
r272 r279 153 153 newscript->Name="mobs_mana_tapped"; 154 154 newscript->GetAI = GetAI_mobs_mana_tapped; 155 m_scripts[nrscripts++] = newscript;155 newscript->RegisterSelf(); 156 156 157 157 newscript = new Script; … … 160 160 newscript->pGossipHello = &GossipHello_npc_prospector_anvilward; 161 161 newscript->pGossipSelect = &GossipSelect_npc_prospector_anvilward; 162 m_scripts[nrscripts++] = newscript;162 newscript->RegisterSelf(); 163 163 } -
trunk/src/bindings/scripts/scripts/zone/felwood/felwood.cpp
r272 r279 86 86 newscript->pGossipHello = &GossipHello_npcs_riverbreeze_and_silversky; 87 87 newscript->pGossipSelect = &GossipSelect_npcs_riverbreeze_and_silversky; 88 m_scripts[nrscripts++] = newscript;88 newscript->RegisterSelf(); 89 89 } -
trunk/src/bindings/scripts/scripts/zone/feralas/feralas.cpp
r272 r279 77 77 newscript->pGossipHello = &GossipHello_npc_gregan_brewspewer; 78 78 newscript->pGossipSelect = &GossipSelect_npc_gregan_brewspewer; 79 m_scripts[nrscripts++] = newscript;79 newscript->RegisterSelf(); 80 80 81 81 newscript = new Script; 82 82 newscript->Name="npc_screecher_spirit"; 83 83 newscript->pGossipHello = &GossipHello_npc_screecher_spirit; 84 m_scripts[nrscripts++] = newscript;84 newscript->RegisterSelf(); 85 85 } -
trunk/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp
r272 r279 134 134 newscript->pGossipHello = &GossipHello_npc_blood_knight_dawnstar; 135 135 newscript->pGossipSelect = &GossipSelect_npc_blood_knight_dawnstar; 136 m_scripts[nrscripts++] = newscript;136 newscript->RegisterSelf(); 137 137 138 138 newscript = new Script; … … 140 140 newscript->pGossipHello = &GossipHello_npc_budd_nedreck; 141 141 newscript->pGossipSelect = &GossipSelect_npc_budd_nedreck; 142 m_scripts[nrscripts++] = newscript;142 newscript->RegisterSelf(); 143 143 144 144 newscript = new Script; … … 146 146 newscript->pGossipHello = &GossipHello_npc_rathis_tomber; 147 147 newscript->pGossipSelect = &GossipSelect_npc_rathis_tomber; 148 m_scripts[nrscripts++] = newscript;148 newscript->RegisterSelf(); 149 149 150 150 newscript = new Script; 151 151 newscript->Name = "go_gilded_brazier"; 152 152 newscript->pGOHello = &GOHello_gilded_brazier; 153 m_scripts[nrscripts++] = newscript;153 newscript->RegisterSelf(); 154 154 } -
trunk/src/bindings/scripts/scripts/zone/gruuls_lair/boss_gruul.cpp
r272 r279 301 301 newscript->Name="boss_gruul"; 302 302 newscript->GetAI = GetAI_boss_gruul; 303 m_scripts[nrscripts++] = newscript;303 newscript->RegisterSelf(); 304 304 } -
trunk/src/bindings/scripts/scripts/zone/gruuls_lair/boss_high_king_maulgar.cpp
r272 r279 818 818 newscript->Name="boss_high_king_maulgar"; 819 819 newscript->GetAI = GetAI_boss_high_king_maulgar; 820 m_scripts[nrscripts++] = newscript;820 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;825 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;830 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;835 newscript->RegisterSelf(); 836 836 837 837 newscript = new Script; 838 838 newscript->Name="boss_krosh_firehand"; 839 839 newscript->GetAI = GetAI_boss_krosh_firehand; 840 m_scripts[nrscripts++] = newscript;840 newscript->RegisterSelf(); 841 841 } -
trunk/src/bindings/scripts/scripts/zone/gruuls_lair/instance_gruuls_lair.cpp
r272 r279 185 185 newscript->Name = "instance_gruuls_lair"; 186 186 newscript->GetInstanceData = GetInstanceData_instance_gruuls_lair; 187 m_scripts[nrscripts++] = newscript;187 newscript->RegisterSelf(); 188 188 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_broggok.cpp
r272 r279 124 124 newscript->Name="boss_broggok"; 125 125 newscript->GetAI = GetAI_boss_broggokAI; 126 m_scripts[nrscripts++] = newscript;126 newscript->RegisterSelf(); 127 127 128 128 newscript = new Script; 129 129 newscript->Name="mob_broggok_poisoncloud"; 130 130 newscript->GetAI = GetAI_mob_broggok_poisoncloudAI; 131 m_scripts[nrscripts++] = newscript;131 newscript->RegisterSelf(); 132 132 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp
r272 r279 226 226 newscript->Name="boss_kelidan_the_breaker"; 227 227 newscript->GetAI = GetAI_boss_kelidan_the_breaker; 228 m_scripts[nrscripts++] = newscript;228 newscript->RegisterSelf(); 229 229 230 230 newscript = new Script; 231 231 newscript->Name="mob_shadowmoon_channeler"; 232 232 newscript->GetAI = GetAI_mob_shadowmoon_channeler; 233 m_scripts[nrscripts++] = newscript;233 newscript->RegisterSelf(); 234 234 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_the_maker.cpp
r272 r279 128 128 newscript->Name="boss_the_maker"; 129 129 newscript->GetAI = GetAI_boss_the_makerAI; 130 m_scripts[nrscripts++] = newscript;130 newscript->RegisterSelf(); 131 131 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp
r272 r279 210 210 newscript->Name="boss_omor_the_unscarred"; 211 211 newscript->GetAI = GetAI_boss_omor_the_unscarredAI; 212 m_scripts[nrscripts++] = newscript;212 newscript->RegisterSelf(); 213 213 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp
r272 r279 165 165 newscript->Name="boss_watchkeeper_gargolmar"; 166 166 newscript->GetAI = GetAI_boss_watchkeeper_gargolmarAI; 167 m_scripts[nrscripts++] = newscript;167 newscript->RegisterSelf(); 168 168 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp
r272 r279 546 546 newscript->Name="boss_magtheridon"; 547 547 newscript->GetAI = GetAI_boss_magtheridon; 548 m_scripts[nrscripts++] = newscript;548 newscript->RegisterSelf(); 549 549 550 550 newscript = new Script; 551 551 newscript->Name="mob_hellfire_channeler"; 552 552 newscript->GetAI = GetAI_mob_hellfire_channeler; 553 m_scripts[nrscripts++] = newscript;553 newscript->RegisterSelf(); 554 554 555 555 newscript = new Script; 556 556 newscript->Name="go_manticron_cube"; 557 557 newscript->pGOHello = &GOHello_go_Manticron_Cube; 558 m_scripts[nrscripts++] = newscript;558 newscript->RegisterSelf(); 559 559 560 560 newscript = new Script; 561 561 newscript->Name="mob_abyssal"; 562 562 newscript->GetAI = GetAI_mob_abyssalAI; 563 m_scripts[nrscripts++] = newscript;563 newscript->RegisterSelf(); 564 564 565 565 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp
r272 r279 119 119 void SetData(uint32 type, uint32 data) 120 120 { 121 Player *player = GetPlayer();122 if(!player) return;123 124 121 switch(type) 125 122 { … … 130 127 if(data != IN_PROGRESS) 131 128 { 132 if(GameObject *Door = GameObject::GetGameObject(*player,DoorGUID))129 if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID)) 133 130 Door->SetGoState(0); 134 131 } … … 143 140 for(std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i) 144 141 { 145 if(Creature *Channeler = (Creature*)Unit::GetUnit(*player,*i))142 if(Creature *Channeler = instance->GetCreatureInMap(*i)) 146 143 { 147 144 if(Channeler->isAlive()) … … 152 149 } 153 150 CageTimer = 0; 154 if(GameObject *Door = GameObject::GetGameObject(*player,DoorGUID))151 if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID)) 155 152 Door->SetGoState(0); 156 153 }break; … … 162 159 for(std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i) 163 160 { 164 Creature *Channeler = (Creature*)Unit::GetUnit(*player,*i);161 Creature *Channeler = instance->GetCreatureInMap(*i); 165 162 if(Channeler && Channeler->isAlive()) 166 163 { … … 171 168 } 172 169 // Release Magtheridon after two minutes. 173 Creature *Magtheridon = (Creature*)Unit::GetUnit(*player,MagtheridonGUID);170 Creature *Magtheridon = instance->GetCreatureInMap(MagtheridonGUID); 174 171 if(Magtheridon && Magtheridon->isAlive()) 175 172 { … … 177 174 CageTimer = 120000; 178 175 } 179 if(GameObject *Door = GameObject::GetGameObject(*player,DoorGUID))176 if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID)) 180 177 Door->SetGoState(1); 181 178 }break; … … 183 180 for(std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i) 184 181 { 185 Unit *Channeler = Unit::GetUnit(*player,*i);182 Creature *Channeler = instance->GetCreatureInMap(*i); 186 183 if(Channeler && Channeler->isAlive()) 187 184 { … … 198 195 for(std::set<uint64>::iterator i = ColumnGUID.begin(); i != ColumnGUID.end(); ++i) 199 196 { 200 if(GameObject *Column = GameObject::GetGameObject(*player,*i))197 if(GameObject *Column = instance->GetGameObjectInMap(*i)) 201 198 Column->SetGoState(!data); 202 199 } … … 214 211 } 215 212 216 Player* GetPlayer()217 {218 if(((InstanceMap*)instance)->GetPlayers().size())219 return ((InstanceMap*)instance)->GetPlayers().front();220 return NULL;221 }222 223 213 void AttackNearestTarget(Creature *creature) 224 214 { … … 226 216 float range; 227 217 Player* target = NULL; 228 InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)instance)->GetPlayers();229 InstanceMap::PlayerList::const_iterator i;218 Map::PlayerList const &PlayerList = instance->GetPlayers(); 219 Map::PlayerList::const_iterator i; 230 220 for(i = PlayerList.begin(); i != PlayerList.end(); ++i) 231 221 { 232 if((*i)->isTargetableForAttack()) 233 { 234 range = (*i)->GetDistance(creature); 235 if(range < minRange) 236 { 237 minRange = range; 238 target = *i; 239 } 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 } 240 233 } 241 234 } … … 249 242 if(CageTimer <= diff) 250 243 { 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 } 244 Creature *Magtheridon = instance->GetCreatureInMap(MagtheridonGUID); 245 if(Magtheridon && Magtheridon->isAlive()) 246 { 247 Magtheridon->clearUnitState(UNIT_STAT_STUNNED); 248 AttackNearestTarget(Magtheridon); 259 249 } 260 250 CageTimer = 0; … … 266 256 if(RespawnTimer <= diff) 267 257 { 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 } 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(); 279 266 } 280 267 } … … 296 283 newscript->Name = "instance_magtheridons_lair"; 297 284 newscript->GetInstanceData = GetInstanceData_instance_magtheridons_lair; 298 m_scripts[nrscripts++] = newscript;285 newscript->RegisterSelf(); 299 286 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_nethekurse.cpp
r272 r279 445 445 newscript->Name="boss_grand_warlock_nethekurse"; 446 446 newscript->GetAI = GetAI_boss_grand_warlock_nethekurse; 447 m_scripts[nrscripts++] = newscript;447 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;452 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;457 newscript->RegisterSelf(); 458 458 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp
r272 r279 395 395 newscript->Name="boss_warbringer_omrogg"; 396 396 newscript->GetAI = GetAI_boss_warbringer_omrogg; 397 m_scripts[nrscripts++] = newscript;397 newscript->RegisterSelf(); 398 398 399 399 newscript = new Script; 400 400 newscript->Name="mob_omrogg_heads"; 401 401 newscript->GetAI = GetAI_mob_omrogg_heads; 402 m_scripts[nrscripts++] = newscript;402 newscript->RegisterSelf(); 403 403 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp
r272 r279 111 111 newscript->Name = "instance_shattered_halls"; 112 112 newscript->GetInstanceData = GetInstanceData_instance_shattered_halls; 113 m_scripts[nrscripts++] = newscript;113 newscript->RegisterSelf(); 114 114 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_peninsula/boss_doomlord_kazzak.cpp
r272 r279 138 138 newscript->Name="boss_doomlord_kazzak"; 139 139 newscript->GetAI = GetAI_boss_doomlordkazzak; 140 m_scripts[nrscripts++] = newscript;140 newscript->RegisterSelf(); 141 141 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_peninsula/hellfire_peninsula.cpp
r272 r279 172 172 newscript->pGossipHello = &GossipHello_npc_wing_commander_dabiree; 173 173 newscript->pGossipSelect = &GossipSelect_npc_wing_commander_dabiree; 174 m_scripts[nrscripts++] = newscript;174 newscript->RegisterSelf(); 175 175 176 176 newscript = new Script; … … 178 178 newscript->pGossipHello = &GossipHello_npc_gryphoneer_windbellow; 179 179 newscript->pGossipSelect = &GossipSelect_npc_gryphoneer_windbellow; 180 m_scripts[nrscripts++] = newscript;180 newscript->RegisterSelf(); 181 181 182 182 newscript = new Script; … … 184 184 newscript->pGossipHello = &GossipHello_npc_wing_commander_brack; 185 185 newscript->pGossipSelect = &GossipSelect_npc_wing_commander_brack; 186 m_scripts[nrscripts++] = newscript;186 newscript->RegisterSelf(); 187 187 } -
trunk/src/bindings/scripts/scripts/zone/ironforge/ironforge.cpp
r272 r279 90 90 newscript->pGossipHello = &GossipHello_npc_royal_historian_archesonus; 91 91 newscript->pGossipSelect = &GossipSelect_npc_royal_historian_archesonus; 92 m_scripts[nrscripts++] = newscript;92 newscript->RegisterSelf(); 93 93 } -
trunk/src/bindings/scripts/scripts/zone/isle_of_queldanas/isle_of_queldanas.cpp
r272 r279 141 141 newscript->pGossipHello = &GossipHello_npc_ayren_cloudbreaker; 142 142 newscript->pGossipSelect = &GossipSelect_npc_ayren_cloudbreaker; 143 m_scripts[nrscripts++] = newscript;143 newscript->RegisterSelf(); 144 144 145 145 newscript = new Script; 146 146 newscript->Name="npc_converted_sentry"; 147 147 newscript->GetAI = GetAI_npc_converted_sentry; 148 m_scripts[nrscripts++] = newscript;148 newscript->RegisterSelf(); 149 149 150 150 newscript = new Script; … … 152 152 newscript->pGossipHello = &GossipHello_npc_unrestrained_dragonhawk; 153 153 newscript->pGossipSelect = &GossipSelect_npc_unrestrained_dragonhawk; 154 m_scripts[nrscripts++] = newscript;154 newscript->RegisterSelf(); 155 155 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/boss_curator.cpp
r272 r279 197 197 newscript->Name="boss_curator"; 198 198 newscript->GetAI = GetAI_boss_curator; 199 m_scripts[nrscripts++] = newscript;199 newscript->RegisterSelf(); 200 200 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/boss_maiden_of_virtue.cpp
r272 r279 180 180 newscript->Name="boss_maiden_of_virtue"; 181 181 newscript->GetAI = GetAI_boss_maiden_of_virtue; 182 m_scripts[nrscripts++] = newscript;182 newscript->RegisterSelf(); 183 183 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp
r272 r279 363 363 newscript->Name="boss_attumen"; 364 364 newscript->GetAI = GetAI_boss_attumen; 365 m_scripts[nrscripts++] = newscript;365 newscript->RegisterSelf(); 366 366 367 367 newscript = new Script; 368 368 newscript->Name="boss_midnight"; 369 369 newscript->GetAI = GetAI_boss_midnight; 370 m_scripts[nrscripts++] = newscript;370 newscript->RegisterSelf(); 371 371 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/boss_moroes.cpp
r272 r279 836 836 newscript->Name="boss_moroes"; 837 837 newscript->GetAI = GetAI_boss_moroes; 838 m_scripts[nrscripts++] = newscript;838 newscript->RegisterSelf(); 839 839 840 840 newscript = new Script; 841 841 newscript->Name="boss_baroness_dorothea_millstipe"; 842 842 newscript->GetAI = GetAI_baroness_dorothea_millstipe; 843 m_scripts[nrscripts++] = newscript;843 newscript->RegisterSelf(); 844 844 845 845 newscript = new Script; 846 846 newscript->Name="boss_baron_rafe_dreuger"; 847 847 newscript->GetAI = GetAI_baron_rafe_dreuger; 848 m_scripts[nrscripts++] = newscript;848 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;853 newscript->RegisterSelf(); 854 854 855 855 newscript = new Script; 856 856 newscript->Name="boss_lady_keira_berrybuck"; 857 857 newscript->GetAI = GetAI_lady_keira_berrybuck; 858 m_scripts[nrscripts++] = newscript;858 newscript->RegisterSelf(); 859 859 860 860 newscript = new Script; 861 861 newscript->Name="boss_lord_robin_daris"; 862 862 newscript->GetAI = GetAI_lord_robin_daris; 863 m_scripts[nrscripts++] = newscript;863 newscript->RegisterSelf(); 864 864 865 865 newscript = new Script; 866 866 newscript->Name="boss_lord_crispin_ference"; 867 867 newscript->GetAI = GetAI_lord_crispin_ference; 868 m_scripts[nrscripts++] = newscript;868 newscript->RegisterSelf(); 869 869 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/boss_prince_malchezaar.cpp
r272 r279 667 667 newscript->Name="boss_malchezaar"; 668 668 newscript->GetAI = GetAI_boss_malchezaar; 669 m_scripts[nrscripts++] = newscript;669 newscript->RegisterSelf(); 670 670 671 671 newscript = new Script; 672 672 newscript->Name="netherspite_infernal"; 673 673 newscript->GetAI = GetAI_netherspite_infernal; 674 m_scripts[nrscripts++] = newscript;674 newscript->RegisterSelf(); 675 675 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/boss_shade_of_aran.cpp
r272 r279 655 655 newscript->Name="boss_shade_of_aran"; 656 656 newscript->GetAI = GetAI_boss_aran; 657 m_scripts[nrscripts++] = newscript;657 newscript->RegisterSelf(); 658 658 659 659 newscript = new Script; 660 660 newscript->Name="mob_shadow_of_aran"; 661 661 newscript->GetAI = GetAI_shadow_of_aran; 662 m_scripts[nrscripts++] = newscript;662 newscript->RegisterSelf(); 663 663 664 664 newscript = new Script; 665 665 newscript->Name="mob_aran_elemental"; 666 666 newscript->GetAI = GetAI_water_elemental; 667 m_scripts[nrscripts++] = newscript;667 newscript->RegisterSelf(); 668 668 669 669 //newscript = new Script; 670 670 //newscript->Name="mob_aran_blizzard"; 671 671 //newscript->GetAI = GetAI_boss_aran; 672 // m_scripts[nrscripts++] = newscript;672 //newscript->RegisterSelf(); 673 673 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/boss_terestian_illhoof.cpp
r272 r279 437 437 newscript->Name="boss_terestian_illhoof"; 438 438 newscript->GetAI = GetAI_boss_terestian_illhoof; 439 m_scripts[nrscripts++] = newscript;439 newscript->RegisterSelf(); 440 440 441 441 newscript = new Script; 442 442 newscript->Name="mob_karazhan_imp"; 443 443 newscript->GetAI = GetAI_mob_karazhan_imp; 444 m_scripts[nrscripts++] = newscript;444 newscript->RegisterSelf(); 445 445 446 446 newscript = new Script; 447 447 newscript->Name="mob_kilrek"; 448 448 newscript->GetAI = GetAI_mob_kilrek; 449 m_scripts[nrscripts++] = newscript;449 newscript->RegisterSelf(); 450 450 451 451 newscript = new Script; 452 452 newscript->Name = "mob_demon_chain"; 453 453 newscript->GetAI = GetAI_mob_demon_chain; 454 m_scripts[nrscripts++] = newscript;454 newscript->RegisterSelf(); 455 455 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp
r272 r279 1415 1415 newscript->GetAI = GetAI_boss_dorothee; 1416 1416 newscript->Name = "boss_dorothee"; 1417 m_scripts[nrscripts++] = newscript;1417 newscript->RegisterSelf(); 1418 1418 1419 1419 newscript = new Script; 1420 1420 newscript->GetAI = GetAI_boss_strawman; 1421 1421 newscript->Name = "boss_strawman"; 1422 m_scripts[nrscripts++] = newscript;1422 newscript->RegisterSelf(); 1423 1423 1424 1424 newscript = new Script; 1425 1425 newscript->GetAI = GetAI_boss_tinhead; 1426 1426 newscript->Name = "boss_tinhead"; 1427 m_scripts[nrscripts++] = newscript;1427 newscript->RegisterSelf(); 1428 1428 1429 1429 newscript = new Script; 1430 1430 newscript->GetAI = GetAI_boss_roar; 1431 1431 newscript->Name = "boss_roar"; 1432 m_scripts[nrscripts++] = newscript;1432 newscript->RegisterSelf(); 1433 1433 1434 1434 newscript = new Script; 1435 1435 newscript->GetAI = GetAI_boss_crone; 1436 1436 newscript->Name = "boss_crone"; 1437 m_scripts[nrscripts++] = newscript;1437 newscript->RegisterSelf(); 1438 1438 1439 1439 newscript = new Script; 1440 1440 newscript->GetAI = GetAI_mob_tito; 1441 1441 newscript->Name = "mob_tito"; 1442 m_scripts[nrscripts++] = newscript;1442 newscript->RegisterSelf(); 1443 1443 1444 1444 newscript = new Script; 1445 1445 newscript->GetAI = GetAI_mob_cyclone; 1446 1446 newscript->Name = "mob_cyclone"; 1447 m_scripts[nrscripts++] = newscript;1447 newscript->RegisterSelf(); 1448 1448 1449 1449 // Hood … … 1452 1452 newscript->pGossipSelect = GossipSelect_npc_grandmother; 1453 1453 newscript->Name = "npc_grandmother"; 1454 m_scripts[nrscripts++] = newscript;1454 newscript->RegisterSelf(); 1455 1455 1456 1456 newscript = new Script; 1457 1457 newscript->GetAI = GetAI_boss_bigbadwolf; 1458 1458 newscript->Name = "boss_bigbadwolf"; 1459 m_scripts[nrscripts++] = newscript;1459 newscript->RegisterSelf(); 1460 1460 1461 1461 // Romeo And Juliet … … 1463 1463 newscript->GetAI = GetAI_boss_julianne; 1464 1464 newscript->Name = "boss_julianne"; 1465 m_scripts[nrscripts++] = newscript;1465 newscript->RegisterSelf(); 1466 1466 1467 1467 newscript = new Script; 1468 1468 newscript->GetAI = GetAI_boss_romulo; 1469 1469 newscript->Name = "boss_romulo"; 1470 m_scripts[nrscripts++] = newscript;1471 } 1470 newscript->RegisterSelf(); 1471 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp
r272 r279 250 250 newscript->Name = "instance_karazhan"; 251 251 newscript->GetInstanceData = GetInstanceData_instance_karazhan; 252 m_scripts[nrscripts++] = newscript;252 newscript->RegisterSelf(); 253 253 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/karazhan.cpp
r272 r279 286 286 if(!map->IsDungeon()) return; 287 287 288 InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers();289 if(PlayerList. empty())288 Map::PlayerList const &PlayerList = map->GetPlayers(); 289 if(PlayerList.isEmpty()) 290 290 return; 291 291 292 292 RaidWiped = true; 293 for( InstanceMap::PlayerList::const_iterator i = PlayerList.begin();i != PlayerList.end(); ++i)293 for(Map::PlayerList::const_iterator i = PlayerList.begin();i != PlayerList.end(); ++i) 294 294 { 295 if ((*i)->isAlive() && !(*i)->isGameMaster())295 if (i->getSource()->isAlive() && !i->getSource()->isGameMaster()) 296 296 { 297 297 RaidWiped = false; … … 461 461 newscript->pGossipHello = GossipHello_npc_barnes; 462 462 newscript->pGossipSelect = GossipSelect_npc_barnes; 463 m_scripts[nrscripts++] = newscript;463 newscript->RegisterSelf(); 464 464 465 465 newscript = new Script; … … 467 467 newscript->pGossipHello = GossipHello_npc_berthold; 468 468 newscript->pGossipSelect = GossipSelect_npc_berthold; 469 m_scripts[nrscripts++] = newscript;470 } 469 newscript->RegisterSelf(); 470 } -
trunk/src/bindings/scripts/scripts/zone/loch_modan/loch_modan.cpp
r272 r279 88 88 newscript->pGossipHello = &GossipHello_npc_mountaineer_pebblebitty; 89 89 newscript->pGossipSelect = &GossipSelect_npc_mountaineer_pebblebitty; 90 m_scripts[nrscripts++] = newscript;90 newscript->RegisterSelf(); 91 91 } -
trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_felblood_kaelthas.cpp
r272 r279 232 232 m_creature->Relocate(KaelLocations[0][0], KaelLocations[0][1], LOCATION_Z, 0); 233 233 Map *map = m_creature->GetMap(); 234 InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers();235 InstanceMap::PlayerList::const_iterator i;234 Map::PlayerList const &PlayerList = map->GetPlayers(); 235 Map::PlayerList::const_iterator i; 236 236 for (i = PlayerList.begin(); i != PlayerList.end(); ++i) 237 237 { 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 }238 if (Player* i_pl = i->getSource()) 239 if(i_pl->isAlive()) 240 { 241 i_pl->CastSpell(i_pl, SPELL_TELEPORT_CENTER, true); 242 m_creature->GetNearPoint(m_creature,x,y,z,5,5,0); 243 i_pl->TeleportTo(m_creature->GetMapId(),x,y,LOCATION_Z,i_pl->GetOrientation()); 244 } 245 245 } 246 246 DoCast(m_creature, SPELL_TELEPORT_CENTER, true); … … 250 250 { 251 251 Map *map = m_creature->GetMap(); 252 InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers();253 InstanceMap::PlayerList::const_iterator i;252 Map::PlayerList const &PlayerList = map->GetPlayers(); 253 Map::PlayerList::const_iterator i; 254 254 for (i = PlayerList.begin(); i != PlayerList.end(); ++i) 255 { 256 if((*i) && (*i)->isAlive()) 255 { 256 if (Player* i_pl = i->getSource()) 257 if(i_pl->isAlive()) 257 258 // Knockback into the air 258 (*i)->CastSpell((*i), SPELL_GRAVITY_LAPSE_DOT, true, 0, 0, m_creature->GetGUID());259 i_pl->CastSpell(i_pl, SPELL_GRAVITY_LAPSE_DOT, true, 0, 0, m_creature->GetGUID()); 259 260 } 260 261 } … … 263 264 { 264 265 Map *map = m_creature->GetMap(); 265 InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 266 InstanceMap::PlayerList::const_iterator i; 266 Map::PlayerList const &PlayerList = map->GetPlayers(); 267 Map::PlayerList::const_iterator i; 268 for (i = PlayerList.begin(); i != PlayerList.end(); ++i) 269 { 270 if (Player* i_pl = i->getSource()) 271 { 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 } 284 } 285 } 286 } 287 288 void RemoveGravityLapse() 289 { 290 Map *map = m_creature->GetMap(); 291 Map::PlayerList const &PlayerList = map->GetPlayers(); 292 Map::PlayerList::const_iterator i; 267 293 for (i = PlayerList.begin(); i != PlayerList.end(); ++i) 268 294 { 269 if((*i) && (*i)->isAlive())295 if(Player* i_pl = i->getSource()) 270 296 { 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); 280 } 281 } 282 } 283 284 void RemoveGravityLapse() 285 { 286 Map *map = m_creature->GetMap(); 287 InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 288 InstanceMap::PlayerList::const_iterator i; 289 for (i = PlayerList.begin(); i != PlayerList.end(); ++i) 290 { 291 if((*i)) 292 { 293 (*i)->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_FLY); 294 (*i)->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_DOT); 297 i_pl->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_FLY); 298 i_pl->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_DOT); 295 299 WorldPacket data(12); 296 300 data.SetOpcode(SMSG_MOVE_UNSET_CAN_FLY); 297 data.append( (*i)->GetPackGUID());301 data.append(i_pl->GetPackGUID()); 298 302 data << uint32(0); 299 (*i)->SendMessageToSet(&data, true);303 i_pl->SendMessageToSet(&data, true); 300 304 } 301 305 } … … 758 762 newscript->Name = "boss_felblood_kaelthas"; 759 763 newscript->GetAI = GetAI_boss_felblood_kaelthas; 760 m_scripts[nrscripts++] = newscript;764 newscript->RegisterSelf(); 761 765 762 766 newscript = new Script; 763 767 newscript->Name = "mob_arcane_sphere"; 764 768 newscript->GetAI = GetAI_mob_arcane_sphere; 765 m_scripts[nrscripts++] = newscript;769 newscript->RegisterSelf(); 766 770 767 771 newscript = new Script; 768 772 newscript->Name="mob_felkael_phoenix"; 769 773 newscript->GetAI = GetAI_mob_felkael_phoenix; 770 m_scripts[nrscripts++] = newscript;774 newscript->RegisterSelf(); 771 775 772 776 newscript = new Script; 773 777 newscript->Name="mob_felkael_phoenix_egg"; 774 778 newscript->GetAI = GetAI_mob_felkael_phoenix_egg; 775 m_scripts[nrscripts++] = newscript;779 newscript->RegisterSelf(); 776 780 777 781 newscript = new Script; 778 782 newscript->Name="mob_felkael_flamestrike"; 779 783 newscript->GetAI = GetAI_mob_felkael_flamestrike; 780 m_scripts[nrscripts++] = newscript;784 newscript->RegisterSelf(); 781 785 782 786 newscript = new Script; 783 787 newscript->Name="go_kael_orb"; 784 788 newscript->pGOHello = &GOHello_go_kael_orb; 785 m_scripts[nrscripts++] = newscript;789 newscript->RegisterSelf(); 786 790 787 791 newscript = new Script; 788 792 newscript->Name="go_movie_orb"; 789 793 newscript->pGOHello = &GOHello_go_movie_orb; 790 m_scripts[nrscripts++] = newscript;794 newscript->RegisterSelf(); 791 795 } -
trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_priestess_delrissa.cpp
r272 r279 1356 1356 newscript->Name="boss_priestess_delrissa"; 1357 1357 newscript->GetAI = GetAI_boss_priestess_delrissa; 1358 m_scripts[nrscripts++] = newscript;1358 newscript->RegisterSelf(); 1359 1359 1360 1360 newscript = new Script; 1361 1361 newscript->Name="boss_kagani_nightstrike"; 1362 1362 newscript->GetAI = GetAI_boss_kagani_nightstrike; 1363 m_scripts[nrscripts++] = newscript;1363 newscript->RegisterSelf(); 1364 1364 1365 1365 newscript = new Script; 1366 1366 newscript->Name="boss_ellris_duskhallow"; 1367 1367 newscript->GetAI = GetAI_ellris_duskhallow; 1368 m_scripts[nrscripts++] = newscript;1368 newscript->RegisterSelf(); 1369 1369 1370 1370 newscript = new Script; 1371 1371 newscript->Name="boss_eramas_brightblaze"; 1372 1372 newscript->GetAI = GetAI_eramas_brightblaze; 1373 m_scripts[nrscripts++] = newscript;1373 newscript->RegisterSelf(); 1374 1374 1375 1375 newscript = new Script; 1376 1376 newscript->Name="boss_yazzai"; 1377 1377 newscript->GetAI = GetAI_yazzai; 1378 m_scripts[nrscripts++] = newscript;1378 newscript->RegisterSelf(); 1379 1379 1380 1380 newscript = new Script; 1381 1381 newscript->Name="boss_warlord_salaris"; 1382 1382 newscript->GetAI = GetAI_warlord_salaris; 1383 m_scripts[nrscripts++] = newscript;1383 newscript->RegisterSelf(); 1384 1384 1385 1385 newscript = new Script; 1386 1386 newscript->Name="boss_garaxxas"; 1387 1387 newscript->GetAI = GetAI_garaxxas; 1388 m_scripts[nrscripts++] = newscript;1388 newscript->RegisterSelf(); 1389 1389 1390 1390 newscript = new Script; 1391 1391 newscript->Name="boss_apoko"; 1392 1392 newscript->GetAI = GetAI_apoko; 1393 m_scripts[nrscripts++] = newscript;1393 newscript->RegisterSelf(); 1394 1394 1395 1395 newscript = new Script; 1396 1396 newscript->Name="boss_zelfan"; 1397 1397 newscript->GetAI = GetAI_zelfan; 1398 m_scripts[nrscripts++] = newscript;1398 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;*/1403 newscript->RegisterSelf();*/ 1404 1404 1405 1405 /*newscript = new Script; 1406 1406 newscript->Name="mob_fizzle"; 1407 1407 newscript->GetAI = GetAI_mob_fizzle; 1408 m_scripts[nrscripts++] = newscript;*/1408 newscript->RegisterSelf();*/ 1409 1409 1410 1410 /*newscript = new Script; 1411 1411 newscript->Name="mob_sliver"; 1412 1412 newscript->GetAI = GetAI_mob_sliver; 1413 m_scripts[nrscripts++] = newscript;*/1413 newscript->RegisterSelf();*/ 1414 1414 } -
trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_selin_fireheart.cpp
r272 r279 404 404 newscript->Name="boss_selin_fireheart"; 405 405 newscript->GetAI = GetAI_boss_selin_fireheart; 406 m_scripts[nrscripts++] = newscript;406 newscript->RegisterSelf(); 407 407 408 408 newscript = new Script; 409 409 newscript->Name="mob_fel_crystal"; 410 410 newscript->GetAI = GetAI_mob_fel_crystal; 411 m_scripts[nrscripts++] = newscript;411 newscript->RegisterSelf(); 412 412 } -
trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_vexallus.cpp
r272 r279 239 239 newscript->Name="boss_vexallus"; 240 240 newscript->GetAI = GetAI_boss_vexallus; 241 m_scripts[nrscripts++] = newscript;241 newscript->RegisterSelf(); 242 242 243 243 newscript = new Script; 244 244 newscript->Name="mob_pure_energy"; 245 245 newscript->GetAI = GetAI_mob_pure_energy; 246 m_scripts[nrscripts++] = newscript;246 newscript->RegisterSelf(); 247 247 } -
trunk/src/bindings/scripts/scripts/zone/magisters_terrace/instance_magisters_terrace.cpp
r272 r279 250 250 newscript->Name = "instance_magisters_terrace"; 251 251 newscript->GetInstanceData = GetInstanceData_instance_magisters_terrace; 252 m_scripts[nrscripts++] = newscript;252 newscript->RegisterSelf(); 253 253 } -
trunk/src/bindings/scripts/scripts/zone/maraudon/boss_celebras_the_cursed.cpp
r272 r279 94 94 newscript->Name="celebras_the_cursed"; 95 95 newscript->GetAI = GetAI_celebras_the_cursed; 96 m_scripts[nrscripts++] = newscript;96 newscript->RegisterSelf(); 97 97 } -
trunk/src/bindings/scripts/scripts/zone/maraudon/boss_landslide.cpp
r272 r279 91 91 newscript->Name="boss_landslide"; 92 92 newscript->GetAI = GetAI_boss_landslide; 93 m_scripts[nrscripts++] = newscript;93 newscript->RegisterSelf(); 94 94 } -
trunk/src/bindings/scripts/scripts/zone/maraudon/boss_noxxion.cpp
r272 r279 146 146 newscript->Name="boss_noxxion"; 147 147 newscript->GetAI = GetAI_boss_noxxion; 148 m_scripts[nrscripts++] = newscript;148 newscript->RegisterSelf(); 149 149 } -
trunk/src/bindings/scripts/scripts/zone/maraudon/boss_princess_theradras.cpp
r272 r279 105 105 newscript->Name="boss_princess_theradras"; 106 106 newscript->GetAI = GetAI_boss_ptheradras; 107 m_scripts[nrscripts++] = newscript;107 newscript->RegisterSelf(); 108 108 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_baron_geddon.cpp
r272 r279 102 102 newscript->Name="boss_baron_geddon"; 103 103 newscript->GetAI = GetAI_boss_baron_geddon; 104 m_scripts[nrscripts++] = newscript;104 newscript->RegisterSelf(); 105 105 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_garr.cpp
r272 r279 141 141 newscript->Name="boss_garr"; 142 142 newscript->GetAI = GetAI_boss_garr; 143 m_scripts[nrscripts++] = newscript;143 newscript->RegisterSelf(); 144 144 145 145 newscript = new Script; 146 146 newscript->Name="mob_firesworn"; 147 147 newscript->GetAI = GetAI_mob_firesworn; 148 m_scripts[nrscripts++] = newscript;148 newscript->RegisterSelf(); 149 149 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_gehennas.cpp
r272 r279 88 88 newscript->Name="boss_gehennas"; 89 89 newscript->GetAI = GetAI_boss_gehennas; 90 m_scripts[nrscripts++] = newscript;90 newscript->RegisterSelf(); 91 91 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_golemagg.cpp
r272 r279 193 193 newscript->Name="boss_golemagg"; 194 194 newscript->GetAI = GetAI_boss_golemagg; 195 m_scripts[nrscripts++] = newscript;195 newscript->RegisterSelf(); 196 196 197 197 newscript = new Script; 198 198 newscript->Name="mob_core_rager"; 199 199 newscript->GetAI = GetAI_mob_core_rager; 200 m_scripts[nrscripts++] = newscript;200 newscript->RegisterSelf(); 201 201 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_lucifron.cpp
r272 r279 87 87 newscript->Name="boss_lucifron"; 88 88 newscript->GetAI = GetAI_boss_lucifron; 89 m_scripts[nrscripts++] = newscript;89 newscript->RegisterSelf(); 90 90 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_magmadar.cpp
r272 r279 94 94 newscript->Name="boss_magmadar"; 95 95 newscript->GetAI = GetAI_boss_magmadar; 96 m_scripts[nrscripts++] = newscript;96 newscript->RegisterSelf(); 97 97 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_majordomo_executus.cpp
r272 r279 130 130 newscript->Name="boss_majordomo"; 131 131 newscript->GetAI = GetAI_boss_majordomo; 132 m_scripts[nrscripts++] = newscript;132 newscript->RegisterSelf(); 133 133 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_ragnaros.cpp
r272 r279 314 314 newscript->Name="boss_ragnaros"; 315 315 newscript->GetAI = GetAI_boss_ragnaros; 316 m_scripts[nrscripts++] = newscript;316 newscript->RegisterSelf(); 317 317 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_shazzrah.cpp
r272 r279 118 118 newscript->Name="boss_shazzrah"; 119 119 newscript->GetAI = GetAI_boss_shazzrah; 120 m_scripts[nrscripts++] = newscript;120 newscript->RegisterSelf(); 121 121 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_sulfuron_harbinger.cpp
r272 r279 207 207 newscript->Name="boss_sulfuron"; 208 208 newscript->GetAI = GetAI_boss_sulfuron; 209 m_scripts[nrscripts++] = newscript;209 newscript->RegisterSelf(); 210 210 211 211 newscript = new Script; 212 212 newscript->Name="mob_flamewaker_priest"; 213 213 newscript->GetAI = GetAI_mob_flamewaker_priest; 214 m_scripts[nrscripts++] = newscript;214 newscript->RegisterSelf(); 215 215 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/instance_molten_core.cpp
r272 r279 254 254 newscript->Name="instance_molten_core"; 255 255 newscript->GetInstanceData = &GetInstance_instance_molten_core; 256 m_scripts[nrscripts++] = newscript;256 newscript->RegisterSelf(); 257 257 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/molten_core.cpp
r272 r279 85 85 newscript->Name="mob_ancient_core_hound"; 86 86 newscript->GetAI = GetAI_mob_ancient_core_hound; 87 m_scripts[nrscripts++] = newscript;87 newscript->RegisterSelf(); 88 88 } -
trunk/src/bindings/scripts/scripts/zone/moonglade/moonglade.cpp
r272 r279 546 546 newscript->pGossipHello = &GossipHello_npc_bunthen_plainswind; 547 547 newscript->pGossipSelect = &GossipSelect_npc_bunthen_plainswind; 548 m_scripts[nrscripts++] = newscript;548 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;554 newscript->RegisterSelf(); 555 555 556 556 newscript = new Script; … … 558 558 newscript->pGossipHello = &GossipHello_npc_silva_filnaveth; 559 559 newscript->pGossipSelect = &GossipSelect_npc_silva_filnaveth; 560 m_scripts[nrscripts++] = newscript;560 newscript->RegisterSelf(); 561 561 562 562 newscript = new Script; 563 563 newscript->Name="npc_clintar_dreamwalker"; 564 564 newscript->pQuestAccept = &QuestAccept_npc_clintar_dreamwalker; 565 m_scripts[nrscripts++] = newscript;565 newscript->RegisterSelf(); 566 566 567 567 newscript = new Script; 568 568 newscript->Name="npc_clintar_spirit"; 569 569 newscript->GetAI = GetAI_npc_clintar_spirit; 570 m_scripts[nrscripts++] = newscript;571 } 570 newscript->RegisterSelf(); 571 } -
trunk/src/bindings/scripts/scripts/zone/mulgore/mulgore.cpp
r272 r279 61 61 newscript->pGossipHello = &GossipHello_npc_skorn_whitecloud; 62 62 newscript->pGossipSelect = &GossipSelect_npc_skorn_whitecloud; 63 m_scripts[nrscripts++] = newscript;63 newscript->RegisterSelf(); 64 64 } -
trunk/src/bindings/scripts/scripts/zone/nagrand/nagrand.cpp
r272 r279 632 632 newscript->Name="mob_shattered_rumbler"; 633 633 newscript->GetAI = GetAI_mob_shattered_rumbler; 634 m_scripts[nrscripts++] = newscript;634 newscript->RegisterSelf(); 635 635 636 636 newscript = new Script; … … 639 639 newscript->pGossipHello = &GossipHello_mob_lump; 640 640 newscript->pGossipSelect = &GossipSelect_mob_lump; 641 m_scripts[nrscripts++] = newscript;641 newscript->RegisterSelf(); 642 642 643 643 newscript = new Script; 644 644 newscript->Name="mob_sunspring_villager"; 645 645 newscript->GetAI = GetAI_mob_sunspring_villager; 646 m_scripts[nrscripts++] = newscript;646 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;653 newscript->RegisterSelf(); 654 654 655 655 newscript = new Script; … … 657 657 newscript->pGossipHello = &GossipHello_npc_greatmother_geyah; 658 658 newscript->pGossipSelect = &GossipSelect_npc_greatmother_geyah; 659 m_scripts[nrscripts++] = newscript;659 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;665 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;670 newscript->RegisterSelf(); 671 671 672 672 newscript = new Script; 673 673 newscript->Name="mob_sparrowhawk"; 674 674 newscript->GetAI = GetAI_mob_sparrowhawk; 675 m_scripts[nrscripts++] = newscript;676 } 675 newscript->RegisterSelf(); 676 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_anubrekhan.cpp
r272 r279 209 209 newscript->Name="boss_anubrekhan"; 210 210 newscript->GetAI = GetAI_boss_anubrekhan; 211 m_scripts[nrscripts++] = newscript;211 newscript->RegisterSelf(); 212 212 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_faerlina.cpp
r272 r279 198 198 newscript->Name="boss_faerlina"; 199 199 newscript->GetAI = GetAI_boss_faerlina; 200 m_scripts[nrscripts++] = newscript;200 newscript->RegisterSelf(); 201 201 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_gluth.cpp
r272 r279 171 171 newscript->Name="boss_gluth"; 172 172 newscript->GetAI = GetAI_boss_gluth; 173 m_scripts[nrscripts++] = newscript;173 newscript->RegisterSelf(); 174 174 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_highlord_mograine.cpp
r272 r279 175 175 newscript->Name="boss_highlord_mograine"; 176 176 newscript->GetAI = GetAI_boss_highlord_mograine; 177 m_scripts[nrscripts++] = newscript;177 newscript->RegisterSelf(); 178 178 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_kelthuzad.cpp
r272 r279 538 538 newscript->Name="boss_kelthuzad"; 539 539 newscript->GetAI = GetAI_boss_kelthuzadAI; 540 m_scripts[nrscripts++] = newscript;540 newscript->RegisterSelf(); 541 541 */ 542 542 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_lady_blaumeux.cpp
r272 r279 144 144 newscript->Name="boss_lady_blaumeux"; 145 145 newscript->GetAI = GetAI_boss_lady_blaumeux; 146 m_scripts[nrscripts++] = newscript;146 newscript->RegisterSelf(); 147 147 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_loatheb.cpp
r272 r279 213 213 newscript->Name="boss_loatheb"; 214 214 newscript->GetAI = GetAI_boss_loatheb; 215 m_scripts[nrscripts++] = newscript;215 newscript->RegisterSelf(); 216 216 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_maexxna.cpp
r272 r279 238 238 newscript->Name="boss_maexxna"; 239 239 newscript->GetAI = GetAI_boss_maexxna; 240 m_scripts[nrscripts++] = newscript;240 newscript->RegisterSelf(); 241 241 242 242 newscript = new Script; 243 243 newscript->Name="mob_webwrap"; 244 244 newscript->GetAI = GetAI_mob_webwrap; 245 m_scripts[nrscripts++] = newscript;245 newscript->RegisterSelf(); 246 246 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_noth.cpp
r272 r279 177 177 newscript->Name="boss_noth"; 178 178 newscript->GetAI = GetAI_boss_noth; 179 m_scripts[nrscripts++] = newscript;179 newscript->RegisterSelf(); 180 180 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_patchwerk.cpp
r272 r279 157 157 newscript->Name="boss_patchwerk"; 158 158 newscript->GetAI = GetAI_boss_patchwerk; 159 m_scripts[nrscripts++] = newscript;159 newscript->RegisterSelf(); 160 160 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_razuvious.cpp
r272 r279 164 164 newscript->Name="boss_razuvious"; 165 165 newscript->GetAI = GetAI_boss_razuvious; 166 m_scripts[nrscripts++] = newscript;166 newscript->RegisterSelf(); 167 167 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_sapphiron.cpp
r272 r279 196 196 newscript->Name="boss_sapphiron"; 197 197 newscript->GetAI = GetAI_boss_sapphiron; 198 m_scripts[nrscripts++] = newscript;198 newscript->RegisterSelf(); 199 199 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_sir_zeliek.cpp
r272 r279 143 143 newscript->Name="boss_sir_zeliek"; 144 144 newscript->GetAI = GetAI_boss_sir_zeliek; 145 m_scripts[nrscripts++] = newscript;145 newscript->RegisterSelf(); 146 146 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_thane_korthazz.cpp
r272 r279 144 144 newscript->Name="boss_thane_korthazz"; 145 145 newscript->GetAI = GetAI_boss_thane_korthazz; 146 m_scripts[nrscripts++] = newscript;146 newscript->RegisterSelf(); 147 147 } -
trunk/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp
r272 r279 401 401 newscript->Name="go_manaforge_control_console"; 402 402 newscript->pGOHello = &GOHello_go_manaforge_control_console; 403 m_scripts[nrscripts++] = newscript;403 newscript->RegisterSelf(); 404 404 405 405 newscript = new Script; 406 406 newscript->Name="npc_manaforge_control_console"; 407 407 newscript->GetAI = GetAI_npc_manaforge_control_console; 408 m_scripts[nrscripts++] = newscript;408 newscript->RegisterSelf(); 409 409 410 410 newscript = new Script; … … 412 412 newscript->pGossipHello = &GossipHello_npc_protectorate_nether_drake; 413 413 newscript->pGossipSelect = &GossipSelect_npc_protectorate_nether_drake; 414 m_scripts[nrscripts++] = newscript;414 newscript->RegisterSelf(); 415 415 416 416 newscript = new Script; … … 418 418 newscript->pGossipHello = &GossipHello_npc_veronia; 419 419 newscript->pGossipSelect = &GossipSelect_npc_veronia; 420 m_scripts[nrscripts++] = newscript;421 } 420 newscript->RegisterSelf(); 421 } -
trunk/src/bindings/scripts/scripts/zone/onyxias_lair/boss_onyxia.cpp
r272 r279 230 230 newscript->Name="boss_onyxia"; 231 231 newscript->GetAI = GetAI_boss_onyxiaAI; 232 m_scripts[nrscripts++] = newscript;232 newscript->RegisterSelf(); 233 233 } -
trunk/src/bindings/scripts/scripts/zone/orgrimmar/orgrimmar.cpp
r272 r279 248 248 newscript->pGossipHello = &GossipHello_npc_neeru_fireblade; 249 249 newscript->pGossipSelect = &GossipSelect_npc_neeru_fireblade; 250 m_scripts[nrscripts++] = newscript;250 newscript->RegisterSelf(); 251 251 252 252 newscript = new Script; … … 255 255 newscript->pQuestAccept = &QuestAccept_npc_shenthul; 256 256 newscript->pReceiveEmote = &ReciveEmote_npc_shenthul; 257 m_scripts[nrscripts++] = newscript;257 newscript->RegisterSelf(); 258 258 259 259 newscript = new Script; … … 262 262 newscript->pGossipHello = &GossipHello_npc_thrall_warchief; 263 263 newscript->pGossipSelect = &GossipSelect_npc_thrall_warchief; 264 m_scripts[nrscripts++] = newscript;265 } 264 newscript->RegisterSelf(); 265 } -
trunk/src/bindings/scripts/scripts/zone/razorfen_downs/boss_amnennar_the_coldbringer.cpp
r272 r279 137 137 newscript->Name="boss_amnennar_the_coldbringer"; 138 138 newscript->GetAI = GetAI_boss_amnennar_the_coldbringer; 139 m_scripts[nrscripts++] = newscript;139 newscript->RegisterSelf(); 140 140 } -
trunk/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_ayamiss.cpp
r272 r279 104 104 newscript->Name="boss_ayamiss"; 105 105 newscript->GetAI = GetAI_boss_ayamiss; 106 m_scripts[nrscripts++] = newscript;106 newscript->RegisterSelf(); 107 107 } -
trunk/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_kurinnaxx.cpp
r272 r279 90 90 newscript->Name="boss_kurinnaxx"; 91 91 newscript->GetAI = GetAI_boss_kurinnaxx; 92 m_scripts[nrscripts++] = newscript;92 newscript->RegisterSelf(); 93 93 } -
trunk/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_moam.cpp
r272 r279 114 114 newscript->Name="boss_moam"; 115 115 newscript->GetAI = GetAI_boss_moam; 116 m_scripts[nrscripts++] = newscript;116 newscript->RegisterSelf(); 117 117 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_arcanist_doan.cpp
r272 r279 168 168 newscript->Name="boss_arcanist_doan"; 169 169 newscript->GetAI = GetAI_boss_arcanist_doan; 170 m_scripts[nrscripts++] = newscript;170 newscript->RegisterSelf(); 171 171 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_azshir_the_sleepless.cpp
r272 r279 94 94 newscript->Name="boss_azshir_the_sleepless"; 95 95 newscript->GetAI = GetAI_boss_azshir_the_sleepless; 96 m_scripts[nrscripts++] = newscript;96 newscript->RegisterSelf(); 97 97 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_bloodmage_thalnos.cpp
r272 r279 133 133 newscript->Name="boss_bloodmage_thalnos"; 134 134 newscript->GetAI = GetAI_boss_bloodmage_thalnos; 135 m_scripts[nrscripts++] = newscript;135 newscript->RegisterSelf(); 136 136 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_herod.cpp
r272 r279 194 194 newscript->Name="boss_herod"; 195 195 newscript->GetAI = GetAI_boss_herod; 196 m_scripts[nrscripts++] = newscript;196 newscript->RegisterSelf(); 197 197 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp
r272 r279 129 129 newscript->Name="boss_high_inquisitor_fairbanks"; 130 130 newscript->GetAI = GetAI_boss_high_inquisitor_fairbanks; 131 m_scripts[nrscripts++] = newscript;131 newscript->RegisterSelf(); 132 132 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_high_inquisitor_whitemane.cpp
r272 r279 174 174 newscript->Name="boss_high_inquisitor_whitemane"; 175 175 newscript->GetAI = GetAI_boss_high_inquisitor_whitemane; 176 m_scripts[nrscripts++] = newscript;176 newscript->RegisterSelf(); 177 177 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_houndmaster_loksey.cpp
r272 r279 75 75 newscript->Name="boss_houndmaster_loksey"; 76 76 newscript->GetAI = GetAI_boss_houndmaster_loksey; 77 m_scripts[nrscripts++] = newscript;77 newscript->RegisterSelf(); 78 78 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_interrogator_vishas.cpp
r272 r279 110 110 newscript->Name="boss_interrogator_vishas"; 111 111 newscript->GetAI = GetAI_boss_interrogator_vishas; 112 m_scripts[nrscripts++] = newscript;112 newscript->RegisterSelf(); 113 113 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_scarlet_commander_mograine.cpp
r272 r279 157 157 newscript->Name="boss_scarlet_commander_mograine"; 158 158 newscript->GetAI = GetAI_boss_scarlet_commander_mograine; 159 m_scripts[nrscripts++] = newscript;159 newscript->RegisterSelf(); 160 160 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_scorn.cpp
r272 r279 97 97 newscript->Name="boss_scorn"; 98 98 newscript->GetAI = GetAI_boss_scorn; 99 m_scripts[nrscripts++] = newscript;99 newscript->RegisterSelf(); 100 100 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_darkmaster_gandling.cpp
r272 r279 189 189 newscript->Name="boss_darkmaster_gandling"; 190 190 newscript->GetAI = GetAI_boss_darkmaster_gandling; 191 m_scripts[nrscripts++] = newscript;191 newscript->RegisterSelf(); 192 192 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_death_knight_darkreaver.cpp
r272 r279 56 56 newscript->Name="boss_death_knight_darkreaver"; 57 57 newscript->GetAI = GetAI_boss_death_knight_darkreaver; 58 m_scripts[nrscripts++] = newscript;58 newscript->RegisterSelf(); 59 59 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_doctor_theolen_krastinov.cpp
r272 r279 105 105 newscript->Name="boss_doctor_theolen_krastinov"; 106 106 newscript->GetAI = GetAI_boss_theolenkrastinov; 107 m_scripts[nrscripts++] = newscript;107 newscript->RegisterSelf(); 108 108 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_illucia_barov.cpp
r272 r279 113 113 newscript->Name="boss_illucia_barov"; 114 114 newscript->GetAI = GetAI_boss_illuciabarov; 115 m_scripts[nrscripts++] = newscript;115 newscript->RegisterSelf(); 116 116 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_instructor_malicia.cpp
r272 r279 149 149 newscript->Name="boss_instructor_malicia"; 150 150 newscript->GetAI = GetAI_boss_instructormalicia; 151 m_scripts[nrscripts++] = newscript;151 newscript->RegisterSelf(); 152 152 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_jandice_barov.cpp
r272 r279 213 213 newscript->Name="boss_jandice_barov"; 214 214 newscript->GetAI = GetAI_boss_jandicebarov; 215 m_scripts[nrscripts++] = newscript;215 newscript->RegisterSelf(); 216 216 217 217 newscript = new Script; 218 218 newscript->Name="mob_illusionofjandicebarov"; 219 219 newscript->GetAI = GetAI_mob_illusionofjandicebarov; 220 m_scripts[nrscripts++] = newscript;220 newscript->RegisterSelf(); 221 221 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_kormok.cpp
r272 r279 152 152 newscript->Name="boss_kormok"; 153 153 newscript->GetAI = GetAI_boss_kormok; 154 m_scripts[nrscripts++] = newscript;154 newscript->RegisterSelf(); 155 155 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_lord_alexei_barov.cpp
r272 r279 95 95 newscript->Name="boss_lord_alexei_barov"; 96 96 newscript->GetAI = GetAI_boss_lordalexeibarov; 97 m_scripts[nrscripts++] = newscript;97 newscript->RegisterSelf(); 98 98 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_lorekeeper_polkelt.cpp
r272 r279 110 110 newscript->Name="boss_lorekeeper_polkelt"; 111 111 newscript->GetAI = GetAI_boss_lorekeeperpolkelt; 112 m_scripts[nrscripts++] = newscript;112 newscript->RegisterSelf(); 113 113 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_ras_frostwhisper.cpp
r272 r279 122 122 newscript->Name="boss_boss_ras_frostwhisper"; 123 123 newscript->GetAI = GetAI_boss_rasfrost; 124 m_scripts[nrscripts++] = newscript;124 newscript->RegisterSelf(); 125 125 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_the_ravenian.cpp
r272 r279 115 115 newscript->Name="boss_the_ravenian"; 116 116 newscript->GetAI = GetAI_boss_theravenian; 117 m_scripts[nrscripts++] = newscript;117 newscript->RegisterSelf(); 118 118 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_vectus.cpp
r272 r279 92 92 newscript->Name="boss_vectus"; 93 93 newscript->GetAI = GetAI_boss_vectus; 94 m_scripts[nrscripts++] = newscript;94 newscript->RegisterSelf(); 95 95 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/instance_scholomance.cpp
r272 r279 99 99 newscript->Name = "instance_scholomance"; 100 100 newscript->GetInstanceData = GetInstanceData_instance_scholomance; 101 m_scripts[nrscripts++] = newscript;101 newscript->RegisterSelf(); 102 102 } -
trunk/src/bindings/scripts/scripts/zone/searing_gorge/searing_gorge.cpp
r272 r279 144 144 newscript->pGossipHello = &GossipHello_npc_kalaran_windblade; 145 145 newscript->pGossipSelect = &GossipSelect_npc_kalaran_windblade; 146 m_scripts[nrscripts++] = newscript;146 newscript->RegisterSelf(); 147 147 148 148 newscript = new Script; … … 150 150 newscript->pGossipHello = &GossipHello_npc_lothos_riftwaker; 151 151 newscript->pGossipSelect = &GossipSelect_npc_lothos_riftwaker; 152 m_scripts[nrscripts++] = newscript;152 newscript->RegisterSelf(); 153 153 154 154 newscript = new Script; … … 156 156 newscript->pGossipHello = &GossipHello_npc_zamael_lunthistle; 157 157 newscript->pGossipSelect = &GossipSelect_npc_zamael_lunthistle; 158 m_scripts[nrscripts++] = newscript;158 newscript->RegisterSelf(); 159 159 } -
trunk/src/bindings/scripts/scripts/zone/shadowfang_keep/instance_shadowfang_keep.cpp
r272 r279 149 149 newscript->Name = "instance_shadowfang_keep"; 150 150 newscript->GetInstanceData = GetInstanceData_instance_shadowfang_keep; 151 m_scripts[nrscripts++] = newscript;151 newscript->RegisterSelf(); 152 152 } -
trunk/src/bindings/scripts/scripts/zone/shadowfang_keep/shadowfang_keep.cpp
r272 r279 114 114 newscript->pGossipSelect = &GossipSelect_npc_shadowfang_prisoner; 115 115 newscript->GetAI = GetAI_npc_shadowfang_prisoner; 116 m_scripts[nrscripts++] = newscript;116 newscript->RegisterSelf(); 117 117 } -
trunk/src/bindings/scripts/scripts/zone/shadowmoon_valley/boss_doomwalker.cpp
r272 r279 213 213 newscript->Name="boss_doomwalker"; 214 214 newscript->GetAI = GetAI_boss_doomwalker; 215 m_scripts[nrscripts++] = newscript;215 newscript->RegisterSelf(); 216 216 } -
trunk/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp
r272 r279 1107 1107 newscript->Name = "mob_mature_netherwing_drake"; 1108 1108 newscript->GetAI = GetAI_mob_mature_netherwing_drake; 1109 m_scripts[nrscripts++] = newscript;1109 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;1114 newscript->RegisterSelf(); 1115 1115 1116 1116 newscript = new Script; 1117 1117 newscript->Name = "mob_dragonmaw_peon"; 1118 1118 newscript->GetAI = GetAI_mob_dragonmaw_peon; 1119 m_scripts[nrscripts++] = newscript;1119 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;1125 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;1130 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;1136 newscript->RegisterSelf(); 1137 1137 1138 1138 newscript = new Script; … … 1140 1140 newscript->pGossipHello = &GossipHello_npc_murkblood_overseer; 1141 1141 newscript->pGossipSelect = &GossipSelect_npc_murkblood_overseer; 1142 m_scripts[nrscripts++] = newscript;1142 newscript->RegisterSelf(); 1143 1143 1144 1144 newscript = new Script; … … 1146 1146 newscript->pGossipHello = &GossipHello_npc_neltharaku; 1147 1147 newscript->pGossipSelect = &GossipSelect_npc_neltharaku; 1148 m_scripts[nrscripts++] = newscript;1148 newscript->RegisterSelf(); 1149 1149 1150 1150 newscript = new Script; 1151 1151 newscript->Name = "npc_karynaku"; 1152 1152 newscript->pQuestAccept = &QuestAccept_npc_karynaku; 1153 m_scripts[nrscripts++] = newscript;1153 newscript->RegisterSelf(); 1154 1154 1155 1155 newscript = new Script; … … 1157 1157 newscript->pGossipHello = &GossipHello_npc_oronok_tornheart; 1158 1158 newscript->pGossipSelect = &GossipSelect_npc_oronok_tornheart; 1159 m_scripts[nrscripts++] = newscript;1159 newscript->RegisterSelf(); 1160 1160 1161 1161 newscript = new Script; … … 1163 1163 newscript->GetAI = GetAI_Overlord_Morghor; 1164 1164 newscript->pQuestAccept = &QuestAccept_Overlord_Morghor; 1165 m_scripts[nrscripts++] = newscript;1165 newscript->RegisterSelf(); 1166 1166 1167 1167 newscript = new Script; 1168 1168 newscript->Name = "npc_lord_illidan_stormrage"; 1169 1169 newscript->GetAI = GetAI_Lord_Illidan; 1170 m_scripts[nrscripts++] = newscript;1170 newscript->RegisterSelf(); 1171 1171 1172 1172 newscript = new Script; … … 1175 1175 newscript->pGossipHello = &GossipHello_npc_yarzill_fly; 1176 1176 newscript->pGossipSelect = &GossipSelect_npc_yarzill_fly; 1177 m_scripts[nrscripts++] = newscript;1178 } 1177 newscript->RegisterSelf(); 1178 } -
trunk/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp
r272 r279 415 415 newscript->pGossipHello = &GossipHello_npc_raliq_the_drunk; 416 416 newscript->pGossipSelect = &GossipSelect_npc_raliq_the_drunk; 417 m_scripts[nrscripts++] = newscript;417 newscript->RegisterSelf(); 418 418 419 419 newscript = new Script; … … 421 421 newscript->GetAI = GetAI_npc_salsalabim; 422 422 newscript->pGossipHello = &GossipHello_npc_salsalabim; 423 m_scripts[nrscripts++] = newscript;423 newscript->RegisterSelf(); 424 424 425 425 newscript = new Script; … … 427 427 newscript->pGossipHello = &GossipHello_npc_shattrathflaskvendors; 428 428 newscript->pGossipSelect = &GossipSelect_npc_shattrathflaskvendors; 429 m_scripts[nrscripts++] = newscript;429 newscript->RegisterSelf(); 430 430 431 431 newscript = new Script; … … 433 433 newscript->pGossipHello = &GossipHello_npc_zephyr; 434 434 newscript->pGossipSelect = &GossipSelect_npc_zephyr; 435 m_scripts[nrscripts++] = newscript;435 newscript->RegisterSelf(); 436 436 437 437 newscript = new Script; 438 438 newscript->Name="npc_kservant"; 439 439 newscript->GetAI = GetAI_npc_kservantAI; 440 m_scripts[nrscripts++] = newscript;441 } 440 newscript->RegisterSelf(); 441 } -
trunk/src/bindings/scripts/scripts/zone/silithus/silithus.cpp
r272 r279 146 146 newscript->pGossipHello = &GossipHello_npcs_rutgar_and_frankal; 147 147 newscript->pGossipSelect = &GossipSelect_npcs_rutgar_and_frankal; 148 m_scripts[nrscripts++] = newscript;148 newscript->RegisterSelf(); 149 149 } -
trunk/src/bindings/scripts/scripts/zone/silvermoon/silvermoon_city.cpp
r272 r279 100 100 newscript->Name="npc_blood_knight_stillblade"; 101 101 newscript->GetAI = GetAI_npc_blood_knight_stillblade; 102 m_scripts[nrscripts++] = newscript;102 newscript->RegisterSelf(); 103 103 } -
trunk/src/bindings/scripts/scripts/zone/silverpine_forest/silverpine_forest.cpp
r272 r279 97 97 newscript->pGossipSelect = &GossipSelect_npc_astor_hadren; 98 98 newscript->GetAI = GetAI_npc_astor_hadren; 99 m_scripts[nrscripts++] = newscript;99 newscript->RegisterSelf(); 100 100 } -
trunk/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp
r272 r279 77 77 newscript->pGossipHello = &GossipHello_npc_braug_dimspirit; 78 78 newscript->pGossipSelect = &GossipSelect_npc_braug_dimspirit; 79 m_scripts[nrscripts++] = newscript;79 newscript->RegisterSelf(); 80 80 } -
trunk/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp
r272 r279 246 246 newscript->pGossipHello = &GossipHello_npc_archmage_malin; 247 247 newscript->pGossipSelect = &GossipSelect_npc_archmage_malin; 248 m_scripts[nrscripts++] = newscript;248 newscript->RegisterSelf(); 249 249 250 250 newscript = new Script; … … 252 252 newscript->GetAI = GetAI_npc_bartleby; 253 253 newscript->pQuestAccept = &QuestAccept_npc_bartleby; 254 m_scripts[nrscripts++] = newscript;254 newscript->RegisterSelf(); 255 255 256 256 newscript = new Script; … … 258 258 newscript->GetAI = GetAI_npc_dashel_stonefist; 259 259 newscript->pQuestAccept = &QuestAccept_npc_dashel_stonefist; 260 m_scripts[nrscripts++] = newscript;260 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;265 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;272 } 271 newscript->RegisterSelf(); 272 } -
trunk/src/bindings/scripts/scripts/zone/stranglethorn_vale/stranglethorn_vale.cpp
r272 r279 104 104 newscript->Name = "mob_yenniku"; 105 105 newscript->GetAI = GetAI_mob_yenniku; 106 m_scripts[nrscripts++] = newscript;106 newscript->RegisterSelf(); 107 107 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_baron_rivendare.cpp
r272 r279 212 212 newscript->Name="boss_baron_rivendare"; 213 213 newscript->GetAI = GetAI_boss_baron_rivendare; 214 m_scripts[nrscripts++] = newscript;214 newscript->RegisterSelf(); 215 215 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_baroness_anastari.cpp
r272 r279 121 121 newscript->Name="boss_baroness_anastari"; 122 122 newscript->GetAI = GetAI_boss_baroness_anastari; 123 m_scripts[nrscripts++] = newscript;123 newscript->RegisterSelf(); 124 124 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_cannon_master_willey.cpp
r272 r279 218 218 newscript->Name="boss_cannon_master_willey"; 219 219 newscript->GetAI = GetAI_boss_cannon_master_willey; 220 m_scripts[nrscripts++] = newscript;220 newscript->RegisterSelf(); 221 221 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_dathrohan_balnazzar.cpp
r272 r279 313 313 newscript->Name="boss_dathrohan_balnazzar"; 314 314 newscript->GetAI = GetAI_boss_dathrohan_balnazzar; 315 m_scripts[nrscripts++] = newscript;315 newscript->RegisterSelf(); 316 316 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_magistrate_barthilas.cpp
r272 r279 111 111 newscript->Name="boss_magistrate_barthilas"; 112 112 newscript->GetAI = GetAI_boss_magistrate_barthilas; 113 m_scripts[nrscripts++] = newscript;113 newscript->RegisterSelf(); 114 114 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_maleki_the_pallid.cpp
r272 r279 116 116 newscript->Name="boss_maleki_the_pallid"; 117 117 newscript->GetAI = GetAI_boss_maleki_the_pallid; 118 m_scripts[nrscripts++] = newscript;118 newscript->RegisterSelf(); 119 119 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_nerubenkan.cpp
r272 r279 135 135 newscript->Name="boss_nerubenkan"; 136 136 newscript->GetAI = GetAI_boss_nerubenkan; 137 m_scripts[nrscripts++] = newscript;137 newscript->RegisterSelf(); 138 138 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_order_of_silver_hand.cpp
r272 r279 158 158 newscript->Name="boss_silver_hand_bosses"; 159 159 newscript->GetAI = GetAI_boss_silver_hand_bossesAI; 160 m_scripts[nrscripts++] = newscript;160 newscript->RegisterSelf(); 161 161 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_postmaster_malown.cpp
r272 r279 141 141 newscript->Name="boss_postmaster_malown"; 142 142 newscript->GetAI = GetAI_boss_postmaster_malown; 143 m_scripts[nrscripts++] = newscript;143 newscript->RegisterSelf(); 144 144 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_ramstein_the_gorger.cpp
r272 r279 89 89 newscript->Name="boss_ramstein_the_gorger"; 90 90 newscript->GetAI = GetAI_boss_ramstein_the_gorger; 91 m_scripts[nrscripts++] = newscript;91 newscript->RegisterSelf(); 92 92 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_timmy_the_cruel.cpp
r272 r279 97 97 newscript->Name="boss_timmy_the_cruel"; 98 98 newscript->GetAI = GetAI_boss_timmy_the_cruel; 99 m_scripts[nrscripts++] = newscript;99 newscript->RegisterSelf(); 100 100 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/instance_stratholme.cpp
r272 r279 74 74 newscript->Name = "instance_stratholme"; 75 75 newscript->GetInstanceData = GetInstanceData_instance_stratholme; 76 m_scripts[nrscripts++] = newscript;76 newscript->RegisterSelf(); 77 77 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/stratholme.cpp
r272 r279 311 311 newscript->Name="mob_freed_soul"; 312 312 newscript->GetAI = GetAI_mob_freed_soul; 313 m_scripts[nrscripts++] = newscript;313 newscript->RegisterSelf(); 314 314 315 315 newscript = new Script; 316 316 newscript->Name="mob_restless_soul"; 317 317 newscript->GetAI = GetAI_mob_restless_soul; 318 m_scripts[nrscripts++] = newscript;318 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;324 newscript->RegisterSelf(); 325 325 326 326 newscript = new Script; 327 327 newscript->Name="mob_mindless_skeleton"; 328 328 newscript->GetAI = GetAI_mob_mindless_skeleton; 329 m_scripts[nrscripts++] = newscript;329 newscript->RegisterSelf(); 330 330 331 331 newscript = new Script; 332 332 newscript->Name="mob_thuzadin_acolyte"; 333 333 newscript->GetAI = GetAI_mob_thuzadin_acolyte; 334 m_scripts[nrscripts++] = newscript;335 } 334 newscript->RegisterSelf(); 335 } -
trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_brutallus.cpp
r272 r279 179 179 newscript->Name="boss_brutallus"; 180 180 newscript->GetAI = GetAI_boss_brutallus; 181 m_scripts[nrscripts++] = newscript;181 newscript->RegisterSelf(); 182 182 } -
trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_eredar_twins.cpp
r272 r279 762 762 newscript->Name="boss_sacrolash"; 763 763 newscript->GetAI = GetAI_boss_sacrolash; 764 m_scripts[nrscripts++] = newscript;764 newscript->RegisterSelf(); 765 765 766 766 newscript = new Script; 767 767 newscript->Name="boss_alythess"; 768 768 newscript->GetAI = GetAI_boss_alythess; 769 m_scripts[nrscripts++] = newscript;769 newscript->RegisterSelf(); 770 770 771 771 newscript = new Script; 772 772 newscript->Name="mob_shadow_image"; 773 773 newscript->GetAI = GetAI_mob_shadow_image; 774 m_scripts[nrscripts++] = newscript;774 newscript->RegisterSelf(); 775 775 } -
trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_felmyst.cpp
r272 r279 296 296 break; 297 297 case 2: 298 if( Player* target = SelectRandomPlayer(150))298 if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true)) 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( Player* target = SelectRandomPlayer(150))314 if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true)) 315 315 { 316 316 //target->CastSpell(target, SPELL_VAPOR_SUMMON, true); need core support … … 331 331 break; 332 332 case 5: 333 if( Player* target = SelectRandomPlayer(150))333 if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true)) 334 334 { 335 335 BreathX = target->GetPositionX(); … … 434 434 break; 435 435 case EVENT_ENCAPSULATE: 436 if(Unit* target = Select RandomPlayer(150))436 if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true)) 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 else534 PlayerList.erase(i);535 }536 return NULL;537 }538 518 }; 539 519 … … 595 575 newscript->Name="boss_felmyst"; 596 576 newscript->GetAI = GetAI_boss_felmyst; 597 m_scripts[nrscripts++] = newscript;577 newscript->RegisterSelf(); 598 578 599 579 newscript = new Script; 600 580 newscript->Name="mob_felmyst_vapor"; 601 581 newscript->GetAI = GetAI_mob_felmyst_vapor; 602 m_scripts[nrscripts++] = newscript;582 newscript->RegisterSelf(); 603 583 604 584 newscript = new Script; 605 585 newscript->Name="mob_felmyst_trail"; 606 586 newscript->GetAI = GetAI_mob_felmyst_trail; 607 m_scripts[nrscripts++] = newscript;587 newscript->RegisterSelf(); 608 588 } -
trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp
r272 r279 369 369 Map *map = m_creature->GetMap(); 370 370 if(!map->IsDungeon()) return; 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 } 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); 378 377 } 379 378 … … 682 681 newscript->Name="boss_kalecgos"; 683 682 newscript->GetAI = GetAI_boss_kalecgos; 684 m_scripts[nrscripts++] = newscript;683 newscript->RegisterSelf(); 685 684 686 685 newscript = new Script; 687 686 newscript->Name="boss_sathrovarr"; 688 687 newscript->GetAI = GetAI_boss_Sathrovarr; 689 m_scripts[nrscripts++] = newscript;688 newscript->RegisterSelf(); 690 689 691 690 newscript = new Script; 692 691 newscript->Name="boss_kalec"; 693 692 newscript->GetAI = GetAI_boss_kalec; 694 m_scripts[nrscripts++] = newscript;693 newscript->RegisterSelf(); 695 694 696 695 newscript = new Script; 697 696 newscript->Name="kalocegos_teleporter"; 698 697 newscript->pGOHello = &GOkalocegos_teleporter; 699 m_scripts[nrscripts++] = newscript;698 newscript->RegisterSelf(); 700 699 } -
trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp
r272 r279 193 193 newscript->Name = "instance_sunwell_plateau"; 194 194 newscript->GetInstanceData = GetInstanceData_instance_sunwell_plateau; 195 m_scripts[nrscripts++] = newscript;195 newscript->RegisterSelf(); 196 196 } -
trunk/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp
r272 r279 375 375 newscript->Name="mob_aquementas"; 376 376 newscript->GetAI = GetAI_mob_aquementas; 377 m_scripts[nrscripts++] = newscript;377 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;382 newscript->RegisterSelf(); 383 383 384 384 newscript = new Script; … … 386 386 newscript->pGossipHello = &GossipHello_npc_marin_noggenfogger; 387 387 newscript->pGossipSelect = &GossipSelect_npc_marin_noggenfogger; 388 m_scripts[nrscripts++] = newscript;388 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;395 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;402 } 401 newscript->RegisterSelf(); 402 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/arcatraz.cpp
r272 r279 576 576 newscript->Name="npc_millhouse_manastorm"; 577 577 newscript->GetAI = GetAI_npc_millhouse_manastorm; 578 m_scripts[nrscripts++] = newscript;578 newscript->RegisterSelf(); 579 579 580 580 newscript = new Script; 581 581 newscript->Name="npc_warden_mellichar"; 582 582 newscript->GetAI = GetAI_npc_warden_mellichar; 583 m_scripts[nrscripts++] = newscript;583 newscript->RegisterSelf(); 584 584 585 585 newscript = new Script; 586 586 newscript->Name="mob_zerekethvoidzone"; 587 587 newscript->GetAI = GetAI_mob_zerekethvoidzoneAI; 588 m_scripts[nrscripts++] = newscript;588 newscript->RegisterSelf(); 589 589 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp
r272 r279 368 368 newscript->Name="boss_harbinger_skyriss"; 369 369 newscript->GetAI = GetAI_boss_harbinger_skyriss; 370 m_scripts[nrscripts++] = newscript;370 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;375 newscript->RegisterSelf(); 376 376 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/instance_arcatraz.cpp
r272 r279 221 221 newscript->Name = "instance_arcatraz"; 222 222 newscript->GetInstanceData = GetInstanceData_instance_arcatraz; 223 m_scripts[nrscripts++] = newscript;223 newscript->RegisterSelf(); 224 224 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_high_botanist_freywinn.cpp
r272 r279 212 212 newscript->Name="boss_high_botanist_freywinn"; 213 213 newscript->GetAI = GetAI_boss_high_botanist_freywinn; 214 m_scripts[nrscripts++] = newscript;214 newscript->RegisterSelf(); 215 215 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_laj.cpp
r272 r279 195 195 newscript->Name="boss_laj"; 196 196 newscript->GetAI = GetAI_boss_laj; 197 m_scripts[nrscripts++] = newscript;197 newscript->RegisterSelf(); 198 198 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_warp_splinter.cpp
r272 r279 294 294 newscript->Name="boss_warp_splinter"; 295 295 newscript->GetAI = GetAI_boss_warp_splinter; 296 m_scripts[nrscripts++] = newscript;296 newscript->RegisterSelf(); 297 297 298 298 newscript = new Script; 299 299 newscript->Name="mob_warp_splinter_treant"; 300 300 newscript->GetAI = GetAI_mob_treant; 301 m_scripts[nrscripts++] = newscript;301 newscript->RegisterSelf(); 302 302 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_alar.cpp
r272 r279 506 506 newscript->Name="boss_alar"; 507 507 newscript->GetAI = GetAI_boss_alar; 508 m_scripts[nrscripts++] = newscript;508 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;513 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;518 newscript->RegisterSelf(); 519 519 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_astromancer.cpp
r272 r279 537 537 newscript->Name="boss_high_astromancer_solarian"; 538 538 newscript->GetAI = GetAI_boss_high_astromancer_solarian; 539 m_scripts[nrscripts++] = newscript;539 newscript->RegisterSelf(); 540 540 541 541 newscript = new Script; 542 542 newscript->Name="mob_solarium_priest"; 543 543 newscript->GetAI = GetAI_mob_solarium_priest; 544 m_scripts[nrscripts++] = newscript;544 newscript->RegisterSelf(); 545 545 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp
r272 r279 1582 1582 newscript->Name="boss_kaelthas"; 1583 1583 newscript->GetAI = GetAI_boss_kaelthas; 1584 m_scripts[nrscripts++] = newscript;1584 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;1589 newscript->RegisterSelf(); 1590 1590 1591 1591 newscript = new Script; 1592 1592 newscript->Name="boss_lord_sanguinar"; 1593 1593 newscript->GetAI = GetAI_boss_lord_sanguinar; 1594 m_scripts[nrscripts++] = newscript;1594 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;1599 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;1604 newscript->RegisterSelf(); 1605 1605 1606 1606 newscript = new Script; 1607 1607 newscript->Name= "mob_kael_flamestrike"; 1608 1608 newscript->GetAI = GetAI_mob_kael_flamestrike; 1609 m_scripts[nrscripts++] = newscript;1609 newscript->RegisterSelf(); 1610 1610 1611 1611 newscript = new Script; 1612 1612 newscript->Name="mob_phoenix"; 1613 1613 newscript->GetAI = GetAI_mob_phoenix; 1614 m_scripts[nrscripts++] = newscript;1614 newscript->RegisterSelf(); 1615 1615 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp
r272 r279 196 196 newscript->Name="boss_void_reaver"; 197 197 newscript->GetAI = GetAI_boss_void_reaver; 198 m_scripts[nrscripts++] = newscript;198 newscript->RegisterSelf(); 199 199 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/instance_the_eye.cpp
r272 r279 173 173 newscript->Name = "instance_the_eye"; 174 174 newscript->GetInstanceData = GetInstanceData_instance_the_eye; 175 m_scripts[nrscripts++] = newscript;175 newscript->RegisterSelf(); 176 176 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/the_eye.cpp
r272 r279 95 95 newscript->Name="mob_crystalcore_devastator"; 96 96 newscript->GetAI = GetAI_mob_crystalcore_devastator; 97 m_scripts[nrscripts++] = newscript;97 newscript->RegisterSelf(); 98 98 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp
r272 r279 158 158 newscript->Name="boss_gatewatcher_iron_hand"; 159 159 newscript->GetAI = GetAI_boss_gatewatcher_iron_hand; 160 m_scripts[nrscripts++] = newscript;160 newscript->RegisterSelf(); 161 161 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp
r272 r279 278 278 newscript->Name="boss_nethermancer_sepethrea"; 279 279 newscript->GetAI = GetAI_boss_nethermancer_sepethrea; 280 m_scripts[nrscripts++] = newscript;280 newscript->RegisterSelf(); 281 281 282 282 newscript = new Script; 283 283 newscript->Name="mob_ragin_flames"; 284 284 newscript->GetAI = GetAI_mob_ragin_flames; 285 m_scripts[nrscripts++] = newscript;285 newscript->RegisterSelf(); 286 286 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp
r272 r279 298 298 newscript->Name="boss_pathaleon_the_calculator"; 299 299 newscript->GetAI = GetAI_boss_pathaleon_the_calculator; 300 m_scripts[nrscripts++] = newscript;300 newscript->RegisterSelf(); 301 301 302 302 newscript = new Script; 303 303 newscript->Name="mob_nether_wraith"; 304 304 newscript->GetAI = GetAI_mob_nether_wraith; 305 m_scripts[nrscripts++] = newscript;305 newscript->RegisterSelf(); 306 306 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/instance_mechanar.cpp
r272 r279 87 87 newscript->Name = "instance_mechanar"; 88 88 newscript->GetInstanceData = GetInstanceData_instance_mechanar; 89 m_scripts[nrscripts++] = newscript;89 newscript->RegisterSelf(); 90 90 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_bug_trio.cpp
r272 r279 335 335 newscript->Name="boss_kri"; 336 336 newscript->GetAI = GetAI_boss_kri; 337 m_scripts[nrscripts++] = newscript;337 newscript->RegisterSelf(); 338 338 339 339 newscript = new Script; 340 340 newscript->Name="boss_vem"; 341 341 newscript->GetAI = GetAI_boss_vem; 342 m_scripts[nrscripts++] = newscript;342 newscript->RegisterSelf(); 343 343 344 344 newscript = new Script; 345 345 newscript->Name="boss_yauj"; 346 346 newscript->GetAI = GetAI_boss_yauj; 347 m_scripts[nrscripts++] = newscript;347 newscript->RegisterSelf(); 348 348 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp
r272 r279 578 578 if(!map->IsDungeon()) return; 579 579 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) 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()) 585 584 { 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; 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 } 594 597 } 595 598 } … … 1327 1330 newscript->Name="boss_eye_of_cthun"; 1328 1331 newscript->GetAI = GetAI_eye_of_cthun; 1329 m_scripts[nrscripts++] = newscript;1332 newscript->RegisterSelf(); 1330 1333 1331 1334 newscript = new Script; 1332 1335 newscript->Name="boss_cthun"; 1333 1336 newscript->GetAI = GetAI_cthun; 1334 m_scripts[nrscripts++] = newscript;1337 newscript->RegisterSelf(); 1335 1338 1336 1339 newscript = new Script; 1337 1340 newscript->Name="mob_eye_tentacle"; 1338 1341 newscript->GetAI = GetAI_eye_tentacle; 1339 m_scripts[nrscripts++] = newscript;1342 newscript->RegisterSelf(); 1340 1343 1341 1344 newscript = new Script; 1342 1345 newscript->Name="mob_claw_tentacle"; 1343 1346 newscript->GetAI = GetAI_claw_tentacle; 1344 m_scripts[nrscripts++] = newscript;1347 newscript->RegisterSelf(); 1345 1348 1346 1349 newscript = new Script; 1347 1350 newscript->Name="mob_giant_claw_tentacle"; 1348 1351 newscript->GetAI = GetAI_giant_claw_tentacle; 1349 m_scripts[nrscripts++] = newscript;1352 newscript->RegisterSelf(); 1350 1353 1351 1354 newscript = new Script; 1352 1355 newscript->Name="mob_giant_eye_tentacle"; 1353 1356 newscript->GetAI = GetAI_giant_eye_tentacle; 1354 m_scripts[nrscripts++] = newscript;1357 newscript->RegisterSelf(); 1355 1358 1356 1359 newscript = new Script; 1357 1360 newscript->Name="mob_giant_flesh_tentacle"; 1358 1361 newscript->GetAI = GetAI_flesh_tentacle; 1359 m_scripts[nrscripts++] = newscript;1362 newscript->RegisterSelf(); 1360 1363 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_fankriss.cpp
r272 r279 187 187 newscript->Name="boss_fankriss"; 188 188 newscript->GetAI = GetAI_boss_fankriss; 189 m_scripts[nrscripts++] = newscript;189 newscript->RegisterSelf(); 190 190 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_huhuran.cpp
r272 r279 140 140 newscript->Name="boss_huhuran"; 141 141 newscript->GetAI = GetAI_boss_huhuran; 142 m_scripts[nrscripts++] = newscript;142 newscript->RegisterSelf(); 143 143 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_ouro.cpp
r272 r279 137 137 newscript->Name="boss_ouro"; 138 138 newscript->GetAI = GetAI_boss_ouro; 139 m_scripts[nrscripts++] = newscript;139 newscript->RegisterSelf(); 140 140 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_sartura.cpp
r272 r279 260 260 newscript->Name="boss_sartura"; 261 261 newscript->GetAI = GetAI_boss_sartura; 262 m_scripts[nrscripts++] = newscript;262 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;267 newscript->RegisterSelf(); 268 268 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_skeram.cpp
r272 r279 311 311 newscript->Name="boss_skeram"; 312 312 newscript->GetAI = GetAI_boss_skeram; 313 m_scripts[nrscripts++] = newscript;313 newscript->RegisterSelf(); 314 314 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_twinemperors.cpp
r272 r279 690 690 newscript->Name="boss_veknilash"; 691 691 newscript->GetAI = GetAI_boss_veknilash; 692 m_scripts[nrscripts++] = newscript;692 newscript->RegisterSelf(); 693 693 694 694 newscript = new Script; 695 695 newscript->Name="boss_veklor"; 696 696 newscript->GetAI = GetAI_boss_veklor; 697 m_scripts[nrscripts++] = newscript;697 newscript->RegisterSelf(); 698 698 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp
r272 r279 162 162 newscript->Name = "instance_temple_of_ahnqiraj"; 163 163 newscript->GetInstanceData = GetInstanceData_instance_temple_of_ahnqiraj; 164 m_scripts[nrscripts++] = newscript;164 newscript->RegisterSelf(); 165 165 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp
r272 r279 310 310 newscript->Name="mob_anubisath_sentinel"; 311 311 newscript->GetAI = GetAI_mob_anubisath_sentinelAI; 312 m_scripts[nrscripts++] = newscript;312 newscript->RegisterSelf(); 313 313 } 314 314 -
trunk/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp
r272 r279 369 369 newscript->Name="mob_unkor_the_ruthless"; 370 370 newscript->GetAI = GetAI_mob_unkor_the_ruthless; 371 m_scripts[nrscripts++] = newscript;371 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;376 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;381 newscript->RegisterSelf(); 382 382 383 383 newscript = new Script; 384 384 newscript->Name="mob_netherweb_victim"; 385 385 newscript->GetAI = GetAI_mob_netherweb_victim; 386 m_scripts[nrscripts++] = newscript;386 newscript->RegisterSelf(); 387 387 388 388 newscript = new Script; … … 390 390 newscript->pGossipHello = &GossipHello_npc_floon; 391 391 newscript->pGossipSelect = &GossipSelect_npc_floon; 392 m_scripts[nrscripts++] = newscript;392 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;399 } 398 newscript->RegisterSelf(); 399 } -
trunk/src/bindings/scripts/scripts/zone/thunder_bluff/thunder_bluff.cpp
r272 r279 133 133 newscript->pGossipHello = &GossipHello_npc_cairne_bloodhoof; 134 134 newscript->pGossipSelect = &GossipSelect_npc_cairne_bloodhoof; 135 m_scripts[nrscripts++] = newscript;135 newscript->RegisterSelf(); 136 136 } -
trunk/src/bindings/scripts/scripts/zone/tirisfal_glades/tirisfal_glades.cpp
r272 r279 85 85 newscript->GetAI = GetAI_npc_calvin_montague; 86 86 newscript->pQuestAccept = &QuestAccept_npc_calvin_montague; 87 m_scripts[nrscripts++] = newscript;87 newscript->RegisterSelf(); 88 88 } -
trunk/src/bindings/scripts/scripts/zone/uldaman/boss_ironaya.cpp
r272 r279 104 104 newscript->Name="boss_ironaya"; 105 105 newscript->GetAI = GetAI_boss_ironaya; 106 m_scripts[nrscripts++] = newscript;106 newscript->RegisterSelf(); 107 107 } -
trunk/src/bindings/scripts/scripts/zone/uldaman/uldaman.cpp
r272 r279 178 178 newscript->Name="mob_jadespine_basilisk"; 179 179 newscript->GetAI = GetAI_mob_jadespine_basilisk; 180 m_scripts[nrscripts++] = newscript;180 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;186 newscript->RegisterSelf(); 187 187 } -
trunk/src/bindings/scripts/scripts/zone/undercity/undercity.cpp
r272 r279 246 246 newscript->GetAI = GetAI_npc_lady_sylvanas_windrunner; 247 247 newscript->pChooseReward = &ChooseReward_npc_lady_sylvanas_windrunner; 248 m_scripts[nrscripts++] = newscript;248 newscript->RegisterSelf(); 249 249 250 250 newscript = new Script; 251 251 newscript->Name="npc_highborne_lamenter"; 252 252 newscript->GetAI = GetAI_npc_highborne_lamenter; 253 m_scripts[nrscripts++] = newscript;253 newscript->RegisterSelf(); 254 254 255 255 newscript = new Script; … … 257 257 newscript->pGossipHello = &GossipHello_npc_parqual_fintallas; 258 258 newscript->pGossipSelect = &GossipSelect_npc_parqual_fintallas; 259 m_scripts[nrscripts++] = newscript;260 } 259 newscript->RegisterSelf(); 260 } -
trunk/src/bindings/scripts/scripts/zone/western_plaguelands/western_plaguelands.cpp
r272 r279 168 168 newscript->pGossipHello = &GossipHello_npcs_dithers_and_arbington; 169 169 newscript->pGossipSelect = &GossipSelect_npcs_dithers_and_arbington; 170 m_scripts[nrscripts++] = newscript;170 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;175 newscript->RegisterSelf(); 176 176 } -
trunk/src/bindings/scripts/scripts/zone/winterspring/winterspring.cpp
r272 r279 142 142 newscript->pGossipHello = &GossipHello_npc_lorax; 143 143 newscript->pGossipSelect = &GossipSelect_npc_lorax; 144 m_scripts[nrscripts++] = newscript;144 newscript->RegisterSelf(); 145 145 146 146 newscript = new Script; … … 148 148 newscript->pGossipHello = &GossipHello_npc_rivern_frostwind; 149 149 newscript->pGossipSelect = &GossipSelect_npc_rivern_frostwind; 150 m_scripts[nrscripts++] = newscript;150 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;156 newscript->RegisterSelf(); 157 157 } -
trunk/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp
r272 r279 262 262 newscript->pGossipHello = &GossipHello_npcs_ashyen_and_keleth; 263 263 newscript->pGossipSelect = &GossipSelect_npcs_ashyen_and_keleth; 264 m_scripts[nrscripts++] = newscript;264 newscript->RegisterSelf(); 265 265 266 266 newscript = new Script; … … 268 268 newscript->pGossipHello = &GossipHello_npc_cooshcoosh; 269 269 newscript->pGossipSelect = &GossipSelect_npc_cooshcoosh; 270 m_scripts[nrscripts++] = newscript;270 newscript->RegisterSelf(); 271 271 272 272 newscript = new Script; … … 274 274 newscript->pGossipHello = &GossipHello_npc_elder_kuruti; 275 275 newscript->pGossipSelect = &GossipSelect_npc_elder_kuruti; 276 m_scripts[nrscripts++] = newscript;276 newscript->RegisterSelf(); 277 277 278 278 newscript = new Script; … … 280 280 newscript->pGossipHello = &GossipHello_npc_mortog_steamhead; 281 281 newscript->pGossipSelect = &GossipSelect_npc_mortog_steamhead; 282 m_scripts[nrscripts++] = newscript;283 } 282 newscript->RegisterSelf(); 283 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/boss_akilzon.cpp
r272 r279 462 462 newscript->Name="boss_akilzon"; 463 463 newscript->GetAI = GetAI_boss_akilzon; 464 m_scripts[nrscripts++] = newscript;464 newscript->RegisterSelf(); 465 465 466 466 newscript = new Script; 467 467 newscript->Name="mob_akilzon_eagle"; 468 468 newscript->GetAI = GetAI_mob_soaring_eagle; 469 m_scripts[nrscripts++] = newscript;469 newscript->RegisterSelf(); 470 470 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/boss_halazzi.cpp
r272 r279 395 395 newscript->Name="boss_halazzi"; 396 396 newscript->GetAI = GetAI_boss_halazziAI; 397 m_scripts[nrscripts++] = newscript;397 newscript->RegisterSelf(); 398 398 399 399 newscript = new Script; 400 400 newscript->Name="mob_halazzi_lynx"; 401 401 newscript->GetAI = GetAI_boss_spiritlynxAI; 402 m_scripts[nrscripts++] = newscript;402 newscript->RegisterSelf(); 403 403 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/boss_hexlord.cpp
r272 r279 372 372 if(SiphonSoul_Timer < diff) 373 373 { 374 Player* target = SelectRandomPlayer(50);374 Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 70, true); 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 else454 PlayerList.erase(i);455 }456 return NULL;457 }458 438 }; 459 439 … … 889 869 newscript->Name="boss_hexlord_malacrass"; 890 870 newscript->GetAI = GetAI_boss_hex_lord_malacrass; 891 m_scripts[nrscripts++] = newscript;871 newscript->RegisterSelf(); 892 872 893 873 newscript = new Script; 894 874 newscript->Name="boss_thurg"; 895 875 newscript->GetAI = GetAI_boss_thurg; 896 m_scripts[nrscripts++] = newscript;876 newscript->RegisterSelf(); 897 877 898 878 newscript = new Script; 899 879 newscript->Name="boss_gazakroth"; 900 880 newscript->GetAI = GetAI_boss_gazakroth; 901 m_scripts[nrscripts++] = newscript;881 newscript->RegisterSelf(); 902 882 903 883 newscript = new Script; 904 884 newscript->Name="boss_lord_raadan"; 905 885 newscript->GetAI = GetAI_boss_lord_raadan; 906 m_scripts[nrscripts++] = newscript;886 newscript->RegisterSelf(); 907 887 908 888 newscript = new Script; 909 889 newscript->Name="boss_darkheart"; 910 890 newscript->GetAI = GetAI_boss_darkheart; 911 m_scripts[nrscripts++] = newscript;891 newscript->RegisterSelf(); 912 892 913 893 newscript = new Script; 914 894 newscript->Name="boss_slither"; 915 895 newscript->GetAI = GetAI_boss_slither; 916 m_scripts[nrscripts++] = newscript;896 newscript->RegisterSelf(); 917 897 918 898 newscript = new Script; 919 899 newscript->Name="boss_fenstalker"; 920 900 newscript->GetAI = GetAI_boss_fenstalker; 921 m_scripts[nrscripts++] = newscript;901 newscript->RegisterSelf(); 922 902 923 903 newscript = new Script; 924 904 newscript->Name="boss_koragg"; 925 905 newscript->GetAI = GetAI_boss_koragg; 926 m_scripts[nrscripts++] = newscript;906 newscript->RegisterSelf(); 927 907 928 908 newscript = new Script; 929 909 newscript->Name="boss_alyson_antille"; 930 910 newscript->GetAI = GetAI_boss_alyson_antille; 931 m_scripts[nrscripts++] = newscript;911 newscript->RegisterSelf(); 932 912 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/boss_janalai.cpp
r272 r279 398 398 Map *map = m_creature->GetMap(); 399 399 if(!map->IsDungeon()) return; 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); 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); 405 406 } 406 407 //m_creature->CastSpell(Temp, SPELL_SUMMON_PLAYERS, true); // core bug, spell does not work if too far … … 706 707 newscript->Name="boss_janalai"; 707 708 newscript->GetAI = GetAI_boss_janalaiAI; 708 m_scripts[nrscripts++] = newscript;709 newscript->RegisterSelf(); 709 710 710 711 newscript = new Script; 711 712 newscript->Name="mob_janalai_firebomb"; 712 713 newscript->GetAI = GetAI_mob_jandalai_firebombAI; 713 m_scripts[nrscripts++] = newscript;714 newscript->RegisterSelf(); 714 715 715 716 newscript = new Script; 716 717 newscript->Name="mob_janalai_hatcher"; 717 718 newscript->GetAI = GetAI_mob_amanishi_hatcherAI; 718 m_scripts[nrscripts++] = newscript;719 newscript->RegisterSelf(); 719 720 720 721 newscript = new Script; 721 722 newscript->Name="mob_janalai_hatchling"; 722 723 newscript->GetAI = GetAI_mob_hatchlingAI; 723 m_scripts[nrscripts++] = newscript;724 newscript->RegisterSelf(); 724 725 725 726 newscript = new Script; 726 727 newscript->Name="mob_janalai_egg"; 727 728 newscript->GetAI = GetAI_mob_eggAI; 728 m_scripts[nrscripts++] = newscript;729 newscript->RegisterSelf(); 729 730 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp
r272 r279 301 301 newscript->Name="boss_nalorakk"; 302 302 newscript->GetAI = GetAI_boss_nalorakk; 303 m_scripts[nrscripts++] = newscript;303 newscript->RegisterSelf(); 304 304 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/boss_zuljin.cpp
r272 r279 630 630 newscript->Name="boss_zuljin"; 631 631 newscript->GetAI = GetAI_boss_zuljin; 632 m_scripts[nrscripts++] = newscript;632 newscript->RegisterSelf(); 633 633 634 634 newscript = new Script; 635 635 newscript->Name="do_nothing"; 636 636 newscript->GetAI = GetAI_do_nothing; 637 m_scripts[nrscripts++] = newscript;637 newscript->RegisterSelf(); 638 638 639 639 newscript = new Script; 640 640 newscript->Name="mob_zuljin_vortex"; 641 641 newscript->GetAI = GetAI_feather_vortexAI; 642 m_scripts[nrscripts++] = newscript;642 newscript->RegisterSelf(); 643 643 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/instance_zulaman.cpp
r272 r279 140 140 void OpenDoor(uint64 DoorGUID, bool open) 141 141 { 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); 142 if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID)) 143 Door->SetUInt32Value(GAMEOBJECT_STATE, open ? 0 : 1); 146 144 } 147 145 148 146 void SummonHostage(uint8 num) 149 147 { 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 } 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 } 157 164 } 158 165 … … 322 329 newscript->Name = "instance_zulaman"; 323 330 newscript->GetInstanceData = GetInstanceData_instance_zulaman; 324 m_scripts[nrscripts++] = newscript;331 newscript->RegisterSelf(); 325 332 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/zulaman.cpp
r272 r279 172 172 newscript->Name="npc_forest_frog"; 173 173 newscript->GetAI = GetAI_npc_forest_frog; 174 m_scripts[nrscripts++] = newscript;174 newscript->RegisterSelf(); 175 175 176 176 newscript = new Script; … … 179 179 newscript->pGossipHello = GossipHello_npc_zulaman_hostage; 180 180 newscript->pGossipSelect = GossipSelect_npc_zulaman_hostage; 181 m_scripts[nrscripts++] = newscript;181 newscript->RegisterSelf(); 182 182 } -
trunk/src/bindings/scripts/scripts/zone/zulfarrak/zulfarrak.cpp
r272 r279 214 214 newscript->pGossipHello = &GossipHello_npc_sergeant_bly; 215 215 newscript->pGossipSelect = &GossipSelect_npc_sergeant_bly; 216 m_scripts[nrscripts++] = newscript;216 newscript->RegisterSelf(); 217 217 218 218 newscript = new Script; … … 221 221 newscript->pGossipHello = &GossipHello_npc_weegli_blastfuse; 222 222 newscript->pGossipSelect = &GossipSelect_npc_weegli_blastfuse; 223 m_scripts[nrscripts++] = newscript;224 } 223 newscript->RegisterSelf(); 224 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_arlokk.cpp
r272 r279 208 208 newscript->Name="boss_arlokk"; 209 209 newscript->GetAI = GetAI_boss_arlokk; 210 m_scripts[nrscripts++] = newscript;210 newscript->RegisterSelf(); 211 211 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_gahzranka.cpp
r272 r279 89 89 newscript->Name="boss_gahzranka"; 90 90 newscript->GetAI = GetAI_boss_gahzranka; 91 m_scripts[nrscripts++] = newscript;91 newscript->RegisterSelf(); 92 92 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_grilek.cpp
r272 r279 89 89 newscript->Name="boss_grilek"; 90 90 newscript->GetAI = GetAI_boss_grilek; 91 m_scripts[nrscripts++] = newscript;91 newscript->RegisterSelf(); 92 92 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_hakkar.cpp
r272 r279 253 253 newscript->Name="boss_hakkar"; 254 254 newscript->GetAI = GetAI_boss_hakkar; 255 m_scripts[nrscripts++] = newscript;255 newscript->RegisterSelf(); 256 256 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_hazzarah.cpp
r272 r279 97 97 newscript->Name="boss_hazzarah"; 98 98 newscript->GetAI = GetAI_boss_hazzarah; 99 m_scripts[nrscripts++] = newscript;99 newscript->RegisterSelf(); 100 100 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_jeklik.cpp
r272 r279 289 289 newscript->Name="boss_jeklik"; 290 290 newscript->GetAI = GetAI_boss_jeklik; 291 m_scripts[nrscripts++] = newscript;291 newscript->RegisterSelf(); 292 292 293 293 newscript = new Script; 294 294 newscript->Name="mob_batrider"; 295 295 newscript->GetAI = GetAI_mob_batrider; 296 m_scripts[nrscripts++] = newscript;296 newscript->RegisterSelf(); 297 297 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_jindo.cpp
r272 r279 259 259 newscript->Name="boss_jindo"; 260 260 newscript->GetAI = GetAI_boss_jindo; 261 m_scripts[nrscripts++] = newscript;261 newscript->RegisterSelf(); 262 262 263 263 newscript = new Script; 264 264 newscript->Name="mob_healing_ward"; 265 265 newscript->GetAI = GetAI_mob_healing_ward; 266 m_scripts[nrscripts++] = newscript;266 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;272 } 271 newscript->RegisterSelf(); 272 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_mandokir.cpp
r272 r279 303 303 newscript->Name="boss_mandokir"; 304 304 newscript->GetAI = GetAI_boss_mandokir; 305 m_scripts[nrscripts++] = newscript;305 newscript->RegisterSelf(); 306 306 307 307 newscript = new Script; 308 308 newscript->Name="mob_ohgan"; 309 309 newscript->GetAI = GetAI_mob_ohgan; 310 m_scripts[nrscripts++] = newscript;310 newscript->RegisterSelf(); 311 311 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_marli.cpp
r272 r279 245 245 newscript->Name="boss_marli"; 246 246 newscript->GetAI = GetAI_boss_marli; 247 m_scripts[nrscripts++] = newscript;247 newscript->RegisterSelf(); 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 m_scripts[nrscripts++] = newscript;252 newscript->RegisterSelf(); 253 253 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_renataki.cpp
r272 r279 148 148 newscript->Name="boss_renataki"; 149 149 newscript->GetAI = GetAI_boss_renataki; 150 m_scripts[nrscripts++] = newscript;150 newscript->RegisterSelf(); 151 151 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_thekal.cpp
r272 r279 532 532 newscript->Name="boss_thekal"; 533 533 newscript->GetAI = GetAI_boss_thekal; 534 m_scripts[nrscripts++] = newscript;534 newscript->RegisterSelf(); 535 535 536 536 newscript = new Script; 537 537 newscript->Name="mob_zealot_lorkhan"; 538 538 newscript->GetAI = GetAI_mob_zealot_lorkhan; 539 m_scripts[nrscripts++] = newscript;539 newscript->RegisterSelf(); 540 540 541 541 newscript = new Script; 542 542 newscript->Name="mob_zealot_zath"; 543 543 newscript->GetAI = GetAI_mob_zealot_zath; 544 m_scripts[nrscripts++] = newscript;544 newscript->RegisterSelf(); 545 545 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_venoxis.cpp
r272 r279 197 197 newscript->Name="boss_venoxis"; 198 198 newscript->GetAI = GetAI_boss_venoxis; 199 m_scripts[nrscripts++] = newscript;199 newscript->RegisterSelf(); 200 200 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_wushoolay.cpp
r272 r279 81 81 newscript->Name="boss_wushoolay"; 82 82 newscript->GetAI = GetAI_boss_wushoolay; 83 m_scripts[nrscripts++] = newscript;83 newscript->RegisterSelf(); 84 84 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/instance_zulgurub.cpp
r272 r279 235 235 newscript->Name = "instance_zulgurub"; 236 236 newscript->GetInstanceData = GetInstanceData_instance_zulgurub; 237 m_scripts[nrscripts++] = newscript;237 newscript->RegisterSelf(); 238 238 }