Changeset 272 for trunk/src/bindings

Show
Ignore:
Timestamp:
11/22/08 00:35:41 (17 years ago)
Author:
yumileroy
Message:

Delete possessed AI only on creature delete.

Original author: gvcoman
Date: 2008-11-16 14:38:02-05:00

Location:
trunk/src/bindings/scripts
Files:
308 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/bindings/scripts/ScriptMgr.cpp

    r260 r272  
    1818 
    1919//*** Global data *** 
    20 int num_db_scripts; 
    21 int num_sc_scripts; 
     20int nrscripts; 
    2221Script *m_scripts[MAX_SCRIPTS]; 
    2322 
     
    4847// Text Maps 
    4948UNORDERED_MAP<int32, StringTextData> TextMap; 
     49 
    5050 
    5151//*** End Global data *** 
     
    11811181TRINITY_DLL_EXPORT 
    11821182void ScriptsFree() 
    1183 { 
     1183{    
    11841184    // Free Spell Summary 
    11851185    delete []SpellSummary; 
    11861186 
    11871187    // Free resources before library unload 
    1188     for(int i=0;i<num_db_scripts;i++) 
     1188    for(int i=0;i<nrscripts;i++) 
    11891189        delete m_scripts[i]; 
    11901190 
    1191     num_db_scripts = 0; 
    1192     num_sc_scripts = 0; 
     1191    nrscripts = 0; 
    11931192} 
    11941193 
     
    12411240        LoadDatabase(); 
    12421241 
    1243     num_db_scripts = GetScriptNames().size(); 
    1244  
    12451242    outstring_log("TSCR: Loading C++ scripts"); 
    12461243    barGoLink bar(1); 
     
    12481245    outstring_log(""); 
    12491246 
     1247    nrscripts = 0; 
    12501248    for(int i=0;i<MAX_SCRIPTS;i++) 
    12511249        m_scripts[i]=NULL; 
     
    17781776    // ------------------- 
    17791777 
    1780     outstring_log(">> Loaded %i C++ Scripts (of %i ScriptNames defined in Mangos database)", num_sc_scripts, num_db_scripts); 
     1778    outstring_log("TSCR: Loaded %u C++ Scripts", nrscripts); 
     1779    outstring_log(""); 
    17811780} 
    17821781 
     
    18501849//*** Functions used internally *** 
    18511850 
    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()); 
     1851TRINITY_DLL_EXPORT 
     1852char const* ScriptsVersion() 
     1853{ 
     1854        return "Default Trinity scripting library"; 
     1855} 
     1856 
     1857Script* 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; 
    18611868} 
    18621869 
     
    18651872 
    18661873TRINITY_DLL_EXPORT 
    1867 char const* ScriptsVersion() 
    1868 { 
    1869         return "Default Trinity scripting library"; 
    1870 } 
    1871 TRINITY_DLL_EXPORT 
    18721874bool GossipHello ( Player * player, Creature *_Creature ) 
    18731875{ 
    1874     Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 
     1876    Script *tmpscript = GetScriptByName(_Creature->GetScriptName()); 
    18751877    if (!tmpscript || !tmpscript->pGossipHello) return false; 
    18761878 
     
    18841886    debug_log("TSCR: Gossip selection, sender: %d, action: %d",sender, action); 
    18851887 
    1886     Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 
     1888    Script *tmpscript = GetScriptByName(_Creature->GetScriptName()); 
    18871889    if (!tmpscript || !tmpscript->pGossipSelect) return false; 
    18881890 
     
    18961898    debug_log("TSCR: Gossip selection with code, sender: %d, action: %d",sender, action); 
    18971899 
    1898     Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 
     1900    Script *tmpscript = GetScriptByName(_Creature->GetScriptName()); 
    18991901    if (!tmpscript || !tmpscript->pGossipSelectWithCode) return false; 
    19001902 
     
    19061908bool QuestAccept( Player *player, Creature *_Creature, Quest const *_Quest ) 
    19071909{ 
    1908     Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 
     1910    Script *tmpscript = GetScriptByName(_Creature->GetScriptName()); 
    19091911    if (!tmpscript || !tmpscript->pQuestAccept) return false; 
    19101912 
     
    19161918bool QuestSelect( Player *player, Creature *_Creature, Quest const *_Quest ) 
    19171919{ 
    1918     Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 
     1920    Script *tmpscript = GetScriptByName(_Creature->GetScriptName()); 
    19191921    if (!tmpscript || !tmpscript->pQuestSelect) return false; 
    19201922 
     
    19261928bool QuestComplete( Player *player, Creature *_Creature, Quest const *_Quest ) 
    19271929{ 
    1928     Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 
     1930    Script *tmpscript = GetScriptByName(_Creature->GetScriptName()); 
    19291931    if (!tmpscript || !tmpscript->pQuestComplete) return false; 
    19301932 
     
    19361938bool ChooseReward( Player *player, Creature *_Creature, Quest const *_Quest, uint32 opt ) 
    19371939{ 
    1938     Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 
     1940    Script *tmpscript = GetScriptByName(_Creature->GetScriptName()); 
    19391941    if (!tmpscript || !tmpscript->pChooseReward) return false; 
    19401942 
     
    19461948uint32 NPCDialogStatus( Player *player, Creature *_Creature ) 
    19471949{ 
    1948     Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 
     1950    Script *tmpscript = GetScriptByName(_Creature->GetScriptName()); 
    19491951    if (!tmpscript || !tmpscript->pNPCDialogStatus) return 100; 
    19501952 
     
    19561958uint32 GODialogStatus( Player *player, GameObject *_GO ) 
    19571959{ 
    1958     Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId]; 
    1959     if (!tmpscript || !tmpscript->pGODialogStatus) return 100; 
     1960    Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName); 
     1961    if(!tmpscript || !tmpscript->pGODialogStatus) return 100; 
    19601962 
    19611963    player->PlayerTalkClass->ClearMenus(); 
     
    19661968bool ItemHello( Player *player, Item *_Item, Quest const *_Quest ) 
    19671969{ 
    1968     Script *tmpscript = m_scripts[_Item->GetProto()->ScriptId]; 
     1970    Script *tmpscript = GetScriptByName(_Item->GetProto()->ScriptName); 
    19691971    if (!tmpscript || !tmpscript->pItemHello) return false; 
    19701972 
     
    19761978bool ItemQuestAccept( Player *player, Item *_Item, Quest const *_Quest ) 
    19771979{ 
    1978     Script *tmpscript = m_scripts[_Item->GetProto()->ScriptId]; 
     1980    Script *tmpscript = GetScriptByName(_Item->GetProto()->ScriptName); 
    19791981    if (!tmpscript || !tmpscript->pItemQuestAccept) return false; 
    19801982 
     
    19861988bool GOHello( Player *player, GameObject *_GO ) 
    19871989{ 
    1988     Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId]; 
     1990    Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName); 
    19891991    if (!tmpscript || !tmpscript->pGOHello) return false; 
    19901992 
     
    19961998bool GOQuestAccept( Player *player, GameObject *_GO, Quest const *_Quest ) 
    19971999{ 
    1998     Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId]; 
     2000    Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName); 
    19992001    if (!tmpscript || !tmpscript->pGOQuestAccept) return false; 
    20002002 
     
    20062008bool GOChooseReward( Player *player, GameObject *_GO, Quest const *_Quest, uint32 opt ) 
    20072009{ 
    2008     Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId]; 
     2010    Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName); 
    20092011    if (!tmpscript || !tmpscript->pGOChooseReward) return false; 
    20102012 
     
    20162018bool AreaTrigger( Player *player, AreaTriggerEntry * atEntry) 
    20172019{ 
    2018     Script *tmpscript = m_scripts[GetAreaTriggerScriptId(atEntry->id)]; 
     2020    Script *tmpscript = NULL; 
     2021 
     2022    tmpscript = GetScriptByName(GetAreaTriggerScriptNameById(atEntry->id)); 
    20192023    if (!tmpscript || !tmpscript->pAreaTrigger) return false; 
    20202024 
     
    20252029CreatureAI* GetAI(Creature *_Creature) 
    20262030{ 
    2027     Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 
     2031    Script *tmpscript = GetScriptByName(_Creature->GetScriptName()); 
     2032 
    20282033    if (!tmpscript || !tmpscript->GetAI) return NULL; 
    2029  
    20302034    return tmpscript->GetAI(_Creature); 
    20312035} 
     
    20342038bool ItemUse( Player *player, Item* _Item, SpellCastTargets const& targets) 
    20352039{ 
    2036     Script *tmpscript = m_scripts[_Item->GetProto()->ScriptId]; 
     2040    Script *tmpscript = GetScriptByName(_Item->GetProto()->ScriptName); 
    20372041    if (!tmpscript || !tmpscript->pItemUse) return false; 
    20382042 
     
    20432047bool ReceiveEmote( Player *player, Creature *_Creature, uint32 emote ) 
    20442048{ 
    2045     Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 
     2049    Script *tmpscript = GetScriptByName(_Creature->GetScriptName()); 
    20462050    if (!tmpscript || !tmpscript->pReceiveEmote) return false; 
    20472051 
     
    20522056InstanceData* CreateInstanceData(Map *map) 
    20532057{ 
    2054     if (!map->IsDungeon()) return NULL; 
    2055  
    2056     Script *tmpscript = m_scripts[((InstanceMap*)map)->GetScriptId()]; 
    2057     if (!tmpscript || !tmpscript->GetInstanceData) return NULL; 
     2058    Script *tmpscript = NULL; 
     2059 
     2060    if (!map->IsDungeon()) return false; 
     2061 
     2062    tmpscript = GetScriptByName(((InstanceMap*)map)->GetScript()); 
     2063    if (!tmpscript || !tmpscript->GetInstanceData) return false; 
    20582064 
    20592065    return tmpscript->GetInstanceData(map); 
  • trunk/src/bindings/scripts/ScriptMgr.h

    r260 r272  
    2525class WorldObject; 
    2626 
    27 #define MAX_SCRIPTS         5000                            //72 bytes each (approx 351kb) 
     27#define MAX_SCRIPTS         1000                            //72 bytes each (approx 71kb) 
    2828#define VISIBLE_RANGE       (166.0f)                        //MAX visible range (size of grid) 
    2929#define DEFAULT_TEXT        "<Trinity Script Text Entry Missing!>" 
     
    3232{ 
    3333    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     {} 
     34pGossipHello(NULL), pQuestAccept(NULL), pGossipSelect(NULL), pGossipSelectWithCode(NULL), 
     35pQuestSelect(NULL), pQuestComplete(NULL), pNPCDialogStatus(NULL), pGODialogStatus(NULL), pChooseReward(NULL), 
     36pItemHello(NULL), pGOHello(NULL), pAreaTrigger(NULL), pItemQuestAccept(NULL), pGOQuestAccept(NULL), 
     37pGOChooseReward(NULL),pReceiveEmote(NULL),pItemUse(NULL), GetAI(NULL), GetInstanceData(NULL) 
     38{} 
    3939 
    40     std::string Name; 
     40std::string Name; 
    4141 
    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& ); 
     42// Quest/gossip Methods to be scripted 
     43bool (*pGossipHello         )(Player*, Creature*); 
     44bool (*pQuestAccept         )(Player*, Creature*, Quest const* ); 
     45bool (*pGossipSelect        )(Player*, Creature*, uint32 , uint32 ); 
     46bool (*pGossipSelectWithCode)(Player*, Creature*, uint32 , uint32 , const char* ); 
     47bool (*pQuestSelect         )(Player*, Creature*, Quest const* ); 
     48bool (*pQuestComplete       )(Player*, Creature*, Quest const* ); 
     49uint32 (*pNPCDialogStatus   )(Player*, Creature* ); 
     50uint32 (*pGODialogStatus    )(Player *player, GameObject * _GO ); 
     51bool (*pChooseReward        )(Player*, Creature*, Quest const*, uint32 ); 
     52bool (*pItemHello           )(Player*, Item*, Quest const* ); 
     53bool (*pGOHello             )(Player*, GameObject* ); 
     54bool (*pAreaTrigger         )(Player*, AreaTriggerEntry* ); 
     55bool (*pItemQuestAccept     )(Player*, Item *, Quest const* ); 
     56bool (*pGOQuestAccept       )(Player*, GameObject*, Quest const* ); 
     57bool (*pGOChooseReward      )(Player*, GameObject*_GO, Quest const*, uint32 ); 
     58bool (*pReceiveEmote        )(Player*, Creature*, uint32 ); 
     59bool (*pItemUse             )(Player*, Item*, SpellCastTargets const& ); 
    6060 
    61     CreatureAI* (*GetAI)(Creature*); 
    62     InstanceData* (*GetInstanceData)(Map*); 
     61CreatureAI* (*GetAI)(Creature*); 
     62InstanceData* (*GetInstanceData)(Map*); 
     63}; 
    6364 
    64     void RegisterSelf(); 
    65 }; 
     65extern int nrscripts; 
     66extern Script *m_scripts[MAX_SCRIPTS]; 
    6667 
    6768//Generic scripting text function 
  • trunk/src/bindings/scripts/include/sc_creature.cpp

    r267 r272  
    7474void ScriptedAI::MoveInLineOfSight(Unit *who) 
    7575{ 
    76     if(!m_creature->getVictim() && m_creature->canStartAttack(who)) 
     76    if(m_creature->getVictim() || !m_creature->IsHostileTo(who) || !who->isInAccessiblePlaceFor(m_creature)) 
     77        return; 
     78 
     79    if(!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE) 
     80        return; 
     81 
     82    if(!m_creature->IsWithinDistInMap(who, m_creature->GetAttackDistance(who)) || !m_creature->IsWithinLOSInMap(who)) 
     83        return; 
     84     
     85    if(m_creature->canAttack(who)) 
     86        //who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); 
    7787        AttackStart(who); 
    7888} 
     
    670680    } 
    671681 
    672     Map::PlayerList const &PlayerList = map->GetPlayers(); 
    673     for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) 
    674         if (Player* i_pl = i->getSource()) 
    675             if (!i_pl->isAlive()) 
    676                 pUnit->AddThreat(i_pl, 0.0f); 
     682    InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 
     683    InstanceMap::PlayerList::const_iterator i; 
     684    for (i = PlayerList.begin(); i != PlayerList.end(); ++i) 
     685    { 
     686        if((*i)->isAlive()) 
     687            pUnit->AddThreat(*i, 0.0f); 
     688    } 
    677689} 
    678690 
     
    709721    ((Player*)pUnit)->TeleportTo(pUnit->GetMapId(), x, y, z, o, TELE_TO_NOT_LEAVE_COMBAT); 
    710722} 
    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  
    725723 
    726724Unit* ScriptedAI::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff) 
  • trunk/src/bindings/scripts/include/sc_creature.h

    r257 r272  
    147147    //Teleports a player without dropping threat (only teleports to same map) 
    148148    void DoTeleportPlayer(Unit* pUnit, float x, float y, float z, float o); 
    149     void DoTeleportAll(float x, float y, float z, float o); 
    150149 
    151150    //Returns friendly unit with the most amount of hp missing from max hp 
  • trunk/src/bindings/scripts/scripts/areatrigger/areatrigger_scripts.cpp

    r260 r272  
    4141    newscript->Name="at_test"; 
    4242    newscript->pAreaTrigger = ATtest; 
    43     newscript->RegisterSelf(); 
     43    m_scripts[nrscripts++] = newscript; 
    4444} 
  • trunk/src/bindings/scripts/scripts/boss/boss_emeriss.cpp

    r260 r272  
    153153    newscript->Name="boss_emeriss"; 
    154154    newscript->GetAI = GetAI_boss_emeriss; 
    155     newscript->RegisterSelf(); 
     155    m_scripts[nrscripts++] = newscript; 
    156156} 
  • trunk/src/bindings/scripts/scripts/boss/boss_taerar.cpp

    r260 r272  
    298298    newscript->Name="boss_taerar"; 
    299299    newscript->GetAI = GetAI_boss_taerar; 
    300     newscript->RegisterSelf(); 
     300    m_scripts[nrscripts++] = newscript; 
    301301 
    302302    newscript = new Script; 
    303303    newscript->Name="boss_shade_of_taerar"; 
    304304    newscript->GetAI = GetAI_boss_shadeoftaerar; 
    305     newscript->RegisterSelf(); 
     305    m_scripts[nrscripts++] = newscript; 
    306306} 
  • trunk/src/bindings/scripts/scripts/boss/boss_ysondre.cpp

    r260 r272  
    238238    newscript->Name="boss_ysondre"; 
    239239    newscript->GetAI = GetAI_boss_ysondre; 
    240     newscript->RegisterSelf(); 
     240    m_scripts[nrscripts++] = newscript; 
    241241 
    242242    newscript = new Script; 
    243243    newscript->Name="mob_dementeddruids"; 
    244244    newscript->GetAI = GetAI_mob_dementeddruids; 
    245     newscript->RegisterSelf(); 
     245    m_scripts[nrscripts++] = newscript; 
    246246} 
  • trunk/src/bindings/scripts/scripts/creature/mob_event_ai.cpp

    r269 r272  
    77 * This program is distributed in the hope that it will be useful, 
    88 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
    1010 * GNU General Public License for more details. 
    1111 * 
    1212 * You should have received a copy of the GNU General Public License 
    1313 * along with this program; if not, write to the Free Software 
    14  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
     14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
    1515 */ 
    1616 
     
    965965                DoZoneInCombat(); 
    966966            } 
    967             break; 
    968  
    969         // TRINITY ONLY 
    970         case ACTION_T_SET_ACTIVE: 
    971             m_creature->setActive(param1 ? true : false); 
    972             break; 
    973         case ACTION_T_SET_AGGRESSIVE: 
    974             m_creature->SetAggressive(param1 ? true : false); 
    975             break; 
    976         case ACTION_T_ATTACK_START_PULSE: 
    977             AttackStart(m_creature->SelectNearestTarget((float)param1)); 
    978967            break; 
    979968        } 
     
    12041193        } 
    12051194 
    1206         // do we need this? 
    1207         //if (m_creature->isCivilian() && m_creature->IsNeutralToAll()) 
    1208         //    return; 
    1209  
    1210         if(m_creature->canStartAttack(who)) 
    1211             AttackStart(who); 
     1195        if (m_creature->isCivilian() && m_creature->IsNeutralToAll()) 
     1196            return; 
     1197 
     1198        if (m_creature->canAttack(who) && who->isInAccessiblePlaceFor(m_creature) && m_creature->IsHostileTo(who)) 
     1199        { 
     1200            if (!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE) 
     1201                return; 
     1202 
     1203            float attackRadius = m_creature->GetAttackDistance(who); 
     1204            if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who)) 
     1205            { 
     1206                //if(who->HasStealthAura()) 
     1207                //    who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); 
     1208 
     1209                //Begin melee attack if we are within range 
     1210                AttackStart(who); 
     1211            } 
     1212        } 
    12121213    } 
    12131214 
     
    12921293                        if (!((*i).Event.event_inverse_phase_mask & (1 << Phase))) 
    12931294                            (*i).Time -= EventDiff; 
    1294  
    12951295                        //Skip processing of events that have time remaining 
    12961296                        continue; 
     
    13291329        if (Combat && MeleeEnabled) 
    13301330            DoMeleeAttackIfReady(); 
    1331  
    13321331    } 
    13331332}; 
     
    14021401    newscript->Name="mob_eventai"; 
    14031402    newscript->GetAI = GetAI_Mob_EventAI; 
    1404     newscript->RegisterSelf(); 
     1403    m_scripts[nrscripts++] = newscript; 
    14051404} 
  • trunk/src/bindings/scripts/scripts/creature/mob_event_ai.h

    r269 r272  
    11/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> 
    2  * This program is free software licensed under GPL version 2 
    3  * Please see the included DOCS/LICENSE.TXT for more information */ 
     2* This program is free software licensed under GPL version 2 
     3* Please see the included DOCS/LICENSE.TXT for more information */ 
    44 
    55#ifndef SC_EVENTAI_H 
     
    7777    ACTION_T_ZONE_COMBAT_PULSE      = 38,   //No Params 
    7878 
    79     ACTION_T_SET_ACTIVE             = 101,  //Apply 
    80     ACTION_T_SET_AGGRESSIVE         = 102,  //Apply 
    81     ACTION_T_ATTACK_START_PULSE     = 103,  //Distance 
    82  
    8379    ACTION_T_END, 
    8480}; 
  • trunk/src/bindings/scripts/scripts/creature/mob_generic_creature.cpp

    r260 r272  
    169169    newscript->Name="generic_creature"; 
    170170    newscript->GetAI = GetAI_generic_creature; 
    171     newscript->RegisterSelf(); 
     171    m_scripts[nrscripts++] = newscript; 
    172172} 
  • trunk/src/bindings/scripts/scripts/custom/custom_example.cpp

    r260 r272  
    274274    newscript->pGossipSelect = &GossipSelect_custom_example; 
    275275    newscript->pReceiveEmote = &ReceiveEmote_custom_example; 
    276     newscript->RegisterSelf(); 
    277 } 
     276    m_scripts[nrscripts++] = newscript; 
     277} 
  • trunk/src/bindings/scripts/scripts/custom/custom_gossip_codebox.cpp

    r260 r272  
    7878    newscript->pGossipSelect =          &GossipSelect_custom_gossip_codebox; 
    7979    newscript->pGossipSelectWithCode =  &GossipSelectWithCode_custom_gossip_codebox; 
    80     newscript->RegisterSelf(); 
     80    m_scripts[nrscripts++] = newscript; 
    8181} 
  • trunk/src/bindings/scripts/scripts/custom/test.cpp

    r260 r272  
    197197    newscript->pGossipHello          = &GossipHello_npc_test; 
    198198    newscript->pGossipSelect         = &GossipSelect_npc_test; 
    199     newscript->RegisterSelf(); 
    200 } 
     199    m_scripts[nrscripts++] = newscript; 
     200} 
  • trunk/src/bindings/scripts/scripts/go/go_scripts.cpp

    r260 r272  
    166166    newscript->Name="go_northern_crystal_pylon"; 
    167167    newscript->pGOHello =           &GOHello_go_northern_crystal_pylon; 
    168     newscript->RegisterSelf(); 
     168    m_scripts[nrscripts++] = newscript; 
    169169 
    170170    newscript = new Script; 
    171171    newscript->Name="go_eastern_crystal_pylon"; 
    172172    newscript->pGOHello =           &GOHello_go_eastern_crystal_pylon; 
    173     newscript->RegisterSelf(); 
     173    m_scripts[nrscripts++] = newscript; 
    174174 
    175175    newscript = new Script; 
    176176    newscript->Name="go_western_crystal_pylon"; 
    177177    newscript->pGOHello =           &GOHello_go_western_crystal_pylon; 
    178     newscript->RegisterSelf(); 
     178    m_scripts[nrscripts++] = newscript; 
    179179 
    180180    newscript = new Script; 
    181181    newscript->Name="go_barov_journal"; 
    182182    newscript->pGOHello =           &GOHello_go_barov_journal; 
    183     newscript->RegisterSelf(); 
     183    m_scripts[nrscripts++] = newscript; 
    184184 
    185185    newscript = new Script; 
    186186    newscript->Name="go_field_repair_bot_74A"; 
    187187    newscript->pGOHello =           &GOHello_go_field_repair_bot_74A; 
    188     newscript->RegisterSelf(); 
     188    m_scripts[nrscripts++] = newscript; 
    189189 
    190190    newscript = new Script; 
    191191    newscript->Name="go_orb_of_command"; 
    192192    newscript->pGOHello =           &GOHello_go_orb_of_command; 
    193     newscript->RegisterSelf(); 
     193    m_scripts[nrscripts++] = newscript; 
    194194 
    195195    newscript = new Script; 
    196196    newscript->Name="go_tablet_of_madness"; 
    197197    newscript->pGOHello =           &GOHello_go_tablet_of_madness; 
    198     newscript->RegisterSelf(); 
     198    m_scripts[nrscripts++] = newscript; 
    199199 
    200200    newscript = new Script; 
    201201    newscript->Name="go_tablet_of_the_seven"; 
    202202    newscript->pGOHello =           &GOHello_go_tablet_of_the_seven; 
    203     newscript->RegisterSelf(); 
     203    m_scripts[nrscripts++] = newscript; 
    204204 
    205205    newscript = new Script; 
    206206    newscript->Name="go_teleporter"; 
    207207    newscript->pGOHello =           &GOHello_go_teleporter; 
    208     newscript->RegisterSelf(); 
    209 } 
     208    m_scripts[nrscripts++] = newscript; 
     209} 
  • trunk/src/bindings/scripts/scripts/guard/guards.cpp

    r260 r272  
    39813981    newscript->pGossipSelect         = &GossipSelect_guard_azuremyst; 
    39823982    newscript->GetAI = GetAI_guard_azuremyst; 
    3983     newscript->RegisterSelf(); 
     3983    m_scripts[nrscripts++] = newscript; 
    39843984 
    39853985    newscript = new Script; 
     
    39883988    newscript->pGossipSelect         = &GossipSelect_guard_bluffwatcher; 
    39893989    newscript->GetAI = GetAI_guard_bluffwatcher; 
    3990     newscript->RegisterSelf(); 
     3990    m_scripts[nrscripts++] = newscript; 
    39913991 
    39923992    newscript = new Script; 
    39933993    newscript->Name="guard_contested"; 
    39943994    newscript->GetAI = GetAI_guard_contested; 
    3995     newscript->RegisterSelf(); 
     3995    m_scripts[nrscripts++] = newscript; 
    39963996 
    39973997    newscript = new Script; 
     
    40004000    newscript->pGossipSelect         = &GossipSelect_guard_darnassus; 
    40014001    newscript->GetAI = GetAI_guard_darnassus; 
    4002     newscript->RegisterSelf(); 
     4002    m_scripts[nrscripts++] = newscript; 
    40034003 
    40044004    newscript = new Script; 
     
    40074007    newscript->pGossipSelect         = &GossipSelect_guard_dunmorogh; 
    40084008    newscript->GetAI = GetAI_guard_dunmorogh; 
    4009     newscript->RegisterSelf(); 
     4009    m_scripts[nrscripts++] = newscript; 
    40104010 
    40114011    newscript = new Script; 
     
    40144014    newscript->pGossipSelect         = &GossipSelect_guard_durotar; 
    40154015    newscript->GetAI = GetAI_guard_durotar; 
    4016     newscript->RegisterSelf(); 
     4016    m_scripts[nrscripts++] = newscript; 
    40174017 
    40184018    newscript = new Script; 
     
    40214021    newscript->pGossipSelect         = &GossipSelect_guard_elwynnforest; 
    40224022    newscript->GetAI = GetAI_guard_elwynnforest; 
    4023     newscript->RegisterSelf(); 
     4023    m_scripts[nrscripts++] = newscript; 
    40244024 
    40254025    newscript = new Script; 
     
    40284028    newscript->pGossipSelect         = &GossipSelect_guard_eversong; 
    40294029    newscript->GetAI = GetAI_guard_eversong; 
    4030     newscript->RegisterSelf(); 
     4030    m_scripts[nrscripts++] = newscript; 
    40314031 
    40324032    newscript = new Script; 
     
    40354035    newscript->pGossipSelect         = &GossipSelect_guard_exodar; 
    40364036    newscript->GetAI = GetAI_guard_exodar; 
    4037     newscript->RegisterSelf(); 
     4037    m_scripts[nrscripts++] = newscript; 
    40384038 
    40394039    newscript = new Script; 
     
    40424042    newscript->pGossipSelect         = &GossipSelect_guard_ironforge; 
    40434043    newscript->GetAI = GetAI_guard_ironforge; 
    4044     newscript->RegisterSelf(); 
     4044    m_scripts[nrscripts++] = newscript; 
    40454045 
    40464046    newscript = new Script; 
     
    40494049    newscript->pGossipSelect         = &GossipSelect_guard_mulgore; 
    40504050    newscript->GetAI = GetAI_guard_mulgore; 
    4051     newscript->RegisterSelf(); 
     4051    m_scripts[nrscripts++] = newscript; 
    40524052 
    40534053    newscript = new Script; 
     
    40574057    newscript->pReceiveEmote         = &ReceiveEmote_guard_orgrimmar; 
    40584058    newscript->GetAI = GetAI_guard_orgrimmar; 
    4059     newscript->RegisterSelf(); 
     4059    m_scripts[nrscripts++] = newscript; 
    40604060 
    40614061    newscript = new Script; 
     
    40644064    newscript->pGossipSelect         = &GossipSelect_guard_shattrath; 
    40654065    newscript->GetAI = GetAI_guard_shattrath; 
    4066     newscript->RegisterSelf(); 
     4066    m_scripts[nrscripts++] = newscript; 
    40674067 
    40684068    newscript = new Script; 
     
    40714071    newscript->pGossipHello          = &GossipHello_guard_shattrath_aldor; 
    40724072    newscript->pGossipSelect         = &GossipSelect_guard_shattrath_aldor; 
    4073     newscript->RegisterSelf(); 
     4073    m_scripts[nrscripts++] = newscript; 
    40744074 
    40754075    newscript = new Script; 
     
    40784078    newscript->pGossipHello          = &GossipHello_guard_shattrath_scryer; 
    40794079    newscript->pGossipSelect         = &GossipSelect_guard_shattrath_scryer; 
    4080     newscript->RegisterSelf(); 
     4080    m_scripts[nrscripts++] = newscript; 
    40814081 
    40824082    newscript = new Script; 
     
    40854085    newscript->pGossipSelect         = &GossipSelect_guard_silvermoon; 
    40864086    newscript->GetAI = GetAI_guard_silvermoon; 
    4087     newscript->RegisterSelf(); 
     4087    m_scripts[nrscripts++] = newscript; 
    40884088 
    40894089    newscript = new Script; 
     
    40934093    newscript->pReceiveEmote         = &ReceiveEmote_guard_stormwind; 
    40944094    newscript->GetAI = GetAI_guard_stormwind; 
    4095     newscript->RegisterSelf(); 
     4095    m_scripts[nrscripts++] = newscript; 
    40964096 
    40974097    newscript = new Script; 
     
    41004100    newscript->pGossipSelect         = &GossipSelect_guard_teldrassil; 
    41014101    newscript->GetAI = GetAI_guard_teldrassil; 
    4102     newscript->RegisterSelf(); 
     4102    m_scripts[nrscripts++] = newscript; 
    41034103 
    41044104    newscript = new Script; 
     
    41074107    newscript->pGossipSelect         = &GossipSelect_guard_tirisfal; 
    41084108    newscript->GetAI = GetAI_guard_tirisfal; 
    4109     newscript->RegisterSelf(); 
     4109    m_scripts[nrscripts++] = newscript; 
    41104110 
    41114111    newscript = new Script; 
     
    41144114    newscript->pGossipSelect         = &GossipSelect_guard_undercity; 
    41154115    newscript->GetAI = GetAI_guard_undercity; 
    4116     newscript->RegisterSelf(); 
    4117 } 
     4116    m_scripts[nrscripts++] = newscript; 
     4117} 
  • trunk/src/bindings/scripts/scripts/item/item_scripts.cpp

    r260 r272  
    456456    newscript->Name="item_area_52_special"; 
    457457    newscript->pItemUse = ItemUse_item_area_52_special; 
    458     newscript->RegisterSelf(); 
     458    m_scripts[nrscripts++] = newscript; 
    459459 
    460460    newscript = new Script; 
    461461    newscript->Name="item_arcane_charges"; 
    462462    newscript->pItemUse = ItemUse_item_arcane_charges; 
    463     newscript->RegisterSelf(); 
     463    m_scripts[nrscripts++] = newscript; 
    464464 
    465465    newscript = new Script; 
    466466    newscript->Name="item_attuned_crystal_cores"; 
    467467    newscript->pItemUse = ItemUse_item_attuned_crystal_cores; 
    468     newscript->RegisterSelf(); 
     468    m_scripts[nrscripts++] = newscript; 
    469469 
    470470    newscript = new Script; 
    471471    newscript->Name="item_blackwhelp_net"; 
    472472    newscript->pItemUse = ItemUse_item_blackwhelp_net; 
    473     newscript->RegisterSelf(); 
     473    m_scripts[nrscripts++] = newscript; 
    474474 
    475475    newscript = new Script; 
    476476    newscript->Name="item_disciplinary_rod"; 
    477477    newscript->pItemUse = ItemUse_item_disciplinary_rod; 
    478     newscript->RegisterSelf(); 
     478    m_scripts[nrscripts++] = newscript; 
    479479 
    480480    newscript = new Script; 
    481481    newscript->Name="item_draenei_fishing_net"; 
    482482    newscript->pItemUse = ItemUse_item_draenei_fishing_net; 
    483     newscript->RegisterSelf(); 
     483    m_scripts[nrscripts++] = newscript; 
    484484 
    485485    newscript = new Script; 
    486486    newscript->Name="item_nether_wraith_beacon"; 
    487487    newscript->pItemUse = ItemUse_item_nether_wraith_beacon; 
    488     newscript->RegisterSelf(); 
     488    m_scripts[nrscripts++] = newscript; 
    489489 
    490490    newscript = new Script; 
    491491    newscript->Name="item_flying_machine"; 
    492492    newscript->pItemUse = ItemUse_item_flying_machine; 
    493     newscript->RegisterSelf(); 
     493    m_scripts[nrscripts++] = newscript; 
    494494 
    495495    newscript = new Script; 
    496496    newscript->Name="item_gor_dreks_ointment"; 
    497497    newscript->pItemUse = ItemUse_item_gor_dreks_ointment; 
    498     newscript->RegisterSelf(); 
     498    m_scripts[nrscripts++] = newscript; 
    499499 
    500500    newscript = new Script; 
    501501    newscript->Name="item_muiseks_vessel"; 
    502502    newscript->pItemUse = ItemUse_item_muiseks_vessel; 
    503     newscript->RegisterSelf(); 
     503    m_scripts[nrscripts++] = newscript; 
    504504 
    505505    newscript = new Script; 
    506506    newscript->Name="item_razorthorn_flayer_gland"; 
    507507    newscript->pItemUse = ItemUse_item_razorthorn_flayer_gland; 
    508     newscript->RegisterSelf(); 
     508    m_scripts[nrscripts++] = newscript; 
    509509 
    510510    newscript = new Script; 
    511511    newscript->Name="item_tame_beast_rods"; 
    512512    newscript->pItemUse = ItemUse_item_tame_beast_rods; 
    513     newscript->RegisterSelf(); 
     513    m_scripts[nrscripts++] = newscript; 
    514514 
    515515    newscript = new Script; 
    516516    newscript->Name="item_protovoltaic_magneto_collector"; 
    517517    newscript->pItemUse = ItemUse_item_protovoltaic_magneto_collector; 
    518     newscript->RegisterSelf(); 
     518    m_scripts[nrscripts++] = newscript; 
    519519 
    520520    newscript = new Script; 
    521521    newscript->Name="item_soul_cannon"; 
    522522    newscript->pItemUse = ItemUse_item_soul_cannon; 
    523     newscript->RegisterSelf(); 
     523    m_scripts[nrscripts++] = newscript; 
    524524 
    525525    newscript = new Script; 
    526526    newscript->Name="item_sparrowhawk_net"; 
    527527    newscript->pItemUse = ItemUse_item_sparrowhawk_net; 
    528     newscript->RegisterSelf(); 
     528    m_scripts[nrscripts++] = newscript; 
    529529 
    530530    newscript = new Script; 
    531531    newscript->Name="item_voodoo_charm"; 
    532532    newscript->pItemUse = ItemUse_item_voodoo_charm; 
    533     newscript->RegisterSelf(); 
     533    m_scripts[nrscripts++] = newscript; 
    534534 
    535535    newscript = new Script; 
    536536    newscript->Name="item_vorenthals_presence"; 
    537537    newscript->pItemUse = ItemUse_item_vorenthals_presence; 
    538     newscript->RegisterSelf(); 
     538    m_scripts[nrscripts++] = newscript; 
    539539 
    540540    newscript = new Script; 
    541541    newscript->Name="item_yehkinyas_bramble"; 
    542542    newscript->pItemUse = ItemUse_item_yehkinyas_bramble; 
    543     newscript->RegisterSelf(); 
     543    m_scripts[nrscripts++] = newscript; 
    544544 
    545545    newscript = new Script; 
    546546    newscript->Name="item_zezzaks_shard"; 
    547547    newscript->pItemUse = ItemUse_item_zezzak_shard; 
    548     newscript->RegisterSelf(); 
    549 } 
     548    m_scripts[nrscripts++] = newscript; 
     549} 
  • trunk/src/bindings/scripts/scripts/item/item_test.cpp

    r260 r272  
    3939    newscript->Name="item_test"; 
    4040    newscript->pItemUse = ItemUse_item_test; 
    41     newscript->RegisterSelf(); 
     41    m_scripts[nrscripts++] = newscript; 
    4242} 
  • trunk/src/bindings/scripts/scripts/npc/npc_innkeeper.cpp

    r260 r272  
    141141    newscript->pGossipHello = &GossipHello_npc_innkeeper; 
    142142    newscript->pGossipSelect = &GossipSelect_npc_innkeeper; 
    143     newscript->RegisterSelf(); 
     143    m_scripts[nrscripts++] = newscript; 
    144144} 
  • trunk/src/bindings/scripts/scripts/npc/npc_professions.cpp

    r260 r272  
    11781178    newscript->pGossipHello =  &GossipHello_npc_prof_alchemy; 
    11791179    newscript->pGossipSelect = &GossipSelect_npc_prof_alchemy; 
    1180     newscript->RegisterSelf(); 
     1180    m_scripts[nrscripts++] = newscript; 
    11811181 
    11821182    newscript = new Script; 
     
    11841184    newscript->pGossipHello =  &GossipHello_npc_prof_blacksmith; 
    11851185    newscript->pGossipSelect = &GossipSelect_npc_prof_blacksmith; 
    1186     newscript->RegisterSelf(); 
     1186    m_scripts[nrscripts++] = newscript; 
    11871187 
    11881188    newscript = new Script; 
     
    11901190    newscript->pGossipHello =  &GossipHello_npc_prof_leather; 
    11911191    newscript->pGossipSelect = &GossipSelect_npc_prof_leather; 
    1192     newscript->RegisterSelf(); 
     1192    m_scripts[nrscripts++] = newscript; 
    11931193 
    11941194    newscript = new Script; 
     
    11961196    newscript->pGossipHello =  &GossipHello_npc_prof_tailor; 
    11971197    newscript->pGossipSelect = &GossipSelect_npc_prof_tailor; 
    1198     newscript->RegisterSelf(); 
     1198    m_scripts[nrscripts++] = newscript; 
    11991199 
    12001200    /*newscript = new Script; 
     
    12021202    newscript->pGOHello =  &GOHello_go_soothsaying_for_dummies; 
    12031203    //newscript->pGossipSelect = &GossipSelect_go_soothsaying_for_dummies; 
    1204     newscript->RegisterSelf();*/ 
    1205 } 
     1204    m_scripts[nrscripts++] = newscript;*/ 
     1205} 
  • trunk/src/bindings/scripts/scripts/npc/npcs_special.cpp

    r260 r272  
    836836    newscript->pQuestAccept =   &QuestAccept_npc_chicken_cluck; 
    837837    newscript->pQuestComplete = &QuestComplete_npc_chicken_cluck; 
    838     newscript->RegisterSelf(); 
     838    m_scripts[nrscripts++] = newscript; 
    839839 
    840840    newscript = new Script; 
    841841    newscript->Name="npc_dancing_flames"; 
    842842    newscript->pReceiveEmote =  &ReceiveEmote_npc_dancing_flames; 
    843     newscript->RegisterSelf(); 
     843    m_scripts[nrscripts++] = newscript; 
    844844 
    845845    newscript = new Script; 
    846846    newscript->Name="npc_injured_patient"; 
    847847    newscript->GetAI = GetAI_npc_injured_patient; 
    848     newscript->RegisterSelf(); 
     848    m_scripts[nrscripts++] = newscript; 
    849849 
    850850    newscript = new Script; 
     
    852852    newscript->GetAI = GetAI_npc_doctor; 
    853853    newscript->pQuestAccept = &QuestAccept_npc_doctor; 
    854     newscript->RegisterSelf(); 
     854    m_scripts[nrscripts++] = newscript; 
    855855 
    856856    newscript = new Script; 
    857857    newscript->Name="npc_guardian"; 
    858858    newscript->GetAI = GetAI_npc_guardian; 
    859     newscript->RegisterSelf(); 
     859    m_scripts[nrscripts++] = newscript; 
    860860 
    861861    newscript = new Script; 
     
    863863    newscript->pGossipHello =  &GossipHello_npc_mount_vendor; 
    864864    newscript->pGossipSelect = &GossipSelect_npc_mount_vendor; 
    865     newscript->RegisterSelf(); 
     865    m_scripts[nrscripts++] = newscript; 
    866866 
    867867    newscript = new Script; 
     
    869869    newscript->pGossipHello =  &GossipHello_npc_rogue_trainer; 
    870870    newscript->pGossipSelect = &GossipSelect_npc_rogue_trainer; 
    871     newscript->RegisterSelf(); 
     871    m_scripts[nrscripts++] = newscript; 
    872872 
    873873    newscript = new Script; 
     
    875875    newscript->pGossipHello = &GossipHello_npc_sayge; 
    876876    newscript->pGossipSelect = &GossipSelect_npc_sayge; 
    877     newscript->RegisterSelf(); 
    878 } 
     877    m_scripts[nrscripts++] = newscript; 
     878} 
  • trunk/src/bindings/scripts/scripts/zone/alterac_mountains/alterac_mountains.cpp

    r260 r272  
    5959    newscript->Name="npc_ravenholdt"; 
    6060    newscript->GetAI = GetAI_npc_ravenholdt; 
    61     newscript->RegisterSelf(); 
     61    m_scripts[nrscripts++] = newscript; 
    6262} 
  • trunk/src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp

    r260 r272  
    349349    newscript->Name="boss_exarch_maladaar"; 
    350350    newscript->GetAI = GetAI_boss_exarch_maladaar; 
    351     newscript->RegisterSelf(); 
     351    m_scripts[nrscripts++] = newscript; 
    352352 
    353353    newscript = new Script; 
    354354    newscript->Name="mob_avatar_of_martyred"; 
    355355    newscript->GetAI = GetAI_mob_avatar_of_martyred; 
    356     newscript->RegisterSelf(); 
     356    m_scripts[nrscripts++] = newscript; 
    357357 
    358358    newscript = new Script; 
    359359    newscript->Name="mob_stolen_soul"; 
    360360    newscript->GetAI = GetAI_mob_stolen_soul; 
    361     newscript->RegisterSelf(); 
     361    m_scripts[nrscripts++] = newscript; 
    362362} 
  • trunk/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp

    r260 r272  
    272272    newscript->Name="boss_nexusprince_shaffar"; 
    273273    newscript->GetAI = GetAI_boss_nexusprince_shaffar; 
    274     newscript->RegisterSelf(); 
     274    m_scripts[nrscripts++] = newscript; 
    275275 
    276276    newscript = new Script; 
    277277    newscript->Name="mob_ethereal_beacon"; 
    278278    newscript->GetAI = GetAI_mob_ethereal_beacon; 
    279     newscript->RegisterSelf(); 
     279    m_scripts[nrscripts++] = newscript; 
    280280} 
  • trunk/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_pandemonius.cpp

    r260 r272  
    135135    newscript->Name="boss_pandemonius"; 
    136136    newscript->GetAI = GetAI_boss_pandemonius; 
    137     newscript->RegisterSelf(); 
     137    m_scripts[nrscripts++] = newscript; 
    138138} 
  • trunk/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_darkweaver_syth.cpp

    r260 r272  
    393393    newscript->Name="boss_darkweaver_syth"; 
    394394    newscript->GetAI = GetAI_boss_darkweaver_syth; 
    395     newscript->RegisterSelf(); 
     395    m_scripts[nrscripts++] = newscript; 
    396396 
    397397    newscript = new Script; 
    398398    newscript->Name="mob_syth_fire"; 
    399399    newscript->GetAI = GetAI_mob_syth_arcane; 
    400     newscript->RegisterSelf(); 
     400    m_scripts[nrscripts++] = newscript; 
    401401 
    402402    newscript = new Script; 
    403403    newscript->Name="mob_syth_arcane"; 
    404404    newscript->GetAI = GetAI_mob_syth_arcane; 
    405     newscript->RegisterSelf(); 
     405    m_scripts[nrscripts++] = newscript; 
    406406 
    407407    newscript = new Script; 
    408408    newscript->Name="mob_syth_frost"; 
    409409    newscript->GetAI = GetAI_mob_syth_frost; 
    410     newscript->RegisterSelf(); 
     410    m_scripts[nrscripts++] = newscript; 
    411411 
    412412    newscript = new Script; 
    413413    newscript->Name="mob_syth_shadow"; 
    414414    newscript->GetAI = GetAI_mob_syth_shadow; 
    415     newscript->RegisterSelf(); 
    416 } 
     415    m_scripts[nrscripts++] = newscript; 
     416} 
  • trunk/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_tailonking_ikiss.cpp

    r260 r272  
    220220    newscript->Name="boss_talon_king_ikiss"; 
    221221    newscript->GetAI = GetAI_boss_talon_king_ikiss; 
    222     newscript->RegisterSelf(); 
     222    m_scripts[nrscripts++] = newscript; 
    223223} 
  • trunk/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/instance_sethekk_halls.cpp

    r260 r272  
    7171    newscript->Name = "instance_sethekk_halls"; 
    7272    newscript->GetInstanceData = GetInstanceData_instance_sethekk_halls; 
    73     newscript->RegisterSelf(); 
     73    m_scripts[nrscripts++] = newscript; 
    7474} 
  • trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp

    r260 r272  
    195195    newscript->Name="boss_ambassador_hellmaw"; 
    196196    newscript->GetAI = GetAI_boss_ambassador_hellmaw; 
    197     newscript->RegisterSelf(); 
     197    m_scripts[nrscripts++] = newscript; 
    198198} 
  • trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp

    r260 r272  
    174174    newscript->Name="boss_blackheart_the_inciter"; 
    175175    newscript->GetAI = GetAI_boss_blackheart_the_inciter; 
    176     newscript->RegisterSelf(); 
     176    m_scripts[nrscripts++] = newscript; 
    177177} 
  • trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp

    r260 r272  
    221221        if ( DrawnShadows_Timer < diff) 
    222222        { 
    223             DoTeleportAll(VorpilPosition[0][0],VorpilPosition[0][1],VorpilPosition[0][2],0); 
     223            Map *map = m_creature->GetMap(); 
     224            if(map->IsDungeon()) 
     225            { 
     226                InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 
     227                for (InstanceMap::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) 
     228                { 
     229                    if((*i)->isAlive()) 
     230                    { 
     231                        (*i)->TeleportTo(555,VorpilPosition[0][0],VorpilPosition[0][1],VorpilPosition[0][2],0); 
     232                    } 
     233                } 
     234            } 
    224235            m_creature->Relocate(VorpilPosition[0][0],VorpilPosition[0][1],VorpilPosition[0][2],0); 
    225236            DoCast(m_creature,SPELL_DRAWN_SHADOWS,true); 
     
    364375    newscript->Name="boss_grandmaster_vorpil"; 
    365376    newscript->GetAI = GetAI_boss_grandmaster_vorpil; 
    366     newscript->RegisterSelf(); 
     377    m_scripts[nrscripts++] = newscript; 
    367378 
    368379    newscript = new Script; 
    369380    newscript->Name="mob_voidtraveler"; 
    370381    newscript->GetAI = GetAI_mob_voidtraveler; 
    371     newscript->RegisterSelf(); 
     382    m_scripts[nrscripts++] = newscript; 
    372383} 
  • trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_murmur.cpp

    r260 r272  
    149149    newscript->Name="boss_murmur"; 
    150150    newscript->GetAI = GetAI_boss_murmur; 
    151     newscript->RegisterSelf(); 
     151    m_scripts[nrscripts++] = newscript; 
    152152} 
  • trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp

    r260 r272  
    175175    newscript->Name = "instance_shadow_labyrinth"; 
    176176    newscript->GetInstanceData = GetInstanceData_instance_shadow_labyrinth; 
    177     newscript->RegisterSelf(); 
     177    m_scripts[nrscripts++] = newscript; 
    178178} 
  • trunk/src/bindings/scripts/scripts/zone/azshara/azshara.cpp

    r260 r272  
    493493    newscript->Name="mobs_spitelashes"; 
    494494    newscript->GetAI = GetAI_mobs_spitelashes; 
    495     newscript->RegisterSelf(); 
     495    m_scripts[nrscripts++] = newscript; 
    496496 
    497497    newscript = new Script; 
     
    499499    newscript->pGossipHello =  &GossipHello_npc_loramus_thalipedes; 
    500500    newscript->pGossipSelect = &GossipSelect_npc_loramus_thalipedes; 
    501     newscript->RegisterSelf(); 
     501    m_scripts[nrscripts++] = newscript; 
    502502 
    503503        newscript = new Script; 
     
    506506    newscript->pGossipHello =  &GossipHello_mob_rizzle_sprysprocket; 
    507507    newscript->pGossipSelect = &GossipSelect_mob_rizzle_sprysprocket; 
    508     newscript->RegisterSelf(); 
     508    m_scripts[nrscripts++] = newscript; 
    509509 
    510510    newscript = new Script; 
    511511    newscript->Name="mob_depth_charge"; 
    512512    newscript->GetAI = GetAI_mob_depth_charge; 
    513     newscript->RegisterSelf(); 
    514 } 
     513    m_scripts[nrscripts++] = newscript; 
     514} 
  • trunk/src/bindings/scripts/scripts/zone/azshara/boss_azuregos.cpp

    r260 r272  
    150150    newscript->Name="boss_azuregos"; 
    151151    newscript->GetAI = GetAI_boss_azuregos; 
    152     newscript->RegisterSelf(); 
     152    m_scripts[nrscripts++] = newscript; 
    153153} 
  • trunk/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp

    r260 r272  
    351351    newscript->Name="npc_draenei_survivor"; 
    352352    newscript->GetAI = GetAI_npc_draenei_survivor; 
    353     newscript->RegisterSelf(); 
     353    m_scripts[nrscripts++] = newscript; 
    354354 
    355355    newscript = new Script; 
     
    358358    newscript->pGossipHello =  &GossipHello_npc_engineer_spark_overgrind; 
    359359    newscript->pGossipSelect = &GossipSelect_npc_engineer_spark_overgrind; 
    360     newscript->RegisterSelf(); 
     360    m_scripts[nrscripts++] = newscript; 
    361361 
    362362    newscript = new Script; 
    363363    newscript->Name="npc_injured_draenei"; 
    364364    newscript->GetAI = GetAI_npc_injured_draenei; 
    365     newscript->RegisterSelf(); 
     365    m_scripts[nrscripts++] = newscript; 
    366366 
    367367    newscript = new Script; 
     
    369369    newscript->pGossipHello =  &GossipHello_npc_susurrus; 
    370370    newscript->pGossipSelect = &GossipSelect_npc_susurrus; 
    371     newscript->RegisterSelf(); 
    372 } 
     371    m_scripts[nrscripts++] = newscript; 
     372} 
  • trunk/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp

    r260 r272  
    370370    newscript->pGossipHello = &GossipHello_npc_beaten_corpse; 
    371371    newscript->pGossipSelect = &GossipSelect_npc_beaten_corpse; 
    372     newscript->RegisterSelf(); 
     372    m_scripts[nrscripts++] = newscript; 
    373373 
    374374    newscript = new Script; 
     
    376376    newscript->pGossipHello = &GossipHello_npc_sputtervalve; 
    377377    newscript->pGossipSelect = &GossipSelect_npc_sputtervalve; 
    378     newscript->RegisterSelf(); 
     378    m_scripts[nrscripts++] = newscript; 
    379379 
    380380    newscript = new Script; 
     
    382382    newscript->GetAI = GetAI_npc_taskmaster_fizzule; 
    383383    newscript->pReceiveEmote = &ReciveEmote_npc_taskmaster_fizzule; 
    384     newscript->RegisterSelf(); 
     384    m_scripts[nrscripts++] = newscript; 
    385385 
    386386    newscript = new Script; 
    387387    newscript->Name="npc_twiggy_flathead"; 
    388388    newscript->GetAI = GetAI_npc_twiggy_flathead; 
    389     newscript->RegisterSelf(); 
    390 } 
     389    m_scripts[nrscripts++] = newscript; 
     390} 
  • trunk/src/bindings/scripts/scripts/zone/black_temple/black_temple.cpp

    r260 r272  
    6565    newscript->pGossipHello = GossipHello_npc_spirit_of_olum; 
    6666    newscript->pGossipSelect = GossipSelect_npc_spirit_of_olum; 
    67     newscript->RegisterSelf(); 
     67    m_scripts[nrscripts++] = newscript; 
    6868} 
  • trunk/src/bindings/scripts/scripts/zone/black_temple/boss_bloodboil.cpp

    r260 r272  
    362362    newscript->Name="boss_gurtogg_bloodboil"; 
    363363    newscript->GetAI = GetAI_boss_gurtogg_bloodboil; 
    364     newscript->RegisterSelf(); 
     364    m_scripts[nrscripts++] = newscript; 
    365365} 
  • trunk/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp

    r260 r272  
    22482248    newscript->Name = "boss_illidan_stormrage"; 
    22492249    newscript->GetAI = GetAI_boss_illidan_stormrage; 
    2250     newscript->RegisterSelf(); 
     2250    m_scripts[nrscripts++] = newscript; 
    22512251 
    22522252    newscript = new Script; 
     
    22552255    newscript->pGossipHello = GossipHello_npc_akama_at_illidan; 
    22562256    newscript->pGossipSelect = GossipSelect_npc_akama_at_illidan; 
    2257     newscript->RegisterSelf(); 
     2257    m_scripts[nrscripts++] = newscript; 
    22582258 
    22592259    newscript = new Script; 
    22602260    newscript->Name = "boss_maiev_shadowsong"; 
    22612261    newscript->GetAI = GetAI_boss_maiev; 
    2262     newscript->RegisterSelf(); 
     2262    m_scripts[nrscripts++] = newscript; 
    22632263 
    22642264    newscript = new Script; 
    22652265    newscript->Name = "mob_flame_of_azzinoth"; 
    22662266    newscript->GetAI = GetAI_mob_flame_of_azzinoth; 
    2267     newscript->RegisterSelf(); 
     2267    m_scripts[nrscripts++] = newscript; 
    22682268 
    22692269    newscript = new Script; 
    22702270    newscript->Name = "mob_blade_of_azzinoth"; 
    22712271    newscript->GetAI = GetAI_blade_of_azzinoth; 
    2272     newscript->RegisterSelf(); 
     2272    m_scripts[nrscripts++] = newscript; 
    22732273 
    22742274    newscript = new Script; 
    22752275    newscript->Name = "gameobject_cage_trap"; 
    22762276    newscript->pGOHello = GOHello_cage_trap; 
    2277     newscript->RegisterSelf(); 
     2277    m_scripts[nrscripts++] = newscript; 
    22782278 
    22792279    newscript = new Script; 
    22802280    newscript->Name="mob_cage_trap_trigger"; 
    22812281    newscript->GetAI = &GetAI_cage_trap_trigger; 
    2282     newscript->RegisterSelf(); 
     2282    m_scripts[nrscripts++] = newscript; 
    22832283 
    22842284    newscript = new Script; 
    22852285    newscript->Name = "mob_shadow_demon"; 
    22862286    newscript->GetAI = GetAI_shadow_demon; 
    2287     newscript->RegisterSelf(); 
     2287    m_scripts[nrscripts++] = newscript; 
    22882288 
    22892289    newscript = new Script; 
    22902290    newscript->Name="mob_demon_fire"; 
    22912291    newscript->GetAI = GetAI_demonfire; 
    2292     newscript->RegisterSelf(); 
     2292    m_scripts[nrscripts++] = newscript; 
    22932293 
    22942294    newscript = new Script; 
    22952295    newscript->Name = "mob_parasitic_shadowfiend"; 
    22962296    newscript->GetAI = GetAI_parasitic_shadowfiend; 
    2297     newscript->RegisterSelf(); 
     2297    m_scripts[nrscripts++] = newscript; 
    22982298} 
  • trunk/src/bindings/scripts/scripts/zone/black_temple/boss_mother_shahraz.cpp

    r260 r272  
    358358    newscript->Name="boss_mother_shahraz"; 
    359359    newscript->GetAI = GetAI_boss_shahraz; 
    360     newscript->RegisterSelf(); 
     360    m_scripts[nrscripts++] = newscript; 
    361361} 
  • trunk/src/bindings/scripts/scripts/zone/black_temple/boss_reliquary_of_souls.cpp

    r260 r272  
    724724    newscript->Name="boss_reliquary_of_souls"; 
    725725    newscript->GetAI = GetAI_boss_reliquary_of_souls; 
    726     newscript->RegisterSelf(); 
     726    m_scripts[nrscripts++] = newscript; 
    727727 
    728728    newscript = new Script; 
    729729    newscript->Name="boss_essence_of_suffering"; 
    730730    newscript->GetAI = GetAI_boss_essence_of_suffering; 
    731     newscript->RegisterSelf(); 
     731    m_scripts[nrscripts++] = newscript; 
    732732 
    733733    newscript = new Script; 
    734734    newscript->Name="boss_essence_of_desire"; 
    735735    newscript->GetAI = GetAI_boss_essence_of_desire; 
    736     newscript->RegisterSelf(); 
     736    m_scripts[nrscripts++] = newscript; 
    737737 
    738738    newscript = new Script; 
    739739    newscript->Name="boss_essence_of_anger"; 
    740740    newscript->GetAI = GetAI_boss_essence_of_anger; 
    741     newscript->RegisterSelf(); 
     741    m_scripts[nrscripts++] = newscript; 
    742742 
    743743    newscript = new Script; 
    744744    newscript->Name="npc_enslaved_soul"; 
    745745    newscript->GetAI = GetAI_npc_enslaved_soul; 
    746     newscript->RegisterSelf(); 
     746    m_scripts[nrscripts++] = newscript; 
    747747} 
  • trunk/src/bindings/scripts/scripts/zone/black_temple/boss_shade_of_akama.cpp

    r260 r272  
    797797    newscript->Name="boss_shade_of_akama"; 
    798798    newscript->GetAI = GetAI_boss_shade_of_akama; 
    799     newscript->RegisterSelf(); 
     799    m_scripts[nrscripts++] = newscript; 
    800800 
    801801    newscript = new Script; 
    802802    newscript->Name="mob_ashtongue_channeler"; 
    803803    newscript->GetAI = GetAI_mob_ashtongue_channeler; 
    804     newscript->RegisterSelf(); 
     804    m_scripts[nrscripts++] = newscript; 
    805805 
    806806    newscript = new Script; 
    807807    newscript->Name="mob_ashtongue_sorcerer"; 
    808808    newscript->GetAI = GetAI_mob_ashtongue_sorcerer; 
    809     newscript->RegisterSelf(); 
     809    m_scripts[nrscripts++] = newscript; 
    810810 
    811811    newscript = new Script; 
     
    814814    newscript->pGossipHello = &GossipHello_npc_akama; 
    815815    newscript->pGossipSelect = &GossipSelect_npc_akama; 
    816     newscript->RegisterSelf(); 
     816    m_scripts[nrscripts++] = newscript; 
    817817} 
  • trunk/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp

    r260 r272  
    237237    newscript->Name="boss_supremus"; 
    238238    newscript->GetAI = GetAI_boss_supremus; 
    239     newscript->RegisterSelf(); 
     239    m_scripts[nrscripts++] = newscript; 
    240240 
    241241    newscript = new Script; 
    242242    newscript->Name="molten_flame"; 
    243243    newscript->GetAI = GetAI_molten_flame; 
    244     newscript->RegisterSelf(); 
     244    m_scripts[nrscripts++] = newscript; 
    245245} 
  • trunk/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp

    r260 r272  
    576576    newscript->Name = "mob_doom_blossom"; 
    577577    newscript->GetAI = GetAI_mob_doom_blossom; 
    578     newscript->RegisterSelf(); 
     578    m_scripts[nrscripts++] = newscript; 
    579579 
    580580    newscript = new Script; 
    581581    newscript->Name = "mob_shadowy_construct"; 
    582582    newscript->GetAI = GetAI_mob_shadowy_construct; 
    583     newscript->RegisterSelf(); 
     583    m_scripts[nrscripts++] = newscript; 
    584584 
    585585    newscript = new Script; 
    586586    newscript->Name="boss_teron_gorefiend"; 
    587587    newscript->GetAI = GetAI_boss_teron_gorefiend; 
    588     newscript->RegisterSelf(); 
     588    m_scripts[nrscripts++] = newscript; 
    589589} 
  • trunk/src/bindings/scripts/scripts/zone/black_temple/boss_warlord_najentus.cpp

    r260 r272  
    259259    newscript->Name="boss_najentus"; 
    260260    newscript->GetAI = GetAI_boss_najentus; 
    261     newscript->RegisterSelf(); 
     261    m_scripts[nrscripts++] = newscript; 
    262262 
    263263    newscript = new Script; 
    264264    newscript->Name = "go_najentus_spine"; 
    265265    newscript->pGOHello = &GOHello_go_najentus_spine; 
    266     newscript->RegisterSelf(); 
     266    m_scripts[nrscripts++] = newscript; 
    267267} 
  • trunk/src/bindings/scripts/scripts/zone/black_temple/illidari_council.cpp

    r260 r272  
    856856    newscript->Name="mob_illidari_council"; 
    857857    newscript->GetAI = GetAI_mob_illidari_council; 
    858     newscript->RegisterSelf(); 
     858    m_scripts[nrscripts++] = newscript; 
    859859 
    860860    newscript = new Script; 
    861861    newscript->Name = "mob_blood_elf_council_voice_trigger"; 
    862862    newscript->GetAI = GetAI_mob_blood_elf_council_voice_trigger; 
    863     newscript->RegisterSelf(); 
     863    m_scripts[nrscripts++] = newscript; 
    864864 
    865865    newscript = new Script; 
    866866    newscript->Name="boss_gathios_the_shatterer"; 
    867867    newscript->GetAI = GetAI_boss_gathios_the_shatterer; 
    868     newscript->RegisterSelf(); 
     868    m_scripts[nrscripts++] = newscript; 
    869869 
    870870    newscript = new Script; 
    871871    newscript->Name="boss_lady_malande"; 
    872872    newscript->GetAI = GetAI_boss_lady_malande; 
    873     newscript->RegisterSelf(); 
     873    m_scripts[nrscripts++] = newscript; 
    874874 
    875875    newscript = new Script; 
    876876    newscript->Name="boss_veras_darkshadow"; 
    877877    newscript->GetAI = GetAI_boss_veras_darkshadow; 
    878     newscript->RegisterSelf(); 
     878    m_scripts[nrscripts++] = newscript; 
    879879 
    880880    newscript = new Script; 
    881881    newscript->Name="boss_high_nethermancer_zerevor"; 
    882882    newscript->GetAI = GetAI_boss_high_nethermancer_zerevor; 
    883     newscript->RegisterSelf(); 
     883    m_scripts[nrscripts++] = newscript; 
    884884} 
  • trunk/src/bindings/scripts/scripts/zone/black_temple/instance_black_temple.cpp

    r260 r272  
    333333    newscript->Name = "instance_black_temple"; 
    334334    newscript->GetInstanceData = GetInstanceData_instance_black_temple; 
    335     newscript->RegisterSelf(); 
     335    m_scripts[nrscripts++] = newscript; 
    336336} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp

    r260 r272  
    222222    newscript->Name="phalanx"; 
    223223    newscript->GetAI = GetAI_mob_phalanx; 
    224     newscript->RegisterSelf(); 
     224    m_scripts[nrscripts++] = newscript; 
    225225 
    226226    newscript = new Script; 
     
    228228    newscript->pGossipHello =  &GossipHello_npc_kharan_mighthammer; 
    229229    newscript->pGossipSelect = &GossipSelect_npc_kharan_mighthammer; 
    230     newscript->RegisterSelf(); 
     230    m_scripts[nrscripts++] = newscript; 
    231231 
    232232    newscript = new Script; 
     
    234234    newscript->pGossipHello =  &GossipHello_npc_lokhtos_darkbargainer; 
    235235    newscript->pGossipSelect = &GossipSelect_npc_lokhtos_darkbargainer; 
    236     newscript->RegisterSelf(); 
    237 } 
     236    m_scripts[nrscripts++] = newscript; 
     237} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_ambassador_flamelash.cpp

    r260 r272  
    103103    newscript->Name="boss_ambassador_flamelash"; 
    104104    newscript->GetAI = GetAI_boss_ambassador_flamelash; 
    105     newscript->RegisterSelf(); 
     105    m_scripts[nrscripts++] = newscript; 
    106106} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_angerrel.cpp

    r260 r272  
    8888    newscript->Name="boss_angerrel"; 
    8989    newscript->GetAI = GetAI_boss_angerrel; 
    90     newscript->RegisterSelf(); 
     90    m_scripts[nrscripts++] = newscript; 
    9191} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_anubshiah.cpp

    r260 r272  
    112112    newscript->Name="boss_anubshiah"; 
    113113    newscript->GetAI = GetAI_boss_anubshiah; 
    114     newscript->RegisterSelf(); 
     114    m_scripts[nrscripts++] = newscript; 
    115115} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_doomrel.cpp

    r260 r272  
    136136    newscript->Name="boss_doomrel"; 
    137137    newscript->GetAI = GetAI_boss_doomrel; 
    138     newscript->RegisterSelf(); 
     138    m_scripts[nrscripts++] = newscript; 
    139139} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_doperel.cpp

    r260 r272  
    8888    newscript->Name="boss_doperel"; 
    8989    newscript->GetAI = GetAI_boss_doperel; 
    90     newscript->RegisterSelf(); 
     90    m_scripts[nrscripts++] = newscript; 
    9191} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp

    r260 r272  
    101101    newscript->Name="boss_emperor_dagran_thaurissan"; 
    102102    newscript->GetAI = GetAI_boss_draganthaurissan; 
    103     newscript->RegisterSelf(); 
     103    m_scripts[nrscripts++] = newscript; 
    104104} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_general_angerforge.cpp

    r260 r272  
    164164    newscript->Name="boss_general_angerforge"; 
    165165    newscript->GetAI = GetAI_boss_general_angerforge; 
    166     newscript->RegisterSelf(); 
     166    m_scripts[nrscripts++] = newscript; 
    167167} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_gloomrel.cpp

    r260 r272  
    139139    newscript->pGossipHello = &GossipHello_boss_gloomrel; 
    140140    newscript->pGossipSelect = &GossipSelect_boss_gloomrel; 
    141     newscript->RegisterSelf(); 
     141    m_scripts[nrscripts++] = newscript; 
    142142} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_gorosh_the_dervish.cpp

    r260 r272  
    7878    newscript->Name="boss_gorosh_the_dervish"; 
    7979    newscript->GetAI = GetAI_boss_gorosh_the_dervish; 
    80     newscript->RegisterSelf(); 
     80    m_scripts[nrscripts++] = newscript; 
    8181} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_grizzle.cpp

    r260 r272  
    8383    newscript->Name="boss_grizzle"; 
    8484    newscript->GetAI = GetAI_boss_grizzle; 
    85     newscript->RegisterSelf(); 
     85    m_scripts[nrscripts++] = newscript; 
    8686} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_haterel.cpp

    r260 r272  
    102102    newscript->Name="boss_haterel"; 
    103103    newscript->GetAI = GetAI_boss_haterel; 
    104     newscript->RegisterSelf(); 
     104    m_scripts[nrscripts++] = newscript; 
    105105} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_high_interrogator_gerstahn.cpp

    r260 r272  
    102102    newscript->Name="boss_high_interrogator_gerstahn"; 
    103103    newscript->GetAI = GetAI_boss_high_interrogator_gerstahn; 
    104     newscript->RegisterSelf(); 
     104    m_scripts[nrscripts++] = newscript; 
    105105} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_magmus.cpp

    r260 r272  
    8181    newscript->Name="boss_magmus"; 
    8282    newscript->GetAI = GetAI_boss_magmus; 
    83     newscript->RegisterSelf(); 
     83    m_scripts[nrscripts++] = newscript; 
    8484} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_moira_bronzebeard.cpp

    r260 r272  
    9696    newscript->Name="boss_moira_bronzebeard"; 
    9797    newscript->GetAI = GetAI_boss_moira_bronzebeard; 
    98     newscript->RegisterSelf(); 
     98    m_scripts[nrscripts++] = newscript; 
    9999} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_seethrel.cpp

    r260 r272  
    112112    newscript->Name="boss_seethrel"; 
    113113    newscript->GetAI = GetAI_boss_seethrel; 
    114     newscript->RegisterSelf(); 
     114    m_scripts[nrscripts++] = newscript; 
    115115} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_vilerel.cpp

    r260 r272  
    9898    newscript->Name="boss_vilerel"; 
    9999    newscript->GetAI = GetAI_boss_vilerel; 
    100     newscript->RegisterSelf(); 
     100    m_scripts[nrscripts++] = newscript; 
    101101} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_drakkisath.cpp

    r260 r272  
    9898    newscript->Name="boss_drakkisath"; 
    9999    newscript->GetAI = GetAI_boss_drakkisath; 
    100     newscript->RegisterSelf(); 
     100    m_scripts[nrscripts++] = newscript; 
    101101} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_gyth.cpp

    r260 r272  
    202202    newscript->Name="boss_gyth"; 
    203203    newscript->GetAI = GetAI_boss_gyth; 
    204     newscript->RegisterSelf(); 
     204    m_scripts[nrscripts++] = newscript; 
    205205} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_halycon.cpp

    r260 r272  
    9292    newscript->Name="boss_halycon"; 
    9393    newscript->GetAI = GetAI_boss_halycon; 
    94     newscript->RegisterSelf(); 
     94    m_scripts[nrscripts++] = newscript; 
    9595} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_highlord_omokk.cpp

    r260 r272  
    128128    newscript->Name="boss_highlord_omokk"; 
    129129    newscript->GetAI = GetAI_boss_highlordomokk; 
    130     newscript->RegisterSelf(); 
     130    m_scripts[nrscripts++] = newscript; 
    131131} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_mother_smolderweb.cpp

    r260 r272  
    8383    newscript->Name="boss_mother_smolderweb"; 
    8484    newscript->GetAI = GetAI_boss_mothersmolderweb; 
    85     newscript->RegisterSelf(); 
     85    m_scripts[nrscripts++] = newscript; 
    8686} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_overlord_wyrmthalak.cpp

    r260 r272  
    124124    newscript->Name="boss_overlord_wyrmthalak"; 
    125125    newscript->GetAI = GetAI_boss_overlordwyrmthalak; 
    126     newscript->RegisterSelf(); 
     126    m_scripts[nrscripts++] = newscript; 
    127127} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_pyroguard_emberseer.cpp

    r260 r272  
    9090    newscript->Name="boss_pyroguard_emberseer"; 
    9191    newscript->GetAI = GetAI_boss_pyroguard_emberseer; 
    92     newscript->RegisterSelf(); 
     92    m_scripts[nrscripts++] = newscript; 
    9393} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_quartermaster_zigris.cpp

    r260 r272  
    8282    newscript->Name="quartermaster_zigris"; 
    8383    newscript->GetAI = GetAI_boss_quatermasterzigris; 
    84     newscript->RegisterSelf(); 
     84    m_scripts[nrscripts++] = newscript; 
    8585} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_rend_blackhand.cpp

    r260 r272  
    8888    newscript->Name="boss_rend_blackhand"; 
    8989    newscript->GetAI = GetAI_boss_rend_blackhand; 
    90     newscript->RegisterSelf(); 
     90    m_scripts[nrscripts++] = newscript; 
    9191} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_shadow_hunter_voshgajin.cpp

    r260 r272  
    9292    newscript->Name="boss_shadow_hunter_voshgajin"; 
    9393    newscript->GetAI = GetAI_boss_shadowvosh; 
    94     newscript->RegisterSelf(); 
     94    m_scripts[nrscripts++] = newscript; 
    9595} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_the_beast.cpp

    r260 r272  
    9090    newscript->Name="boss_the_beast"; 
    9191    newscript->GetAI = GetAI_boss_thebeast; 
    92     newscript->RegisterSelf(); 
     92    m_scripts[nrscripts++] = newscript; 
    9393} 
  • trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_warmaster_voone.cpp

    r260 r272  
    118118    newscript->Name="boss_warmaster_voone"; 
    119119    newscript->GetAI = GetAI_boss_warmastervoone; 
    120     newscript->RegisterSelf(); 
     120    m_scripts[nrscripts++] = newscript; 
    121121} 
  • trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_broodlord_lashlayer.cpp

    r260 r272  
    125125    newscript->Name="boss_broodlord"; 
    126126    newscript->GetAI = GetAI_boss_broodlord; 
    127     newscript->RegisterSelf(); 
     127    m_scripts[nrscripts++] = newscript; 
    128128} 
  • trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_chromaggus.cpp

    r260 r272  
    311311    newscript->Name="boss_chromaggus"; 
    312312    newscript->GetAI = GetAI_boss_chromaggus; 
    313     newscript->RegisterSelf(); 
     313    m_scripts[nrscripts++] = newscript; 
    314314} 
  • trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_ebonroc.cpp

    r260 r272  
    100100    newscript->Name="boss_ebonroc"; 
    101101    newscript->GetAI = GetAI_boss_ebonroc; 
    102     newscript->RegisterSelf(); 
     102    m_scripts[nrscripts++] = newscript; 
    103103} 
  • trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_firemaw.cpp

    r260 r272  
    9191    newscript->Name="boss_firemaw"; 
    9292    newscript->GetAI = GetAI_boss_firemaw; 
    93     newscript->RegisterSelf(); 
     93    m_scripts[nrscripts++] = newscript; 
    9494} 
  • trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_flamegor.cpp

    r260 r272  
    9191    newscript->Name="boss_flamegor"; 
    9292    newscript->GetAI = GetAI_boss_flamegor; 
    93     newscript->RegisterSelf(); 
     93    m_scripts[nrscripts++] = newscript; 
    9494} 
  • trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_nefarian.cpp

    r260 r272  
    224224    newscript->Name="boss_nefarian"; 
    225225    newscript->GetAI = GetAI_boss_nefarian; 
    226     newscript->RegisterSelf(); 
     226    m_scripts[nrscripts++] = newscript; 
    227227} 
  • trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_razorgore.cpp

    r260 r272  
    128128    newscript->Name="boss_razorgore"; 
    129129    newscript->GetAI = GetAI_boss_razorgore; 
    130     newscript->RegisterSelf(); 
     130    m_scripts[nrscripts++] = newscript; 
    131131} 
  • trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_vaelastrasz.cpp

    r260 r272  
    258258    newscript->pGossipHello = &GossipHello_boss_vael; 
    259259    newscript->pGossipSelect = &GossipSelect_boss_vael; 
    260     newscript->RegisterSelf(); 
    261 } 
     260    m_scripts[nrscripts++] = newscript; 
     261} 
  • trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_victor_nefarius.cpp

    r260 r272  
    391391    newscript->pGossipHello = &GossipHello_boss_victor_nefarius; 
    392392    newscript->pGossipSelect = &GossipSelect_boss_victor_nefarius; 
    393     newscript->RegisterSelf(); 
     393    m_scripts[nrscripts++] = newscript; 
    394394} 
  • trunk/src/bindings/scripts/scripts/zone/blades_edge_mountains/blades_edge_mountains.cpp

    r260 r272  
    407407    newscript->Name="mobs_bladespire_ogre"; 
    408408    newscript->GetAI = GetAI_mobs_bladespire_ogre; 
    409     newscript->RegisterSelf(); 
     409    m_scripts[nrscripts++] = newscript; 
    410410 
    411411    newscript = new Script; 
    412412    newscript->Name="mobs_nether_drake"; 
    413413    newscript->GetAI = GetAI_mobs_nether_drake; 
    414     newscript->RegisterSelf(); 
     414    m_scripts[nrscripts++] = newscript; 
    415415 
    416416    newscript = new Script; 
    417417    newscript->Name="npc_daranelle"; 
    418418    newscript->GetAI = GetAI_npc_daranelle; 
    419     newscript->RegisterSelf(); 
     419    m_scripts[nrscripts++] = newscript; 
    420420 
    421421    newscript = new Script; 
     
    423423    newscript->pGossipHello = &GossipHello_npc_overseer_nuaar; 
    424424    newscript->pGossipSelect = &GossipSelect_npc_overseer_nuaar; 
    425     newscript->RegisterSelf(); 
     425    m_scripts[nrscripts++] = newscript; 
    426426 
    427427    newscript = new Script; 
     
    429429    newscript->pGossipHello = &GossipHello_npc_saikkal_the_elder; 
    430430    newscript->pGossipSelect = &GossipSelect_npc_saikkal_the_elder; 
    431     newscript->RegisterSelf(); 
     431    m_scripts[nrscripts++] = newscript; 
    432432 
    433433    newscript = new Script; 
     
    435435    newscript->pGossipHello =  &GossipHello_npc_skyguard_handler_irena; 
    436436    newscript->pGossipSelect = &GossipSelect_npc_skyguard_handler_irena; 
    437     newscript->RegisterSelf(); 
    438 } 
     437    m_scripts[nrscripts++] = newscript; 
     438} 
  • trunk/src/bindings/scripts/scripts/zone/blasted_lands/blasted_lands.cpp

    r260 r272  
    150150    newscript->pGossipHello =  &GossipHello_npc_deathly_usher; 
    151151    newscript->pGossipSelect = &GossipSelect_npc_deathly_usher; 
    152     newscript->RegisterSelf(); 
     152    m_scripts[nrscripts++] = newscript; 
    153153 
    154154    newscript = new Script; 
     
    156156    newscript->pGossipHello =  &GossipHello_npc_fallen_hero_of_horde; 
    157157    newscript->pGossipSelect = &GossipSelect_npc_fallen_hero_of_horde; 
    158     newscript->RegisterSelf(); 
     158    m_scripts[nrscripts++] = newscript; 
    159159} 
  • trunk/src/bindings/scripts/scripts/zone/blasted_lands/boss_kruul.cpp

    r260 r272  
    179179    newscript->Name="boss_kruul"; 
    180180    newscript->GetAI = GetAI_boss_kruul; 
    181     newscript->RegisterSelf(); 
     181    m_scripts[nrscripts++] = newscript; 
    182182} 
  • trunk/src/bindings/scripts/scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp

    r260 r272  
    132132    newscript->Name="mob_webbed_creature"; 
    133133    newscript->GetAI = GetAI_mob_webbed_creature; 
    134     newscript->RegisterSelf(); 
     134    m_scripts[nrscripts++] = newscript; 
    135135 
    136136    newscript = new Script; 
     
    138138    newscript->pGossipHello =  &GossipHello_npc_captured_sunhawk_agent; 
    139139    newscript->pGossipSelect = &GossipSelect_npc_captured_sunhawk_agent; 
    140     newscript->RegisterSelf(); 
     140    m_scripts[nrscripts++] = newscript; 
    141141} 
  • trunk/src/bindings/scripts/scripts/zone/burning_steppes/burning_steppes.cpp

    r260 r272  
    148148    newscript->pGossipHello =  &GossipHello_npc_ragged_john; 
    149149    newscript->pGossipSelect = &GossipSelect_npc_ragged_john; 
    150     newscript->RegisterSelf(); 
     150    m_scripts[nrscripts++] = newscript; 
    151151} 
  • trunk/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_aeonus.cpp

    r260 r272  
    118118    newscript->Name="boss_aeonus"; 
    119119    newscript->GetAI = GetAI_boss_aeonus; 
    120     newscript->RegisterSelf(); 
     120    m_scripts[nrscripts++] = newscript; 
    121121} 
  • trunk/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp

    r260 r272  
    106106    newscript->Name="boss_chrono_lord_deja"; 
    107107    newscript->GetAI = GetAI_boss_chrono_lord_deja; 
    108     newscript->RegisterSelf(); 
     108    m_scripts[nrscripts++] = newscript; 
    109109} 
  • trunk/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_temporus.cpp

    r260 r272  
    140140    newscript->Name="boss_temporus"; 
    141141    newscript->GetAI = GetAI_boss_temporus; 
    142     newscript->RegisterSelf(); 
     142    m_scripts[nrscripts++] = newscript; 
    143143} 
  • trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_archimonde.cpp

    r260 r272  
    770770    newscript->Name="boss_archimonde"; 
    771771    newscript->GetAI = GetAI_boss_archimonde; 
    772     newscript->RegisterSelf(); 
     772    m_scripts[nrscripts++] = newscript; 
    773773 
    774774    newscript = new Script; 
    775775    newscript->Name = "mob_doomfire"; 
    776776    newscript->GetAI = GetAI_mob_doomfire; 
    777     newscript->RegisterSelf(); 
     777    m_scripts[nrscripts++] = newscript; 
    778778 
    779779    newscript = new Script; 
    780780    newscript->Name = "mob_doomfire_targetting"; 
    781781    newscript->GetAI = GetAI_mob_doomfire_targetting; 
    782     newscript->RegisterSelf(); 
     782    m_scripts[nrscripts++] = newscript; 
    783783 
    784784    newscript = new Script; 
    785785    newscript->Name = "mob_ancient_wisp"; 
    786786    newscript->GetAI = GetAI_mob_ancient_wisp; 
    787     newscript->RegisterSelf(); 
     787    m_scripts[nrscripts++] = newscript; 
    788788} 
  • trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal.cpp

    r260 r272  
    201201    newscript->pGossipHello = &GossipHello_npc_jaina_proudmoore; 
    202202    newscript->pGossipSelect = &GossipSelect_npc_jaina_proudmoore; 
    203     newscript->RegisterSelf(); 
     203    m_scripts[nrscripts++] = newscript; 
    204204 
    205205    newscript = new Script; 
     
    208208    newscript->pGossipHello = &GossipHello_npc_thrall; 
    209209    newscript->pGossipSelect = &GossipSelect_npc_thrall; 
    210     newscript->RegisterSelf(); 
     210    m_scripts[nrscripts++] = newscript; 
    211211 
    212212    newscript = new Script; 
     
    214214    newscript->pGossipHello = &GossipHello_npc_tyrande_whisperwind; 
    215215    newscript->pGossipSelect = &GossipSelect_npc_tyrande_whisperwind; 
    216     newscript->RegisterSelf(); 
    217 } 
     216    m_scripts[nrscripts++] = newscript; 
     217} 
  • trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjalAI.cpp

    r270 r272  
    302302    data << value; 
    303303 
    304     map->SendToPlayers(&data); 
     304    ((InstanceMap*)map)->SendToPlayers(&data); 
    305305 
    306306    // TODO: Uncomment and remove everything above this line only when the core patch for this is accepted 
  • trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/instance_hyjal.cpp

    r270 r272  
    150150        data << value; 
    151151 
    152         instance->SendToPlayers(&data); 
     152        ((InstanceMap*)instance)->SendToPlayers(&data); 
    153153    } 
    154154 
     
    200200    newscript->Name = "instance_hyjal"; 
    201201    newscript->GetInstanceData = GetInstanceData_instance_mount_hyjal; 
    202     newscript->RegisterSelf(); 
     202    m_scripts[nrscripts++] = newscript; 
    203203} 
  • trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp

    r260 r272  
    153153    newscript->Name="boss_captain_skarloc"; 
    154154    newscript->GetAI = GetAI_boss_captain_skarloc; 
    155     newscript->RegisterSelf(); 
     155    m_scripts[nrscripts++] = newscript; 
    156156} 
  • trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp

    r260 r272  
    147147    newscript->Name="boss_epoch_hunter"; 
    148148    newscript->GetAI = GetAI_boss_epoch_hunter; 
    149     newscript->RegisterSelf(); 
     149    m_scripts[nrscripts++] = newscript; 
    150150} 
  • trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp

    r260 r272  
    195195    newscript->Name="go_barrel_old_hillsbrad"; 
    196196    newscript->pGOHello = &GOHello_go_barrel_old_hillsbrad; 
    197     newscript->RegisterSelf(); 
     197    m_scripts[nrscripts++] = newscript; 
    198198 
    199199    newscript = new Script; 
    200200    newscript->Name="boss_lieutenant_drake"; 
    201201    newscript->GetAI = GetAI_boss_lieutenant_drake; 
    202     newscript->RegisterSelf(); 
     202    m_scripts[nrscripts++] = newscript; 
    203203} 
  • trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp

    r260 r272  
    175175    newscript->Name = "instance_old_hillsbrad"; 
    176176    newscript->GetInstanceData = GetInstanceData_instance_old_hillsbrad; 
    177     newscript->RegisterSelf(); 
     177    m_scripts[nrscripts++] = newscript; 
    178178} 
  • trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp

    r260 r272  
    894894    newscript->pGossipHello =   &GossipHello_npc_brazen; 
    895895    newscript->pGossipSelect =  &GossipSelect_npc_brazen; 
    896     newscript->RegisterSelf(); 
     896    m_scripts[nrscripts++] = newscript; 
    897897 
    898898    newscript = new Script; 
     
    900900    newscript->pGossipHello =   &GossipHello_npc_erozion; 
    901901    newscript->pGossipSelect =  &GossipSelect_npc_erozion; 
    902     newscript->RegisterSelf(); 
     902    m_scripts[nrscripts++] = newscript; 
    903903 
    904904    newscript = new Script; 
     
    907907    newscript->pGossipSelect = &GossipSelect_npc_thrall_old_hillsbrad; 
    908908    newscript->GetAI = GetAI_npc_thrall_old_hillsbrad; 
    909     newscript->RegisterSelf(); 
     909    m_scripts[nrscripts++] = newscript; 
    910910 
    911911    newscript = new Script; 
     
    913913    newscript->pGossipHello =   &GossipHello_npc_taretha; 
    914914    newscript->pGossipSelect =  &GossipSelect_npc_taretha; 
    915     newscript->RegisterSelf(); 
    916 } 
     915    m_scripts[nrscripts++] = newscript; 
     916} 
  • trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp

    r260 r272  
    745745    newscript->Name="boss_fathomlord_karathress"; 
    746746    newscript->GetAI = GetAI_boss_fathomlord_karathress; 
    747     newscript->RegisterSelf(); 
     747    m_scripts[nrscripts++] = newscript; 
    748748 
    749749    newscript = new Script; 
    750750    newscript->Name="boss_fathomguard_sharkkis"; 
    751751    newscript->GetAI = GetAI_boss_fathomguard_sharkkis; 
    752     newscript->RegisterSelf(); 
     752    m_scripts[nrscripts++] = newscript; 
    753753 
    754754    newscript = new Script; 
    755755    newscript->Name="boss_fathomguard_tidalvess"; 
    756756    newscript->GetAI = GetAI_boss_fathomguard_tidalvess; 
    757     newscript->RegisterSelf(); 
     757    m_scripts[nrscripts++] = newscript; 
    758758 
    759759    newscript = new Script; 
    760760    newscript->Name="boss_fathomguard_caribdis"; 
    761761    newscript->GetAI = GetAI_boss_fathomguard_caribdis; 
    762     newscript->RegisterSelf(); 
     762    m_scripts[nrscripts++] = newscript; 
    763763} 
  • trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp

    r260 r272  
    383383    newscript->Name="boss_hydross_the_unstable"; 
    384384    newscript->GetAI = GetAI_boss_hydross_the_unstable; 
    385     newscript->RegisterSelf(); 
     385    m_scripts[nrscripts++] = newscript; 
    386386} 
  • trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp

    r260 r272  
    251251                        //remove old tainted cores to prevent cheating in phase 2 
    252252                        Map *map = m_creature->GetMap(); 
    253                         Map::PlayerList const &PlayerList = map->GetPlayers(); 
    254                         for(Map::PlayerList::const_iterator i = PlayerList.begin();i != PlayerList.end(); ++i) 
    255             { 
    256                 if(Player* i_pl = i->getSource()) 
     253                        InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 
     254                        for(InstanceMap::PlayerList::const_iterator i = PlayerList.begin();i != PlayerList.end(); ++i) 
     255            { 
     256                if((*i)) 
    257257                { 
    258                     i_pl->DestroyItemCount(31088, 1, true); 
     258                    (*i)->DestroyItemCount(31088, 1, true); 
    259259                } 
    260260            } 
     
    10301030    newscript->Name="boss_lady_vashj"; 
    10311031    newscript->GetAI = GetAI_boss_lady_vashj; 
    1032     newscript->RegisterSelf(); 
     1032    m_scripts[nrscripts++] = newscript; 
    10331033 
    10341034    newscript = new Script; 
    10351035    newscript->Name="mob_enchanted_elemental"; 
    10361036    newscript->GetAI = GetAI_mob_enchanted_elemental; 
    1037     newscript->RegisterSelf(); 
     1037    m_scripts[nrscripts++] = newscript; 
    10381038 
    10391039    newscript = new Script; 
    10401040    newscript->Name="mob_tainted_elemental"; 
    10411041    newscript->GetAI = GetAI_mob_tainted_elemental; 
    1042     newscript->RegisterSelf(); 
     1042    m_scripts[nrscripts++] = newscript; 
    10431043 
    10441044    newscript = new Script; 
    10451045    newscript->Name="mob_toxic_sporebat"; 
    10461046    newscript->GetAI = GetAI_mob_toxic_sporebat; 
    1047     newscript->RegisterSelf(); 
     1047    m_scripts[nrscripts++] = newscript; 
    10481048 
    10491049    newscript = new Script; 
    10501050    newscript->Name="mob_coilfang_elite"; 
    10511051    newscript->GetAI = GetAI_mob_coilfang_elite; 
    1052     newscript->RegisterSelf(); 
     1052    m_scripts[nrscripts++] = newscript; 
    10531053 
    10541054    newscript = new Script; 
    10551055    newscript->Name="mob_coilfang_strider"; 
    10561056    newscript->GetAI = GetAI_mob_coilfang_strider; 
    1057     newscript->RegisterSelf(); 
     1057    m_scripts[nrscripts++] = newscript; 
    10581058 
    10591059    newscript = new Script; 
    10601060    newscript->Name="mob_shield_generator_channel"; 
    10611061    newscript->GetAI = GetAI_mob_shield_generator_channel; 
    1062     newscript->RegisterSelf(); 
     1062    m_scripts[nrscripts++] = newscript; 
    10631063 
    10641064    newscript = new Script; 
    10651065    newscript->Name="item_tainted_core"; 
    10661066    newscript->pItemUse = ItemUse_item_tainted_core; 
    1067     newscript->RegisterSelf(); 
     1067    m_scripts[nrscripts++] = newscript; 
    10681068} 
    10691069 
  • trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp

    r260 r272  
    755755                { 
    756756                        Map *map = m_creature->GetMap(); 
    757                         Map::PlayerList const &PlayerList = map->GetPlayers(); 
    758                         for(Map::PlayerList::const_iterator itr = PlayerList.begin();itr != PlayerList.end(); ++itr) 
     757                        InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 
     758                        for(InstanceMap::PlayerList::const_iterator itr = PlayerList.begin();itr != PlayerList.end(); ++itr) 
    759759            { 
    760                 if (Player* i_pl = itr->getSource()) 
    761                 { 
    762                                     bool isCasting = false; 
    763                                     for(uint8 i = 0; i < CURRENT_MAX_SPELL; ++i) 
    764                                             if(i_pl->m_currentSpells[i]) 
    765                                                     isCasting = true; 
    766                                  
    767                                     if(isCasting) 
    768                                     { 
    769                                             DoCast(i_pl, SPELL_EARTHSHOCK); 
    770                                             break; 
    771                                     } 
    772                 } 
     760                                bool isCasting = false; 
     761                                for(uint8 i = 0; i < CURRENT_MAX_SPELL; ++i) 
     762                                        if((*itr)->m_currentSpells[i]) 
     763                                                isCasting = true; 
     764                                 
     765                                if(isCasting) 
     766                                { 
     767                                        DoCast((*itr), SPELL_EARTHSHOCK); 
     768                                        break; 
     769                                } 
    773770                        } 
    774771                        Earthshock_Timer = 8000 + rand()%7000; 
     
    805802    newscript->Name="boss_leotheras_the_blind"; 
    806803    newscript->GetAI = GetAI_boss_leotheras_the_blind; 
    807     newscript->RegisterSelf(); 
     804    m_scripts[nrscripts++] = newscript; 
    808805 
    809806    newscript = new Script; 
    810807    newscript->Name="boss_leotheras_the_blind_demonform"; 
    811808    newscript->GetAI = GetAI_boss_leotheras_the_blind_demonform; 
    812     newscript->RegisterSelf(); 
     809    m_scripts[nrscripts++] = newscript; 
    813810 
    814811        newscript = new Script; 
    815812    newscript->Name="mob_greyheart_spellbinder"; 
    816813    newscript->GetAI = GetAI_mob_greyheart_spellbinder; 
    817     newscript->RegisterSelf(); 
     814    m_scripts[nrscripts++] = newscript; 
    818815 
    819816        newscript = new Script; 
    820817    newscript->Name="mob_inner_demon"; 
    821818    newscript->GetAI = GetAI_mob_inner_demon; 
    822     newscript->RegisterSelf(); 
     819    m_scripts[nrscripts++] = newscript; 
    823820} 
  • trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp

    r260 r272  
    168168    newscript->Name="boss_the_lurker_below"; 
    169169    newscript->GetAI = GetAI_boss_the_lurker_below; 
    170     newscript->RegisterSelf(); 
     170    m_scripts[nrscripts++] = newscript; 
    171171 
    172172        newscript = new Script; 
    173173    newscript->Name="mob_coilfang_guardian"; 
    174174    newscript->GetAI = GetAI_mob_coilfang_guardian; 
    175     newscript->RegisterSelf(); 
     175    m_scripts[nrscripts++] = newscript; 
    176176 
    177177        newscript = new Script; 
    178178    newscript->Name="mob_coilfang_ambusher"; 
    179179    newscript->GetAI = GetAI_mob_coilfang_ambusher; 
    180     newscript->RegisterSelf(); 
     180    m_scripts[nrscripts++] = newscript; 
    181181} 
    182182 
  • trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp

    r260 r272  
    351351    newscript->Name="boss_morogrim_tidewalker"; 
    352352    newscript->GetAI = GetAI_boss_morogrim_tidewalker; 
    353     newscript->RegisterSelf(); 
     353    m_scripts[nrscripts++] = newscript; 
    354354 
    355355    newscript = new Script; 
    356356    newscript->Name="mob_water_globule"; 
    357357    newscript->GetAI = GetAI_mob_water_globule; 
    358     newscript->RegisterSelf(); 
     358    m_scripts[nrscripts++] = newscript; 
    359359} 
  • trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp

    r260 r272  
    216216    newscript->Name = "instance_serpent_shrine"; 
    217217    newscript->GetInstanceData = GetInstanceData_instance_serpentshrine_cavern; 
    218     newscript->RegisterSelf(); 
     218    m_scripts[nrscripts++] = newscript; 
    219219} 
  • trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp

    r260 r272  
    189189    newscript->Name="boss_hydromancer_thespia"; 
    190190    newscript->GetAI = GetAI_boss_thespiaAI; 
    191     newscript->RegisterSelf(); 
     191    m_scripts[nrscripts++] = newscript; 
    192192 
    193193    newscript = new Script; 
    194194    newscript->Name="mob_coilfang_waterelemental"; 
    195195    newscript->GetAI = GetAI_mob_coilfang_waterelementalAI; 
    196     newscript->RegisterSelf(); 
     196    m_scripts[nrscripts++] = newscript; 
    197197} 
  • trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp

    r260 r272  
    272272    newscript->Name="boss_mekgineer_steamrigger"; 
    273273    newscript->GetAI = GetAI_boss_mekgineer_steamrigger; 
    274     newscript->RegisterSelf(); 
     274    m_scripts[nrscripts++] = newscript; 
    275275 
    276276    newscript = new Script; 
    277277    newscript->Name="mob_steamrigger_mechanic"; 
    278278    newscript->GetAI = GetAI_mob_steamrigger_mechanic; 
    279     newscript->RegisterSelf(); 
     279    m_scripts[nrscripts++] = newscript; 
    280280} 
  • trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp

    r260 r272  
    227227    newscript->Name="mob_naga_distiller"; 
    228228    newscript->GetAI = GetAI_mob_naga_distiller; 
    229     newscript->RegisterSelf(); 
     229    m_scripts[nrscripts++] = newscript; 
    230230 
    231231    newscript = new Script; 
    232232    newscript->Name="boss_warlord_kalithresh"; 
    233233    newscript->GetAI = GetAI_boss_warlord_kalithresh; 
    234     newscript->RegisterSelf(); 
     234    m_scripts[nrscripts++] = newscript; 
    235235} 
  • trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/instance_steam_vault.cpp

    r260 r272  
    167167    newscript->Name = "instance_steam_vault"; 
    168168    newscript->GetInstanceData = GetInstanceData_instance_steam_vault; 
    169     newscript->RegisterSelf(); 
     169    m_scripts[nrscripts++] = newscript; 
    170170} 
  • trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/underbog/boss_hungarfen.cpp

    r260 r272  
    148148    newscript->Name="boss_hungarfen"; 
    149149    newscript->GetAI = GetAI_boss_hungarfen; 
    150     newscript->RegisterSelf(); 
     150    m_scripts[nrscripts++] = newscript; 
    151151 
    152152    newscript = new Script; 
    153153    newscript->Name="mob_underbog_mushroom"; 
    154154    newscript->GetAI = GetAI_mob_underbog_mushroom; 
    155     newscript->RegisterSelf(); 
     155    m_scripts[nrscripts++] = newscript; 
    156156} 
  • trunk/src/bindings/scripts/scripts/zone/dun_morogh/dun_morogh.cpp

    r260 r272  
    9595    newscript->Name="npc_narm_faulk"; 
    9696    newscript->GetAI = GetAI_npc_narm_faulk; 
    97     newscript->RegisterSelf(); 
     97    m_scripts[nrscripts++] = newscript; 
    9898} 
  • trunk/src/bindings/scripts/scripts/zone/dustwallow_marsh/dustwallow_marsh.cpp

    r260 r272  
    205205    newscript->Name="mobs_risen_husk_spirit"; 
    206206    newscript->GetAI = GetAI_mobs_risen_husk_spirit; 
    207     newscript->RegisterSelf(); 
     207    m_scripts[nrscripts++] = newscript; 
    208208 
    209209    newscript = new Script; 
    210210    newscript->Name="npc_restless_apparition"; 
    211211    newscript->pGossipHello =   &GossipHello_npc_restless_apparition; 
    212     newscript->RegisterSelf(); 
     212    m_scripts[nrscripts++] = newscript; 
    213213 
    214214    newscript = new Script; 
     
    216216    newscript->GetAI = GetAI_npc_deserter_agitator; 
    217217    newscript->pGossipHello = &GossipHello_npc_deserter_agitator; 
    218     newscript->RegisterSelf(); 
     218    m_scripts[nrscripts++] = newscript; 
    219219 
    220220    newscript = new Script; 
     
    222222    newscript->pGossipHello = &GossipHello_npc_lady_jaina_proudmoore; 
    223223    newscript->pGossipSelect = &GossipSelect_npc_lady_jaina_proudmoore; 
    224     newscript->RegisterSelf(); 
     224    m_scripts[nrscripts++] = newscript; 
    225225 
    226226    newscript = new Script; 
     
    228228    newscript->pGossipHello = &GossipHello_npc_nat_pagle; 
    229229    newscript->pGossipSelect = &GossipSelect_npc_nat_pagle; 
    230     newscript->RegisterSelf(); 
    231 } 
     230    m_scripts[nrscripts++] = newscript; 
     231} 
  • trunk/src/bindings/scripts/scripts/zone/eastern_plaguelands/eastern_plaguelands.cpp

    r260 r272  
    159159    newscript->Name="mobs_ghoul_flayer"; 
    160160    newscript->GetAI = GetAI_mobs_ghoul_flayer; 
    161     newscript->RegisterSelf(); 
     161    m_scripts[nrscripts++] = newscript; 
    162162 
    163163    newscript = new Script; 
     
    165165    newscript->pGossipHello = &GossipHello_npc_augustus_the_touched; 
    166166    newscript->pGossipSelect = &GossipSelect_npc_augustus_the_touched; 
    167     newscript->RegisterSelf(); 
     167    m_scripts[nrscripts++] = newscript; 
    168168 
    169169    newscript = new Script; 
     
    171171    newscript->GetAI = GetAI_npc_darrowshire_spirit; 
    172172    newscript->pGossipHello = &GossipHello_npc_darrowshire_spirit; 
    173     newscript->RegisterSelf(); 
     173    m_scripts[nrscripts++] = newscript; 
    174174 
    175175    newscript = new Script; 
     
    177177    newscript->pGossipHello =  &GossipHello_npc_tirion_fordring; 
    178178    newscript->pGossipSelect = &GossipSelect_npc_tirion_fordring; 
    179     newscript->RegisterSelf(); 
     179    m_scripts[nrscripts++] = newscript; 
    180180} 
  • trunk/src/bindings/scripts/scripts/zone/elwynn_forest/elwynn_forest.cpp

    r260 r272  
    9595    newscript->Name="npc_henze_faulk"; 
    9696    newscript->GetAI = GetAI_npc_henze_faulk; 
    97     newscript->RegisterSelf(); 
     97    m_scripts[nrscripts++] = newscript; 
    9898} 
  • trunk/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp

    r260 r272  
    153153    newscript->Name="mobs_mana_tapped"; 
    154154    newscript->GetAI = GetAI_mobs_mana_tapped; 
    155     newscript->RegisterSelf(); 
     155    m_scripts[nrscripts++] = newscript; 
    156156 
    157157    newscript = new Script; 
     
    160160    newscript->pGossipHello =  &GossipHello_npc_prospector_anvilward; 
    161161    newscript->pGossipSelect = &GossipSelect_npc_prospector_anvilward; 
    162     newscript->RegisterSelf(); 
     162    m_scripts[nrscripts++] = newscript; 
    163163} 
  • trunk/src/bindings/scripts/scripts/zone/felwood/felwood.cpp

    r260 r272  
    8686    newscript->pGossipHello = &GossipHello_npcs_riverbreeze_and_silversky; 
    8787    newscript->pGossipSelect = &GossipSelect_npcs_riverbreeze_and_silversky; 
    88     newscript->RegisterSelf(); 
     88    m_scripts[nrscripts++] = newscript; 
    8989} 
  • trunk/src/bindings/scripts/scripts/zone/feralas/feralas.cpp

    r260 r272  
    7777    newscript->pGossipHello = &GossipHello_npc_gregan_brewspewer; 
    7878    newscript->pGossipSelect = &GossipSelect_npc_gregan_brewspewer; 
    79     newscript->RegisterSelf(); 
     79    m_scripts[nrscripts++] = newscript; 
    8080 
    8181    newscript = new Script; 
    8282    newscript->Name="npc_screecher_spirit"; 
    8383    newscript->pGossipHello = &GossipHello_npc_screecher_spirit; 
    84     newscript->RegisterSelf(); 
     84    m_scripts[nrscripts++] = newscript; 
    8585} 
  • trunk/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp

    r260 r272  
    134134    newscript->pGossipHello = &GossipHello_npc_blood_knight_dawnstar; 
    135135    newscript->pGossipSelect = &GossipSelect_npc_blood_knight_dawnstar; 
    136     newscript->RegisterSelf(); 
     136    m_scripts[nrscripts++] = newscript; 
    137137 
    138138    newscript = new Script; 
     
    140140    newscript->pGossipHello = &GossipHello_npc_budd_nedreck; 
    141141    newscript->pGossipSelect = &GossipSelect_npc_budd_nedreck; 
    142     newscript->RegisterSelf(); 
     142    m_scripts[nrscripts++] = newscript; 
    143143 
    144144    newscript = new Script; 
     
    146146    newscript->pGossipHello = &GossipHello_npc_rathis_tomber; 
    147147    newscript->pGossipSelect = &GossipSelect_npc_rathis_tomber; 
    148     newscript->RegisterSelf(); 
     148    m_scripts[nrscripts++] = newscript; 
    149149 
    150150    newscript = new Script; 
    151151    newscript->Name = "go_gilded_brazier"; 
    152152    newscript->pGOHello = &GOHello_gilded_brazier; 
    153     newscript->RegisterSelf(); 
     153    m_scripts[nrscripts++] = newscript; 
    154154} 
  • trunk/src/bindings/scripts/scripts/zone/gruuls_lair/boss_gruul.cpp

    r260 r272  
    301301    newscript->Name="boss_gruul"; 
    302302    newscript->GetAI = GetAI_boss_gruul; 
    303     newscript->RegisterSelf(); 
     303    m_scripts[nrscripts++] = newscript; 
    304304} 
  • trunk/src/bindings/scripts/scripts/zone/gruuls_lair/boss_high_king_maulgar.cpp

    r260 r272  
    818818    newscript->Name="boss_high_king_maulgar"; 
    819819    newscript->GetAI = GetAI_boss_high_king_maulgar; 
    820     newscript->RegisterSelf(); 
     820    m_scripts[nrscripts++] = newscript; 
    821821 
    822822    newscript = new Script; 
    823823    newscript->Name="boss_kiggler_the_crazed"; 
    824824    newscript->GetAI = GetAI_boss_kiggler_the_crazed; 
    825     newscript->RegisterSelf(); 
     825    m_scripts[nrscripts++] = newscript; 
    826826 
    827827    newscript = new Script; 
    828828    newscript->Name="boss_blindeye_the_seer"; 
    829829    newscript->GetAI = GetAI_boss_blindeye_the_seer; 
    830     newscript->RegisterSelf(); 
     830    m_scripts[nrscripts++] = newscript; 
    831831 
    832832    newscript = new Script; 
    833833    newscript->Name="boss_olm_the_summoner"; 
    834834    newscript->GetAI = GetAI_boss_olm_the_summoner; 
    835     newscript->RegisterSelf(); 
     835    m_scripts[nrscripts++] = newscript; 
    836836 
    837837    newscript = new Script; 
    838838    newscript->Name="boss_krosh_firehand"; 
    839839    newscript->GetAI = GetAI_boss_krosh_firehand; 
    840     newscript->RegisterSelf(); 
     840    m_scripts[nrscripts++] = newscript; 
    841841} 
  • trunk/src/bindings/scripts/scripts/zone/gruuls_lair/instance_gruuls_lair.cpp

    r260 r272  
    185185    newscript->Name = "instance_gruuls_lair"; 
    186186    newscript->GetInstanceData = GetInstanceData_instance_gruuls_lair; 
    187     newscript->RegisterSelf(); 
     187    m_scripts[nrscripts++] = newscript; 
    188188} 
  • trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_broggok.cpp

    r260 r272  
    124124    newscript->Name="boss_broggok"; 
    125125    newscript->GetAI = GetAI_boss_broggokAI; 
    126     newscript->RegisterSelf(); 
     126    m_scripts[nrscripts++] = newscript; 
    127127 
    128128    newscript = new Script; 
    129129    newscript->Name="mob_broggok_poisoncloud"; 
    130130    newscript->GetAI = GetAI_mob_broggok_poisoncloudAI; 
    131     newscript->RegisterSelf(); 
     131    m_scripts[nrscripts++] = newscript; 
    132132} 
  • trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp

    r260 r272  
    226226    newscript->Name="boss_kelidan_the_breaker"; 
    227227    newscript->GetAI = GetAI_boss_kelidan_the_breaker; 
    228     newscript->RegisterSelf(); 
     228    m_scripts[nrscripts++] = newscript; 
    229229 
    230230    newscript = new Script; 
    231231    newscript->Name="mob_shadowmoon_channeler"; 
    232232    newscript->GetAI = GetAI_mob_shadowmoon_channeler; 
    233     newscript->RegisterSelf(); 
     233    m_scripts[nrscripts++] = newscript; 
    234234} 
  • trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_the_maker.cpp

    r260 r272  
    128128    newscript->Name="boss_the_maker"; 
    129129    newscript->GetAI = GetAI_boss_the_makerAI; 
    130     newscript->RegisterSelf(); 
     130    m_scripts[nrscripts++] = newscript; 
    131131} 
  • trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp

    r260 r272  
    210210    newscript->Name="boss_omor_the_unscarred"; 
    211211    newscript->GetAI = GetAI_boss_omor_the_unscarredAI; 
    212     newscript->RegisterSelf(); 
     212    m_scripts[nrscripts++] = newscript; 
    213213} 
  • trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp

    r260 r272  
    165165    newscript->Name="boss_watchkeeper_gargolmar"; 
    166166    newscript->GetAI = GetAI_boss_watchkeeper_gargolmarAI; 
    167     newscript->RegisterSelf(); 
     167    m_scripts[nrscripts++] = newscript; 
    168168} 
  • trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp

    r260 r272  
    546546    newscript->Name="boss_magtheridon"; 
    547547    newscript->GetAI = GetAI_boss_magtheridon; 
    548     newscript->RegisterSelf(); 
     548    m_scripts[nrscripts++] = newscript; 
    549549 
    550550    newscript = new Script; 
    551551    newscript->Name="mob_hellfire_channeler"; 
    552552    newscript->GetAI = GetAI_mob_hellfire_channeler; 
    553     newscript->RegisterSelf(); 
     553    m_scripts[nrscripts++] = newscript; 
    554554 
    555555    newscript = new Script; 
    556556    newscript->Name="go_manticron_cube"; 
    557557    newscript->pGOHello = &GOHello_go_Manticron_Cube; 
    558     newscript->RegisterSelf(); 
     558    m_scripts[nrscripts++] = newscript; 
    559559 
    560560    newscript = new Script; 
    561561    newscript->Name="mob_abyssal"; 
    562562    newscript->GetAI = GetAI_mob_abyssalAI; 
    563     newscript->RegisterSelf(); 
     563    m_scripts[nrscripts++] = newscript; 
    564564 
    565565} 
  • trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp

    r260 r272  
    119119    void SetData(uint32 type, uint32 data) 
    120120    { 
     121        Player *player = GetPlayer(); 
     122        if(!player) return; 
     123 
    121124        switch(type) 
    122125        { 
     
    127130            if(data != IN_PROGRESS) 
    128131            { 
    129                 if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID)) 
     132                if(GameObject *Door = GameObject::GetGameObject(*player, DoorGUID)) 
    130133                    Door->SetGoState(0); 
    131134            } 
     
    140143                    for(std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i) 
    141144                    { 
    142                         if(Creature *Channeler = instance->GetCreatureInMap(*i)) 
     145                        if(Creature *Channeler = (Creature*)Unit::GetUnit(*player, *i)) 
    143146                        { 
    144147                            if(Channeler->isAlive()) 
     
    149152                    } 
    150153                    CageTimer = 0; 
    151                     if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID)) 
     154                    if(GameObject *Door = GameObject::GetGameObject(*player, DoorGUID)) 
    152155                        Door->SetGoState(0); 
    153156                }break; 
     
    159162                    for(std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i) 
    160163                    { 
    161                         Creature *Channeler = instance->GetCreatureInMap(*i); 
     164                        Creature *Channeler = (Creature*)Unit::GetUnit(*player, *i); 
    162165                        if(Channeler && Channeler->isAlive()) 
    163166                        { 
     
    168171                    } 
    169172                    // Release Magtheridon after two minutes. 
    170                     Creature *Magtheridon = instance->GetCreatureInMap(MagtheridonGUID); 
     173                    Creature *Magtheridon = (Creature*)Unit::GetUnit(*player, MagtheridonGUID); 
    171174                    if(Magtheridon && Magtheridon->isAlive()) 
    172175                    { 
     
    174177                        CageTimer = 120000; 
    175178                    } 
    176                     if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID)) 
     179                    if(GameObject *Door = GameObject::GetGameObject(*player, DoorGUID)) 
    177180                        Door->SetGoState(1); 
    178181                }break; 
     
    180183                for(std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i) 
    181184                { 
    182                     Creature *Channeler = instance->GetCreatureInMap(*i); 
     185                    Unit *Channeler = Unit::GetUnit(*player, *i); 
    183186                    if(Channeler && Channeler->isAlive()) 
    184187                    { 
     
    195198            for(std::set<uint64>::iterator i = ColumnGUID.begin(); i != ColumnGUID.end(); ++i) 
    196199            { 
    197                 if(GameObject *Column = instance->GetGameObjectInMap(*i)) 
     200                if(GameObject *Column = GameObject::GetGameObject(*player, *i)) 
    198201                    Column->SetGoState(!data); 
    199202            } 
     
    211214    } 
    212215 
     216    Player* GetPlayer() 
     217    { 
     218        if(((InstanceMap*)instance)->GetPlayers().size()) 
     219            return ((InstanceMap*)instance)->GetPlayers().front(); 
     220        return NULL; 
     221    } 
     222 
    213223    void AttackNearestTarget(Creature *creature) 
    214224    { 
     
    216226        float range; 
    217227        Player* target = NULL; 
    218         Map::PlayerList const &PlayerList = instance->GetPlayers(); 
    219         Map::PlayerList::const_iterator i; 
     228        InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)instance)->GetPlayers(); 
     229        InstanceMap::PlayerList::const_iterator i; 
    220230        for(i = PlayerList.begin(); i != PlayerList.end(); ++i) 
    221231        { 
    222             if(Player* i_pl = i->getSource()) 
    223             { 
    224                 if(i_pl->isTargetableForAttack()) 
    225                 { 
    226                     range = i_pl->GetDistance(creature); 
    227                     if(range < minRange) 
    228                     { 
    229                         minRange = range; 
    230                         target = i_pl; 
    231                     }                 
    232                 } 
     232            if((*i)->isTargetableForAttack()) 
     233            { 
     234                range = (*i)->GetDistance(creature); 
     235                if(range < minRange) 
     236                { 
     237                    minRange = range; 
     238                    target = *i; 
     239                }                 
    233240            } 
    234241        } 
     
    242249            if(CageTimer <= diff) 
    243250            { 
    244                 Creature *Magtheridon = instance->GetCreatureInMap(MagtheridonGUID); 
    245                 if(Magtheridon && Magtheridon->isAlive()) 
    246                 { 
    247                     Magtheridon->clearUnitState(UNIT_STAT_STUNNED); 
    248                     AttackNearestTarget(Magtheridon); 
     251                if(Player *player = GetPlayer()) 
     252                { 
     253                    Creature *Magtheridon = (Creature*)Unit::GetUnit(*player, MagtheridonGUID); 
     254                    if(Magtheridon && Magtheridon->isAlive()) 
     255                    { 
     256                        Magtheridon->clearUnitState(UNIT_STAT_STUNNED); 
     257                        AttackNearestTarget(Magtheridon); 
     258                    } 
    249259                } 
    250260                CageTimer = 0; 
     
    256266            if(RespawnTimer <= diff) 
    257267            { 
    258                 for(std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i) 
    259                 { 
    260                     if(Creature *Channeler = instance->GetCreatureInMap(*i)) 
    261                     { 
    262                         if(Channeler->isAlive()) 
    263                             Channeler->AI()->EnterEvadeMode(); 
    264                         else 
    265                             Channeler->Respawn(); 
     268                if(Player *player = GetPlayer()) 
     269                { 
     270                    for(std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i) 
     271                    { 
     272                        if(Creature *Channeler = (Creature*)Unit::GetUnit(*player, *i)) 
     273                        { 
     274                            if(Channeler->isAlive()) 
     275                                Channeler->AI()->EnterEvadeMode(); 
     276                            else 
     277                                Channeler->Respawn(); 
     278                        } 
    266279                    } 
    267280                } 
     
    283296    newscript->Name = "instance_magtheridons_lair"; 
    284297    newscript->GetInstanceData = GetInstanceData_instance_magtheridons_lair; 
    285     newscript->RegisterSelf(); 
     298    m_scripts[nrscripts++] = newscript; 
    286299} 
  • trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_nethekurse.cpp

    r260 r272  
    445445    newscript->Name="boss_grand_warlock_nethekurse"; 
    446446    newscript->GetAI = GetAI_boss_grand_warlock_nethekurse; 
    447     newscript->RegisterSelf(); 
     447    m_scripts[nrscripts++] = newscript; 
    448448 
    449449    newscript = new Script; 
    450450    newscript->Name="mob_fel_orc_convert"; 
    451451    newscript->GetAI = GetAI_mob_fel_orc_convert; 
    452     newscript->RegisterSelf(); 
     452    m_scripts[nrscripts++] = newscript; 
    453453 
    454454    newscript = new Script; 
    455455    newscript->Name="mob_lesser_shadow_fissure"; 
    456456    newscript->GetAI = GetAI_mob_lesser_shadow_fissure; 
    457     newscript->RegisterSelf(); 
     457    m_scripts[nrscripts++] = newscript; 
    458458} 
  • trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp

    r260 r272  
    395395    newscript->Name="boss_warbringer_omrogg"; 
    396396    newscript->GetAI = GetAI_boss_warbringer_omrogg; 
    397     newscript->RegisterSelf(); 
     397    m_scripts[nrscripts++] = newscript; 
    398398 
    399399    newscript = new Script; 
    400400    newscript->Name="mob_omrogg_heads"; 
    401401    newscript->GetAI = GetAI_mob_omrogg_heads; 
    402     newscript->RegisterSelf(); 
     402    m_scripts[nrscripts++] = newscript; 
    403403} 
  • trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp

    r260 r272  
    111111    newscript->Name = "instance_shattered_halls"; 
    112112    newscript->GetInstanceData = GetInstanceData_instance_shattered_halls; 
    113     newscript->RegisterSelf(); 
     113    m_scripts[nrscripts++] = newscript; 
    114114} 
  • trunk/src/bindings/scripts/scripts/zone/hellfire_peninsula/boss_doomlord_kazzak.cpp

    r260 r272  
    138138    newscript->Name="boss_doomlord_kazzak"; 
    139139    newscript->GetAI = GetAI_boss_doomlordkazzak; 
    140     newscript->RegisterSelf(); 
     140    m_scripts[nrscripts++] = newscript; 
    141141} 
  • trunk/src/bindings/scripts/scripts/zone/hellfire_peninsula/hellfire_peninsula.cpp

    r271 r272  
    1818SDName: Hellfire_Peninsula 
    1919SD%Complete: 100 
    20 SDComment: Quest support: 9375, 10129, 10146, 10162, 10163, 10340, 10346, 10347, 10382 (Special flight paths) 
     20SDComment: Quest support: 10129, 10146, 10162, 10163, 10340, 10346, 10347, 10382 (Special flight paths) 
    2121SDCategory: Hellfire Peninsula 
    2222EndScriptData */ 
     
    2626npc_gryphoneer_windbellow 
    2727npc_wing_commander_brack 
    28 npc_wounded_blood_elf 
    2928EndContentData */ 
    3029 
    3130#include "precompiled.h" 
    32 #include "../../npc/npc_escortAI.h" 
    3331 
    3432/*###### 
     
    163161 
    164162/*###### 
    165 ## npc_wounded_blood_elf 
    166 ######*/ 
    167  
    168 #define QUEST_THE_ROAD_TO_FALCON_WATCH 9375 
    169 #define SAY1      "Thank you for agreeing to help. Now, let's get out of here $N." 
    170 #define SAY2      "Over there! They're following us!" 
    171 #define SAY3      "Allow me a moment to rest. The journey taxes what little strength I have." 
    172 #define SAY4      "Did you hear something?" 
    173 #define SAY5      "Falcon Watch, at last! Now, where's my... Oh no! My pack, it's missing! Where has -" 
    174 #define SAYAGGRO  "You won't keep me from getting to Falcon Watch!" 
    175  
    176 struct TRINITY_DLL_DECL npc_wounded_blood_elfAI : public npc_escortAI 
    177 { 
    178     npc_wounded_blood_elfAI(Creature *c) : npc_escortAI(c) {Reset();} 
    179  
    180     void WaypointReached(uint32 i) 
    181     { 
    182         Unit* player = Unit::GetUnit((*m_creature), PlayerGUID); 
    183  
    184         if (!player) 
    185             return; 
    186  
    187         switch (i) 
    188         { 
    189  
    190         case 0: 
    191             DoSay(SAY1, LANG_UNIVERSAL, player); 
    192             // Change faction, so mobs can attack 
    193             m_creature->setFaction(1610); 
    194             break; 
    195  
    196         case 9: 
    197             DoSay(SAY2, LANG_UNIVERSAL, player); 
    198             // Spawn two Haal'eshi Talonguard 
    199             { 
    200                 Creature* temp1 = m_creature->SummonCreature(16967, m_creature->GetPositionX()-15, m_creature->GetPositionY()-15, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000); 
    201                 if (temp1) temp1->AI()->AttackStart(m_creature); 
    202                 Creature* temp2 = m_creature->SummonCreature(16967, m_creature->GetPositionX()-17, m_creature->GetPositionY()-17, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000); 
    203                 if (temp2) temp2->AI()->AttackStart(m_creature); 
    204             } 
    205             break; 
    206  
    207         case 13: 
    208             DoSay(SAY3, LANG_UNIVERSAL, player); 
    209             // NPC "should" kneel 
    210             m_creature->HandleEmoteCommand(EMOTE_STATE_KNEEL); 
    211             break; 
    212  
    213         case 14: 
    214             DoSay(SAY4, LANG_UNIVERSAL, player); 
    215             // Spawn two Haal'eshi Windwalker 
    216             { 
    217                 Creature* temp3 = m_creature->SummonCreature(16966, m_creature->GetPositionX()-15, m_creature->GetPositionY()-15, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000); 
    218                 if (temp3) temp3->AI()->AttackStart(m_creature); 
    219                 Creature* temp4 = m_creature->SummonCreature(16966, m_creature->GetPositionX()-17, m_creature->GetPositionY()-17, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000); 
    220                 if (temp4) temp4->AI()->AttackStart(m_creature); 
    221             } 
    222             break; 
    223  
    224         case 27: 
    225             DoSay(SAY5, LANG_UNIVERSAL, player); 
    226             // Set faction back to normal 
    227             m_creature->setFaction(1604); 
    228             // Award quest credit 
    229             if( PlayerGUID ) 
    230             { 
    231                 Unit* player = Unit::GetUnit((*m_creature), PlayerGUID); 
    232                 if( player && player->GetTypeId() == TYPEID_PLAYER ) 
    233                     ((Player*)player)->GroupEventHappens(9375,m_creature); 
    234             } 
    235             break; 
    236         } 
    237     } 
    238  
    239     void Aggro(Unit* who) 
    240     { 
    241         DoSay(SAYAGGRO, LANG_UNIVERSAL, who); 
    242     } 
    243  
    244     void Reset() { } 
    245  
    246     void JustDied(Unit* killer) 
    247         // If NPC dies, Quest fail 
    248     { 
    249         if (PlayerGUID) 
    250         { 
    251             Unit* player = Unit::GetUnit((*m_creature), PlayerGUID); 
    252             if (player) 
    253                 ((Player*)player)->FailQuest(QUEST_THE_ROAD_TO_FALCON_WATCH); 
    254         } 
    255     } 
    256  
    257     void UpdateAI(const uint32 diff) 
    258     { 
    259         npc_escortAI::UpdateAI(diff); 
    260     } 
    261 }; 
    262  
    263 bool QuestAccept_wounded_blood_elf(Player* player, Creature* creature, Quest const* quest) 
    264 // Begin the escort quest 
    265 { 
    266     if (quest->GetQuestId() == QUEST_THE_ROAD_TO_FALCON_WATCH) 
    267     { 
    268         ((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID()); 
    269     } 
    270     return true; 
    271 } 
    272  
    273 CreatureAI* GetAI_npc_wounded_blood_elf(Creature *_Creature) 
    274 { 
    275     npc_wounded_blood_elfAI* thisAI = new npc_wounded_blood_elfAI(_Creature); 
    276  
    277     thisAI->AddWaypoint(0, -1137.72, 4272.10, 14.04, 3000); 
    278     thisAI->AddWaypoint(1, -1141.34, 4232.42, 14.63); 
    279     thisAI->AddWaypoint(2, -1133.47, 4220.88, 11.78); 
    280     thisAI->AddWaypoint(3, -1126.18, 4213.26, 13.51); 
    281     thisAI->AddWaypoint(4, -1100.12, 4204.32, 16.41); 
    282     thisAI->AddWaypoint(5, -1063.68, 4197.92, 15.51); 
    283     thisAI->AddWaypoint(6, -1027.28, 4194.36, 15.52); 
    284     thisAI->AddWaypoint(7, -995.68, 4189.59, 19.84); 
    285     thisAI->AddWaypoint(8, -970.90, 4188.60, 24.61); 
    286     thisAI->AddWaypoint(9, -961.93, 4193.34, 26.11, 80000); // Summon 1 
    287     thisAI->AddWaypoint(10, -935.52, 4210.99, 31.98); 
    288     thisAI->AddWaypoint(11, -913.42, 4218.27, 37.29); 
    289     thisAI->AddWaypoint(12, -896.53, 4207.73, 43.23); 
    290     thisAI->AddWaypoint(13, -868.49, 4194.77, 46.75, 17000); // Kneel and Rest Here 
    291     thisAI->AddWaypoint(14, -852.83, 4198.29, 47.28, 80000); // Summon 2 
    292     thisAI->AddWaypoint(15, -819.85, 4200.50, 46.37); 
    293     thisAI->AddWaypoint(16, -791.92, 4201.96, 44.19); 
    294     thisAI->AddWaypoint(17, -774.42, 4202.46, 47.41); 
    295     thisAI->AddWaypoint(18, -762.90, 4202.17, 48.81); 
    296     thisAI->AddWaypoint(19, -728.25, 4195.35, 50.68); 
    297     thisAI->AddWaypoint(20, -713.58, 4192.07, 53.98); 
    298     thisAI->AddWaypoint(21, -703.09, 4189.74, 56.96); 
    299     thisAI->AddWaypoint(22, -693.70, 4185.43, 57.06); 
    300     thisAI->AddWaypoint(23, -686.38, 4159.81, 60.26); 
    301     thisAI->AddWaypoint(24, -679.88, 4147.04, 64.20); 
    302     thisAI->AddWaypoint(25, -656.74, 4147.72, 64.11); 
    303     thisAI->AddWaypoint(26, -652.22, 4137.50, 64.58); 
    304     thisAI->AddWaypoint(27, -649.99, 4136.38, 64.63, 20000); // Award Quest Credit 
    305  
    306     return (CreatureAI*)thisAI; 
    307 } 
    308  
    309 /*###### 
    310163## 
    311164######*/ 
     
    319172    newscript->pGossipHello =   &GossipHello_npc_wing_commander_dabiree; 
    320173    newscript->pGossipSelect =  &GossipSelect_npc_wing_commander_dabiree; 
    321     newscript->RegisterSelf(); 
     174    m_scripts[nrscripts++] = newscript; 
    322175 
    323176    newscript = new Script; 
     
    325178    newscript->pGossipHello =   &GossipHello_npc_gryphoneer_windbellow; 
    326179    newscript->pGossipSelect =  &GossipSelect_npc_gryphoneer_windbellow; 
    327     newscript->RegisterSelf(); 
     180    m_scripts[nrscripts++] = newscript; 
    328181 
    329182    newscript = new Script; 
     
    331184    newscript->pGossipHello =   &GossipHello_npc_wing_commander_brack; 
    332185    newscript->pGossipSelect =  &GossipSelect_npc_wing_commander_brack; 
    333     newscript->RegisterSelf(); 
    334          
    335     newscript = new Script; 
    336     newscript->Name="npc_wounded_blood_elf"; 
    337     newscript->GetAI = &GetAI_npc_wounded_blood_elf; 
    338     newscript->pQuestAccept = &QuestAccept_wounded_blood_elf; 
    339     newscript->RegisterSelf(); 
     186    m_scripts[nrscripts++] = newscript; 
    340187} 
  • trunk/src/bindings/scripts/scripts/zone/ironforge/ironforge.cpp

    r260 r272  
    9090    newscript->pGossipHello =  &GossipHello_npc_royal_historian_archesonus; 
    9191    newscript->pGossipSelect = &GossipSelect_npc_royal_historian_archesonus; 
    92     newscript->RegisterSelf(); 
     92    m_scripts[nrscripts++] = newscript; 
    9393} 
  • trunk/src/bindings/scripts/scripts/zone/isle_of_queldanas/isle_of_queldanas.cpp

    r260 r272  
    141141    newscript->pGossipHello = &GossipHello_npc_ayren_cloudbreaker; 
    142142    newscript->pGossipSelect = &GossipSelect_npc_ayren_cloudbreaker; 
    143     newscript->RegisterSelf(); 
     143    m_scripts[nrscripts++] = newscript; 
    144144 
    145145    newscript = new Script; 
    146146    newscript->Name="npc_converted_sentry"; 
    147147    newscript->GetAI = GetAI_npc_converted_sentry; 
    148     newscript->RegisterSelf(); 
     148    m_scripts[nrscripts++] = newscript; 
    149149 
    150150    newscript = new Script; 
     
    152152    newscript->pGossipHello = &GossipHello_npc_unrestrained_dragonhawk; 
    153153    newscript->pGossipSelect = &GossipSelect_npc_unrestrained_dragonhawk; 
    154     newscript->RegisterSelf(); 
     154    m_scripts[nrscripts++] = newscript; 
    155155} 
  • trunk/src/bindings/scripts/scripts/zone/karazhan/boss_curator.cpp

    r260 r272  
    197197    newscript->Name="boss_curator"; 
    198198    newscript->GetAI = GetAI_boss_curator; 
    199     newscript->RegisterSelf(); 
     199    m_scripts[nrscripts++] = newscript; 
    200200} 
  • trunk/src/bindings/scripts/scripts/zone/karazhan/boss_maiden_of_virtue.cpp

    r260 r272  
    180180    newscript->Name="boss_maiden_of_virtue"; 
    181181    newscript->GetAI = GetAI_boss_maiden_of_virtue; 
    182     newscript->RegisterSelf(); 
     182    m_scripts[nrscripts++] = newscript; 
    183183} 
  • trunk/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp

    r260 r272  
    363363    newscript->Name="boss_attumen"; 
    364364    newscript->GetAI = GetAI_boss_attumen; 
    365     newscript->RegisterSelf(); 
     365    m_scripts[nrscripts++] = newscript; 
    366366 
    367367    newscript = new Script; 
    368368    newscript->Name="boss_midnight"; 
    369369    newscript->GetAI = GetAI_boss_midnight; 
    370     newscript->RegisterSelf(); 
     370    m_scripts[nrscripts++] = newscript; 
    371371} 
  • trunk/src/bindings/scripts/scripts/zone/karazhan/boss_moroes.cpp

    r260 r272  
    836836    newscript->Name="boss_moroes"; 
    837837    newscript->GetAI = GetAI_boss_moroes; 
    838     newscript->RegisterSelf(); 
     838    m_scripts[nrscripts++] = newscript; 
    839839 
    840840    newscript = new Script; 
    841841    newscript->Name="boss_baroness_dorothea_millstipe"; 
    842842    newscript->GetAI = GetAI_baroness_dorothea_millstipe; 
    843     newscript->RegisterSelf(); 
     843    m_scripts[nrscripts++] = newscript; 
    844844 
    845845    newscript = new Script; 
    846846    newscript->Name="boss_baron_rafe_dreuger"; 
    847847    newscript->GetAI = GetAI_baron_rafe_dreuger; 
    848     newscript->RegisterSelf(); 
     848    m_scripts[nrscripts++] = newscript; 
    849849 
    850850    newscript = new Script; 
    851851    newscript->Name="boss_lady_catriona_von_indi"; 
    852852    newscript->GetAI = GetAI_lady_catriona_von_indi; 
    853     newscript->RegisterSelf(); 
     853    m_scripts[nrscripts++] = newscript; 
    854854 
    855855    newscript = new Script; 
    856856    newscript->Name="boss_lady_keira_berrybuck"; 
    857857    newscript->GetAI = GetAI_lady_keira_berrybuck; 
    858     newscript->RegisterSelf(); 
     858    m_scripts[nrscripts++] = newscript; 
    859859 
    860860    newscript = new Script; 
    861861    newscript->Name="boss_lord_robin_daris"; 
    862862    newscript->GetAI = GetAI_lord_robin_daris; 
    863     newscript->RegisterSelf(); 
     863    m_scripts[nrscripts++] = newscript; 
    864864 
    865865    newscript = new Script; 
    866866    newscript->Name="boss_lord_crispin_ference"; 
    867867    newscript->GetAI = GetAI_lord_crispin_ference; 
    868     newscript->RegisterSelf(); 
     868    m_scripts[nrscripts++] = newscript; 
    869869} 
  • trunk/src/bindings/scripts/scripts/zone/karazhan/boss_prince_malchezaar.cpp

    r260 r272  
    667667    newscript->Name="boss_malchezaar"; 
    668668    newscript->GetAI = GetAI_boss_malchezaar; 
    669     newscript->RegisterSelf(); 
     669    m_scripts[nrscripts++] = newscript; 
    670670 
    671671    newscript = new Script; 
    672672    newscript->Name="netherspite_infernal"; 
    673673    newscript->GetAI = GetAI_netherspite_infernal; 
    674     newscript->RegisterSelf(); 
     674    m_scripts[nrscripts++] = newscript; 
    675675} 
  • trunk/src/bindings/scripts/scripts/zone/karazhan/boss_shade_of_aran.cpp

    r260 r272  
    655655    newscript->Name="boss_shade_of_aran"; 
    656656    newscript->GetAI = GetAI_boss_aran; 
    657     newscript->RegisterSelf(); 
     657    m_scripts[nrscripts++] = newscript; 
    658658 
    659659    newscript = new Script; 
    660660    newscript->Name="mob_shadow_of_aran"; 
    661661    newscript->GetAI = GetAI_shadow_of_aran; 
    662     newscript->RegisterSelf(); 
     662    m_scripts[nrscripts++] = newscript; 
    663663 
    664664    newscript = new Script; 
    665665    newscript->Name="mob_aran_elemental"; 
    666666    newscript->GetAI = GetAI_water_elemental; 
    667     newscript->RegisterSelf(); 
     667    m_scripts[nrscripts++] = newscript; 
    668668 
    669669    //newscript = new Script; 
    670670    //newscript->Name="mob_aran_blizzard"; 
    671671    //newscript->GetAI = GetAI_boss_aran; 
    672     //newscript->RegisterSelf(); 
     672    //m_scripts[nrscripts++] = newscript; 
    673673} 
  • trunk/src/bindings/scripts/scripts/zone/karazhan/boss_terestian_illhoof.cpp

    r260 r272  
    437437    newscript->Name="boss_terestian_illhoof"; 
    438438    newscript->GetAI = GetAI_boss_terestian_illhoof; 
    439     newscript->RegisterSelf(); 
     439    m_scripts[nrscripts++] = newscript; 
    440440 
    441441    newscript = new Script; 
    442442    newscript->Name="mob_karazhan_imp"; 
    443443    newscript->GetAI = GetAI_mob_karazhan_imp; 
    444     newscript->RegisterSelf(); 
     444    m_scripts[nrscripts++] = newscript; 
    445445 
    446446    newscript = new Script; 
    447447    newscript->Name="mob_kilrek"; 
    448448    newscript->GetAI = GetAI_mob_kilrek; 
    449     newscript->RegisterSelf(); 
     449    m_scripts[nrscripts++] = newscript; 
    450450 
    451451    newscript = new Script; 
    452452    newscript->Name = "mob_demon_chain"; 
    453453    newscript->GetAI = GetAI_mob_demon_chain; 
    454     newscript->RegisterSelf(); 
     454    m_scripts[nrscripts++] = newscript; 
    455455} 
  • trunk/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp

    r260 r272  
    14151415    newscript->GetAI = GetAI_boss_dorothee; 
    14161416    newscript->Name = "boss_dorothee"; 
    1417     newscript->RegisterSelf(); 
     1417    m_scripts[nrscripts++] = newscript; 
    14181418 
    14191419    newscript = new Script; 
    14201420    newscript->GetAI = GetAI_boss_strawman; 
    14211421    newscript->Name = "boss_strawman"; 
    1422     newscript->RegisterSelf(); 
     1422    m_scripts[nrscripts++] = newscript; 
    14231423 
    14241424    newscript = new Script; 
    14251425    newscript->GetAI = GetAI_boss_tinhead; 
    14261426    newscript->Name = "boss_tinhead"; 
    1427     newscript->RegisterSelf(); 
     1427    m_scripts[nrscripts++] = newscript; 
    14281428 
    14291429    newscript = new Script; 
    14301430    newscript->GetAI = GetAI_boss_roar; 
    14311431    newscript->Name = "boss_roar"; 
    1432     newscript->RegisterSelf(); 
     1432    m_scripts[nrscripts++] = newscript; 
    14331433 
    14341434    newscript = new Script; 
    14351435    newscript->GetAI = GetAI_boss_crone; 
    14361436    newscript->Name = "boss_crone"; 
    1437     newscript->RegisterSelf(); 
     1437    m_scripts[nrscripts++] = newscript; 
    14381438 
    14391439    newscript = new Script; 
    14401440    newscript->GetAI = GetAI_mob_tito; 
    14411441    newscript->Name = "mob_tito"; 
    1442     newscript->RegisterSelf(); 
     1442    m_scripts[nrscripts++] = newscript; 
    14431443 
    14441444    newscript = new Script; 
    14451445    newscript->GetAI = GetAI_mob_cyclone; 
    14461446    newscript->Name = "mob_cyclone"; 
    1447     newscript->RegisterSelf(); 
     1447    m_scripts[nrscripts++] = newscript; 
    14481448 
    14491449    // Hood 
     
    14521452    newscript->pGossipSelect = GossipSelect_npc_grandmother; 
    14531453    newscript->Name = "npc_grandmother"; 
    1454     newscript->RegisterSelf(); 
     1454    m_scripts[nrscripts++] = newscript; 
    14551455 
    14561456    newscript = new Script; 
    14571457    newscript->GetAI = GetAI_boss_bigbadwolf; 
    14581458    newscript->Name = "boss_bigbadwolf"; 
    1459     newscript->RegisterSelf(); 
     1459    m_scripts[nrscripts++] = newscript; 
    14601460 
    14611461    // Romeo And Juliet 
     
    14631463    newscript->GetAI = GetAI_boss_julianne; 
    14641464    newscript->Name = "boss_julianne"; 
    1465     newscript->RegisterSelf(); 
     1465    m_scripts[nrscripts++] = newscript; 
    14661466 
    14671467    newscript = new Script; 
    14681468    newscript->GetAI = GetAI_boss_romulo; 
    14691469    newscript->Name = "boss_romulo"; 
    1470     newscript->RegisterSelf(); 
    1471 } 
     1470    m_scripts[nrscripts++] = newscript; 
     1471} 
  • trunk/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp

    r260 r272  
    250250    newscript->Name = "instance_karazhan"; 
    251251    newscript->GetInstanceData = GetInstanceData_instance_karazhan; 
    252     newscript->RegisterSelf(); 
     252    m_scripts[nrscripts++] = newscript; 
    253253} 
  • trunk/src/bindings/scripts/scripts/zone/karazhan/karazhan.cpp

    r260 r272  
    286286                    if(!map->IsDungeon()) return; 
    287287 
    288                     Map::PlayerList const &PlayerList = map->GetPlayers(); 
    289                     if(PlayerList.isEmpty()) 
     288                    InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 
     289                    if(PlayerList.empty()) 
    290290                        return; 
    291291 
    292292                    RaidWiped = true; 
    293                     for(Map::PlayerList::const_iterator i = PlayerList.begin();i != PlayerList.end(); ++i) 
     293                    for(InstanceMap::PlayerList::const_iterator i = PlayerList.begin();i != PlayerList.end(); ++i) 
    294294                    { 
    295                         if (i->getSource()->isAlive() && !i->getSource()->isGameMaster()) 
     295                        if((*i)->isAlive() && !(*i)->isGameMaster()) 
    296296                        { 
    297297                            RaidWiped = false; 
     
    461461    newscript->pGossipHello = GossipHello_npc_barnes; 
    462462    newscript->pGossipSelect = GossipSelect_npc_barnes; 
    463     newscript->RegisterSelf(); 
     463    m_scripts[nrscripts++] = newscript; 
    464464 
    465465    newscript = new Script; 
     
    467467    newscript->pGossipHello = GossipHello_npc_berthold; 
    468468    newscript->pGossipSelect = GossipSelect_npc_berthold; 
    469     newscript->RegisterSelf(); 
    470 } 
     469    m_scripts[nrscripts++] = newscript; 
     470} 
  • trunk/src/bindings/scripts/scripts/zone/loch_modan/loch_modan.cpp

    r260 r272  
    8888    newscript->pGossipHello =  &GossipHello_npc_mountaineer_pebblebitty; 
    8989    newscript->pGossipSelect = &GossipSelect_npc_mountaineer_pebblebitty; 
    90     newscript->RegisterSelf(); 
     90    m_scripts[nrscripts++] = newscript; 
    9191} 
  • trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_felblood_kaelthas.cpp

    r260 r272  
    232232        m_creature->Relocate(KaelLocations[0][0], KaelLocations[0][1], LOCATION_Z, 0); 
    233233                Map *map = m_creature->GetMap(); 
    234         Map::PlayerList const &PlayerList = map->GetPlayers(); 
    235                 Map::PlayerList::const_iterator i; 
     234        InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 
     235                InstanceMap::PlayerList::const_iterator i; 
    236236                for (i = PlayerList.begin(); i != PlayerList.end(); ++i) 
    237237                { 
    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                             } 
     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                        } 
    245245        } 
    246246        DoCast(m_creature, SPELL_TELEPORT_CENTER, true); 
     
    250250    { 
    251251                Map *map = m_creature->GetMap(); 
    252         Map::PlayerList const &PlayerList = map->GetPlayers(); 
    253                 Map::PlayerList::const_iterator i; 
     252        InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 
     253                InstanceMap::PlayerList::const_iterator i; 
    254254                for (i = PlayerList.begin(); i != PlayerList.end(); ++i) 
    255                 { 
    256             if (Player* i_pl = i->getSource()) 
    257                             if(i_pl->isAlive()) 
     255                {             
     256                        if((*i) && (*i)->isAlive()) 
    258257                // Knockback into the air 
    259                     i_pl->CastSpell(i_pl, SPELL_GRAVITY_LAPSE_DOT, true, 0, 0, m_creature->GetGUID()); 
     258                (*i)->CastSpell((*i), SPELL_GRAVITY_LAPSE_DOT, true, 0, 0, m_creature->GetGUID()); 
    260259        } 
    261260    } 
     
    264263    { 
    265264                Map *map = m_creature->GetMap(); 
    266                 Map::PlayerList const &PlayerList = map->GetPlayers(); 
    267                 Map::PlayerList::const_iterator i; 
     265                InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 
     266                InstanceMap::PlayerList::const_iterator i; 
    268267                for (i = PlayerList.begin(); i != PlayerList.end(); ++i) 
    269                 { 
    270             if (Player* i_pl = i->getSource()) 
     268                {  
     269                        if((*i) && (*i)->isAlive()) 
    271270            { 
    272                             if(i_pl->isAlive()) 
    273                 { 
    274                     // Also needs an exception in spell system. 
    275                     i_pl->CastSpell(i_pl, SPELL_GRAVITY_LAPSE_FLY, true, 0, 0, m_creature->GetGUID()); 
    276                     // Use packet hack 
    277                     WorldPacket data(12); 
    278                     data.SetOpcode(SMSG_MOVE_SET_CAN_FLY); 
    279                     data.append(i_pl->GetPackGUID()); 
    280                     data << uint32(0); 
    281                     i_pl->SendMessageToSet(&data, true); 
    282                                     i_pl->SetSpeed(MOVE_FLY, 2.0f); 
    283                 } 
     271                // Also needs an exception in spell system. 
     272                (*i)->CastSpell((*i), SPELL_GRAVITY_LAPSE_FLY, true, 0, 0, m_creature->GetGUID()); 
     273                // Use packet hack 
     274                WorldPacket data(12); 
     275                data.SetOpcode(SMSG_MOVE_SET_CAN_FLY); 
     276                data.append((*i)->GetPackGUID()); 
     277                data << uint32(0); 
     278                (*i)->SendMessageToSet(&data, true); 
     279                                (*i)->SetSpeed(MOVE_FLY, 2.0f); 
    284280            } 
    285281        } 
     
    289285    { 
    290286                Map *map = m_creature->GetMap(); 
    291         Map::PlayerList const &PlayerList = map->GetPlayers(); 
    292                 Map::PlayerList::const_iterator i; 
     287        InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 
     288                InstanceMap::PlayerList::const_iterator i; 
    293289                for (i = PlayerList.begin(); i != PlayerList.end(); ++i) 
    294290                {  
    295             if(Player* i_pl = i->getSource()) 
     291            if((*i)) 
    296292            { 
    297                 i_pl->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_FLY); 
    298                 i_pl->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_DOT); 
     293                (*i)->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_FLY); 
     294                (*i)->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_DOT); 
    299295                WorldPacket data(12); 
    300296                data.SetOpcode(SMSG_MOVE_UNSET_CAN_FLY); 
    301                 data.append(i_pl->GetPackGUID()); 
     297                data.append((*i)->GetPackGUID()); 
    302298                data << uint32(0); 
    303                 i_pl->SendMessageToSet(&data, true); 
     299                (*i)->SendMessageToSet(&data, true); 
    304300            } 
    305301        } 
     
    762758    newscript->Name = "boss_felblood_kaelthas"; 
    763759    newscript->GetAI = GetAI_boss_felblood_kaelthas; 
    764     newscript->RegisterSelf(); 
     760    m_scripts[nrscripts++] = newscript; 
    765761 
    766762    newscript = new Script; 
    767763    newscript->Name = "mob_arcane_sphere"; 
    768764    newscript->GetAI = GetAI_mob_arcane_sphere; 
    769     newscript->RegisterSelf(); 
     765    m_scripts[nrscripts++] = newscript; 
    770766 
    771767    newscript = new Script; 
    772768    newscript->Name="mob_felkael_phoenix"; 
    773769    newscript->GetAI = GetAI_mob_felkael_phoenix; 
    774     newscript->RegisterSelf(); 
     770    m_scripts[nrscripts++] = newscript; 
    775771 
    776772    newscript = new Script; 
    777773    newscript->Name="mob_felkael_phoenix_egg"; 
    778774    newscript->GetAI = GetAI_mob_felkael_phoenix_egg; 
    779     newscript->RegisterSelf(); 
     775    m_scripts[nrscripts++] = newscript; 
    780776 
    781777    newscript = new Script; 
    782778    newscript->Name="mob_felkael_flamestrike"; 
    783779    newscript->GetAI = GetAI_mob_felkael_flamestrike; 
    784     newscript->RegisterSelf(); 
     780    m_scripts[nrscripts++] = newscript; 
    785781 
    786782        newscript = new Script; 
    787783    newscript->Name="go_kael_orb"; 
    788784    newscript->pGOHello = &GOHello_go_kael_orb; 
    789     newscript->RegisterSelf(); 
     785    m_scripts[nrscripts++] = newscript; 
    790786 
    791787        newscript = new Script; 
    792788    newscript->Name="go_movie_orb"; 
    793789    newscript->pGOHello = &GOHello_go_movie_orb; 
    794     newscript->RegisterSelf(); 
     790    m_scripts[nrscripts++] = newscript; 
    795791} 
  • trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_priestess_delrissa.cpp

    r260 r272  
    13561356    newscript->Name="boss_priestess_delrissa"; 
    13571357    newscript->GetAI = GetAI_boss_priestess_delrissa; 
    1358     newscript->RegisterSelf(); 
     1358    m_scripts[nrscripts++] = newscript; 
    13591359 
    13601360    newscript = new Script; 
    13611361    newscript->Name="boss_kagani_nightstrike"; 
    13621362    newscript->GetAI = GetAI_boss_kagani_nightstrike; 
    1363     newscript->RegisterSelf(); 
     1363    m_scripts[nrscripts++] = newscript; 
    13641364 
    13651365    newscript = new Script; 
    13661366    newscript->Name="boss_ellris_duskhallow"; 
    13671367    newscript->GetAI = GetAI_ellris_duskhallow; 
    1368     newscript->RegisterSelf(); 
     1368    m_scripts[nrscripts++] = newscript; 
    13691369 
    13701370    newscript = new Script; 
    13711371    newscript->Name="boss_eramas_brightblaze"; 
    13721372    newscript->GetAI = GetAI_eramas_brightblaze; 
    1373     newscript->RegisterSelf(); 
     1373    m_scripts[nrscripts++] = newscript; 
    13741374 
    13751375    newscript = new Script; 
    13761376    newscript->Name="boss_yazzai"; 
    13771377    newscript->GetAI = GetAI_yazzai; 
    1378     newscript->RegisterSelf(); 
     1378    m_scripts[nrscripts++] = newscript; 
    13791379 
    13801380    newscript = new Script; 
    13811381    newscript->Name="boss_warlord_salaris"; 
    13821382    newscript->GetAI = GetAI_warlord_salaris; 
    1383     newscript->RegisterSelf(); 
     1383    m_scripts[nrscripts++] = newscript; 
    13841384 
    13851385    newscript = new Script; 
    13861386    newscript->Name="boss_garaxxas"; 
    13871387    newscript->GetAI = GetAI_garaxxas; 
    1388     newscript->RegisterSelf(); 
     1388    m_scripts[nrscripts++] = newscript; 
    13891389 
    13901390    newscript = new Script; 
    13911391    newscript->Name="boss_apoko"; 
    13921392    newscript->GetAI = GetAI_apoko; 
    1393     newscript->RegisterSelf(); 
     1393    m_scripts[nrscripts++] = newscript; 
    13941394 
    13951395    newscript = new Script; 
    13961396    newscript->Name="boss_zelfan"; 
    13971397    newscript->GetAI = GetAI_zelfan; 
    1398     newscript->RegisterSelf(); 
     1398    m_scripts[nrscripts++] = newscript; 
    13991399 
    14001400    /*newscript = new Script; 
    14011401    newscript->Name="mob_high_explosive_sheep"; 
    14021402    newscript->GetAI = GetAI_mob_high_explosive_sheep; 
    1403     newscript->RegisterSelf();*/ 
     1403    m_scripts[nrscripts++] = newscript;*/ 
    14041404 
    14051405    /*newscript = new Script; 
    14061406    newscript->Name="mob_fizzle"; 
    14071407    newscript->GetAI = GetAI_mob_fizzle; 
    1408     newscript->RegisterSelf();*/ 
     1408    m_scripts[nrscripts++] = newscript;*/ 
    14091409 
    14101410    /*newscript = new Script; 
    14111411    newscript->Name="mob_sliver"; 
    14121412    newscript->GetAI = GetAI_mob_sliver; 
    1413     newscript->RegisterSelf();*/ 
     1413    m_scripts[nrscripts++] = newscript;*/ 
    14141414} 
  • trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_selin_fireheart.cpp

    r260 r272  
    404404    newscript->Name="boss_selin_fireheart"; 
    405405    newscript->GetAI = GetAI_boss_selin_fireheart; 
    406     newscript->RegisterSelf(); 
     406    m_scripts[nrscripts++] = newscript; 
    407407 
    408408    newscript = new Script; 
    409409    newscript->Name="mob_fel_crystal"; 
    410410    newscript->GetAI = GetAI_mob_fel_crystal; 
    411     newscript->RegisterSelf(); 
     411    m_scripts[nrscripts++] = newscript; 
    412412} 
  • trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_vexallus.cpp

    r260 r272  
    239239    newscript->Name="boss_vexallus"; 
    240240    newscript->GetAI = GetAI_boss_vexallus; 
    241     newscript->RegisterSelf(); 
     241    m_scripts[nrscripts++] = newscript; 
    242242 
    243243    newscript = new Script; 
    244244    newscript->Name="mob_pure_energy"; 
    245245    newscript->GetAI = GetAI_mob_pure_energy; 
    246     newscript->RegisterSelf(); 
     246    m_scripts[nrscripts++] = newscript; 
    247247} 
  • trunk/src/bindings/scripts/scripts/zone/magisters_terrace/instance_magisters_terrace.cpp

    r260 r272  
    250250    newscript->Name = "instance_magisters_terrace"; 
    251251    newscript->GetInstanceData = GetInstanceData_instance_magisters_terrace; 
    252     newscript->RegisterSelf(); 
     252    m_scripts[nrscripts++] = newscript; 
    253253} 
  • trunk/src/bindings/scripts/scripts/zone/maraudon/boss_celebras_the_cursed.cpp

    r260 r272  
    9494    newscript->Name="celebras_the_cursed"; 
    9595    newscript->GetAI = GetAI_celebras_the_cursed; 
    96     newscript->RegisterSelf(); 
     96    m_scripts[nrscripts++] = newscript; 
    9797} 
  • trunk/src/bindings/scripts/scripts/zone/maraudon/boss_landslide.cpp

    r260 r272  
    9191    newscript->Name="boss_landslide"; 
    9292    newscript->GetAI = GetAI_boss_landslide; 
    93     newscript->RegisterSelf(); 
     93    m_scripts[nrscripts++] = newscript; 
    9494} 
  • trunk/src/bindings/scripts/scripts/zone/maraudon/boss_noxxion.cpp

    r260 r272  
    146146    newscript->Name="boss_noxxion"; 
    147147    newscript->GetAI = GetAI_boss_noxxion; 
    148     newscript->RegisterSelf(); 
     148    m_scripts[nrscripts++] = newscript; 
    149149} 
  • trunk/src/bindings/scripts/scripts/zone/maraudon/boss_princess_theradras.cpp

    r260 r272  
    105105    newscript->Name="boss_princess_theradras"; 
    106106    newscript->GetAI = GetAI_boss_ptheradras; 
    107     newscript->RegisterSelf(); 
     107    m_scripts[nrscripts++] = newscript; 
    108108} 
  • trunk/src/bindings/scripts/scripts/zone/molten_core/boss_baron_geddon.cpp

    r260 r272  
    102102    newscript->Name="boss_baron_geddon"; 
    103103    newscript->GetAI = GetAI_boss_baron_geddon; 
    104     newscript->RegisterSelf(); 
     104    m_scripts[nrscripts++] = newscript; 
    105105} 
  • trunk/src/bindings/scripts/scripts/zone/molten_core/boss_garr.cpp

    r260 r272  
    141141    newscript->Name="boss_garr"; 
    142142    newscript->GetAI = GetAI_boss_garr; 
    143     newscript->RegisterSelf(); 
     143    m_scripts[nrscripts++] = newscript; 
    144144 
    145145    newscript = new Script; 
    146146    newscript->Name="mob_firesworn"; 
    147147    newscript->GetAI = GetAI_mob_firesworn; 
    148     newscript->RegisterSelf(); 
     148    m_scripts[nrscripts++] = newscript; 
    149149} 
  • trunk/src/bindings/scripts/scripts/zone/molten_core/boss_gehennas.cpp

    r260 r272  
    8888    newscript->Name="boss_gehennas"; 
    8989    newscript->GetAI = GetAI_boss_gehennas; 
    90     newscript->RegisterSelf(); 
     90    m_scripts[nrscripts++] = newscript; 
    9191} 
  • trunk/src/bindings/scripts/scripts/zone/molten_core/boss_golemagg.cpp

    r260 r272  
    193193    newscript->Name="boss_golemagg"; 
    194194    newscript->GetAI = GetAI_boss_golemagg; 
    195     newscript->RegisterSelf(); 
     195    m_scripts[nrscripts++] = newscript; 
    196196 
    197197    newscript = new Script; 
    198198    newscript->Name="mob_core_rager"; 
    199199    newscript->GetAI = GetAI_mob_core_rager; 
    200     newscript->RegisterSelf(); 
     200    m_scripts[nrscripts++] = newscript; 
    201201} 
  • trunk/src/bindings/scripts/scripts/zone/molten_core/boss_lucifron.cpp

    r260 r272  
    8787    newscript->Name="boss_lucifron"; 
    8888    newscript->GetAI = GetAI_boss_lucifron; 
    89     newscript->RegisterSelf(); 
     89    m_scripts[nrscripts++] = newscript; 
    9090} 
  • trunk/src/bindings/scripts/scripts/zone/molten_core/boss_magmadar.cpp

    r260 r272  
    9494    newscript->Name="boss_magmadar"; 
    9595    newscript->GetAI = GetAI_boss_magmadar; 
    96     newscript->RegisterSelf(); 
     96    m_scripts[nrscripts++] = newscript; 
    9797} 
  • trunk/src/bindings/scripts/scripts/zone/molten_core/boss_majordomo_executus.cpp

    r260 r272  
    130130    newscript->Name="boss_majordomo"; 
    131131    newscript->GetAI = GetAI_boss_majordomo; 
    132     newscript->RegisterSelf(); 
     132    m_scripts[nrscripts++] = newscript; 
    133133} 
  • trunk/src/bindings/scripts/scripts/zone/molten_core/boss_ragnaros.cpp

    r260 r272  
    314314    newscript->Name="boss_ragnaros"; 
    315315    newscript->GetAI = GetAI_boss_ragnaros; 
    316     newscript->RegisterSelf(); 
     316    m_scripts[nrscripts++] = newscript; 
    317317} 
  • trunk/src/bindings/scripts/scripts/zone/molten_core/boss_shazzrah.cpp

    r260 r272  
    118118    newscript->Name="boss_shazzrah"; 
    119119    newscript->GetAI = GetAI_boss_shazzrah; 
    120     newscript->RegisterSelf(); 
     120    m_scripts[nrscripts++] = newscript; 
    121121} 
  • trunk/src/bindings/scripts/scripts/zone/molten_core/boss_sulfuron_harbinger.cpp

    r260 r272  
    207207    newscript->Name="boss_sulfuron"; 
    208208    newscript->GetAI = GetAI_boss_sulfuron; 
    209     newscript->RegisterSelf(); 
     209    m_scripts[nrscripts++] = newscript; 
    210210 
    211211    newscript = new Script; 
    212212    newscript->Name="mob_flamewaker_priest"; 
    213213    newscript->GetAI = GetAI_mob_flamewaker_priest; 
    214     newscript->RegisterSelf(); 
     214    m_scripts[nrscripts++] = newscript; 
    215215} 
  • trunk/src/bindings/scripts/scripts/zone/molten_core/instance_molten_core.cpp

    r260 r272  
    254254    newscript->Name="instance_molten_core"; 
    255255    newscript->GetInstanceData = &GetInstance_instance_molten_core; 
    256     newscript->RegisterSelf(); 
     256    m_scripts[nrscripts++] = newscript; 
    257257} 
  • trunk/src/bindings/scripts/scripts/zone/molten_core/molten_core.cpp

    r260 r272  
    8585    newscript->Name="mob_ancient_core_hound"; 
    8686    newscript->GetAI = GetAI_mob_ancient_core_hound; 
    87     newscript->RegisterSelf(); 
     87    m_scripts[nrscripts++] = newscript; 
    8888} 
  • trunk/src/bindings/scripts/scripts/zone/moonglade/moonglade.cpp

    r260 r272  
    546546    newscript->pGossipHello =  &GossipHello_npc_bunthen_plainswind; 
    547547    newscript->pGossipSelect = &GossipSelect_npc_bunthen_plainswind; 
    548     newscript->RegisterSelf(); 
     548    m_scripts[nrscripts++] = newscript; 
    549549 
    550550    newscript = new Script; 
     
    552552    newscript->pGossipHello =  &GossipHello_npc_great_bear_spirit; 
    553553    newscript->pGossipSelect = &GossipSelect_npc_great_bear_spirit; 
    554     newscript->RegisterSelf(); 
     554    m_scripts[nrscripts++] = newscript; 
    555555 
    556556    newscript = new Script; 
     
    558558    newscript->pGossipHello =  &GossipHello_npc_silva_filnaveth; 
    559559    newscript->pGossipSelect = &GossipSelect_npc_silva_filnaveth; 
    560     newscript->RegisterSelf(); 
     560    m_scripts[nrscripts++] = newscript; 
    561561 
    562562        newscript = new Script; 
    563563    newscript->Name="npc_clintar_dreamwalker"; 
    564564    newscript->pQuestAccept = &QuestAccept_npc_clintar_dreamwalker; 
    565     newscript->RegisterSelf(); 
     565    m_scripts[nrscripts++] = newscript; 
    566566 
    567567    newscript = new Script; 
    568568    newscript->Name="npc_clintar_spirit"; 
    569569    newscript->GetAI = GetAI_npc_clintar_spirit; 
    570     newscript->RegisterSelf(); 
    571 } 
     570    m_scripts[nrscripts++] = newscript; 
     571} 
  • trunk/src/bindings/scripts/scripts/zone/mulgore/mulgore.cpp

    r260 r272  
    6161    newscript->pGossipHello          = &GossipHello_npc_skorn_whitecloud; 
    6262    newscript->pGossipSelect         = &GossipSelect_npc_skorn_whitecloud; 
    63     newscript->RegisterSelf(); 
     63    m_scripts[nrscripts++] = newscript; 
    6464} 
  • trunk/src/bindings/scripts/scripts/zone/nagrand/nagrand.cpp

    r260 r272  
    632632    newscript->Name="mob_shattered_rumbler"; 
    633633    newscript->GetAI = GetAI_mob_shattered_rumbler; 
    634     newscript->RegisterSelf(); 
     634    m_scripts[nrscripts++] = newscript; 
    635635 
    636636    newscript = new Script; 
     
    639639    newscript->pGossipHello =  &GossipHello_mob_lump; 
    640640    newscript->pGossipSelect = &GossipSelect_mob_lump; 
    641     newscript->RegisterSelf(); 
     641    m_scripts[nrscripts++] = newscript; 
    642642 
    643643    newscript = new Script; 
    644644    newscript->Name="mob_sunspring_villager"; 
    645645    newscript->GetAI = GetAI_mob_sunspring_villager; 
    646     newscript->RegisterSelf(); 
     646    m_scripts[nrscripts++] = newscript; 
    647647 
    648648    newscript = new Script; 
     
    651651    newscript->pGossipSelect = &GossipSelect_npc_altruis_the_sufferer; 
    652652    newscript->pQuestAccept =  &QuestAccept_npc_altruis_the_sufferer; 
    653     newscript->RegisterSelf(); 
     653    m_scripts[nrscripts++] = newscript; 
    654654 
    655655    newscript = new Script; 
     
    657657    newscript->pGossipHello =  &GossipHello_npc_greatmother_geyah; 
    658658    newscript->pGossipSelect = &GossipSelect_npc_greatmother_geyah; 
    659     newscript->RegisterSelf(); 
     659    m_scripts[nrscripts++] = newscript; 
    660660 
    661661    newscript = new Script; 
     
    663663    newscript->pGossipHello =  &GossipHello_npc_lantresor_of_the_blade; 
    664664    newscript->pGossipSelect = &GossipSelect_npc_lantresor_of_the_blade; 
    665     newscript->RegisterSelf(); 
     665    m_scripts[nrscripts++] = newscript; 
    666666 
    667667    newscript = new Script; 
    668668    newscript->Name="npc_creditmarker_visit_with_ancestors"; 
    669669    newscript->GetAI = GetAI_npc_creditmarker_visit_with_ancestors; 
    670     newscript->RegisterSelf(); 
     670    m_scripts[nrscripts++] = newscript; 
    671671 
    672672    newscript = new Script; 
    673673    newscript->Name="mob_sparrowhawk"; 
    674674    newscript->GetAI = GetAI_mob_sparrowhawk; 
    675     newscript->RegisterSelf(); 
    676 } 
     675    m_scripts[nrscripts++] = newscript; 
     676} 
  • trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_anubrekhan.cpp

    r260 r272  
    209209    newscript->Name="boss_anubrekhan"; 
    210210    newscript->GetAI = GetAI_boss_anubrekhan; 
    211     newscript->RegisterSelf(); 
     211    m_scripts[nrscripts++] = newscript; 
    212212} 
  • trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_faerlina.cpp

    r260 r272  
    198198    newscript->Name="boss_faerlina"; 
    199199    newscript->GetAI = GetAI_boss_faerlina; 
    200     newscript->RegisterSelf(); 
     200    m_scripts[nrscripts++] = newscript; 
    201201} 
  • trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_gluth.cpp

    r260 r272  
    171171    newscript->Name="boss_gluth"; 
    172172    newscript->GetAI = GetAI_boss_gluth; 
    173     newscript->RegisterSelf(); 
     173    m_scripts[nrscripts++] = newscript; 
    174174} 
  • trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_highlord_mograine.cpp

    r260 r272  
    175175    newscript->Name="boss_highlord_mograine"; 
    176176    newscript->GetAI = GetAI_boss_highlord_mograine; 
    177     newscript->RegisterSelf(); 
     177    m_scripts[nrscripts++] = newscript; 
    178178} 
  • trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_kelthuzad.cpp

    r260 r272  
    538538    newscript->Name="boss_kelthuzad"; 
    539539    newscript->GetAI = GetAI_boss_kelthuzadAI; 
    540     newscript->RegisterSelf(); 
     540    m_scripts[nrscripts++] = newscript; 
    541541    */ 
    542542} 
  • trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_lady_blaumeux.cpp

    r260 r272  
    144144    newscript->Name="boss_lady_blaumeux"; 
    145145    newscript->GetAI = GetAI_boss_lady_blaumeux; 
    146     newscript->RegisterSelf(); 
     146    m_scripts[nrscripts++] = newscript; 
    147147} 
  • trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_loatheb.cpp

    r260 r272  
    213213    newscript->Name="boss_loatheb"; 
    214214    newscript->GetAI = GetAI_boss_loatheb; 
    215     newscript->RegisterSelf(); 
     215    m_scripts[nrscripts++] = newscript; 
    216216} 
  • trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_maexxna.cpp

    r260 r272  
    238238    newscript->Name="boss_maexxna"; 
    239239    newscript->GetAI = GetAI_boss_maexxna; 
    240     newscript->RegisterSelf(); 
     240    m_scripts[nrscripts++] = newscript; 
    241241 
    242242    newscript = new Script; 
    243243    newscript->Name="mob_webwrap"; 
    244244    newscript->GetAI = GetAI_mob_webwrap; 
    245     newscript->RegisterSelf(); 
     245    m_scripts[nrscripts++] = newscript; 
    246246} 
  • trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_noth.cpp

    r260 r272  
    177177    newscript->Name="boss_noth"; 
    178178    newscript->GetAI = GetAI_boss_noth; 
    179     newscript->RegisterSelf(); 
     179    m_scripts[nrscripts++] = newscript; 
    180180} 
  • trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_patchwerk.cpp

    r260 r272  
    157157    newscript->Name="boss_patchwerk"; 
    158158    newscript->GetAI = GetAI_boss_patchwerk; 
    159     newscript->RegisterSelf(); 
     159    m_scripts[nrscripts++] = newscript; 
    160160} 
  • trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_razuvious.cpp

    r260 r272  
    164164    newscript->Name="boss_razuvious"; 
    165165    newscript->GetAI = GetAI_boss_razuvious; 
    166     newscript->RegisterSelf(); 
     166    m_scripts[nrscripts++] = newscript; 
    167167} 
  • trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_sapphiron.cpp

    r260 r272  
    196196    newscript->Name="boss_sapphiron"; 
    197197    newscript->GetAI = GetAI_boss_sapphiron; 
    198     newscript->RegisterSelf(); 
     198    m_scripts[nrscripts++] = newscript; 
    199199} 
  • trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_sir_zeliek.cpp

    r260 r272  
    143143    newscript->Name="boss_sir_zeliek"; 
    144144    newscript->GetAI = GetAI_boss_sir_zeliek; 
    145     newscript->RegisterSelf(); 
     145    m_scripts[nrscripts++] = newscript; 
    146146} 
  • trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_thane_korthazz.cpp

    r260 r272  
    144144    newscript->Name="boss_thane_korthazz"; 
    145145    newscript->GetAI = GetAI_boss_thane_korthazz; 
    146     newscript->RegisterSelf(); 
     146    m_scripts[nrscripts++] = newscript; 
    147147} 
  • trunk/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp

    r271 r272  
    391391 
    392392/*###### 
    393 ## mob_phase_hunter 
    394 ######*/ 
    395  
    396 #define SUMMONED_MOB        19595 
    397 #define EMOTE_WEAK          "is very weak" 
    398  
    399 // Spells 
    400 #define SPELL_PHASE_SLIP    36574 
    401 #define SPELL_MANA_BURN     13321 
    402  
    403 struct TRINITY_DLL_DECL mob_phase_hunterAI : public ScriptedAI 
    404 { 
    405  
    406     mob_phase_hunterAI(Creature *c) : ScriptedAI(c) {Reset();} 
    407      
    408     bool Weak; 
    409     int WeakPercent; 
    410     uint32 PlayerGUID; 
    411     uint32 Health; 
    412     uint32 Level; 
    413     uint32 PhaseSlipVulnerabilityTimer; 
    414     uint32 ManaBurnTimer; 
    415  
    416     void Reset() 
    417     { 
    418         Weak = false; 
    419         WeakPercent = 25 + (rand()%16); // 25-40 
    420         PlayerGUID = 0; 
    421         ManaBurnTimer = 5000 + (rand()%3 * 1000); // 5-8 sec cd 
    422     } 
    423  
    424     void Aggro(Unit *who) 
    425     { 
    426         PlayerGUID = who->GetGUID(); 
    427     } 
    428  
    429     void UpdateAI(const uint32 diff) 
    430     { 
    431  
    432         Player* target = NULL; 
    433         target = ((Player*)Unit::GetUnit((*m_creature), PlayerGUID)); 
    434          
    435         if(!target) 
    436             return; 
    437  
    438         if(m_creature->HasAuraType(SPELL_AURA_MOD_DECREASE_SPEED) || m_creature->hasUnitState(UNIT_STAT_ROOT)) // if the mob is rooted/slowed by spells eg.: Entangling Roots, Frost Nova, Hamstring, Crippling Poison, etc. => remove it 
    439             DoCast(m_creature, SPELL_PHASE_SLIP); 
    440         if(ManaBurnTimer < diff) // cast Mana Burn 
    441         { 
    442             if(target->GetCreateMana() > 0) 
    443             { 
    444                 DoCast(target, SPELL_MANA_BURN); 
    445                 ManaBurnTimer = 8000 + (rand()%10 * 1000); // 8-18 sec cd 
    446             } 
    447         } 
    448         else ManaBurnTimer -= diff; 
    449  
    450         if(!Weak && m_creature->GetHealth() < (m_creature->GetMaxHealth() / 100 * WeakPercent) && target->GetQuestStatus(10190) == QUEST_STATUS_INCOMPLETE) // start: support for quest 10190 
    451         { 
    452             DoTextEmote(EMOTE_WEAK, 0); 
    453             Weak = true; 
    454         } 
    455         if(Weak && m_creature->HasAura(34219, 0)) 
    456         { 
    457             Health = m_creature->GetHealth(); // get the normal mob's data 
    458             Level = m_creature->getLevel(); 
    459  
    460             m_creature->AttackStop(); // delete the normal mob 
    461             m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); 
    462             m_creature->RemoveCorpse(); 
    463              
    464             Creature* DrainedPhaseHunter = NULL; 
    465              
    466             if(!DrainedPhaseHunter) 
    467                 DrainedPhaseHunter = m_creature->SummonCreature(SUMMONED_MOB, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); // summon the mob 
    468              
    469             if(DrainedPhaseHunter) 
    470             { 
    471                 DrainedPhaseHunter->SetLevel(Level); // set the summoned mob's data 
    472                 DrainedPhaseHunter->SetHealth(Health); 
    473                 DrainedPhaseHunter->AI()->AttackStart(target); 
    474             } 
    475         } // end: support for quest 10190 
    476     } 
    477  
    478 }; 
    479  
    480 CreatureAI* GetAI_mob_phase_hunter(Creature *_Creature) 
    481 { 
    482     return new mob_phase_hunterAI (_Creature); 
    483 } 
    484  
    485 /*###### 
    486393## 
    487394######*/ 
     
    494401    newscript->Name="go_manaforge_control_console"; 
    495402    newscript->pGOHello = &GOHello_go_manaforge_control_console; 
    496     newscript->RegisterSelf(); 
     403    m_scripts[nrscripts++] = newscript; 
    497404 
    498405    newscript = new Script; 
    499406    newscript->Name="npc_manaforge_control_console"; 
    500407    newscript->GetAI = GetAI_npc_manaforge_control_console; 
    501     newscript->RegisterSelf(); 
     408    m_scripts[nrscripts++] = newscript; 
    502409 
    503410    newscript = new Script; 
     
    505412    newscript->pGossipHello =   &GossipHello_npc_protectorate_nether_drake; 
    506413    newscript->pGossipSelect =  &GossipSelect_npc_protectorate_nether_drake; 
    507     newscript->RegisterSelf(); 
     414    m_scripts[nrscripts++] = newscript; 
    508415 
    509416    newscript = new Script; 
     
    511418    newscript->pGossipHello =   &GossipHello_npc_veronia; 
    512419    newscript->pGossipSelect =  &GossipSelect_npc_veronia; 
    513     newscript->RegisterSelf(); 
    514  
    515     newscript = new Script; 
    516     newscript->Name = "mob_phase_hunter"; 
    517     newscript->GetAI = GetAI_mob_phase_hunter; 
    518     newscript->RegisterSelf(); 
    519 } 
     420    m_scripts[nrscripts++] = newscript; 
     421} 
  • trunk/src/bindings/scripts/scripts/zone/onyxias_lair/boss_onyxia.cpp

    r260 r272  
    230230    newscript->Name="boss_onyxia"; 
    231231    newscript->GetAI = GetAI_boss_onyxiaAI; 
    232     newscript->RegisterSelf(); 
     232    m_scripts[nrscripts++] = newscript; 
    233233} 
  • trunk/src/bindings/scripts/scripts/zone/orgrimmar/orgrimmar.cpp

    r260 r272  
    248248    newscript->pGossipHello =  &GossipHello_npc_neeru_fireblade; 
    249249    newscript->pGossipSelect = &GossipSelect_npc_neeru_fireblade; 
    250     newscript->RegisterSelf(); 
     250    m_scripts[nrscripts++] = newscript; 
    251251 
    252252    newscript = new Script; 
     
    255255    newscript->pQuestAccept =  &QuestAccept_npc_shenthul; 
    256256    newscript->pReceiveEmote = &ReciveEmote_npc_shenthul; 
    257     newscript->RegisterSelf(); 
     257    m_scripts[nrscripts++] = newscript; 
    258258 
    259259    newscript = new Script; 
     
    262262    newscript->pGossipHello =  &GossipHello_npc_thrall_warchief; 
    263263    newscript->pGossipSelect = &GossipSelect_npc_thrall_warchief; 
    264     newscript->RegisterSelf(); 
    265 } 
     264    m_scripts[nrscripts++] = newscript; 
     265} 
  • trunk/src/bindings/scripts/scripts/zone/razorfen_downs/boss_amnennar_the_coldbringer.cpp

    r260 r272  
    137137    newscript->Name="boss_amnennar_the_coldbringer"; 
    138138    newscript->GetAI = GetAI_boss_amnennar_the_coldbringer; 
    139     newscript->RegisterSelf(); 
     139    m_scripts[nrscripts++] = newscript; 
    140140} 
  • trunk/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_ayamiss.cpp

    r260 r272  
    104104    newscript->Name="boss_ayamiss"; 
    105105    newscript->GetAI = GetAI_boss_ayamiss; 
    106     newscript->RegisterSelf(); 
     106    m_scripts[nrscripts++] = newscript; 
    107107} 
  • trunk/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_kurinnaxx.cpp

    r260 r272  
    9090    newscript->Name="boss_kurinnaxx"; 
    9191    newscript->GetAI = GetAI_boss_kurinnaxx; 
    92     newscript->RegisterSelf(); 
     92    m_scripts[nrscripts++] = newscript; 
    9393} 
  • trunk/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_moam.cpp

    r260 r272  
    114114    newscript->Name="boss_moam"; 
    115115    newscript->GetAI = GetAI_boss_moam; 
    116     newscript->RegisterSelf(); 
     116    m_scripts[nrscripts++] = newscript; 
    117117} 
  • trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_arcanist_doan.cpp

    r260 r272  
    168168    newscript->Name="boss_arcanist_doan"; 
    169169    newscript->GetAI = GetAI_boss_arcanist_doan; 
    170     newscript->RegisterSelf(); 
     170    m_scripts[nrscripts++] = newscript; 
    171171} 
  • trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_azshir_the_sleepless.cpp

    r260 r272  
    9494    newscript->Name="boss_azshir_the_sleepless"; 
    9595    newscript->GetAI = GetAI_boss_azshir_the_sleepless; 
    96     newscript->RegisterSelf(); 
     96    m_scripts[nrscripts++] = newscript; 
    9797} 
  • trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_bloodmage_thalnos.cpp

    r260 r272  
    133133    newscript->Name="boss_bloodmage_thalnos"; 
    134134    newscript->GetAI = GetAI_boss_bloodmage_thalnos; 
    135     newscript->RegisterSelf(); 
     135    m_scripts[nrscripts++] = newscript; 
    136136} 
  • trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_herod.cpp

    r260 r272  
    194194    newscript->Name="boss_herod"; 
    195195    newscript->GetAI = GetAI_boss_herod; 
    196     newscript->RegisterSelf(); 
     196    m_scripts[nrscripts++] = newscript; 
    197197} 
  • trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp

    r260 r272  
    129129    newscript->Name="boss_high_inquisitor_fairbanks"; 
    130130    newscript->GetAI = GetAI_boss_high_inquisitor_fairbanks; 
    131     newscript->RegisterSelf(); 
     131    m_scripts[nrscripts++] = newscript; 
    132132} 
  • trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_high_inquisitor_whitemane.cpp

    r260 r272  
    174174    newscript->Name="boss_high_inquisitor_whitemane"; 
    175175    newscript->GetAI = GetAI_boss_high_inquisitor_whitemane; 
    176     newscript->RegisterSelf(); 
     176    m_scripts[nrscripts++] = newscript; 
    177177} 
  • trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_houndmaster_loksey.cpp

    r260 r272  
    7575    newscript->Name="boss_houndmaster_loksey"; 
    7676    newscript->GetAI = GetAI_boss_houndmaster_loksey; 
    77     newscript->RegisterSelf(); 
     77    m_scripts[nrscripts++] = newscript; 
    7878} 
  • trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_interrogator_vishas.cpp

    r260 r272  
    110110    newscript->Name="boss_interrogator_vishas"; 
    111111    newscript->GetAI = GetAI_boss_interrogator_vishas; 
    112     newscript->RegisterSelf(); 
     112    m_scripts[nrscripts++] = newscript; 
    113113} 
  • trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_scarlet_commander_mograine.cpp

    r260 r272  
    157157    newscript->Name="boss_scarlet_commander_mograine"; 
    158158    newscript->GetAI = GetAI_boss_scarlet_commander_mograine; 
    159     newscript->RegisterSelf(); 
     159    m_scripts[nrscripts++] = newscript; 
    160160} 
  • trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_scorn.cpp

    r260 r272  
    9797    newscript->Name="boss_scorn"; 
    9898    newscript->GetAI = GetAI_boss_scorn; 
    99     newscript->RegisterSelf(); 
     99    m_scripts[nrscripts++] = newscript; 
    100100} 
  • trunk/src/bindings/scripts/scripts/zone/scholomance/boss_darkmaster_gandling.cpp

    r260 r272  
    189189    newscript->Name="boss_darkmaster_gandling"; 
    190190    newscript->GetAI = GetAI_boss_darkmaster_gandling; 
    191     newscript->RegisterSelf(); 
     191    m_scripts[nrscripts++] = newscript; 
    192192} 
  • trunk/src/bindings/scripts/scripts/zone/scholomance/boss_death_knight_darkreaver.cpp

    r260 r272  
    5656    newscript->Name="boss_death_knight_darkreaver"; 
    5757    newscript->GetAI = GetAI_boss_death_knight_darkreaver; 
    58     newscript->RegisterSelf(); 
     58    m_scripts[nrscripts++] = newscript; 
    5959} 
  • trunk/src/bindings/scripts/scripts/zone/scholomance/boss_doctor_theolen_krastinov.cpp

    r260 r272  
    105105    newscript->Name="boss_doctor_theolen_krastinov"; 
    106106    newscript->GetAI = GetAI_boss_theolenkrastinov; 
    107     newscript->RegisterSelf(); 
     107    m_scripts[nrscripts++] = newscript; 
    108108} 
  • trunk/src/bindings/scripts/scripts/zone/scholomance/boss_illucia_barov.cpp

    r260 r272  
    113113    newscript->Name="boss_illucia_barov"; 
    114114    newscript->GetAI = GetAI_boss_illuciabarov; 
    115     newscript->RegisterSelf(); 
     115    m_scripts[nrscripts++] = newscript; 
    116116} 
  • trunk/src/bindings/scripts/scripts/zone/scholomance/boss_instructor_malicia.cpp

    r260 r272  
    149149    newscript->Name="boss_instructor_malicia"; 
    150150    newscript->GetAI = GetAI_boss_instructormalicia; 
    151     newscript->RegisterSelf(); 
     151    m_scripts[nrscripts++] = newscript; 
    152152} 
  • trunk/src/bindings/scripts/scripts/zone/scholomance/boss_jandice_barov.cpp

    r260 r272  
    213213    newscript->Name="boss_jandice_barov"; 
    214214    newscript->GetAI = GetAI_boss_jandicebarov; 
    215     newscript->RegisterSelf(); 
     215    m_scripts[nrscripts++] = newscript; 
    216216 
    217217    newscript = new Script; 
    218218    newscript->Name="mob_illusionofjandicebarov"; 
    219219    newscript->GetAI = GetAI_mob_illusionofjandicebarov; 
    220     newscript->RegisterSelf(); 
     220    m_scripts[nrscripts++] = newscript; 
    221221} 
  • trunk/src/bindings/scripts/scripts/zone/scholomance/boss_kormok.cpp

    r260 r272  
    152152    newscript->Name="boss_kormok"; 
    153153    newscript->GetAI = GetAI_boss_kormok; 
    154     newscript->RegisterSelf(); 
     154    m_scripts[nrscripts++] = newscript; 
    155155} 
  • trunk/src/bindings/scripts/scripts/zone/scholomance/boss_lord_alexei_barov.cpp

    r260 r272  
    9595    newscript->Name="boss_lord_alexei_barov"; 
    9696    newscript->GetAI = GetAI_boss_lordalexeibarov; 
    97     newscript->RegisterSelf(); 
     97    m_scripts[nrscripts++] = newscript; 
    9898} 
  • trunk/src/bindings/scripts/scripts/zone/scholomance/boss_lorekeeper_polkelt.cpp

    r260 r272  
    110110    newscript->Name="boss_lorekeeper_polkelt"; 
    111111    newscript->GetAI = GetAI_boss_lorekeeperpolkelt; 
    112     newscript->RegisterSelf(); 
     112    m_scripts[nrscripts++] = newscript; 
    113113} 
  • trunk/src/bindings/scripts/scripts/zone/scholomance/boss_ras_frostwhisper.cpp

    r260 r272  
    122122    newscript->Name="boss_boss_ras_frostwhisper"; 
    123123    newscript->GetAI = GetAI_boss_rasfrost; 
    124     newscript->RegisterSelf(); 
     124    m_scripts[nrscripts++] = newscript; 
    125125} 
  • trunk/src/bindings/scripts/scripts/zone/scholomance/boss_the_ravenian.cpp

    r260 r272  
    115115    newscript->Name="boss_the_ravenian"; 
    116116    newscript->GetAI = GetAI_boss_theravenian; 
    117     newscript->RegisterSelf(); 
     117    m_scripts[nrscripts++] = newscript; 
    118118} 
  • trunk/src/bindings/scripts/scripts/zone/scholomance/boss_vectus.cpp

    r260 r272  
    9292    newscript->Name="boss_vectus"; 
    9393    newscript->GetAI = GetAI_boss_vectus; 
    94     newscript->RegisterSelf(); 
     94    m_scripts[nrscripts++] = newscript; 
    9595} 
  • trunk/src/bindings/scripts/scripts/zone/scholomance/instance_scholomance.cpp

    r260 r272  
    9999    newscript->Name = "instance_scholomance"; 
    100100    newscript->GetInstanceData = GetInstanceData_instance_scholomance; 
    101     newscript->RegisterSelf(); 
     101    m_scripts[nrscripts++] = newscript; 
    102102} 
  • trunk/src/bindings/scripts/scripts/zone/searing_gorge/searing_gorge.cpp

    r260 r272  
    144144    newscript->pGossipHello =  &GossipHello_npc_kalaran_windblade; 
    145145    newscript->pGossipSelect = &GossipSelect_npc_kalaran_windblade; 
    146     newscript->RegisterSelf(); 
     146    m_scripts[nrscripts++] = newscript; 
    147147 
    148148    newscript = new Script; 
     
    150150    newscript->pGossipHello          = &GossipHello_npc_lothos_riftwaker; 
    151151    newscript->pGossipSelect         = &GossipSelect_npc_lothos_riftwaker; 
    152     newscript->RegisterSelf(); 
     152    m_scripts[nrscripts++] = newscript; 
    153153 
    154154    newscript = new Script; 
     
    156156    newscript->pGossipHello =  &GossipHello_npc_zamael_lunthistle; 
    157157    newscript->pGossipSelect = &GossipSelect_npc_zamael_lunthistle; 
    158     newscript->RegisterSelf(); 
     158    m_scripts[nrscripts++] = newscript; 
    159159} 
  • trunk/src/bindings/scripts/scripts/zone/shadowfang_keep/instance_shadowfang_keep.cpp

    r260 r272  
    149149    newscript->Name = "instance_shadowfang_keep"; 
    150150    newscript->GetInstanceData = GetInstanceData_instance_shadowfang_keep; 
    151     newscript->RegisterSelf(); 
     151    m_scripts[nrscripts++] = newscript; 
    152152} 
  • trunk/src/bindings/scripts/scripts/zone/shadowfang_keep/shadowfang_keep.cpp

    r260 r272  
    114114    newscript->pGossipSelect = &GossipSelect_npc_shadowfang_prisoner; 
    115115    newscript->GetAI = GetAI_npc_shadowfang_prisoner; 
    116     newscript->RegisterSelf(); 
     116    m_scripts[nrscripts++] = newscript; 
    117117} 
  • trunk/src/bindings/scripts/scripts/zone/shadowmoon_valley/boss_doomwalker.cpp

    r260 r272  
    213213    newscript->Name="boss_doomwalker"; 
    214214    newscript->GetAI = GetAI_boss_doomwalker; 
    215     newscript->RegisterSelf(); 
     215    m_scripts[nrscripts++] = newscript; 
    216216} 
  • trunk/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp

    r260 r272  
    11071107    newscript->Name = "mob_mature_netherwing_drake"; 
    11081108    newscript->GetAI = GetAI_mob_mature_netherwing_drake; 
    1109     newscript->RegisterSelf(); 
     1109    m_scripts[nrscripts++] = newscript; 
    11101110 
    11111111    newscript = new Script; 
    11121112    newscript->Name = "mob_enslaved_netherwing_drake"; 
    11131113    newscript->GetAI = GetAI_mob_enslaved_netherwing_drake; 
    1114     newscript->RegisterSelf(); 
     1114    m_scripts[nrscripts++] = newscript; 
    11151115 
    11161116        newscript = new Script; 
    11171117        newscript->Name = "mob_dragonmaw_peon"; 
    11181118        newscript->GetAI = GetAI_mob_dragonmaw_peon; 
    1119         newscript->RegisterSelf(); 
     1119        m_scripts[nrscripts++] = newscript; 
    11201120 
    11211121    newscript = new Script; 
     
    11231123    newscript->pGossipHello =  &GossipHello_npc_drake_dealer_hurlunk; 
    11241124    newscript->pGossipSelect = &GossipSelect_npc_drake_dealer_hurlunk; 
    1125     newscript->RegisterSelf(); 
     1125    m_scripts[nrscripts++] = newscript; 
    11261126 
    11271127    newscript = new Script; 
    11281128    newscript->Name="npc_invis_legion_teleporter"; 
    11291129    newscript->GetAI = GetAI_npc_invis_legion_teleporter; 
    1130     newscript->RegisterSelf(); 
     1130    m_scripts[nrscripts++] = newscript; 
    11311131 
    11321132    newscript = new Script; 
     
    11341134    newscript->pGossipHello =  &GossipHello_npcs_flanis_swiftwing_and_kagrosh; 
    11351135    newscript->pGossipSelect = &GossipSelect_npcs_flanis_swiftwing_and_kagrosh; 
    1136     newscript->RegisterSelf(); 
     1136    m_scripts[nrscripts++] = newscript; 
    11371137 
    11381138    newscript = new Script; 
     
    11401140    newscript->pGossipHello =  &GossipHello_npc_murkblood_overseer; 
    11411141    newscript->pGossipSelect = &GossipSelect_npc_murkblood_overseer; 
    1142     newscript->RegisterSelf(); 
     1142    m_scripts[nrscripts++] = newscript; 
    11431143 
    11441144    newscript = new Script; 
     
    11461146    newscript->pGossipHello =  &GossipHello_npc_neltharaku; 
    11471147    newscript->pGossipSelect = &GossipSelect_npc_neltharaku; 
    1148     newscript->RegisterSelf(); 
     1148    m_scripts[nrscripts++] = newscript; 
    11491149 
    11501150    newscript = new Script; 
    11511151    newscript->Name = "npc_karynaku"; 
    11521152    newscript->pQuestAccept = &QuestAccept_npc_karynaku; 
    1153     newscript->RegisterSelf(); 
     1153    m_scripts[nrscripts++] = newscript; 
    11541154 
    11551155    newscript = new Script; 
     
    11571157    newscript->pGossipHello =  &GossipHello_npc_oronok_tornheart; 
    11581158    newscript->pGossipSelect = &GossipSelect_npc_oronok_tornheart; 
    1159     newscript->RegisterSelf(); 
     1159    m_scripts[nrscripts++] = newscript; 
    11601160 
    11611161        newscript = new Script; 
     
    11631163        newscript->GetAI = GetAI_Overlord_Morghor; 
    11641164        newscript->pQuestAccept = &QuestAccept_Overlord_Morghor; 
    1165         newscript->RegisterSelf(); 
     1165        m_scripts[nrscripts++] = newscript; 
    11661166 
    11671167        newscript = new Script; 
    11681168        newscript->Name = "npc_lord_illidan_stormrage"; 
    11691169        newscript->GetAI = GetAI_Lord_Illidan; 
    1170         newscript->RegisterSelf(); 
     1170        m_scripts[nrscripts++] = newscript; 
    11711171 
    11721172        newscript = new Script; 
     
    11751175        newscript->pGossipHello = &GossipHello_npc_yarzill_fly; 
    11761176        newscript->pGossipSelect = &GossipSelect_npc_yarzill_fly; 
    1177         newscript->RegisterSelf(); 
    1178 } 
     1177        m_scripts[nrscripts++] = newscript; 
     1178} 
  • trunk/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp

    r260 r272  
    415415    newscript->pGossipHello =  &GossipHello_npc_raliq_the_drunk; 
    416416    newscript->pGossipSelect = &GossipSelect_npc_raliq_the_drunk; 
    417     newscript->RegisterSelf(); 
     417    m_scripts[nrscripts++] = newscript; 
    418418 
    419419    newscript = new Script; 
     
    421421    newscript->GetAI = GetAI_npc_salsalabim; 
    422422    newscript->pGossipHello =  &GossipHello_npc_salsalabim; 
    423     newscript->RegisterSelf(); 
     423    m_scripts[nrscripts++] = newscript; 
    424424 
    425425    newscript = new Script; 
     
    427427    newscript->pGossipHello =  &GossipHello_npc_shattrathflaskvendors; 
    428428    newscript->pGossipSelect = &GossipSelect_npc_shattrathflaskvendors; 
    429     newscript->RegisterSelf(); 
     429    m_scripts[nrscripts++] = newscript; 
    430430 
    431431    newscript = new Script; 
     
    433433    newscript->pGossipHello =  &GossipHello_npc_zephyr; 
    434434    newscript->pGossipSelect = &GossipSelect_npc_zephyr; 
    435     newscript->RegisterSelf(); 
     435    m_scripts[nrscripts++] = newscript; 
    436436 
    437437       newscript = new Script; 
    438438    newscript->Name="npc_kservant"; 
    439439    newscript->GetAI = GetAI_npc_kservantAI; 
    440     newscript->RegisterSelf(); 
    441 } 
     440    m_scripts[nrscripts++] = newscript; 
     441} 
  • trunk/src/bindings/scripts/scripts/zone/silithus/silithus.cpp

    r260 r272  
    146146    newscript->pGossipHello =   &GossipHello_npcs_rutgar_and_frankal; 
    147147    newscript->pGossipSelect =  &GossipSelect_npcs_rutgar_and_frankal; 
    148     newscript->RegisterSelf(); 
     148    m_scripts[nrscripts++] = newscript; 
    149149} 
  • trunk/src/bindings/scripts/scripts/zone/silvermoon/silvermoon_city.cpp

    r260 r272  
    100100    newscript->Name="npc_blood_knight_stillblade"; 
    101101    newscript->GetAI = GetAI_npc_blood_knight_stillblade; 
    102     newscript->RegisterSelf(); 
     102    m_scripts[nrscripts++] = newscript; 
    103103} 
  • trunk/src/bindings/scripts/scripts/zone/silverpine_forest/silverpine_forest.cpp

    r260 r272  
    9797    newscript->pGossipSelect = &GossipSelect_npc_astor_hadren; 
    9898    newscript->GetAI = GetAI_npc_astor_hadren; 
    99     newscript->RegisterSelf(); 
     99    m_scripts[nrscripts++] = newscript; 
    100100} 
  • trunk/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp

    r260 r272  
    7777    newscript->pGossipHello = &GossipHello_npc_braug_dimspirit; 
    7878    newscript->pGossipSelect = &GossipSelect_npc_braug_dimspirit; 
    79     newscript->RegisterSelf(); 
     79    m_scripts[nrscripts++] = newscript; 
    8080} 
  • trunk/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp

    r260 r272  
    246246    newscript->pGossipHello = &GossipHello_npc_archmage_malin; 
    247247    newscript->pGossipSelect = &GossipSelect_npc_archmage_malin; 
    248     newscript->RegisterSelf(); 
     248    m_scripts[nrscripts++] = newscript; 
    249249 
    250250    newscript = new Script; 
     
    252252    newscript->GetAI = GetAI_npc_bartleby; 
    253253    newscript->pQuestAccept = &QuestAccept_npc_bartleby; 
    254     newscript->RegisterSelf(); 
     254    m_scripts[nrscripts++] = newscript; 
    255255 
    256256    newscript = new Script; 
     
    258258    newscript->GetAI = GetAI_npc_dashel_stonefist; 
    259259    newscript->pQuestAccept = &QuestAccept_npc_dashel_stonefist; 
    260     newscript->RegisterSelf(); 
     260    m_scripts[nrscripts++] = newscript; 
    261261 
    262262    newscript = new Script; 
    263263    newscript->Name = "npc_general_marcus_jonathan"; 
    264264    newscript->pReceiveEmote = &ReceiveEmote_npc_general_marcus_jonathan; 
    265     newscript->RegisterSelf(); 
     265    m_scripts[nrscripts++] = newscript; 
    266266 
    267267    newscript = new Script; 
     
    269269    newscript->pGossipHello = &GossipHello_npc_lady_katrana_prestor; 
    270270    newscript->pGossipSelect = &GossipSelect_npc_lady_katrana_prestor; 
    271     newscript->RegisterSelf(); 
    272 } 
     271    m_scripts[nrscripts++] = newscript; 
     272} 
  • trunk/src/bindings/scripts/scripts/zone/stranglethorn_vale/stranglethorn_vale.cpp

    r260 r272  
    104104    newscript->Name = "mob_yenniku"; 
    105105    newscript->GetAI = GetAI_mob_yenniku; 
    106     newscript->RegisterSelf(); 
     106    m_scripts[nrscripts++] = newscript; 
    107107} 
  • trunk/src/bindings/scripts/scripts/zone/stratholme/boss_baron_rivendare.cpp

    r260 r272  
    212212    newscript->Name="boss_baron_rivendare"; 
    213213    newscript->GetAI = GetAI_boss_baron_rivendare; 
    214     newscript->RegisterSelf(); 
     214    m_scripts[nrscripts++] = newscript; 
    215215} 
  • trunk/src/bindings/scripts/scripts/zone/stratholme/boss_baroness_anastari.cpp

    r260 r272  
    121121    newscript->Name="boss_baroness_anastari"; 
    122122    newscript->GetAI = GetAI_boss_baroness_anastari; 
    123     newscript->RegisterSelf(); 
     123    m_scripts[nrscripts++] = newscript; 
    124124} 
  • trunk/src/bindings/scripts/scripts/zone/stratholme/boss_cannon_master_willey.cpp

    r260 r272  
    218218    newscript->Name="boss_cannon_master_willey"; 
    219219    newscript->GetAI = GetAI_boss_cannon_master_willey; 
    220     newscript->RegisterSelf(); 
     220    m_scripts[nrscripts++] = newscript; 
    221221} 
  • trunk/src/bindings/scripts/scripts/zone/stratholme/boss_dathrohan_balnazzar.cpp

    r260 r272  
    313313    newscript->Name="boss_dathrohan_balnazzar"; 
    314314    newscript->GetAI = GetAI_boss_dathrohan_balnazzar; 
    315     newscript->RegisterSelf(); 
     315    m_scripts[nrscripts++] = newscript; 
    316316} 
  • trunk/src/bindings/scripts/scripts/zone/stratholme/boss_magistrate_barthilas.cpp

    r260 r272  
    111111    newscript->Name="boss_magistrate_barthilas"; 
    112112    newscript->GetAI = GetAI_boss_magistrate_barthilas; 
    113     newscript->RegisterSelf(); 
     113    m_scripts[nrscripts++] = newscript; 
    114114} 
  • trunk/src/bindings/scripts/scripts/zone/stratholme/boss_maleki_the_pallid.cpp

    r260 r272  
    116116    newscript->Name="boss_maleki_the_pallid"; 
    117117    newscript->GetAI = GetAI_boss_maleki_the_pallid; 
    118     newscript->RegisterSelf(); 
     118    m_scripts[nrscripts++] = newscript; 
    119119} 
  • trunk/src/bindings/scripts/scripts/zone/stratholme/boss_nerubenkan.cpp

    r260 r272  
    135135    newscript->Name="boss_nerubenkan"; 
    136136    newscript->GetAI = GetAI_boss_nerubenkan; 
    137     newscript->RegisterSelf(); 
     137    m_scripts[nrscripts++] = newscript; 
    138138} 
  • trunk/src/bindings/scripts/scripts/zone/stratholme/boss_order_of_silver_hand.cpp

    r260 r272  
    158158    newscript->Name="boss_silver_hand_bosses"; 
    159159    newscript->GetAI = GetAI_boss_silver_hand_bossesAI; 
    160     newscript->RegisterSelf(); 
     160    m_scripts[nrscripts++] = newscript; 
    161161} 
  • trunk/src/bindings/scripts/scripts/zone/stratholme/boss_postmaster_malown.cpp

    r260 r272  
    141141    newscript->Name="boss_postmaster_malown"; 
    142142    newscript->GetAI = GetAI_boss_postmaster_malown; 
    143     newscript->RegisterSelf(); 
     143    m_scripts[nrscripts++] = newscript; 
    144144} 
  • trunk/src/bindings/scripts/scripts/zone/stratholme/boss_ramstein_the_gorger.cpp

    r260 r272  
    8989    newscript->Name="boss_ramstein_the_gorger"; 
    9090    newscript->GetAI = GetAI_boss_ramstein_the_gorger; 
    91     newscript->RegisterSelf(); 
     91    m_scripts[nrscripts++] = newscript; 
    9292} 
  • trunk/src/bindings/scripts/scripts/zone/stratholme/boss_timmy_the_cruel.cpp

    r260 r272  
    9797    newscript->Name="boss_timmy_the_cruel"; 
    9898    newscript->GetAI = GetAI_boss_timmy_the_cruel; 
    99     newscript->RegisterSelf(); 
     99    m_scripts[nrscripts++] = newscript; 
    100100} 
  • trunk/src/bindings/scripts/scripts/zone/stratholme/instance_stratholme.cpp

    r260 r272  
    7474    newscript->Name = "instance_stratholme"; 
    7575    newscript->GetInstanceData = GetInstanceData_instance_stratholme; 
    76     newscript->RegisterSelf(); 
     76    m_scripts[nrscripts++] = newscript; 
    7777} 
  • trunk/src/bindings/scripts/scripts/zone/stratholme/stratholme.cpp

    r260 r272  
    311311    newscript->Name="mob_freed_soul"; 
    312312    newscript->GetAI = GetAI_mob_freed_soul; 
    313     newscript->RegisterSelf(); 
     313    m_scripts[nrscripts++] = newscript; 
    314314 
    315315    newscript = new Script; 
    316316    newscript->Name="mob_restless_soul"; 
    317317    newscript->GetAI = GetAI_mob_restless_soul; 
    318     newscript->RegisterSelf(); 
     318    m_scripts[nrscripts++] = newscript; 
    319319 
    320320    newscript = new Script; 
     
    322322    newscript->GetAI = GetAI_mobs_spectral_ghostly_citizen; 
    323323    newscript->pReceiveEmote = &ReciveEmote_mobs_spectral_ghostly_citizen; 
    324     newscript->RegisterSelf(); 
     324    m_scripts[nrscripts++] = newscript; 
    325325 
    326326    newscript = new Script; 
    327327    newscript->Name="mob_mindless_skeleton"; 
    328328    newscript->GetAI = GetAI_mob_mindless_skeleton; 
    329     newscript->RegisterSelf(); 
     329    m_scripts[nrscripts++] = newscript; 
    330330 
    331331    newscript = new Script; 
    332332    newscript->Name="mob_thuzadin_acolyte"; 
    333333    newscript->GetAI = GetAI_mob_thuzadin_acolyte; 
    334     newscript->RegisterSelf(); 
    335 } 
     334    m_scripts[nrscripts++] = newscript; 
     335} 
  • trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_brutallus.cpp

    r260 r272  
    179179    newscript->Name="boss_brutallus"; 
    180180    newscript->GetAI = GetAI_boss_brutallus; 
    181     newscript->RegisterSelf(); 
     181    m_scripts[nrscripts++] = newscript; 
    182182} 
  • trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_eredar_twins.cpp

    r260 r272  
    762762    newscript->Name="boss_sacrolash"; 
    763763    newscript->GetAI = GetAI_boss_sacrolash; 
    764     newscript->RegisterSelf(); 
     764    m_scripts[nrscripts++] = newscript; 
    765765 
    766766    newscript = new Script; 
    767767    newscript->Name="boss_alythess"; 
    768768    newscript->GetAI = GetAI_boss_alythess; 
    769     newscript->RegisterSelf(); 
     769    m_scripts[nrscripts++] = newscript; 
    770770 
    771771    newscript = new Script; 
    772772    newscript->Name="mob_shadow_image"; 
    773773    newscript->GetAI = GetAI_mob_shadow_image; 
    774     newscript->RegisterSelf(); 
     774    m_scripts[nrscripts++] = newscript; 
    775775} 
  • trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_felmyst.cpp

    r260 r272  
    296296            break; 
    297297        case 2: 
    298             if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true)) 
     298            if(Player* target = SelectRandomPlayer(150)) 
    299299            { 
    300300                Creature* Vapor = m_creature->SummonCreature(MOB_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000); 
     
    312312            DespawnSummons(MOB_VAPOR_TRAIL); 
    313313            //m_creature->CastSpell(m_creature, SPELL_VAPOR_SELECT); need core support 
    314             if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true)) 
     314            if(Player* target = SelectRandomPlayer(150)) 
    315315            { 
    316316                //target->CastSpell(target, SPELL_VAPOR_SUMMON, true); need core support 
     
    331331            break; 
    332332        case 5: 
    333             if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true)) 
     333            if(Player* target = SelectRandomPlayer(150)) 
    334334            { 
    335335                BreathX = target->GetPositionX(); 
     
    434434                break; 
    435435            case EVENT_ENCAPSULATE: 
    436                 if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 150, true)) 
     436                if(Unit* target = SelectRandomPlayer(150)) 
    437437                { 
    438438                    m_creature->CastSpell(target, SPELL_ENCAPSULATE_CHANNEL, false); 
     
    516516        } 
    517517    } 
     518 
     519    Player* SelectRandomPlayer(float range = 0.0f) 
     520    { 
     521        Map *map = m_creature->GetMap(); 
     522        if (!map->IsDungeon()) return NULL; 
     523 
     524        InstanceMap::PlayerList PlayerList = ((InstanceMap*)map)->GetPlayers(); 
     525        InstanceMap::PlayerList::iterator i; 
     526        while(PlayerList.size()) 
     527        { 
     528            i = PlayerList.begin(); 
     529            advance(i, rand()%PlayerList.size()); 
     530            if((range == 0.0f || m_creature->IsWithinDistInMap(*i, range)) 
     531                && (*i)->isTargetableForAttack()) 
     532                return *i; 
     533            else 
     534                PlayerList.erase(i); 
     535        } 
     536        return NULL; 
     537    } 
    518538}; 
    519539 
     
    575595    newscript->Name="boss_felmyst"; 
    576596    newscript->GetAI = GetAI_boss_felmyst; 
    577     newscript->RegisterSelf(); 
     597    m_scripts[nrscripts++] = newscript; 
    578598 
    579599    newscript = new Script; 
    580600    newscript->Name="mob_felmyst_vapor"; 
    581601    newscript->GetAI = GetAI_mob_felmyst_vapor; 
    582     newscript->RegisterSelf(); 
     602    m_scripts[nrscripts++] = newscript; 
    583603 
    584604    newscript = new Script; 
    585605    newscript->Name="mob_felmyst_trail"; 
    586606    newscript->GetAI = GetAI_mob_felmyst_trail; 
    587     newscript->RegisterSelf(); 
     607    m_scripts[nrscripts++] = newscript; 
    588608} 
  • trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp

    r260 r272  
    369369        Map *map = m_creature->GetMap(); 
    370370        if(!map->IsDungeon()) return; 
    371         Map::PlayerList const &PlayerList = map->GetPlayers(); 
    372         Map::PlayerList::const_iterator i; 
    373         for(i = PlayerList.begin(); i != PlayerList.end(); ++i) 
    374             if(Player* i_pl = i->getSource()) 
    375                 if(i_pl->HasAura(AURA_SPECTRAL_REALM,0)) 
    376                     i_pl->RemoveAurasDueToSpell(AURA_SPECTRAL_REALM); 
     371        InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 
     372        InstanceMap::PlayerList::const_iterator i; 
     373        for (i = PlayerList.begin(); i != PlayerList.end(); ++i) 
     374        { 
     375            if((*i)->HasAura(AURA_SPECTRAL_REALM,0)) 
     376                (*i)->RemoveAurasDueToSpell(AURA_SPECTRAL_REALM); 
     377        } 
    377378    } 
    378379 
     
    681682    newscript->Name="boss_kalecgos"; 
    682683    newscript->GetAI = GetAI_boss_kalecgos; 
    683     newscript->RegisterSelf(); 
     684    m_scripts[nrscripts++] = newscript; 
    684685 
    685686    newscript = new Script; 
    686687    newscript->Name="boss_sathrovarr"; 
    687688    newscript->GetAI = GetAI_boss_Sathrovarr; 
    688     newscript->RegisterSelf(); 
     689    m_scripts[nrscripts++] = newscript; 
    689690 
    690691    newscript = new Script; 
    691692    newscript->Name="boss_kalec"; 
    692693    newscript->GetAI = GetAI_boss_kalec; 
    693     newscript->RegisterSelf(); 
     694    m_scripts[nrscripts++] = newscript; 
    694695 
    695696    newscript = new Script; 
    696697    newscript->Name="kalocegos_teleporter"; 
    697698    newscript->pGOHello = &GOkalocegos_teleporter; 
    698     newscript->RegisterSelf(); 
     699    m_scripts[nrscripts++] = newscript; 
    699700} 
  • trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp

    r260 r272  
    193193    newscript->Name = "instance_sunwell_plateau"; 
    194194    newscript->GetInstanceData = GetInstanceData_instance_sunwell_plateau; 
    195     newscript->RegisterSelf(); 
     195    m_scripts[nrscripts++] = newscript; 
    196196} 
  • trunk/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp

    r260 r272  
    375375    newscript->Name="mob_aquementas"; 
    376376    newscript->GetAI = GetAI_mob_aquementas; 
    377     newscript->RegisterSelf(); 
     377    m_scripts[nrscripts++] = newscript; 
    378378 
    379379    newscript = new Script; 
    380380    newscript->Name="npc_custodian_of_time"; 
    381381    newscript->GetAI = GetAI_npc_custodian_of_time; 
    382     newscript->RegisterSelf(); 
     382    m_scripts[nrscripts++] = newscript; 
    383383 
    384384    newscript = new Script; 
     
    386386    newscript->pGossipHello =  &GossipHello_npc_marin_noggenfogger; 
    387387    newscript->pGossipSelect = &GossipSelect_npc_marin_noggenfogger; 
    388     newscript->RegisterSelf(); 
     388    m_scripts[nrscripts++] = newscript; 
    389389 
    390390    newscript = new Script; 
     
    393393    newscript->pGossipSelect = &GossipSelect_npc_steward_of_time; 
    394394    newscript->pQuestAccept =  &QuestAccept_npc_steward_of_time; 
    395     newscript->RegisterSelf(); 
     395    m_scripts[nrscripts++] = newscript; 
    396396 
    397397    newscript = new Script; 
     
    399399    newscript->pGossipHello =  &GossipHello_npc_stone_watcher_of_norgannon; 
    400400    newscript->pGossipSelect = &GossipSelect_npc_stone_watcher_of_norgannon; 
    401     newscript->RegisterSelf(); 
    402 } 
     401    m_scripts[nrscripts++] = newscript; 
     402} 
  • trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/arcatraz.cpp

    r260 r272  
    576576    newscript->Name="npc_millhouse_manastorm"; 
    577577    newscript->GetAI = GetAI_npc_millhouse_manastorm; 
    578     newscript->RegisterSelf(); 
     578    m_scripts[nrscripts++] = newscript; 
    579579 
    580580    newscript = new Script; 
    581581    newscript->Name="npc_warden_mellichar"; 
    582582    newscript->GetAI = GetAI_npc_warden_mellichar; 
    583     newscript->RegisterSelf(); 
     583    m_scripts[nrscripts++] = newscript; 
    584584 
    585585    newscript = new Script; 
    586586    newscript->Name="mob_zerekethvoidzone"; 
    587587    newscript->GetAI = GetAI_mob_zerekethvoidzoneAI; 
    588     newscript->RegisterSelf(); 
     588    m_scripts[nrscripts++] = newscript; 
    589589} 
  • trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp

    r260 r272  
    368368    newscript->Name="boss_harbinger_skyriss"; 
    369369    newscript->GetAI = GetAI_boss_harbinger_skyriss; 
    370     newscript->RegisterSelf(); 
     370    m_scripts[nrscripts++] = newscript; 
    371371 
    372372    newscript = new Script; 
    373373    newscript->Name="boss_harbinger_skyriss_illusion"; 
    374374    newscript->GetAI = GetAI_boss_harbinger_skyriss_illusion; 
    375     newscript->RegisterSelf(); 
     375    m_scripts[nrscripts++] = newscript; 
    376376} 
  • trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/instance_arcatraz.cpp

    r260 r272  
    221221    newscript->Name = "instance_arcatraz"; 
    222222    newscript->GetInstanceData = GetInstanceData_instance_arcatraz; 
    223     newscript->RegisterSelf(); 
     223    m_scripts[nrscripts++] = newscript; 
    224224} 
  • trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_high_botanist_freywinn.cpp

    r260 r272  
    212212    newscript->Name="boss_high_botanist_freywinn"; 
    213213    newscript->GetAI = GetAI_boss_high_botanist_freywinn; 
    214     newscript->RegisterSelf(); 
     214    m_scripts[nrscripts++] = newscript; 
    215215} 
  • trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_laj.cpp

    r260 r272  
    195195    newscript->Name="boss_laj"; 
    196196    newscript->GetAI = GetAI_boss_laj; 
    197     newscript->RegisterSelf(); 
     197    m_scripts[nrscripts++] = newscript; 
    198198} 
  • trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_warp_splinter.cpp

    r260 r272  
    294294    newscript->Name="boss_warp_splinter"; 
    295295    newscript->GetAI = GetAI_boss_warp_splinter; 
    296     newscript->RegisterSelf(); 
     296    m_scripts[nrscripts++] = newscript; 
    297297 
    298298    newscript = new Script; 
    299299    newscript->Name="mob_warp_splinter_treant"; 
    300300    newscript->GetAI = GetAI_mob_treant; 
    301     newscript->RegisterSelf(); 
     301    m_scripts[nrscripts++] = newscript; 
    302302} 
  • trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_alar.cpp

    r260 r272  
    506506    newscript->Name="boss_alar"; 
    507507    newscript->GetAI = GetAI_boss_alar; 
    508     newscript->RegisterSelf(); 
     508    m_scripts[nrscripts++] = newscript; 
    509509 
    510510    newscript = new Script; 
    511511    newscript->Name="mob_ember_of_alar"; 
    512512    newscript->GetAI = GetAI_mob_ember_of_alar; 
    513     newscript->RegisterSelf(); 
     513    m_scripts[nrscripts++] = newscript; 
    514514 
    515515    newscript = new Script; 
    516516    newscript->Name="mob_flame_patch_alar"; 
    517517    newscript->GetAI = GetAI_mob_flame_patch_alar; 
    518     newscript->RegisterSelf(); 
     518    m_scripts[nrscripts++] = newscript; 
    519519} 
  • trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_astromancer.cpp

    r260 r272  
    537537    newscript->Name="boss_high_astromancer_solarian"; 
    538538    newscript->GetAI = GetAI_boss_high_astromancer_solarian; 
    539     newscript->RegisterSelf(); 
     539    m_scripts[nrscripts++] = newscript; 
    540540 
    541541    newscript = new Script; 
    542542    newscript->Name="mob_solarium_priest"; 
    543543    newscript->GetAI = GetAI_mob_solarium_priest; 
    544     newscript->RegisterSelf(); 
     544    m_scripts[nrscripts++] = newscript; 
    545545} 
  • trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp

    r260 r272  
    15821582    newscript->Name="boss_kaelthas"; 
    15831583    newscript->GetAI = GetAI_boss_kaelthas; 
    1584     newscript->RegisterSelf(); 
     1584    m_scripts[nrscripts++] = newscript; 
    15851585 
    15861586    newscript = new Script; 
    15871587    newscript->Name="boss_thaladred_the_darkener"; 
    15881588    newscript->GetAI = GetAI_boss_thaladred_the_darkener; 
    1589     newscript->RegisterSelf(); 
     1589    m_scripts[nrscripts++] = newscript; 
    15901590 
    15911591    newscript = new Script; 
    15921592    newscript->Name="boss_lord_sanguinar"; 
    15931593    newscript->GetAI = GetAI_boss_lord_sanguinar; 
    1594     newscript->RegisterSelf(); 
     1594    m_scripts[nrscripts++] = newscript; 
    15951595 
    15961596    newscript = new Script; 
    15971597    newscript->Name="boss_grand_astromancer_capernian"; 
    15981598    newscript->GetAI = GetAI_boss_grand_astromancer_capernian; 
    1599     newscript->RegisterSelf(); 
     1599    m_scripts[nrscripts++] = newscript; 
    16001600 
    16011601    newscript = new Script; 
    16021602    newscript->Name="boss_master_engineer_telonicus"; 
    16031603    newscript->GetAI = GetAI_boss_master_engineer_telonicus; 
    1604     newscript->RegisterSelf(); 
     1604    m_scripts[nrscripts++] = newscript; 
    16051605 
    16061606    newscript = new Script; 
    16071607    newscript->Name= "mob_kael_flamestrike"; 
    16081608    newscript->GetAI = GetAI_mob_kael_flamestrike; 
    1609     newscript->RegisterSelf(); 
     1609    m_scripts[nrscripts++] = newscript; 
    16101610 
    16111611    newscript = new Script; 
    16121612    newscript->Name="mob_phoenix"; 
    16131613    newscript->GetAI = GetAI_mob_phoenix; 
    1614     newscript->RegisterSelf(); 
     1614    m_scripts[nrscripts++] = newscript; 
    16151615} 
  • trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp

    r260 r272  
    196196    newscript->Name="boss_void_reaver"; 
    197197    newscript->GetAI = GetAI_boss_void_reaver; 
    198     newscript->RegisterSelf(); 
     198    m_scripts[nrscripts++] = newscript; 
    199199} 
  • trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/instance_the_eye.cpp

    r260 r272  
    173173    newscript->Name = "instance_the_eye"; 
    174174    newscript->GetInstanceData = GetInstanceData_instance_the_eye; 
    175     newscript->RegisterSelf(); 
     175    m_scripts[nrscripts++] = newscript; 
    176176} 
  • trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/the_eye.cpp

    r260 r272  
    9595    newscript->Name="mob_crystalcore_devastator"; 
    9696    newscript->GetAI = GetAI_mob_crystalcore_devastator; 
    97     newscript->RegisterSelf(); 
     97    m_scripts[nrscripts++] = newscript; 
    9898} 
  • trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp

    r260 r272  
    158158    newscript->Name="boss_gatewatcher_iron_hand";     
    159159    newscript->GetAI = GetAI_boss_gatewatcher_iron_hand;     
    160     newscript->RegisterSelf(); 
     160    m_scripts[nrscripts++] = newscript; 
    161161} 
  • trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp

    r260 r272  
    278278    newscript->Name="boss_nethermancer_sepethrea";     
    279279    newscript->GetAI = GetAI_boss_nethermancer_sepethrea;     
    280     newscript->RegisterSelf(); 
     280    m_scripts[nrscripts++] = newscript; 
    281281 
    282282    newscript = new Script;     
    283283    newscript->Name="mob_ragin_flames";     
    284284    newscript->GetAI = GetAI_mob_ragin_flames;     
    285     newscript->RegisterSelf(); 
     285    m_scripts[nrscripts++] = newscript; 
    286286} 
  • trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp

    r263 r272  
    298298    newscript->Name="boss_pathaleon_the_calculator";     
    299299    newscript->GetAI = GetAI_boss_pathaleon_the_calculator;     
    300     newscript->RegisterSelf(); 
     300    m_scripts[nrscripts++] = newscript; 
    301301 
    302302    newscript = new Script;     
    303303    newscript->Name="mob_nether_wraith";     
    304304    newscript->GetAI = GetAI_mob_nether_wraith;     
    305     newscript->RegisterSelf(); 
     305    m_scripts[nrscripts++] = newscript; 
    306306} 
  • trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/instance_mechanar.cpp

    r263 r272  
    8787    newscript->Name = "instance_mechanar"; 
    8888    newscript->GetInstanceData = GetInstanceData_instance_mechanar; 
    89     newscript->RegisterSelf(); 
     89    m_scripts[nrscripts++] = newscript; 
    9090} 
  • trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_bug_trio.cpp

    r260 r272  
    335335    newscript->Name="boss_kri"; 
    336336    newscript->GetAI = GetAI_boss_kri; 
    337     newscript->RegisterSelf(); 
     337    m_scripts[nrscripts++] = newscript; 
    338338 
    339339    newscript = new Script; 
    340340    newscript->Name="boss_vem"; 
    341341    newscript->GetAI = GetAI_boss_vem; 
    342     newscript->RegisterSelf(); 
     342    m_scripts[nrscripts++] = newscript; 
    343343 
    344344    newscript = new Script; 
    345345    newscript->Name="boss_yauj"; 
    346346    newscript->GetAI = GetAI_boss_yauj; 
    347     newscript->RegisterSelf(); 
     347    m_scripts[nrscripts++] = newscript; 
    348348} 
  • trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp

    r260 r272  
    578578                if(!map->IsDungeon()) return; 
    579579 
    580                 Map::PlayerList const &PlayerList = map->GetPlayers(); 
    581                 for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) 
    582                 { 
    583                     if (Player* i_pl = i->getSource()) 
     580                InstanceMap::PlayerList const &PlayerList = ((InstanceMap*)map)->GetPlayers(); 
     581                for (InstanceMap::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) 
     582                { 
     583                    //Play random sound to the zone 
     584                    switch (rand()%8) 
    584585                    { 
    585                         //Play random sound to the zone 
    586                         switch (rand()%8) 
    587                         { 
    588                             case 0: i_pl->SendPlaySound(RND_WISPER_1, true); break; 
    589                             case 1: i_pl->SendPlaySound(RND_WISPER_2, true); break; 
    590                             case 2: i_pl->SendPlaySound(RND_WISPER_3, true); break; 
    591                             case 3: i_pl->SendPlaySound(RND_WISPER_4, true); break; 
    592                             case 4: i_pl->SendPlaySound(RND_WISPER_5, true); break; 
    593                             case 5: i_pl->SendPlaySound(RND_WISPER_6, true); break; 
    594                             case 6: i_pl->SendPlaySound(RND_WISPER_7, true); break; 
    595                             case 7: i_pl->SendPlaySound(RND_WISPER_8, true); break; 
    596                         } 
     586                        case 0: (*i)->SendPlaySound(RND_WISPER_1, true); break; 
     587                        case 1: (*i)->SendPlaySound(RND_WISPER_2, true); break; 
     588                        case 2: (*i)->SendPlaySound(RND_WISPER_3, true); break; 
     589                        case 3: (*i)->SendPlaySound(RND_WISPER_4, true); break; 
     590                        case 4: (*i)->SendPlaySound(RND_WISPER_5, true); break; 
     591                        case 5: (*i)->SendPlaySound(RND_WISPER_6, true); break; 
     592                        case 6: (*i)->SendPlaySound(RND_WISPER_7, true); break; 
     593                        case 7: (*i)->SendPlaySound(RND_WISPER_8, true); break; 
    597594                    } 
    598595                } 
     
    13301327    newscript->Name="boss_eye_of_cthun"; 
    13311328    newscript->GetAI = GetAI_eye_of_cthun; 
    1332     newscript->RegisterSelf(); 
     1329    m_scripts[nrscripts++] = newscript; 
    13331330 
    13341331    newscript = new Script; 
    13351332    newscript->Name="boss_cthun"; 
    13361333    newscript->GetAI = GetAI_cthun; 
    1337     newscript->RegisterSelf(); 
     1334    m_scripts[nrscripts++] = newscript; 
    13381335 
    13391336    newscript = new Script; 
    13401337    newscript->Name="mob_eye_tentacle"; 
    13411338    newscript->GetAI = GetAI_eye_tentacle; 
    1342     newscript->RegisterSelf(); 
     1339    m_scripts[nrscripts++] = newscript; 
    13431340 
    13441341    newscript = new Script; 
    13451342    newscript->Name="mob_claw_tentacle"; 
    13461343    newscript->GetAI = GetAI_claw_tentacle; 
    1347     newscript->RegisterSelf(); 
     1344    m_scripts[nrscripts++] = newscript; 
    13481345 
    13491346    newscript = new Script; 
    13501347    newscript->Name="mob_giant_claw_tentacle"; 
    13511348    newscript->GetAI = GetAI_giant_claw_tentacle; 
    1352     newscript->RegisterSelf(); 
     1349    m_scripts[nrscripts++] = newscript; 
    13531350 
    13541351    newscript = new Script; 
    13551352    newscript->Name="mob_giant_eye_tentacle"; 
    13561353    newscript->GetAI = GetAI_giant_eye_tentacle; 
    1357     newscript->RegisterSelf(); 
     1354    m_scripts[nrscripts++] = newscript; 
    13581355 
    13591356    newscript = new Script; 
    13601357    newscript->Name="mob_giant_flesh_tentacle"; 
    13611358    newscript->GetAI = GetAI_flesh_tentacle; 
    1362     newscript->RegisterSelf(); 
     1359    m_scripts[nrscripts++] = newscript; 
    13631360} 
  • trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_fankriss.cpp

    r260 r272  
    187187    newscript->Name="boss_fankriss"; 
    188188    newscript->GetAI = GetAI_boss_fankriss; 
    189     newscript->RegisterSelf(); 
     189    m_scripts[nrscripts++] = newscript; 
    190190} 
  • trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_huhuran.cpp

    r260 r272  
    140140    newscript->Name="boss_huhuran"; 
    141141    newscript->GetAI = GetAI_boss_huhuran; 
    142     newscript->RegisterSelf(); 
     142    m_scripts[nrscripts++] = newscript; 
    143143} 
  • trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_ouro.cpp

    r260 r272  
    137137    newscript->Name="boss_ouro"; 
    138138    newscript->GetAI = GetAI_boss_ouro; 
    139     newscript->RegisterSelf(); 
     139    m_scripts[nrscripts++] = newscript; 
    140140} 
  • trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_sartura.cpp

    r260 r272  
    260260    newscript->Name="boss_sartura"; 
    261261    newscript->GetAI = GetAI_boss_sartura; 
    262     newscript->RegisterSelf(); 
     262    m_scripts[nrscripts++] = newscript; 
    263263 
    264264    newscript = new Script; 
    265265    newscript->Name="mob_sartura_royal_guard"; 
    266266    newscript->GetAI = GetAI_mob_sartura_royal_guard; 
    267     newscript->RegisterSelf(); 
     267    m_scripts[nrscripts++] = newscript; 
    268268} 
  • trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_skeram.cpp

    r260 r272  
    311311    newscript->Name="boss_skeram"; 
    312312    newscript->GetAI = GetAI_boss_skeram; 
    313     newscript->RegisterSelf(); 
     313    m_scripts[nrscripts++] = newscript; 
    314314} 
  • trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_twinemperors.cpp

    r260 r272  
    690690    newscript->Name="boss_veknilash"; 
    691691    newscript->GetAI = GetAI_boss_veknilash; 
    692     newscript->RegisterSelf(); 
     692    m_scripts[nrscripts++] = newscript; 
    693693 
    694694    newscript = new Script; 
    695695    newscript->Name="boss_veklor"; 
    696696    newscript->GetAI = GetAI_boss_veklor; 
    697     newscript->RegisterSelf(); 
     697    m_scripts[nrscripts++] = newscript; 
    698698} 
  • trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp

    r260 r272  
    162162    newscript->Name = "instance_temple_of_ahnqiraj"; 
    163163    newscript->GetInstanceData = GetInstanceData_instance_temple_of_ahnqiraj; 
    164     newscript->RegisterSelf(); 
     164    m_scripts[nrscripts++] = newscript; 
    165165} 
  • trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp

    r260 r272  
    310310    newscript->Name="mob_anubisath_sentinel"; 
    311311    newscript->GetAI = GetAI_mob_anubisath_sentinelAI; 
    312     newscript->RegisterSelf(); 
     312    m_scripts[nrscripts++] = newscript; 
    313313} 
    314314 
  • trunk/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp

    r260 r272  
    369369    newscript->Name="mob_unkor_the_ruthless"; 
    370370    newscript->GetAI = GetAI_mob_unkor_the_ruthless; 
    371     newscript->RegisterSelf(); 
     371    m_scripts[nrscripts++] = newscript; 
    372372 
    373373    newscript = new Script; 
    374374    newscript->Name="mob_infested_root_walker"; 
    375375    newscript->GetAI = GetAI_mob_infested_root_walker; 
    376     newscript->RegisterSelf(); 
     376    m_scripts[nrscripts++] = newscript; 
    377377 
    378378    newscript = new Script; 
    379379    newscript->Name="mob_rotting_forest_rager"; 
    380380    newscript->GetAI = GetAI_mob_rotting_forest_rager; 
    381     newscript->RegisterSelf(); 
     381    m_scripts[nrscripts++] = newscript; 
    382382 
    383383    newscript = new Script; 
    384384    newscript->Name="mob_netherweb_victim"; 
    385385    newscript->GetAI = GetAI_mob_netherweb_victim; 
    386     newscript->RegisterSelf(); 
     386    m_scripts[nrscripts++] = newscript; 
    387387 
    388388    newscript = new Script; 
     
    390390    newscript->pGossipHello =  &GossipHello_npc_floon; 
    391391    newscript->pGossipSelect = &GossipSelect_npc_floon; 
    392     newscript->RegisterSelf(); 
     392    m_scripts[nrscripts++] = newscript; 
    393393 
    394394    newscript = new Script; 
     
    396396    newscript->pGossipHello =  &GossipHello_npc_skyguard_handler_deesak; 
    397397    newscript->pGossipSelect = &GossipSelect_npc_skyguard_handler_deesak; 
    398     newscript->RegisterSelf(); 
    399 } 
     398    m_scripts[nrscripts++] = newscript; 
     399} 
  • trunk/src/bindings/scripts/scripts/zone/thunder_bluff/thunder_bluff.cpp

    r260 r272  
    133133    newscript->pGossipHello = &GossipHello_npc_cairne_bloodhoof; 
    134134    newscript->pGossipSelect = &GossipSelect_npc_cairne_bloodhoof; 
    135     newscript->RegisterSelf(); 
     135    m_scripts[nrscripts++] = newscript; 
    136136} 
  • trunk/src/bindings/scripts/scripts/zone/tirisfal_glades/tirisfal_glades.cpp

    r260 r272  
    8585    newscript->GetAI = GetAI_npc_calvin_montague; 
    8686    newscript->pQuestAccept = &QuestAccept_npc_calvin_montague; 
    87     newscript->RegisterSelf(); 
     87    m_scripts[nrscripts++] = newscript; 
    8888} 
  • trunk/src/bindings/scripts/scripts/zone/uldaman/boss_ironaya.cpp

    r260 r272  
    104104    newscript->Name="boss_ironaya"; 
    105105    newscript->GetAI = GetAI_boss_ironaya; 
    106     newscript->RegisterSelf(); 
     106    m_scripts[nrscripts++] = newscript; 
    107107} 
  • trunk/src/bindings/scripts/scripts/zone/uldaman/uldaman.cpp

    r260 r272  
    178178    newscript->Name="mob_jadespine_basilisk"; 
    179179    newscript->GetAI = GetAI_mob_jadespine_basilisk; 
    180     newscript->RegisterSelf(); 
     180    m_scripts[nrscripts++] = newscript; 
    181181 
    182182    newscript = new Script; 
     
    184184    newscript->pGossipHello = &GossipHello_npc_lore_keeper_of_norgannon; 
    185185    newscript->pGossipSelect = &GossipSelect_npc_lore_keeper_of_norgannon; 
    186     newscript->RegisterSelf(); 
     186    m_scripts[nrscripts++] = newscript; 
    187187} 
  • trunk/src/bindings/scripts/scripts/zone/undercity/undercity.cpp

    r260 r272  
    246246    newscript->GetAI = GetAI_npc_lady_sylvanas_windrunner; 
    247247    newscript->pChooseReward = &ChooseReward_npc_lady_sylvanas_windrunner; 
    248     newscript->RegisterSelf(); 
     248    m_scripts[nrscripts++] = newscript; 
    249249 
    250250    newscript = new Script; 
    251251    newscript->Name="npc_highborne_lamenter"; 
    252252    newscript->GetAI = GetAI_npc_highborne_lamenter; 
    253     newscript->RegisterSelf(); 
     253    m_scripts[nrscripts++] = newscript; 
    254254 
    255255    newscript = new Script; 
     
    257257    newscript->pGossipHello = &GossipHello_npc_parqual_fintallas; 
    258258    newscript->pGossipSelect = &GossipSelect_npc_parqual_fintallas; 
    259     newscript->RegisterSelf(); 
    260 } 
     259    m_scripts[nrscripts++] = newscript; 
     260} 
  • trunk/src/bindings/scripts/scripts/zone/western_plaguelands/western_plaguelands.cpp

    r260 r272  
    168168    newscript->pGossipHello = &GossipHello_npcs_dithers_and_arbington; 
    169169    newscript->pGossipSelect = &GossipSelect_npcs_dithers_and_arbington; 
    170     newscript->RegisterSelf(); 
     170    m_scripts[nrscripts++] = newscript; 
    171171 
    172172    newscript = new Script; 
    173173    newscript->Name="npc_the_scourge_cauldron"; 
    174174    newscript->GetAI = GetAI_npc_the_scourge_cauldron; 
    175     newscript->RegisterSelf(); 
     175    m_scripts[nrscripts++] = newscript; 
    176176} 
  • trunk/src/bindings/scripts/scripts/zone/winterspring/winterspring.cpp

    r260 r272  
    142142    newscript->pGossipHello =  &GossipHello_npc_lorax; 
    143143    newscript->pGossipSelect = &GossipSelect_npc_lorax; 
    144     newscript->RegisterSelf(); 
     144    m_scripts[nrscripts++] = newscript; 
    145145 
    146146    newscript = new Script; 
     
    148148    newscript->pGossipHello =  &GossipHello_npc_rivern_frostwind; 
    149149    newscript->pGossipSelect = &GossipSelect_npc_rivern_frostwind; 
    150     newscript->RegisterSelf(); 
     150    m_scripts[nrscripts++] = newscript; 
    151151 
    152152    newscript = new Script; 
     
    154154    newscript->pGossipHello =  &GossipHello_npc_witch_doctor_mauari; 
    155155    newscript->pGossipSelect = &GossipSelect_npc_witch_doctor_mauari; 
    156     newscript->RegisterSelf(); 
     156    m_scripts[nrscripts++] = newscript; 
    157157} 
  • trunk/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp

    r260 r272  
    262262    newscript->pGossipHello =  &GossipHello_npcs_ashyen_and_keleth; 
    263263    newscript->pGossipSelect = &GossipSelect_npcs_ashyen_and_keleth; 
    264     newscript->RegisterSelf(); 
     264    m_scripts[nrscripts++] = newscript; 
    265265 
    266266    newscript = new Script; 
     
    268268    newscript->pGossipHello =  &GossipHello_npc_cooshcoosh; 
    269269    newscript->pGossipSelect = &GossipSelect_npc_cooshcoosh; 
    270     newscript->RegisterSelf(); 
     270    m_scripts[nrscripts++] = newscript; 
    271271 
    272272    newscript = new Script; 
     
    274274    newscript->pGossipHello =  &GossipHello_npc_elder_kuruti; 
    275275    newscript->pGossipSelect = &GossipSelect_npc_elder_kuruti; 
    276     newscript->RegisterSelf(); 
     276    m_scripts[nrscripts++] = newscript; 
    277277 
    278278    newscript = new Script; 
     
    280280    newscript->pGossipHello =  &GossipHello_npc_mortog_steamhead; 
    281281    newscript->pGossipSelect = &GossipSelect_npc_mortog_steamhead; 
    282     newscript->RegisterSelf(); 
    283 } 
     282    m_scripts[nrscripts++] = newscript; 
     283} 
  • trunk/src/bindings/scripts/scripts/zone/zulaman/boss_akilzon.cpp

    r270 r272  
    170170        data << uint32(weather) << (float)grade << uint8(0); 
    171171 
    172         map->SendToPlayers(&data); 
     172        ((InstanceMap*)map)->SendToPlayers(&data); 
    173173    } 
    174174 
     
    462462    newscript->Name="boss_akilzon"; 
    463463    newscript->GetAI = GetAI_boss_akilzon; 
    464     newscript->RegisterSelf(); 
     464    m_scripts[nrscripts++] = newscript; 
    465465 
    466466    newscript = new Script; 
    467467    newscript->Name="mob_akilzon_eagle"; 
    468468    newscript->GetAI = GetAI_mob_soaring_eagle; 
    469     newscript->RegisterSelf(); 
     469    m_scripts[nrscripts++] = newscript; 
    470470} 
  • trunk/src/bindings/scripts/scripts/zone/zulaman/boss_halazzi.cpp

    r260 r272  
    395395    newscript->Name="boss_halazzi"; 
    396396    newscript->GetAI = GetAI_boss_halazziAI; 
    397     newscript->RegisterSelf(); 
     397    m_scripts[nrscripts++] = newscript; 
    398398 
    399399    newscript = new Script; 
    400400    newscript->Name="mob_halazzi_lynx"; 
    401401    newscript->GetAI = GetAI_boss_spiritlynxAI; 
    402     newscript->RegisterSelf(); 
     402    m_scripts[nrscripts++] = newscript; 
    403403} 
  • trunk/src/bindings/scripts/scripts/zone/zulaman/boss_hexlord.cpp

    r260 r272  
    372372        if(SiphonSoul_Timer < diff) 
    373373        { 
    374             Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 70, true); 
     374            Player* target = SelectRandomPlayer(50); 
    375375            Unit *trigger = DoSpawnCreature(MOB_TEMP_TRIGGER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 30000); 
    376376            if(!target || !trigger) EnterEvadeMode(); 
     
    436436        m_creature->CastSpell(target, PlayerAbility[PlayerClass][random].spell, false); 
    437437    } 
     438 
     439    Player* SelectRandomPlayer(float range = 0.0f, bool alive = true) 
     440    { 
     441        Map *map = m_creature->GetMap(); 
     442        if (!map->IsDungeon()) return NULL; 
     443 
     444        InstanceMap::PlayerList PlayerList = ((InstanceMap*)map)->GetPlayers(); 
     445        InstanceMap::PlayerList::iterator i; 
     446        while(PlayerList.size()) 
     447        { 
     448            i = PlayerList.begin(); 
     449            advance(i, rand()%PlayerList.size()); 
     450            if((range == 0.0f || m_creature->IsWithinDistInMap(*i, range)) 
     451                && (!alive || (*i)->isAlive())) 
     452                return *i; 
     453            else 
     454                PlayerList.erase(i); 
     455        } 
     456        return NULL; 
     457    } 
    438458}; 
    439459 
     
    869889    newscript->Name="boss_hexlord_malacrass"; 
    870890    newscript->GetAI = GetAI_boss_hex_lord_malacrass; 
    871     newscript->RegisterSelf(); 
     891    m_scripts[nrscripts++] = newscript; 
    872892 
    873893    newscript = new Script; 
    874894    newscript->Name="boss_thurg"; 
    875895    newscript->GetAI = GetAI_boss_thurg; 
    876     newscript->RegisterSelf(); 
     896    m_scripts[nrscripts++] = newscript; 
    877897 
    878898    newscript = new Script; 
    879899    newscript->Name="boss_gazakroth"; 
    880900    newscript->GetAI = GetAI_boss_gazakroth; 
    881     newscript->RegisterSelf(); 
     901    m_scripts[nrscripts++] = newscript; 
    882902 
    883903    newscript = new Script; 
    884904    newscript->Name="boss_lord_raadan"; 
    885905    newscript->GetAI = GetAI_boss_lord_raadan; 
    886     newscript->RegisterSelf(); 
     906    m_scripts[nrscripts++] = newscript; 
    887907 
    888908    newscript = new Script; 
    889909    newscript->Name="boss_darkheart"; 
    890910    newscript->GetAI = GetAI_boss_darkheart; 
    891     newscript->RegisterSelf(); 
     911    m_scripts[nrscripts++] = newscript; 
    892912 
    893913    newscript = new Script; 
    894914    newscript->Name="boss_slither"; 
    895915    newscript->GetAI = GetAI_boss_slither; 
    896     newscript->RegisterSelf(); 
     916    m_scripts[nrscripts++] = newscript; 
    897917 
    898918    newscript = new Script; 
    899919    newscript->Name="boss_fenstalker"; 
    900920    newscript->GetAI = GetAI_boss_fenstalker; 
    901     newscript->RegisterSelf(); 
     921    m_scripts[nrscripts++] = newscript; 
    902922 
    903923    newscript = new Script; 
    904924    newscript->Name="boss_koragg"; 
    905925    newscript->GetAI = GetAI_boss_koragg; 
    906     newscript->RegisterSelf(); 
     926    m_scripts[nrscripts++] = newscript; 
    907927 
    908928    newscript = new Script; 
    909929    newscript->Name="boss_alyson_antille"; 
    910930    newscript->GetAI = GetAI_boss_alyson_antille; 
    911     newscript->RegisterSelf(); 
     931    m_scripts[nrscripts++] = newscript; 
    912932} 
  • trunk/src/bindings/scripts/scripts/zone/zulaman/boss_janalai.cpp

    r260 r272  
    398398            Map *map = m_creature->GetMap(); 
    399399            if(!map->IsDungeon()) return; 
    400             Map::PlayerList const &PlayerList = map->GetPlayers(); 
    401             for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) 
    402             { 
    403                 if (Player* i_pl = i->getSource()) 
    404                     if(i_pl->isAlive()) 
    405                         DoTeleportPlayer(i_pl, JanalainPos[0][0]-5+rand()%10, JanalainPos[0][1]-5+rand()%10, JanalainPos[0][2], 0); 
     400            InstanceMap::PlayerList const &PlayerList =((InstanceMap*)map)->GetPlayers(); 
     401            for(InstanceMap::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) 
     402            { 
     403                if((*i)->isAlive()) 
     404                    DoTeleportPlayer(*i, JanalainPos[0][0]-5+rand()%10, JanalainPos[0][1]-5+rand()%10, JanalainPos[0][2], 0); 
    406405            } 
    407406            //m_creature->CastSpell(Temp, SPELL_SUMMON_PLAYERS, true); // core bug, spell does not work if too far 
     
    707706    newscript->Name="boss_janalai"; 
    708707    newscript->GetAI = GetAI_boss_janalaiAI; 
    709     newscript->RegisterSelf() 
     708    m_scripts[nrscripts++] = newscript 
    710709 
    711710    newscript = new Script; 
    712711    newscript->Name="mob_janalai_firebomb"; 
    713712    newscript->GetAI = GetAI_mob_jandalai_firebombAI; 
    714     newscript->RegisterSelf() 
     713    m_scripts[nrscripts++] = newscript 
    715714 
    716715    newscript = new Script; 
    717716    newscript->Name="mob_janalai_hatcher"; 
    718717    newscript->GetAI = GetAI_mob_amanishi_hatcherAI; 
    719     newscript->RegisterSelf();  
     718    m_scripts[nrscripts++] = newscript;  
    720719 
    721720    newscript = new Script; 
    722721    newscript->Name="mob_janalai_hatchling"; 
    723722    newscript->GetAI = GetAI_mob_hatchlingAI; 
    724     newscript->RegisterSelf(); 
     723    m_scripts[nrscripts++] = newscript; 
    725724 
    726725    newscript = new Script; 
    727726    newscript->Name="mob_janalai_egg"; 
    728727    newscript->GetAI = GetAI_mob_eggAI; 
    729     newscript->RegisterSelf();  
     728    m_scripts[nrscripts++] = newscript;  
    730729} 
  • trunk/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp

    r260 r272  
    301301    newscript->Name="boss_nalorakk"; 
    302302    newscript->GetAI = GetAI_boss_nalorakk; 
    303     newscript->RegisterSelf(); 
     303    m_scripts[nrscripts++] = newscript; 
    304304} 
  • trunk/src/bindings/scripts/scripts/zone/zulaman/boss_zuljin.cpp

    r260 r272  
    630630    newscript->Name="boss_zuljin"; 
    631631    newscript->GetAI = GetAI_boss_zuljin; 
    632     newscript->RegisterSelf(); 
     632    m_scripts[nrscripts++] = newscript; 
    633633 
    634634    newscript = new Script; 
    635635    newscript->Name="do_nothing"; 
    636636    newscript->GetAI = GetAI_do_nothing; 
    637     newscript->RegisterSelf(); 
     637    m_scripts[nrscripts++] = newscript; 
    638638 
    639639    newscript = new Script; 
    640640    newscript->Name="mob_zuljin_vortex"; 
    641641    newscript->GetAI = GetAI_feather_vortexAI; 
    642     newscript->RegisterSelf(); 
     642    m_scripts[nrscripts++] = newscript; 
    643643} 
  • trunk/src/bindings/scripts/scripts/zone/zulaman/instance_zulaman.cpp

    r270 r272  
    140140    void OpenDoor(uint64 DoorGUID, bool open) 
    141141    { 
    142         if(GameObject *Door = instance->GetGameObjectInMap(DoorGUID)) 
    143             Door->SetUInt32Value(GAMEOBJECT_STATE, open ? 0 : 1); 
     142        if(((InstanceMap*)instance)->GetPlayers().size()) 
     143            if(Player* first = ((InstanceMap*)instance)->GetPlayers().front()) 
     144                if(GameObject *Door = GameObject::GetGameObject(*first, DoorGUID)) 
     145                    Door->SetUInt32Value(GAMEOBJECT_STATE, open ? 0 : 1); 
    144146    } 
    145147 
    146148    void SummonHostage(uint8 num) 
    147149    { 
    148         if(!QuestMinute) 
    149             return; 
    150  
    151         Map::PlayerList const &PlayerList = instance->GetPlayers(); 
    152         if (PlayerList.isEmpty()) 
    153             return; 
    154  
    155         Map::PlayerList::const_iterator i = PlayerList.begin(); 
    156         if(Player* i_pl = i->getSource()) 
    157         { 
    158             if(Unit* Hostage = i_pl->SummonCreature(HostageInfo[num].npc, HostageInfo[num].x, HostageInfo[num].y, HostageInfo[num].z, HostageInfo[num].o, TEMPSUMMON_DEAD_DESPAWN, 0)) 
    159             { 
    160                 Hostage->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); 
    161                 Hostage->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); 
    162             } 
    163         } 
     150        if(QuestMinute && ((InstanceMap*)instance)->GetPlayers().size()) 
     151            if(Player* first = ((InstanceMap*)instance)->GetPlayers().front()) 
     152                if(Unit* Hostage = first->SummonCreature(HostageInfo[num].npc, HostageInfo[num].x, HostageInfo[num].y, HostageInfo[num].z, HostageInfo[num].o, TEMPSUMMON_DEAD_DESPAWN, 0)) 
     153                { 
     154                    Hostage->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); 
     155                    Hostage->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); 
     156                } 
    164157    } 
    165158 
     
    177170        WorldPacket data(SMSG_UPDATE_WORLD_STATE, 8); 
    178171        data << field << value; 
    179         instance->SendToPlayers(&data); 
     172        ((InstanceMap*)instance)->SendToPlayers(&data); 
    180173    } 
    181174 
     
    329322    newscript->Name = "instance_zulaman"; 
    330323    newscript->GetInstanceData = GetInstanceData_instance_zulaman; 
    331     newscript->RegisterSelf(); 
     324    m_scripts[nrscripts++] = newscript; 
    332325} 
  • trunk/src/bindings/scripts/scripts/zone/zulaman/zulaman.cpp

    r260 r272  
    172172    newscript->Name="npc_forest_frog"; 
    173173    newscript->GetAI = GetAI_npc_forest_frog; 
    174     newscript->RegisterSelf(); 
     174    m_scripts[nrscripts++] = newscript; 
    175175 
    176176    newscript = new Script; 
     
    179179    newscript->pGossipHello = GossipHello_npc_zulaman_hostage; 
    180180    newscript->pGossipSelect = GossipSelect_npc_zulaman_hostage; 
    181     newscript->RegisterSelf(); 
     181    m_scripts[nrscripts++] = newscript; 
    182182} 
  • trunk/src/bindings/scripts/scripts/zone/zulfarrak/zulfarrak.cpp

    r260 r272  
    214214    newscript->pGossipHello =  &GossipHello_npc_sergeant_bly; 
    215215    newscript->pGossipSelect = &GossipSelect_npc_sergeant_bly; 
    216     newscript->RegisterSelf(); 
     216    m_scripts[nrscripts++] = newscript; 
    217217 
    218218    newscript = new Script; 
     
    221221    newscript->pGossipHello =  &GossipHello_npc_weegli_blastfuse; 
    222222    newscript->pGossipSelect = &GossipSelect_npc_weegli_blastfuse; 
    223     newscript->RegisterSelf(); 
    224 } 
     223    m_scripts[nrscripts++] = newscript; 
     224} 
  • trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_arlokk.cpp

    r260 r272  
    208208    newscript->Name="boss_arlokk"; 
    209209    newscript->GetAI = GetAI_boss_arlokk; 
    210     newscript->RegisterSelf(); 
     210    m_scripts[nrscripts++] = newscript; 
    211211} 
  • trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_gahzranka.cpp

    r260 r272  
    8989    newscript->Name="boss_gahzranka"; 
    9090    newscript->GetAI = GetAI_boss_gahzranka; 
    91     newscript->RegisterSelf(); 
     91    m_scripts[nrscripts++] = newscript; 
    9292} 
  • trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_grilek.cpp

    r260 r272  
    8989    newscript->Name="boss_grilek"; 
    9090    newscript->GetAI = GetAI_boss_grilek; 
    91     newscript->RegisterSelf(); 
     91    m_scripts[nrscripts++] = newscript; 
    9292} 
  • trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_hakkar.cpp

    r260 r272  
    253253    newscript->Name="boss_hakkar"; 
    254254    newscript->GetAI = GetAI_boss_hakkar; 
    255     newscript->RegisterSelf(); 
     255    m_scripts[nrscripts++] = newscript; 
    256256} 
  • trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_hazzarah.cpp

    r260 r272  
    9797    newscript->Name="boss_hazzarah"; 
    9898    newscript->GetAI = GetAI_boss_hazzarah; 
    99     newscript->RegisterSelf(); 
     99    m_scripts[nrscripts++] = newscript; 
    100100} 
  • trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_jeklik.cpp

    r260 r272  
    289289    newscript->Name="boss_jeklik"; 
    290290    newscript->GetAI = GetAI_boss_jeklik; 
    291     newscript->RegisterSelf(); 
     291    m_scripts[nrscripts++] = newscript; 
    292292 
    293293    newscript = new Script; 
    294294    newscript->Name="mob_batrider"; 
    295295    newscript->GetAI = GetAI_mob_batrider; 
    296     newscript->RegisterSelf(); 
     296    m_scripts[nrscripts++] = newscript; 
    297297} 
  • trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_jindo.cpp

    r260 r272  
    259259    newscript->Name="boss_jindo"; 
    260260    newscript->GetAI = GetAI_boss_jindo; 
    261     newscript->RegisterSelf(); 
     261    m_scripts[nrscripts++] = newscript; 
    262262 
    263263    newscript = new Script; 
    264264    newscript->Name="mob_healing_ward"; 
    265265    newscript->GetAI = GetAI_mob_healing_ward; 
    266     newscript->RegisterSelf(); 
     266    m_scripts[nrscripts++] = newscript; 
    267267 
    268268    newscript = new Script; 
    269269    newscript->Name="mob_shade_of_jindo"; 
    270270    newscript->GetAI = GetAI_mob_shade_of_jindo; 
    271     newscript->RegisterSelf(); 
    272 } 
     271    m_scripts[nrscripts++] = newscript; 
     272} 
  • trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_mandokir.cpp

    r260 r272  
    303303    newscript->Name="boss_mandokir"; 
    304304    newscript->GetAI = GetAI_boss_mandokir; 
    305     newscript->RegisterSelf(); 
     305    m_scripts[nrscripts++] = newscript; 
    306306 
    307307    newscript = new Script; 
    308308    newscript->Name="mob_ohgan"; 
    309309    newscript->GetAI = GetAI_mob_ohgan; 
    310     newscript->RegisterSelf(); 
     310    m_scripts[nrscripts++] = newscript; 
    311311} 
  • trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_marli.cpp

    r260 r272  
    245245    newscript->Name="boss_marli"; 
    246246    newscript->GetAI = GetAI_boss_marli; 
    247     newscript->RegisterSelf(); 
     247    m_scripts[nrscripts++] = newscript; 
    248248 
    249249    newscript = new Script; 
    250250    newscript->Name="mob_spawn_of_marli"; 
    251251    newscript->GetAI = GetAI_mob_spawn_of_marli; 
    252     newscript->RegisterSelf(); 
     252    m_scripts[nrscripts++] = newscript; 
    253253} 
  • trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_renataki.cpp

    r260 r272  
    148148    newscript->Name="boss_renataki"; 
    149149    newscript->GetAI = GetAI_boss_renataki; 
    150     newscript->RegisterSelf(); 
     150    m_scripts[nrscripts++] = newscript; 
    151151} 
  • trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_thekal.cpp

    r260 r272  
    532532    newscript->Name="boss_thekal"; 
    533533    newscript->GetAI = GetAI_boss_thekal; 
    534     newscript->RegisterSelf(); 
     534    m_scripts[nrscripts++] = newscript; 
    535535 
    536536    newscript = new Script; 
    537537    newscript->Name="mob_zealot_lorkhan"; 
    538538    newscript->GetAI = GetAI_mob_zealot_lorkhan; 
    539     newscript->RegisterSelf(); 
     539    m_scripts[nrscripts++] = newscript; 
    540540 
    541541    newscript = new Script; 
    542542    newscript->Name="mob_zealot_zath"; 
    543543    newscript->GetAI = GetAI_mob_zealot_zath; 
    544     newscript->RegisterSelf(); 
     544    m_scripts[nrscripts++] = newscript; 
    545545} 
  • trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_venoxis.cpp

    r260 r272  
    197197    newscript->Name="boss_venoxis"; 
    198198    newscript->GetAI = GetAI_boss_venoxis; 
    199     newscript->RegisterSelf(); 
     199    m_scripts[nrscripts++] = newscript; 
    200200} 
  • trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_wushoolay.cpp

    r260 r272  
    8181    newscript->Name="boss_wushoolay"; 
    8282    newscript->GetAI = GetAI_boss_wushoolay; 
    83     newscript->RegisterSelf(); 
     83    m_scripts[nrscripts++] = newscript; 
    8484} 
  • trunk/src/bindings/scripts/scripts/zone/zulgurub/instance_zulgurub.cpp

    r260 r272  
    235235    newscript->Name = "instance_zulgurub"; 
    236236    newscript->GetInstanceData = GetInstanceData_instance_zulgurub; 
    237     newscript->RegisterSelf(); 
     237    m_scripts[nrscripts++] = newscript; 
    238238}