Changeset 260
- Timestamp:
- 11/21/08 08:47:55 (17 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 352 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bindings/scripts/ScriptMgr.cpp
r223 r260 18 18 19 19 //*** Global data *** 20 int nrscripts; 20 int num_db_scripts; 21 int num_sc_scripts; 21 22 Script *m_scripts[MAX_SCRIPTS]; 22 23 … … 47 48 // Text Maps 48 49 UNORDERED_MAP<int32, StringTextData> TextMap; 49 50 50 51 51 //*** End Global data *** … … 1181 1181 TRINITY_DLL_EXPORT 1182 1182 void ScriptsFree() 1183 { 1183 { 1184 1184 // Free Spell Summary 1185 1185 delete []SpellSummary; 1186 1186 1187 1187 // Free resources before library unload 1188 for(int i=0;i<n rscripts;i++)1188 for(int i=0;i<num_db_scripts;i++) 1189 1189 delete m_scripts[i]; 1190 1190 1191 nrscripts = 0; 1191 num_db_scripts = 0; 1192 num_sc_scripts = 0; 1192 1193 } 1193 1194 … … 1240 1241 LoadDatabase(); 1241 1242 1243 num_db_scripts = GetScriptNames().size(); 1244 1242 1245 outstring_log("TSCR: Loading C++ scripts"); 1243 1246 barGoLink bar(1); … … 1245 1248 outstring_log(""); 1246 1249 1247 nrscripts = 0;1248 1250 for(int i=0;i<MAX_SCRIPTS;i++) 1249 1251 m_scripts[i]=NULL; … … 1776 1778 // ------------------- 1777 1779 1778 outstring_log("TSCR: Loaded %u C++ Scripts", nrscripts); 1779 outstring_log(""); 1780 outstring_log(">> Loaded %i C++ Scripts (of %i ScriptNames defined in Mangos database)", num_sc_scripts, num_db_scripts); 1780 1781 } 1781 1782 … … 1849 1850 //*** Functions used internally *** 1850 1851 1851 TRINITY_DLL_EXPORT 1852 char const* ScriptsVersion() 1853 { 1854 return "Default Trinity scripting library"; 1855 } 1856 1857 Script* GetScriptByName(std::string Name) 1858 { 1859 if (Name.empty()) 1860 return NULL; 1861 1862 for(int i=0;i<MAX_SCRIPTS;i++) 1863 { 1864 if (m_scripts[i] && m_scripts[i]->Name == Name) 1865 return m_scripts[i]; 1866 } 1867 return NULL; 1852 void Script::RegisterSelf() 1853 { 1854 int id = GetScriptId(Name.c_str()); 1855 if (id != 0) 1856 { 1857 m_scripts[id] = this; 1858 ++num_sc_scripts; 1859 } else 1860 debug_log("SD2: RegisterSelf, but script named %s does not have ScriptName assigned in database.",(this)->Name.c_str()); 1868 1861 } 1869 1862 … … 1872 1865 1873 1866 TRINITY_DLL_EXPORT 1867 char const* ScriptsVersion() 1868 { 1869 return "Default Trinity scripting library"; 1870 } 1871 TRINITY_DLL_EXPORT 1874 1872 bool GossipHello ( Player * player, Creature *_Creature ) 1875 1873 { 1876 Script *tmpscript = GetScriptByName(_Creature->GetScriptName());1874 Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 1877 1875 if (!tmpscript || !tmpscript->pGossipHello) return false; 1878 1876 … … 1886 1884 debug_log("TSCR: Gossip selection, sender: %d, action: %d",sender, action); 1887 1885 1888 Script *tmpscript = GetScriptByName(_Creature->GetScriptName());1886 Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 1889 1887 if (!tmpscript || !tmpscript->pGossipSelect) return false; 1890 1888 … … 1898 1896 debug_log("TSCR: Gossip selection with code, sender: %d, action: %d",sender, action); 1899 1897 1900 Script *tmpscript = GetScriptByName(_Creature->GetScriptName());1898 Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 1901 1899 if (!tmpscript || !tmpscript->pGossipSelectWithCode) return false; 1902 1900 … … 1908 1906 bool QuestAccept( Player *player, Creature *_Creature, Quest const *_Quest ) 1909 1907 { 1910 Script *tmpscript = GetScriptByName(_Creature->GetScriptName());1908 Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 1911 1909 if (!tmpscript || !tmpscript->pQuestAccept) return false; 1912 1910 … … 1918 1916 bool QuestSelect( Player *player, Creature *_Creature, Quest const *_Quest ) 1919 1917 { 1920 Script *tmpscript = GetScriptByName(_Creature->GetScriptName());1918 Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 1921 1919 if (!tmpscript || !tmpscript->pQuestSelect) return false; 1922 1920 … … 1928 1926 bool QuestComplete( Player *player, Creature *_Creature, Quest const *_Quest ) 1929 1927 { 1930 Script *tmpscript = GetScriptByName(_Creature->GetScriptName());1928 Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 1931 1929 if (!tmpscript || !tmpscript->pQuestComplete) return false; 1932 1930 … … 1938 1936 bool ChooseReward( Player *player, Creature *_Creature, Quest const *_Quest, uint32 opt ) 1939 1937 { 1940 Script *tmpscript = GetScriptByName(_Creature->GetScriptName());1938 Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 1941 1939 if (!tmpscript || !tmpscript->pChooseReward) return false; 1942 1940 … … 1948 1946 uint32 NPCDialogStatus( Player *player, Creature *_Creature ) 1949 1947 { 1950 Script *tmpscript = GetScriptByName(_Creature->GetScriptName());1948 Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 1951 1949 if (!tmpscript || !tmpscript->pNPCDialogStatus) return 100; 1952 1950 … … 1958 1956 uint32 GODialogStatus( Player *player, GameObject *_GO ) 1959 1957 { 1960 Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName);1961 if (!tmpscript || !tmpscript->pGODialogStatus) return 100;1958 Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId]; 1959 if (!tmpscript || !tmpscript->pGODialogStatus) return 100; 1962 1960 1963 1961 player->PlayerTalkClass->ClearMenus(); … … 1968 1966 bool ItemHello( Player *player, Item *_Item, Quest const *_Quest ) 1969 1967 { 1970 Script *tmpscript = GetScriptByName(_Item->GetProto()->ScriptName);1968 Script *tmpscript = m_scripts[_Item->GetProto()->ScriptId]; 1971 1969 if (!tmpscript || !tmpscript->pItemHello) return false; 1972 1970 … … 1978 1976 bool ItemQuestAccept( Player *player, Item *_Item, Quest const *_Quest ) 1979 1977 { 1980 Script *tmpscript = GetScriptByName(_Item->GetProto()->ScriptName);1978 Script *tmpscript = m_scripts[_Item->GetProto()->ScriptId]; 1981 1979 if (!tmpscript || !tmpscript->pItemQuestAccept) return false; 1982 1980 … … 1988 1986 bool GOHello( Player *player, GameObject *_GO ) 1989 1987 { 1990 Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName);1988 Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId]; 1991 1989 if (!tmpscript || !tmpscript->pGOHello) return false; 1992 1990 … … 1998 1996 bool GOQuestAccept( Player *player, GameObject *_GO, Quest const *_Quest ) 1999 1997 { 2000 Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName);1998 Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId]; 2001 1999 if (!tmpscript || !tmpscript->pGOQuestAccept) return false; 2002 2000 … … 2008 2006 bool GOChooseReward( Player *player, GameObject *_GO, Quest const *_Quest, uint32 opt ) 2009 2007 { 2010 Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName);2008 Script *tmpscript = m_scripts[_GO->GetGOInfo()->ScriptId]; 2011 2009 if (!tmpscript || !tmpscript->pGOChooseReward) return false; 2012 2010 … … 2018 2016 bool AreaTrigger( Player *player, AreaTriggerEntry * atEntry) 2019 2017 { 2020 Script *tmpscript = NULL; 2021 2022 tmpscript = GetScriptByName(GetAreaTriggerScriptNameById(atEntry->id)); 2018 Script *tmpscript = m_scripts[GetAreaTriggerScriptId(atEntry->id)]; 2023 2019 if (!tmpscript || !tmpscript->pAreaTrigger) return false; 2024 2020 … … 2029 2025 CreatureAI* GetAI(Creature *_Creature) 2030 2026 { 2031 Script *tmpscript = GetScriptByName(_Creature->GetScriptName()); 2032 2027 Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 2033 2028 if (!tmpscript || !tmpscript->GetAI) return NULL; 2029 2034 2030 return tmpscript->GetAI(_Creature); 2035 2031 } … … 2038 2034 bool ItemUse( Player *player, Item* _Item, SpellCastTargets const& targets) 2039 2035 { 2040 Script *tmpscript = GetScriptByName(_Item->GetProto()->ScriptName);2036 Script *tmpscript = m_scripts[_Item->GetProto()->ScriptId]; 2041 2037 if (!tmpscript || !tmpscript->pItemUse) return false; 2042 2038 … … 2047 2043 bool ReceiveEmote( Player *player, Creature *_Creature, uint32 emote ) 2048 2044 { 2049 Script *tmpscript = GetScriptByName(_Creature->GetScriptName());2045 Script *tmpscript = m_scripts[_Creature->GetScriptId()]; 2050 2046 if (!tmpscript || !tmpscript->pReceiveEmote) return false; 2051 2047 … … 2056 2052 InstanceData* CreateInstanceData(Map *map) 2057 2053 { 2058 Script *tmpscript = NULL; 2059 2060 if (!map->IsDungeon()) return false; 2061 2062 tmpscript = GetScriptByName(((InstanceMap*)map)->GetScript()); 2063 if (!tmpscript || !tmpscript->GetInstanceData) return false; 2054 if (!map->IsDungeon()) return NULL; 2055 2056 Script *tmpscript = m_scripts[((InstanceMap*)map)->GetScriptId()]; 2057 if (!tmpscript || !tmpscript->GetInstanceData) return NULL; 2064 2058 2065 2059 return tmpscript->GetInstanceData(map); -
trunk/src/bindings/scripts/ScriptMgr.h
r149 r260 25 25 class WorldObject; 26 26 27 #define MAX_SCRIPTS 1000 //72 bytes each (approx 71kb)27 #define MAX_SCRIPTS 5000 //72 bytes each (approx 351kb) 28 28 #define VISIBLE_RANGE (166.0f) //MAX visible range (size of grid) 29 29 #define DEFAULT_TEXT "<Trinity Script Text Entry Missing!>" … … 32 32 { 33 33 Script() : 34 pGossipHello(NULL), pQuestAccept(NULL), pGossipSelect(NULL), pGossipSelectWithCode(NULL),35 pQuestSelect(NULL), pQuestComplete(NULL), pNPCDialogStatus(NULL), pGODialogStatus(NULL), pChooseReward(NULL),36 pItemHello(NULL), pGOHello(NULL), pAreaTrigger(NULL), pItemQuestAccept(NULL), pGOQuestAccept(NULL),37 pGOChooseReward(NULL),pReceiveEmote(NULL),pItemUse(NULL), GetAI(NULL), GetInstanceData(NULL)38 {}34 pGossipHello(NULL), pQuestAccept(NULL), pGossipSelect(NULL), pGossipSelectWithCode(NULL), 35 pQuestSelect(NULL), pQuestComplete(NULL), pNPCDialogStatus(NULL), pGODialogStatus(NULL), pChooseReward(NULL), 36 pItemHello(NULL), pGOHello(NULL), pAreaTrigger(NULL), pItemQuestAccept(NULL), pGOQuestAccept(NULL), 37 pGOChooseReward(NULL),pReceiveEmote(NULL),pItemUse(NULL), GetAI(NULL), GetInstanceData(NULL) 38 {} 39 39 40 std::string Name;40 std::string Name; 41 41 42 // Quest/gossipMethods to be scripted43 bool (*pGossipHello )(Player*, Creature*);44 bool (*pQuestAccept )(Player*, Creature*, Quest const* );45 bool (*pGossipSelect )(Player*, Creature*, uint32 , uint32);46 bool (*pGossipSelectWithCode)(Player*, Creature*, uint32 , uint32 , const char* );47 bool (*pQuestSelect )(Player*, Creature*, Quest const* );48 bool (*pQuestComplete )(Player*, Creature*, Quest const* );49 uint32 (*pNPCDialogStatus )(Player*, Creature* );50 uint32 (*pGODialogStatus )(Player *player, GameObject * _GO );51 bool (*pChooseReward )(Player*, Creature*, Quest const*, uint32 );52 bool (*pItemHello )(Player*, Item*, Quest const* );53 bool (*pGOHello )(Player*, GameObject* );54 bool (*pAreaTrigger )(Player*, AreaTriggerEntry* );55 bool (*pItemQuestAccept )(Player*, Item *, Quest const* );56 bool (*pGOQuestAccept )(Player*, GameObject*, Quest const* );57 bool (*pGOChooseReward )(Player*, GameObject*_GO, Quest const*, uint32 );58 bool (*pReceiveEmote )(Player*, Creature*, uint32 );59 bool (*pItemUse )(Player*, Item*, SpellCastTargets const& );42 //Methods to be scripted 43 bool (*pGossipHello )(Player*, Creature*); 44 bool (*pQuestAccept )(Player*, Creature*, Quest const* ); 45 bool (*pGossipSelect )(Player*, Creature*, uint32 , uint32 ); 46 bool (*pGossipSelectWithCode)(Player*, Creature*, uint32 , uint32 , const char* ); 47 bool (*pQuestSelect )(Player*, Creature*, Quest const* ); 48 bool (*pQuestComplete )(Player*, Creature*, Quest const* ); 49 uint32 (*pNPCDialogStatus )(Player*, Creature* ); 50 uint32 (*pGODialogStatus )(Player*, GameObject * _GO ); 51 bool (*pChooseReward )(Player*, Creature*, Quest const*, uint32 ); 52 bool (*pItemHello )(Player*, Item*, Quest const* ); 53 bool (*pGOHello )(Player*, GameObject* ); 54 bool (*pAreaTrigger )(Player*, AreaTriggerEntry* ); 55 bool (*pItemQuestAccept )(Player*, Item *, Quest const* ); 56 bool (*pGOQuestAccept )(Player*, GameObject*, Quest const* ); 57 bool (*pGOChooseReward )(Player*, GameObject*, Quest const*, uint32 ); 58 bool (*pReceiveEmote )(Player*, Creature*, uint32 ); 59 bool (*pItemUse )(Player*, Item*, SpellCastTargets const& ); 60 60 61 CreatureAI* (*GetAI)(Creature*); 62 InstanceData* (*GetInstanceData)(Map*); 61 CreatureAI* (*GetAI)(Creature*); 62 InstanceData* (*GetInstanceData)(Map*); 63 64 void RegisterSelf(); 63 65 }; 64 65 extern int nrscripts;66 extern Script *m_scripts[MAX_SCRIPTS];67 66 68 67 //Generic scripting text function -
trunk/src/bindings/scripts/scripts/areatrigger/areatrigger_scripts.cpp
r90 r260 41 41 newscript->Name="at_test"; 42 42 newscript->pAreaTrigger = ATtest; 43 m_scripts[nrscripts++] = newscript;43 newscript->RegisterSelf(); 44 44 } -
trunk/src/bindings/scripts/scripts/boss/boss_emeriss.cpp
r90 r260 153 153 newscript->Name="boss_emeriss"; 154 154 newscript->GetAI = GetAI_boss_emeriss; 155 m_scripts[nrscripts++] = newscript;155 newscript->RegisterSelf(); 156 156 } -
trunk/src/bindings/scripts/scripts/boss/boss_taerar.cpp
r90 r260 298 298 newscript->Name="boss_taerar"; 299 299 newscript->GetAI = GetAI_boss_taerar; 300 m_scripts[nrscripts++] = newscript;300 newscript->RegisterSelf(); 301 301 302 302 newscript = new Script; 303 303 newscript->Name="boss_shade_of_taerar"; 304 304 newscript->GetAI = GetAI_boss_shadeoftaerar; 305 m_scripts[nrscripts++] = newscript;305 newscript->RegisterSelf(); 306 306 } -
trunk/src/bindings/scripts/scripts/boss/boss_ysondre.cpp
r90 r260 238 238 newscript->Name="boss_ysondre"; 239 239 newscript->GetAI = GetAI_boss_ysondre; 240 m_scripts[nrscripts++] = newscript;240 newscript->RegisterSelf(); 241 241 242 242 newscript = new Script; 243 243 newscript->Name="mob_dementeddruids"; 244 244 newscript->GetAI = GetAI_mob_dementeddruids; 245 m_scripts[nrscripts++] = newscript;245 newscript->RegisterSelf(); 246 246 } -
trunk/src/bindings/scripts/scripts/creature/mob_event_ai.cpp
r239 r260 1401 1401 newscript->Name="mob_eventai"; 1402 1402 newscript->GetAI = GetAI_Mob_EventAI; 1403 m_scripts[nrscripts++] = newscript;1403 newscript->RegisterSelf(); 1404 1404 } -
trunk/src/bindings/scripts/scripts/creature/mob_generic_creature.cpp
r158 r260 169 169 newscript->Name="generic_creature"; 170 170 newscript->GetAI = GetAI_generic_creature; 171 m_scripts[nrscripts++] = newscript;171 newscript->RegisterSelf(); 172 172 } -
trunk/src/bindings/scripts/scripts/custom/custom_example.cpp
r90 r260 274 274 newscript->pGossipSelect = &GossipSelect_custom_example; 275 275 newscript->pReceiveEmote = &ReceiveEmote_custom_example; 276 m_scripts[nrscripts++] = newscript;277 } 276 newscript->RegisterSelf(); 277 } -
trunk/src/bindings/scripts/scripts/custom/custom_gossip_codebox.cpp
r90 r260 78 78 newscript->pGossipSelect = &GossipSelect_custom_gossip_codebox; 79 79 newscript->pGossipSelectWithCode = &GossipSelectWithCode_custom_gossip_codebox; 80 m_scripts[nrscripts++] = newscript;80 newscript->RegisterSelf(); 81 81 } -
trunk/src/bindings/scripts/scripts/custom/test.cpp
r90 r260 197 197 newscript->pGossipHello = &GossipHello_npc_test; 198 198 newscript->pGossipSelect = &GossipSelect_npc_test; 199 m_scripts[nrscripts++] = newscript;200 } 199 newscript->RegisterSelf(); 200 } -
trunk/src/bindings/scripts/scripts/go/go_scripts.cpp
r239 r260 166 166 newscript->Name="go_northern_crystal_pylon"; 167 167 newscript->pGOHello = &GOHello_go_northern_crystal_pylon; 168 m_scripts[nrscripts++] = newscript;168 newscript->RegisterSelf(); 169 169 170 170 newscript = new Script; 171 171 newscript->Name="go_eastern_crystal_pylon"; 172 172 newscript->pGOHello = &GOHello_go_eastern_crystal_pylon; 173 m_scripts[nrscripts++] = newscript;173 newscript->RegisterSelf(); 174 174 175 175 newscript = new Script; 176 176 newscript->Name="go_western_crystal_pylon"; 177 177 newscript->pGOHello = &GOHello_go_western_crystal_pylon; 178 m_scripts[nrscripts++] = newscript;178 newscript->RegisterSelf(); 179 179 180 180 newscript = new Script; 181 181 newscript->Name="go_barov_journal"; 182 182 newscript->pGOHello = &GOHello_go_barov_journal; 183 m_scripts[nrscripts++] = newscript;183 newscript->RegisterSelf(); 184 184 185 185 newscript = new Script; 186 186 newscript->Name="go_field_repair_bot_74A"; 187 187 newscript->pGOHello = &GOHello_go_field_repair_bot_74A; 188 m_scripts[nrscripts++] = newscript;188 newscript->RegisterSelf(); 189 189 190 190 newscript = new Script; 191 191 newscript->Name="go_orb_of_command"; 192 192 newscript->pGOHello = &GOHello_go_orb_of_command; 193 m_scripts[nrscripts++] = newscript;193 newscript->RegisterSelf(); 194 194 195 195 newscript = new Script; 196 196 newscript->Name="go_tablet_of_madness"; 197 197 newscript->pGOHello = &GOHello_go_tablet_of_madness; 198 m_scripts[nrscripts++] = newscript;198 newscript->RegisterSelf(); 199 199 200 200 newscript = new Script; 201 201 newscript->Name="go_tablet_of_the_seven"; 202 202 newscript->pGOHello = &GOHello_go_tablet_of_the_seven; 203 m_scripts[nrscripts++] = newscript;203 newscript->RegisterSelf(); 204 204 205 205 newscript = new Script; 206 206 newscript->Name="go_teleporter"; 207 207 newscript->pGOHello = &GOHello_go_teleporter; 208 m_scripts[nrscripts++] = newscript;209 } 208 newscript->RegisterSelf(); 209 } -
trunk/src/bindings/scripts/scripts/guard/guards.cpp
r159 r260 3981 3981 newscript->pGossipSelect = &GossipSelect_guard_azuremyst; 3982 3982 newscript->GetAI = GetAI_guard_azuremyst; 3983 m_scripts[nrscripts++] = newscript;3983 newscript->RegisterSelf(); 3984 3984 3985 3985 newscript = new Script; … … 3988 3988 newscript->pGossipSelect = &GossipSelect_guard_bluffwatcher; 3989 3989 newscript->GetAI = GetAI_guard_bluffwatcher; 3990 m_scripts[nrscripts++] = newscript;3990 newscript->RegisterSelf(); 3991 3991 3992 3992 newscript = new Script; 3993 3993 newscript->Name="guard_contested"; 3994 3994 newscript->GetAI = GetAI_guard_contested; 3995 m_scripts[nrscripts++] = newscript;3995 newscript->RegisterSelf(); 3996 3996 3997 3997 newscript = new Script; … … 4000 4000 newscript->pGossipSelect = &GossipSelect_guard_darnassus; 4001 4001 newscript->GetAI = GetAI_guard_darnassus; 4002 m_scripts[nrscripts++] = newscript;4002 newscript->RegisterSelf(); 4003 4003 4004 4004 newscript = new Script; … … 4007 4007 newscript->pGossipSelect = &GossipSelect_guard_dunmorogh; 4008 4008 newscript->GetAI = GetAI_guard_dunmorogh; 4009 m_scripts[nrscripts++] = newscript;4009 newscript->RegisterSelf(); 4010 4010 4011 4011 newscript = new Script; … … 4014 4014 newscript->pGossipSelect = &GossipSelect_guard_durotar; 4015 4015 newscript->GetAI = GetAI_guard_durotar; 4016 m_scripts[nrscripts++] = newscript;4016 newscript->RegisterSelf(); 4017 4017 4018 4018 newscript = new Script; … … 4021 4021 newscript->pGossipSelect = &GossipSelect_guard_elwynnforest; 4022 4022 newscript->GetAI = GetAI_guard_elwynnforest; 4023 m_scripts[nrscripts++] = newscript;4023 newscript->RegisterSelf(); 4024 4024 4025 4025 newscript = new Script; … … 4028 4028 newscript->pGossipSelect = &GossipSelect_guard_eversong; 4029 4029 newscript->GetAI = GetAI_guard_eversong; 4030 m_scripts[nrscripts++] = newscript;4030 newscript->RegisterSelf(); 4031 4031 4032 4032 newscript = new Script; … … 4035 4035 newscript->pGossipSelect = &GossipSelect_guard_exodar; 4036 4036 newscript->GetAI = GetAI_guard_exodar; 4037 m_scripts[nrscripts++] = newscript;4037 newscript->RegisterSelf(); 4038 4038 4039 4039 newscript = new Script; … … 4042 4042 newscript->pGossipSelect = &GossipSelect_guard_ironforge; 4043 4043 newscript->GetAI = GetAI_guard_ironforge; 4044 m_scripts[nrscripts++] = newscript;4044 newscript->RegisterSelf(); 4045 4045 4046 4046 newscript = new Script; … … 4049 4049 newscript->pGossipSelect = &GossipSelect_guard_mulgore; 4050 4050 newscript->GetAI = GetAI_guard_mulgore; 4051 m_scripts[nrscripts++] = newscript;4051 newscript->RegisterSelf(); 4052 4052 4053 4053 newscript = new Script; … … 4057 4057 newscript->pReceiveEmote = &ReceiveEmote_guard_orgrimmar; 4058 4058 newscript->GetAI = GetAI_guard_orgrimmar; 4059 m_scripts[nrscripts++] = newscript;4059 newscript->RegisterSelf(); 4060 4060 4061 4061 newscript = new Script; … … 4064 4064 newscript->pGossipSelect = &GossipSelect_guard_shattrath; 4065 4065 newscript->GetAI = GetAI_guard_shattrath; 4066 m_scripts[nrscripts++] = newscript;4066 newscript->RegisterSelf(); 4067 4067 4068 4068 newscript = new Script; … … 4071 4071 newscript->pGossipHello = &GossipHello_guard_shattrath_aldor; 4072 4072 newscript->pGossipSelect = &GossipSelect_guard_shattrath_aldor; 4073 m_scripts[nrscripts++] = newscript;4073 newscript->RegisterSelf(); 4074 4074 4075 4075 newscript = new Script; … … 4078 4078 newscript->pGossipHello = &GossipHello_guard_shattrath_scryer; 4079 4079 newscript->pGossipSelect = &GossipSelect_guard_shattrath_scryer; 4080 m_scripts[nrscripts++] = newscript;4080 newscript->RegisterSelf(); 4081 4081 4082 4082 newscript = new Script; … … 4085 4085 newscript->pGossipSelect = &GossipSelect_guard_silvermoon; 4086 4086 newscript->GetAI = GetAI_guard_silvermoon; 4087 m_scripts[nrscripts++] = newscript;4087 newscript->RegisterSelf(); 4088 4088 4089 4089 newscript = new Script; … … 4093 4093 newscript->pReceiveEmote = &ReceiveEmote_guard_stormwind; 4094 4094 newscript->GetAI = GetAI_guard_stormwind; 4095 m_scripts[nrscripts++] = newscript;4095 newscript->RegisterSelf(); 4096 4096 4097 4097 newscript = new Script; … … 4100 4100 newscript->pGossipSelect = &GossipSelect_guard_teldrassil; 4101 4101 newscript->GetAI = GetAI_guard_teldrassil; 4102 m_scripts[nrscripts++] = newscript;4102 newscript->RegisterSelf(); 4103 4103 4104 4104 newscript = new Script; … … 4107 4107 newscript->pGossipSelect = &GossipSelect_guard_tirisfal; 4108 4108 newscript->GetAI = GetAI_guard_tirisfal; 4109 m_scripts[nrscripts++] = newscript;4109 newscript->RegisterSelf(); 4110 4110 4111 4111 newscript = new Script; … … 4114 4114 newscript->pGossipSelect = &GossipSelect_guard_undercity; 4115 4115 newscript->GetAI = GetAI_guard_undercity; 4116 m_scripts[nrscripts++] = newscript;4117 } 4116 newscript->RegisterSelf(); 4117 } -
trunk/src/bindings/scripts/scripts/item/item_scripts.cpp
r105 r260 456 456 newscript->Name="item_area_52_special"; 457 457 newscript->pItemUse = ItemUse_item_area_52_special; 458 m_scripts[nrscripts++] = newscript;458 newscript->RegisterSelf(); 459 459 460 460 newscript = new Script; 461 461 newscript->Name="item_arcane_charges"; 462 462 newscript->pItemUse = ItemUse_item_arcane_charges; 463 m_scripts[nrscripts++] = newscript;463 newscript->RegisterSelf(); 464 464 465 465 newscript = new Script; 466 466 newscript->Name="item_attuned_crystal_cores"; 467 467 newscript->pItemUse = ItemUse_item_attuned_crystal_cores; 468 m_scripts[nrscripts++] = newscript;468 newscript->RegisterSelf(); 469 469 470 470 newscript = new Script; 471 471 newscript->Name="item_blackwhelp_net"; 472 472 newscript->pItemUse = ItemUse_item_blackwhelp_net; 473 m_scripts[nrscripts++] = newscript;473 newscript->RegisterSelf(); 474 474 475 475 newscript = new Script; 476 476 newscript->Name="item_disciplinary_rod"; 477 477 newscript->pItemUse = ItemUse_item_disciplinary_rod; 478 m_scripts[nrscripts++] = newscript;478 newscript->RegisterSelf(); 479 479 480 480 newscript = new Script; 481 481 newscript->Name="item_draenei_fishing_net"; 482 482 newscript->pItemUse = ItemUse_item_draenei_fishing_net; 483 m_scripts[nrscripts++] = newscript;483 newscript->RegisterSelf(); 484 484 485 485 newscript = new Script; 486 486 newscript->Name="item_nether_wraith_beacon"; 487 487 newscript->pItemUse = ItemUse_item_nether_wraith_beacon; 488 m_scripts[nrscripts++] = newscript;488 newscript->RegisterSelf(); 489 489 490 490 newscript = new Script; 491 491 newscript->Name="item_flying_machine"; 492 492 newscript->pItemUse = ItemUse_item_flying_machine; 493 m_scripts[nrscripts++] = newscript;493 newscript->RegisterSelf(); 494 494 495 495 newscript = new Script; 496 496 newscript->Name="item_gor_dreks_ointment"; 497 497 newscript->pItemUse = ItemUse_item_gor_dreks_ointment; 498 m_scripts[nrscripts++] = newscript;498 newscript->RegisterSelf(); 499 499 500 500 newscript = new Script; 501 501 newscript->Name="item_muiseks_vessel"; 502 502 newscript->pItemUse = ItemUse_item_muiseks_vessel; 503 m_scripts[nrscripts++] = newscript;503 newscript->RegisterSelf(); 504 504 505 505 newscript = new Script; 506 506 newscript->Name="item_razorthorn_flayer_gland"; 507 507 newscript->pItemUse = ItemUse_item_razorthorn_flayer_gland; 508 m_scripts[nrscripts++] = newscript;508 newscript->RegisterSelf(); 509 509 510 510 newscript = new Script; 511 511 newscript->Name="item_tame_beast_rods"; 512 512 newscript->pItemUse = ItemUse_item_tame_beast_rods; 513 m_scripts[nrscripts++] = newscript;513 newscript->RegisterSelf(); 514 514 515 515 newscript = new Script; 516 516 newscript->Name="item_protovoltaic_magneto_collector"; 517 517 newscript->pItemUse = ItemUse_item_protovoltaic_magneto_collector; 518 m_scripts[nrscripts++] = newscript;518 newscript->RegisterSelf(); 519 519 520 520 newscript = new Script; 521 521 newscript->Name="item_soul_cannon"; 522 522 newscript->pItemUse = ItemUse_item_soul_cannon; 523 m_scripts[nrscripts++] = newscript;523 newscript->RegisterSelf(); 524 524 525 525 newscript = new Script; 526 526 newscript->Name="item_sparrowhawk_net"; 527 527 newscript->pItemUse = ItemUse_item_sparrowhawk_net; 528 m_scripts[nrscripts++] = newscript;528 newscript->RegisterSelf(); 529 529 530 530 newscript = new Script; 531 531 newscript->Name="item_voodoo_charm"; 532 532 newscript->pItemUse = ItemUse_item_voodoo_charm; 533 m_scripts[nrscripts++] = newscript;533 newscript->RegisterSelf(); 534 534 535 535 newscript = new Script; 536 536 newscript->Name="item_vorenthals_presence"; 537 537 newscript->pItemUse = ItemUse_item_vorenthals_presence; 538 m_scripts[nrscripts++] = newscript;538 newscript->RegisterSelf(); 539 539 540 540 newscript = new Script; 541 541 newscript->Name="item_yehkinyas_bramble"; 542 542 newscript->pItemUse = ItemUse_item_yehkinyas_bramble; 543 m_scripts[nrscripts++] = newscript;543 newscript->RegisterSelf(); 544 544 545 545 newscript = new Script; 546 546 newscript->Name="item_zezzaks_shard"; 547 547 newscript->pItemUse = ItemUse_item_zezzak_shard; 548 m_scripts[nrscripts++] = newscript;549 } 548 newscript->RegisterSelf(); 549 } -
trunk/src/bindings/scripts/scripts/item/item_test.cpp
r90 r260 39 39 newscript->Name="item_test"; 40 40 newscript->pItemUse = ItemUse_item_test; 41 m_scripts[nrscripts++] = newscript;41 newscript->RegisterSelf(); 42 42 } -
trunk/src/bindings/scripts/scripts/npc/npc_innkeeper.cpp
r90 r260 141 141 newscript->pGossipHello = &GossipHello_npc_innkeeper; 142 142 newscript->pGossipSelect = &GossipSelect_npc_innkeeper; 143 m_scripts[nrscripts++] = newscript;143 newscript->RegisterSelf(); 144 144 } -
trunk/src/bindings/scripts/scripts/npc/npc_professions.cpp
r91 r260 1178 1178 newscript->pGossipHello = &GossipHello_npc_prof_alchemy; 1179 1179 newscript->pGossipSelect = &GossipSelect_npc_prof_alchemy; 1180 m_scripts[nrscripts++] = newscript;1180 newscript->RegisterSelf(); 1181 1181 1182 1182 newscript = new Script; … … 1184 1184 newscript->pGossipHello = &GossipHello_npc_prof_blacksmith; 1185 1185 newscript->pGossipSelect = &GossipSelect_npc_prof_blacksmith; 1186 m_scripts[nrscripts++] = newscript;1186 newscript->RegisterSelf(); 1187 1187 1188 1188 newscript = new Script; … … 1190 1190 newscript->pGossipHello = &GossipHello_npc_prof_leather; 1191 1191 newscript->pGossipSelect = &GossipSelect_npc_prof_leather; 1192 m_scripts[nrscripts++] = newscript;1192 newscript->RegisterSelf(); 1193 1193 1194 1194 newscript = new Script; … … 1196 1196 newscript->pGossipHello = &GossipHello_npc_prof_tailor; 1197 1197 newscript->pGossipSelect = &GossipSelect_npc_prof_tailor; 1198 m_scripts[nrscripts++] = newscript;1198 newscript->RegisterSelf(); 1199 1199 1200 1200 /*newscript = new Script; … … 1202 1202 newscript->pGOHello = &GOHello_go_soothsaying_for_dummies; 1203 1203 //newscript->pGossipSelect = &GossipSelect_go_soothsaying_for_dummies; 1204 m_scripts[nrscripts++] = newscript;*/1205 } 1204 newscript->RegisterSelf();*/ 1205 } -
trunk/src/bindings/scripts/scripts/npc/npcs_special.cpp
r90 r260 836 836 newscript->pQuestAccept = &QuestAccept_npc_chicken_cluck; 837 837 newscript->pQuestComplete = &QuestComplete_npc_chicken_cluck; 838 m_scripts[nrscripts++] = newscript;838 newscript->RegisterSelf(); 839 839 840 840 newscript = new Script; 841 841 newscript->Name="npc_dancing_flames"; 842 842 newscript->pReceiveEmote = &ReceiveEmote_npc_dancing_flames; 843 m_scripts[nrscripts++] = newscript;843 newscript->RegisterSelf(); 844 844 845 845 newscript = new Script; 846 846 newscript->Name="npc_injured_patient"; 847 847 newscript->GetAI = GetAI_npc_injured_patient; 848 m_scripts[nrscripts++] = newscript;848 newscript->RegisterSelf(); 849 849 850 850 newscript = new Script; … … 852 852 newscript->GetAI = GetAI_npc_doctor; 853 853 newscript->pQuestAccept = &QuestAccept_npc_doctor; 854 m_scripts[nrscripts++] = newscript;854 newscript->RegisterSelf(); 855 855 856 856 newscript = new Script; 857 857 newscript->Name="npc_guardian"; 858 858 newscript->GetAI = GetAI_npc_guardian; 859 m_scripts[nrscripts++] = newscript;859 newscript->RegisterSelf(); 860 860 861 861 newscript = new Script; … … 863 863 newscript->pGossipHello = &GossipHello_npc_mount_vendor; 864 864 newscript->pGossipSelect = &GossipSelect_npc_mount_vendor; 865 m_scripts[nrscripts++] = newscript;865 newscript->RegisterSelf(); 866 866 867 867 newscript = new Script; … … 869 869 newscript->pGossipHello = &GossipHello_npc_rogue_trainer; 870 870 newscript->pGossipSelect = &GossipSelect_npc_rogue_trainer; 871 m_scripts[nrscripts++] = newscript;871 newscript->RegisterSelf(); 872 872 873 873 newscript = new Script; … … 875 875 newscript->pGossipHello = &GossipHello_npc_sayge; 876 876 newscript->pGossipSelect = &GossipSelect_npc_sayge; 877 m_scripts[nrscripts++] = newscript;878 } 877 newscript->RegisterSelf(); 878 } -
trunk/src/bindings/scripts/scripts/zone/alterac_mountains/alterac_mountains.cpp
r90 r260 59 59 newscript->Name="npc_ravenholdt"; 60 60 newscript->GetAI = GetAI_npc_ravenholdt; 61 m_scripts[nrscripts++] = newscript;61 newscript->RegisterSelf(); 62 62 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp
r229 r260 349 349 newscript->Name="boss_exarch_maladaar"; 350 350 newscript->GetAI = GetAI_boss_exarch_maladaar; 351 m_scripts[nrscripts++] = newscript;351 newscript->RegisterSelf(); 352 352 353 353 newscript = new Script; 354 354 newscript->Name="mob_avatar_of_martyred"; 355 355 newscript->GetAI = GetAI_mob_avatar_of_martyred; 356 m_scripts[nrscripts++] = newscript;356 newscript->RegisterSelf(); 357 357 358 358 newscript = new Script; 359 359 newscript->Name="mob_stolen_soul"; 360 360 newscript->GetAI = GetAI_mob_stolen_soul; 361 m_scripts[nrscripts++] = newscript;361 newscript->RegisterSelf(); 362 362 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp
r229 r260 272 272 newscript->Name="boss_nexusprince_shaffar"; 273 273 newscript->GetAI = GetAI_boss_nexusprince_shaffar; 274 m_scripts[nrscripts++] = newscript;274 newscript->RegisterSelf(); 275 275 276 276 newscript = new Script; 277 277 newscript->Name="mob_ethereal_beacon"; 278 278 newscript->GetAI = GetAI_mob_ethereal_beacon; 279 m_scripts[nrscripts++] = newscript;279 newscript->RegisterSelf(); 280 280 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/mana_tombs/boss_pandemonius.cpp
r115 r260 135 135 newscript->Name="boss_pandemonius"; 136 136 newscript->GetAI = GetAI_boss_pandemonius; 137 m_scripts[nrscripts++] = newscript;137 newscript->RegisterSelf(); 138 138 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_darkweaver_syth.cpp
r115 r260 393 393 newscript->Name="boss_darkweaver_syth"; 394 394 newscript->GetAI = GetAI_boss_darkweaver_syth; 395 m_scripts[nrscripts++] = newscript;395 newscript->RegisterSelf(); 396 396 397 397 newscript = new Script; 398 398 newscript->Name="mob_syth_fire"; 399 399 newscript->GetAI = GetAI_mob_syth_arcane; 400 m_scripts[nrscripts++] = newscript;400 newscript->RegisterSelf(); 401 401 402 402 newscript = new Script; 403 403 newscript->Name="mob_syth_arcane"; 404 404 newscript->GetAI = GetAI_mob_syth_arcane; 405 m_scripts[nrscripts++] = newscript;405 newscript->RegisterSelf(); 406 406 407 407 newscript = new Script; 408 408 newscript->Name="mob_syth_frost"; 409 409 newscript->GetAI = GetAI_mob_syth_frost; 410 m_scripts[nrscripts++] = newscript;410 newscript->RegisterSelf(); 411 411 412 412 newscript = new Script; 413 413 newscript->Name="mob_syth_shadow"; 414 414 newscript->GetAI = GetAI_mob_syth_shadow; 415 m_scripts[nrscripts++] = newscript;416 } 415 newscript->RegisterSelf(); 416 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/boss_tailonking_ikiss.cpp
r229 r260 220 220 newscript->Name="boss_talon_king_ikiss"; 221 221 newscript->GetAI = GetAI_boss_talon_king_ikiss; 222 m_scripts[nrscripts++] = newscript;222 newscript->RegisterSelf(); 223 223 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/instance_sethekk_halls.cpp
r90 r260 71 71 newscript->Name = "instance_sethekk_halls"; 72 72 newscript->GetInstanceData = GetInstanceData_instance_sethekk_halls; 73 m_scripts[nrscripts++] = newscript;73 newscript->RegisterSelf(); 74 74 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp
r115 r260 195 195 newscript->Name="boss_ambassador_hellmaw"; 196 196 newscript->GetAI = GetAI_boss_ambassador_hellmaw; 197 m_scripts[nrscripts++] = newscript;197 newscript->RegisterSelf(); 198 198 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp
r115 r260 174 174 newscript->Name="boss_blackheart_the_inciter"; 175 175 newscript->GetAI = GetAI_boss_blackheart_the_inciter; 176 m_scripts[nrscripts++] = newscript;176 newscript->RegisterSelf(); 177 177 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp
r257 r260 364 364 newscript->Name="boss_grandmaster_vorpil"; 365 365 newscript->GetAI = GetAI_boss_grandmaster_vorpil; 366 m_scripts[nrscripts++] = newscript;366 newscript->RegisterSelf(); 367 367 368 368 newscript = new Script; 369 369 newscript->Name="mob_voidtraveler"; 370 370 newscript->GetAI = GetAI_mob_voidtraveler; 371 m_scripts[nrscripts++] = newscript;371 newscript->RegisterSelf(); 372 372 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/boss_murmur.cpp
r158 r260 149 149 newscript->Name="boss_murmur"; 150 150 newscript->GetAI = GetAI_boss_murmur; 151 m_scripts[nrscripts++] = newscript;151 newscript->RegisterSelf(); 152 152 } -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp
r90 r260 175 175 newscript->Name = "instance_shadow_labyrinth"; 176 176 newscript->GetInstanceData = GetInstanceData_instance_shadow_labyrinth; 177 m_scripts[nrscripts++] = newscript;177 newscript->RegisterSelf(); 178 178 } -
trunk/src/bindings/scripts/scripts/zone/azshara/azshara.cpp
r204 r260 493 493 newscript->Name="mobs_spitelashes"; 494 494 newscript->GetAI = GetAI_mobs_spitelashes; 495 m_scripts[nrscripts++] = newscript;495 newscript->RegisterSelf(); 496 496 497 497 newscript = new Script; … … 499 499 newscript->pGossipHello = &GossipHello_npc_loramus_thalipedes; 500 500 newscript->pGossipSelect = &GossipSelect_npc_loramus_thalipedes; 501 m_scripts[nrscripts++] = newscript;501 newscript->RegisterSelf(); 502 502 503 503 newscript = new Script; … … 506 506 newscript->pGossipHello = &GossipHello_mob_rizzle_sprysprocket; 507 507 newscript->pGossipSelect = &GossipSelect_mob_rizzle_sprysprocket; 508 m_scripts[nrscripts++] = newscript;508 newscript->RegisterSelf(); 509 509 510 510 newscript = new Script; 511 511 newscript->Name="mob_depth_charge"; 512 512 newscript->GetAI = GetAI_mob_depth_charge; 513 m_scripts[nrscripts++] = newscript;514 } 513 newscript->RegisterSelf(); 514 } -
trunk/src/bindings/scripts/scripts/zone/azshara/boss_azuregos.cpp
r90 r260 150 150 newscript->Name="boss_azuregos"; 151 151 newscript->GetAI = GetAI_boss_azuregos; 152 m_scripts[nrscripts++] = newscript;152 newscript->RegisterSelf(); 153 153 } -
trunk/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp
r90 r260 351 351 newscript->Name="npc_draenei_survivor"; 352 352 newscript->GetAI = GetAI_npc_draenei_survivor; 353 m_scripts[nrscripts++] = newscript;353 newscript->RegisterSelf(); 354 354 355 355 newscript = new Script; … … 358 358 newscript->pGossipHello = &GossipHello_npc_engineer_spark_overgrind; 359 359 newscript->pGossipSelect = &GossipSelect_npc_engineer_spark_overgrind; 360 m_scripts[nrscripts++] = newscript;360 newscript->RegisterSelf(); 361 361 362 362 newscript = new Script; 363 363 newscript->Name="npc_injured_draenei"; 364 364 newscript->GetAI = GetAI_npc_injured_draenei; 365 m_scripts[nrscripts++] = newscript;365 newscript->RegisterSelf(); 366 366 367 367 newscript = new Script; … … 369 369 newscript->pGossipHello = &GossipHello_npc_susurrus; 370 370 newscript->pGossipSelect = &GossipSelect_npc_susurrus; 371 m_scripts[nrscripts++] = newscript;372 } 371 newscript->RegisterSelf(); 372 } -
trunk/src/bindings/scripts/scripts/zone/barrens/the_barrens.cpp
r92 r260 370 370 newscript->pGossipHello = &GossipHello_npc_beaten_corpse; 371 371 newscript->pGossipSelect = &GossipSelect_npc_beaten_corpse; 372 m_scripts[nrscripts++] = newscript;372 newscript->RegisterSelf(); 373 373 374 374 newscript = new Script; … … 376 376 newscript->pGossipHello = &GossipHello_npc_sputtervalve; 377 377 newscript->pGossipSelect = &GossipSelect_npc_sputtervalve; 378 m_scripts[nrscripts++] = newscript;378 newscript->RegisterSelf(); 379 379 380 380 newscript = new Script; … … 382 382 newscript->GetAI = GetAI_npc_taskmaster_fizzule; 383 383 newscript->pReceiveEmote = &ReciveEmote_npc_taskmaster_fizzule; 384 m_scripts[nrscripts++] = newscript;384 newscript->RegisterSelf(); 385 385 386 386 newscript = new Script; 387 387 newscript->Name="npc_twiggy_flathead"; 388 388 newscript->GetAI = GetAI_npc_twiggy_flathead; 389 m_scripts[nrscripts++] = newscript;390 } 389 newscript->RegisterSelf(); 390 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/black_temple.cpp
r90 r260 65 65 newscript->pGossipHello = GossipHello_npc_spirit_of_olum; 66 66 newscript->pGossipSelect = GossipSelect_npc_spirit_of_olum; 67 m_scripts[nrscripts++] = newscript;67 newscript->RegisterSelf(); 68 68 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_bloodboil.cpp
r90 r260 362 362 newscript->Name="boss_gurtogg_bloodboil"; 363 363 newscript->GetAI = GetAI_boss_gurtogg_bloodboil; 364 m_scripts[nrscripts++] = newscript;364 newscript->RegisterSelf(); 365 365 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp
r239 r260 2248 2248 newscript->Name = "boss_illidan_stormrage"; 2249 2249 newscript->GetAI = GetAI_boss_illidan_stormrage; 2250 m_scripts[nrscripts++] = newscript;2250 newscript->RegisterSelf(); 2251 2251 2252 2252 newscript = new Script; … … 2255 2255 newscript->pGossipHello = GossipHello_npc_akama_at_illidan; 2256 2256 newscript->pGossipSelect = GossipSelect_npc_akama_at_illidan; 2257 m_scripts[nrscripts++] = newscript;2257 newscript->RegisterSelf(); 2258 2258 2259 2259 newscript = new Script; 2260 2260 newscript->Name = "boss_maiev_shadowsong"; 2261 2261 newscript->GetAI = GetAI_boss_maiev; 2262 m_scripts[nrscripts++] = newscript;2262 newscript->RegisterSelf(); 2263 2263 2264 2264 newscript = new Script; 2265 2265 newscript->Name = "mob_flame_of_azzinoth"; 2266 2266 newscript->GetAI = GetAI_mob_flame_of_azzinoth; 2267 m_scripts[nrscripts++] = newscript;2267 newscript->RegisterSelf(); 2268 2268 2269 2269 newscript = new Script; 2270 2270 newscript->Name = "mob_blade_of_azzinoth"; 2271 2271 newscript->GetAI = GetAI_blade_of_azzinoth; 2272 m_scripts[nrscripts++] = newscript;2272 newscript->RegisterSelf(); 2273 2273 2274 2274 newscript = new Script; 2275 2275 newscript->Name = "gameobject_cage_trap"; 2276 2276 newscript->pGOHello = GOHello_cage_trap; 2277 m_scripts[nrscripts++] = newscript;2277 newscript->RegisterSelf(); 2278 2278 2279 2279 newscript = new Script; 2280 2280 newscript->Name="mob_cage_trap_trigger"; 2281 2281 newscript->GetAI = &GetAI_cage_trap_trigger; 2282 m_scripts[nrscripts++] = newscript;2282 newscript->RegisterSelf(); 2283 2283 2284 2284 newscript = new Script; 2285 2285 newscript->Name = "mob_shadow_demon"; 2286 2286 newscript->GetAI = GetAI_shadow_demon; 2287 m_scripts[nrscripts++] = newscript;2287 newscript->RegisterSelf(); 2288 2288 2289 2289 newscript = new Script; 2290 2290 newscript->Name="mob_demon_fire"; 2291 2291 newscript->GetAI = GetAI_demonfire; 2292 m_scripts[nrscripts++] = newscript;2292 newscript->RegisterSelf(); 2293 2293 2294 2294 newscript = new Script; 2295 2295 newscript->Name = "mob_parasitic_shadowfiend"; 2296 2296 newscript->GetAI = GetAI_parasitic_shadowfiend; 2297 m_scripts[nrscripts++] = newscript;2297 newscript->RegisterSelf(); 2298 2298 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_mother_shahraz.cpp
r90 r260 358 358 newscript->Name="boss_mother_shahraz"; 359 359 newscript->GetAI = GetAI_boss_shahraz; 360 m_scripts[nrscripts++] = newscript;360 newscript->RegisterSelf(); 361 361 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_reliquary_of_souls.cpp
r229 r260 724 724 newscript->Name="boss_reliquary_of_souls"; 725 725 newscript->GetAI = GetAI_boss_reliquary_of_souls; 726 m_scripts[nrscripts++] = newscript;726 newscript->RegisterSelf(); 727 727 728 728 newscript = new Script; 729 729 newscript->Name="boss_essence_of_suffering"; 730 730 newscript->GetAI = GetAI_boss_essence_of_suffering; 731 m_scripts[nrscripts++] = newscript;731 newscript->RegisterSelf(); 732 732 733 733 newscript = new Script; 734 734 newscript->Name="boss_essence_of_desire"; 735 735 newscript->GetAI = GetAI_boss_essence_of_desire; 736 m_scripts[nrscripts++] = newscript;736 newscript->RegisterSelf(); 737 737 738 738 newscript = new Script; 739 739 newscript->Name="boss_essence_of_anger"; 740 740 newscript->GetAI = GetAI_boss_essence_of_anger; 741 m_scripts[nrscripts++] = newscript;741 newscript->RegisterSelf(); 742 742 743 743 newscript = new Script; 744 744 newscript->Name="npc_enslaved_soul"; 745 745 newscript->GetAI = GetAI_npc_enslaved_soul; 746 m_scripts[nrscripts++] = newscript;746 newscript->RegisterSelf(); 747 747 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_shade_of_akama.cpp
r222 r260 797 797 newscript->Name="boss_shade_of_akama"; 798 798 newscript->GetAI = GetAI_boss_shade_of_akama; 799 m_scripts[nrscripts++] = newscript;799 newscript->RegisterSelf(); 800 800 801 801 newscript = new Script; 802 802 newscript->Name="mob_ashtongue_channeler"; 803 803 newscript->GetAI = GetAI_mob_ashtongue_channeler; 804 m_scripts[nrscripts++] = newscript;804 newscript->RegisterSelf(); 805 805 806 806 newscript = new Script; 807 807 newscript->Name="mob_ashtongue_sorcerer"; 808 808 newscript->GetAI = GetAI_mob_ashtongue_sorcerer; 809 m_scripts[nrscripts++] = newscript;809 newscript->RegisterSelf(); 810 810 811 811 newscript = new Script; … … 814 814 newscript->pGossipHello = &GossipHello_npc_akama; 815 815 newscript->pGossipSelect = &GossipSelect_npc_akama; 816 m_scripts[nrscripts++] = newscript;816 newscript->RegisterSelf(); 817 817 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_supremus.cpp
r203 r260 237 237 newscript->Name="boss_supremus"; 238 238 newscript->GetAI = GetAI_boss_supremus; 239 m_scripts[nrscripts++] = newscript;239 newscript->RegisterSelf(); 240 240 241 241 newscript = new Script; 242 242 newscript->Name="molten_flame"; 243 243 newscript->GetAI = GetAI_molten_flame; 244 m_scripts[nrscripts++] = newscript;244 newscript->RegisterSelf(); 245 245 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp
r229 r260 576 576 newscript->Name = "mob_doom_blossom"; 577 577 newscript->GetAI = GetAI_mob_doom_blossom; 578 m_scripts[nrscripts++] = newscript;578 newscript->RegisterSelf(); 579 579 580 580 newscript = new Script; 581 581 newscript->Name = "mob_shadowy_construct"; 582 582 newscript->GetAI = GetAI_mob_shadowy_construct; 583 m_scripts[nrscripts++] = newscript;583 newscript->RegisterSelf(); 584 584 585 585 newscript = new Script; 586 586 newscript->Name="boss_teron_gorefiend"; 587 587 newscript->GetAI = GetAI_boss_teron_gorefiend; 588 m_scripts[nrscripts++] = newscript;588 newscript->RegisterSelf(); 589 589 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/boss_warlord_najentus.cpp
r160 r260 259 259 newscript->Name="boss_najentus"; 260 260 newscript->GetAI = GetAI_boss_najentus; 261 m_scripts[nrscripts++] = newscript;261 newscript->RegisterSelf(); 262 262 263 263 newscript = new Script; 264 264 newscript->Name = "go_najentus_spine"; 265 265 newscript->pGOHello = &GOHello_go_najentus_spine; 266 m_scripts[nrscripts++] = newscript;266 newscript->RegisterSelf(); 267 267 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/illidari_council.cpp
r108 r260 856 856 newscript->Name="mob_illidari_council"; 857 857 newscript->GetAI = GetAI_mob_illidari_council; 858 m_scripts[nrscripts++] = newscript;858 newscript->RegisterSelf(); 859 859 860 860 newscript = new Script; 861 861 newscript->Name = "mob_blood_elf_council_voice_trigger"; 862 862 newscript->GetAI = GetAI_mob_blood_elf_council_voice_trigger; 863 m_scripts[nrscripts++] = newscript;863 newscript->RegisterSelf(); 864 864 865 865 newscript = new Script; 866 866 newscript->Name="boss_gathios_the_shatterer"; 867 867 newscript->GetAI = GetAI_boss_gathios_the_shatterer; 868 m_scripts[nrscripts++] = newscript;868 newscript->RegisterSelf(); 869 869 870 870 newscript = new Script; 871 871 newscript->Name="boss_lady_malande"; 872 872 newscript->GetAI = GetAI_boss_lady_malande; 873 m_scripts[nrscripts++] = newscript;873 newscript->RegisterSelf(); 874 874 875 875 newscript = new Script; 876 876 newscript->Name="boss_veras_darkshadow"; 877 877 newscript->GetAI = GetAI_boss_veras_darkshadow; 878 m_scripts[nrscripts++] = newscript;878 newscript->RegisterSelf(); 879 879 880 880 newscript = new Script; 881 881 newscript->Name="boss_high_nethermancer_zerevor"; 882 882 newscript->GetAI = GetAI_boss_high_nethermancer_zerevor; 883 m_scripts[nrscripts++] = newscript;883 newscript->RegisterSelf(); 884 884 } -
trunk/src/bindings/scripts/scripts/zone/black_temple/instance_black_temple.cpp
r178 r260 333 333 newscript->Name = "instance_black_temple"; 334 334 newscript->GetInstanceData = GetInstanceData_instance_black_temple; 335 m_scripts[nrscripts++] = newscript;335 newscript->RegisterSelf(); 336 336 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/blackrock_depths.cpp
r90 r260 222 222 newscript->Name="phalanx"; 223 223 newscript->GetAI = GetAI_mob_phalanx; 224 m_scripts[nrscripts++] = newscript;224 newscript->RegisterSelf(); 225 225 226 226 newscript = new Script; … … 228 228 newscript->pGossipHello = &GossipHello_npc_kharan_mighthammer; 229 229 newscript->pGossipSelect = &GossipSelect_npc_kharan_mighthammer; 230 m_scripts[nrscripts++] = newscript;230 newscript->RegisterSelf(); 231 231 232 232 newscript = new Script; … … 234 234 newscript->pGossipHello = &GossipHello_npc_lokhtos_darkbargainer; 235 235 newscript->pGossipSelect = &GossipSelect_npc_lokhtos_darkbargainer; 236 m_scripts[nrscripts++] = newscript;237 } 236 newscript->RegisterSelf(); 237 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_ambassador_flamelash.cpp
r90 r260 103 103 newscript->Name="boss_ambassador_flamelash"; 104 104 newscript->GetAI = GetAI_boss_ambassador_flamelash; 105 m_scripts[nrscripts++] = newscript;105 newscript->RegisterSelf(); 106 106 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_angerrel.cpp
r90 r260 88 88 newscript->Name="boss_angerrel"; 89 89 newscript->GetAI = GetAI_boss_angerrel; 90 m_scripts[nrscripts++] = newscript;90 newscript->RegisterSelf(); 91 91 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_anubshiah.cpp
r90 r260 112 112 newscript->Name="boss_anubshiah"; 113 113 newscript->GetAI = GetAI_boss_anubshiah; 114 m_scripts[nrscripts++] = newscript;114 newscript->RegisterSelf(); 115 115 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_doomrel.cpp
r90 r260 136 136 newscript->Name="boss_doomrel"; 137 137 newscript->GetAI = GetAI_boss_doomrel; 138 m_scripts[nrscripts++] = newscript;138 newscript->RegisterSelf(); 139 139 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_doperel.cpp
r90 r260 88 88 newscript->Name="boss_doperel"; 89 89 newscript->GetAI = GetAI_boss_doperel; 90 m_scripts[nrscripts++] = newscript;90 newscript->RegisterSelf(); 91 91 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_emperor_dagran_thaurissan.cpp
r90 r260 101 101 newscript->Name="boss_emperor_dagran_thaurissan"; 102 102 newscript->GetAI = GetAI_boss_draganthaurissan; 103 m_scripts[nrscripts++] = newscript;103 newscript->RegisterSelf(); 104 104 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_general_angerforge.cpp
r90 r260 164 164 newscript->Name="boss_general_angerforge"; 165 165 newscript->GetAI = GetAI_boss_general_angerforge; 166 m_scripts[nrscripts++] = newscript;166 newscript->RegisterSelf(); 167 167 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_gloomrel.cpp
r90 r260 139 139 newscript->pGossipHello = &GossipHello_boss_gloomrel; 140 140 newscript->pGossipSelect = &GossipSelect_boss_gloomrel; 141 m_scripts[nrscripts++] = newscript;141 newscript->RegisterSelf(); 142 142 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_gorosh_the_dervish.cpp
r90 r260 78 78 newscript->Name="boss_gorosh_the_dervish"; 79 79 newscript->GetAI = GetAI_boss_gorosh_the_dervish; 80 m_scripts[nrscripts++] = newscript;80 newscript->RegisterSelf(); 81 81 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_grizzle.cpp
r90 r260 83 83 newscript->Name="boss_grizzle"; 84 84 newscript->GetAI = GetAI_boss_grizzle; 85 m_scripts[nrscripts++] = newscript;85 newscript->RegisterSelf(); 86 86 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_haterel.cpp
r90 r260 102 102 newscript->Name="boss_haterel"; 103 103 newscript->GetAI = GetAI_boss_haterel; 104 m_scripts[nrscripts++] = newscript;104 newscript->RegisterSelf(); 105 105 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_high_interrogator_gerstahn.cpp
r90 r260 102 102 newscript->Name="boss_high_interrogator_gerstahn"; 103 103 newscript->GetAI = GetAI_boss_high_interrogator_gerstahn; 104 m_scripts[nrscripts++] = newscript;104 newscript->RegisterSelf(); 105 105 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_magmus.cpp
r90 r260 81 81 newscript->Name="boss_magmus"; 82 82 newscript->GetAI = GetAI_boss_magmus; 83 m_scripts[nrscripts++] = newscript;83 newscript->RegisterSelf(); 84 84 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_moira_bronzebeard.cpp
r90 r260 96 96 newscript->Name="boss_moira_bronzebeard"; 97 97 newscript->GetAI = GetAI_boss_moira_bronzebeard; 98 m_scripts[nrscripts++] = newscript;98 newscript->RegisterSelf(); 99 99 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_seethrel.cpp
r90 r260 112 112 newscript->Name="boss_seethrel"; 113 113 newscript->GetAI = GetAI_boss_seethrel; 114 m_scripts[nrscripts++] = newscript;114 newscript->RegisterSelf(); 115 115 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_depths/boss_vilerel.cpp
r90 r260 98 98 newscript->Name="boss_vilerel"; 99 99 newscript->GetAI = GetAI_boss_vilerel; 100 m_scripts[nrscripts++] = newscript;100 newscript->RegisterSelf(); 101 101 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_drakkisath.cpp
r90 r260 98 98 newscript->Name="boss_drakkisath"; 99 99 newscript->GetAI = GetAI_boss_drakkisath; 100 m_scripts[nrscripts++] = newscript;100 newscript->RegisterSelf(); 101 101 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_gyth.cpp
r90 r260 202 202 newscript->Name="boss_gyth"; 203 203 newscript->GetAI = GetAI_boss_gyth; 204 m_scripts[nrscripts++] = newscript;204 newscript->RegisterSelf(); 205 205 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_halycon.cpp
r90 r260 92 92 newscript->Name="boss_halycon"; 93 93 newscript->GetAI = GetAI_boss_halycon; 94 m_scripts[nrscripts++] = newscript;94 newscript->RegisterSelf(); 95 95 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_highlord_omokk.cpp
r90 r260 128 128 newscript->Name="boss_highlord_omokk"; 129 129 newscript->GetAI = GetAI_boss_highlordomokk; 130 m_scripts[nrscripts++] = newscript;130 newscript->RegisterSelf(); 131 131 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_mother_smolderweb.cpp
r90 r260 83 83 newscript->Name="boss_mother_smolderweb"; 84 84 newscript->GetAI = GetAI_boss_mothersmolderweb; 85 m_scripts[nrscripts++] = newscript;85 newscript->RegisterSelf(); 86 86 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_overlord_wyrmthalak.cpp
r90 r260 124 124 newscript->Name="boss_overlord_wyrmthalak"; 125 125 newscript->GetAI = GetAI_boss_overlordwyrmthalak; 126 m_scripts[nrscripts++] = newscript;126 newscript->RegisterSelf(); 127 127 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_pyroguard_emberseer.cpp
r90 r260 90 90 newscript->Name="boss_pyroguard_emberseer"; 91 91 newscript->GetAI = GetAI_boss_pyroguard_emberseer; 92 m_scripts[nrscripts++] = newscript;92 newscript->RegisterSelf(); 93 93 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_quartermaster_zigris.cpp
r90 r260 82 82 newscript->Name="quartermaster_zigris"; 83 83 newscript->GetAI = GetAI_boss_quatermasterzigris; 84 m_scripts[nrscripts++] = newscript;84 newscript->RegisterSelf(); 85 85 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_rend_blackhand.cpp
r90 r260 88 88 newscript->Name="boss_rend_blackhand"; 89 89 newscript->GetAI = GetAI_boss_rend_blackhand; 90 m_scripts[nrscripts++] = newscript;90 newscript->RegisterSelf(); 91 91 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_shadow_hunter_voshgajin.cpp
r90 r260 92 92 newscript->Name="boss_shadow_hunter_voshgajin"; 93 93 newscript->GetAI = GetAI_boss_shadowvosh; 94 m_scripts[nrscripts++] = newscript;94 newscript->RegisterSelf(); 95 95 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_the_beast.cpp
r90 r260 90 90 newscript->Name="boss_the_beast"; 91 91 newscript->GetAI = GetAI_boss_thebeast; 92 m_scripts[nrscripts++] = newscript;92 newscript->RegisterSelf(); 93 93 } -
trunk/src/bindings/scripts/scripts/zone/blackrock_spire/boss_warmaster_voone.cpp
r90 r260 118 118 newscript->Name="boss_warmaster_voone"; 119 119 newscript->GetAI = GetAI_boss_warmastervoone; 120 m_scripts[nrscripts++] = newscript;120 newscript->RegisterSelf(); 121 121 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_broodlord_lashlayer.cpp
r125 r260 125 125 newscript->Name="boss_broodlord"; 126 126 newscript->GetAI = GetAI_boss_broodlord; 127 m_scripts[nrscripts++] = newscript;127 newscript->RegisterSelf(); 128 128 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_chromaggus.cpp
r125 r260 311 311 newscript->Name="boss_chromaggus"; 312 312 newscript->GetAI = GetAI_boss_chromaggus; 313 m_scripts[nrscripts++] = newscript;313 newscript->RegisterSelf(); 314 314 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_ebonroc.cpp
r90 r260 100 100 newscript->Name="boss_ebonroc"; 101 101 newscript->GetAI = GetAI_boss_ebonroc; 102 m_scripts[nrscripts++] = newscript;102 newscript->RegisterSelf(); 103 103 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_firemaw.cpp
r90 r260 91 91 newscript->Name="boss_firemaw"; 92 92 newscript->GetAI = GetAI_boss_firemaw; 93 m_scripts[nrscripts++] = newscript;93 newscript->RegisterSelf(); 94 94 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_flamegor.cpp
r90 r260 91 91 newscript->Name="boss_flamegor"; 92 92 newscript->GetAI = GetAI_boss_flamegor; 93 m_scripts[nrscripts++] = newscript;93 newscript->RegisterSelf(); 94 94 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_nefarian.cpp
r125 r260 224 224 newscript->Name="boss_nefarian"; 225 225 newscript->GetAI = GetAI_boss_nefarian; 226 m_scripts[nrscripts++] = newscript;226 newscript->RegisterSelf(); 227 227 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_razorgore.cpp
r125 r260 128 128 newscript->Name="boss_razorgore"; 129 129 newscript->GetAI = GetAI_boss_razorgore; 130 m_scripts[nrscripts++] = newscript;130 newscript->RegisterSelf(); 131 131 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_vaelastrasz.cpp
r125 r260 258 258 newscript->pGossipHello = &GossipHello_boss_vael; 259 259 newscript->pGossipSelect = &GossipSelect_boss_vael; 260 m_scripts[nrscripts++] = newscript;261 } 260 newscript->RegisterSelf(); 261 } -
trunk/src/bindings/scripts/scripts/zone/blackwing_lair/boss_victor_nefarius.cpp
r125 r260 391 391 newscript->pGossipHello = &GossipHello_boss_victor_nefarius; 392 392 newscript->pGossipSelect = &GossipSelect_boss_victor_nefarius; 393 m_scripts[nrscripts++] = newscript;393 newscript->RegisterSelf(); 394 394 } -
trunk/src/bindings/scripts/scripts/zone/blades_edge_mountains/blades_edge_mountains.cpp
r229 r260 407 407 newscript->Name="mobs_bladespire_ogre"; 408 408 newscript->GetAI = GetAI_mobs_bladespire_ogre; 409 m_scripts[nrscripts++] = newscript;409 newscript->RegisterSelf(); 410 410 411 411 newscript = new Script; 412 412 newscript->Name="mobs_nether_drake"; 413 413 newscript->GetAI = GetAI_mobs_nether_drake; 414 m_scripts[nrscripts++] = newscript;414 newscript->RegisterSelf(); 415 415 416 416 newscript = new Script; 417 417 newscript->Name="npc_daranelle"; 418 418 newscript->GetAI = GetAI_npc_daranelle; 419 m_scripts[nrscripts++] = newscript;419 newscript->RegisterSelf(); 420 420 421 421 newscript = new Script; … … 423 423 newscript->pGossipHello = &GossipHello_npc_overseer_nuaar; 424 424 newscript->pGossipSelect = &GossipSelect_npc_overseer_nuaar; 425 m_scripts[nrscripts++] = newscript;425 newscript->RegisterSelf(); 426 426 427 427 newscript = new Script; … … 429 429 newscript->pGossipHello = &GossipHello_npc_saikkal_the_elder; 430 430 newscript->pGossipSelect = &GossipSelect_npc_saikkal_the_elder; 431 m_scripts[nrscripts++] = newscript;431 newscript->RegisterSelf(); 432 432 433 433 newscript = new Script; … … 435 435 newscript->pGossipHello = &GossipHello_npc_skyguard_handler_irena; 436 436 newscript->pGossipSelect = &GossipSelect_npc_skyguard_handler_irena; 437 m_scripts[nrscripts++] = newscript;438 } 437 newscript->RegisterSelf(); 438 } -
trunk/src/bindings/scripts/scripts/zone/blasted_lands/blasted_lands.cpp
r90 r260 150 150 newscript->pGossipHello = &GossipHello_npc_deathly_usher; 151 151 newscript->pGossipSelect = &GossipSelect_npc_deathly_usher; 152 m_scripts[nrscripts++] = newscript;152 newscript->RegisterSelf(); 153 153 154 154 newscript = new Script; … … 156 156 newscript->pGossipHello = &GossipHello_npc_fallen_hero_of_horde; 157 157 newscript->pGossipSelect = &GossipSelect_npc_fallen_hero_of_horde; 158 m_scripts[nrscripts++] = newscript;158 newscript->RegisterSelf(); 159 159 } -
trunk/src/bindings/scripts/scripts/zone/blasted_lands/boss_kruul.cpp
r90 r260 179 179 newscript->Name="boss_kruul"; 180 180 newscript->GetAI = GetAI_boss_kruul; 181 m_scripts[nrscripts++] = newscript;181 newscript->RegisterSelf(); 182 182 } -
trunk/src/bindings/scripts/scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp
r90 r260 132 132 newscript->Name="mob_webbed_creature"; 133 133 newscript->GetAI = GetAI_mob_webbed_creature; 134 m_scripts[nrscripts++] = newscript;134 newscript->RegisterSelf(); 135 135 136 136 newscript = new Script; … … 138 138 newscript->pGossipHello = &GossipHello_npc_captured_sunhawk_agent; 139 139 newscript->pGossipSelect = &GossipSelect_npc_captured_sunhawk_agent; 140 m_scripts[nrscripts++] = newscript;140 newscript->RegisterSelf(); 141 141 } -
trunk/src/bindings/scripts/scripts/zone/burning_steppes/burning_steppes.cpp
r229 r260 148 148 newscript->pGossipHello = &GossipHello_npc_ragged_john; 149 149 newscript->pGossipSelect = &GossipSelect_npc_ragged_john; 150 m_scripts[nrscripts++] = newscript;150 newscript->RegisterSelf(); 151 151 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_aeonus.cpp
r125 r260 118 118 newscript->Name="boss_aeonus"; 119 119 newscript->GetAI = GetAI_boss_aeonus; 120 m_scripts[nrscripts++] = newscript;120 newscript->RegisterSelf(); 121 121 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp
r125 r260 106 106 newscript->Name="boss_chrono_lord_deja"; 107 107 newscript->GetAI = GetAI_boss_chrono_lord_deja; 108 m_scripts[nrscripts++] = newscript;108 newscript->RegisterSelf(); 109 109 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/dark_portal/boss_temporus.cpp
r229 r260 140 140 newscript->Name="boss_temporus"; 141 141 newscript->GetAI = GetAI_boss_temporus; 142 m_scripts[nrscripts++] = newscript;142 newscript->RegisterSelf(); 143 143 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_archimonde.cpp
r90 r260 770 770 newscript->Name="boss_archimonde"; 771 771 newscript->GetAI = GetAI_boss_archimonde; 772 m_scripts[nrscripts++] = newscript;772 newscript->RegisterSelf(); 773 773 774 774 newscript = new Script; 775 775 newscript->Name = "mob_doomfire"; 776 776 newscript->GetAI = GetAI_mob_doomfire; 777 m_scripts[nrscripts++] = newscript;777 newscript->RegisterSelf(); 778 778 779 779 newscript = new Script; 780 780 newscript->Name = "mob_doomfire_targetting"; 781 781 newscript->GetAI = GetAI_mob_doomfire_targetting; 782 m_scripts[nrscripts++] = newscript;782 newscript->RegisterSelf(); 783 783 784 784 newscript = new Script; 785 785 newscript->Name = "mob_ancient_wisp"; 786 786 newscript->GetAI = GetAI_mob_ancient_wisp; 787 m_scripts[nrscripts++] = newscript;787 newscript->RegisterSelf(); 788 788 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal.cpp
r90 r260 201 201 newscript->pGossipHello = &GossipHello_npc_jaina_proudmoore; 202 202 newscript->pGossipSelect = &GossipSelect_npc_jaina_proudmoore; 203 m_scripts[nrscripts++] = newscript;203 newscript->RegisterSelf(); 204 204 205 205 newscript = new Script; … … 208 208 newscript->pGossipHello = &GossipHello_npc_thrall; 209 209 newscript->pGossipSelect = &GossipSelect_npc_thrall; 210 m_scripts[nrscripts++] = newscript;210 newscript->RegisterSelf(); 211 211 212 212 newscript = new Script; … … 214 214 newscript->pGossipHello = &GossipHello_npc_tyrande_whisperwind; 215 215 newscript->pGossipSelect = &GossipSelect_npc_tyrande_whisperwind; 216 m_scripts[nrscripts++] = newscript;217 } 216 newscript->RegisterSelf(); 217 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/instance_hyjal.cpp
r90 r260 200 200 newscript->Name = "instance_hyjal"; 201 201 newscript->GetInstanceData = GetInstanceData_instance_mount_hyjal; 202 m_scripts[nrscripts++] = newscript;202 newscript->RegisterSelf(); 203 203 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp
r125 r260 153 153 newscript->Name="boss_captain_skarloc"; 154 154 newscript->GetAI = GetAI_boss_captain_skarloc; 155 m_scripts[nrscripts++] = newscript;155 newscript->RegisterSelf(); 156 156 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp
r125 r260 147 147 newscript->Name="boss_epoch_hunter"; 148 148 newscript->GetAI = GetAI_boss_epoch_hunter; 149 m_scripts[nrscripts++] = newscript;149 newscript->RegisterSelf(); 150 150 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp
r239 r260 195 195 newscript->Name="go_barrel_old_hillsbrad"; 196 196 newscript->pGOHello = &GOHello_go_barrel_old_hillsbrad; 197 m_scripts[nrscripts++] = newscript;197 newscript->RegisterSelf(); 198 198 199 199 newscript = new Script; 200 200 newscript->Name="boss_lieutenant_drake"; 201 201 newscript->GetAI = GetAI_boss_lieutenant_drake; 202 m_scripts[nrscripts++] = newscript;202 newscript->RegisterSelf(); 203 203 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp
r90 r260 175 175 newscript->Name = "instance_old_hillsbrad"; 176 176 newscript->GetInstanceData = GetInstanceData_instance_old_hillsbrad; 177 m_scripts[nrscripts++] = newscript;177 newscript->RegisterSelf(); 178 178 } -
trunk/src/bindings/scripts/scripts/zone/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp
r90 r260 894 894 newscript->pGossipHello = &GossipHello_npc_brazen; 895 895 newscript->pGossipSelect = &GossipSelect_npc_brazen; 896 m_scripts[nrscripts++] = newscript;896 newscript->RegisterSelf(); 897 897 898 898 newscript = new Script; … … 900 900 newscript->pGossipHello = &GossipHello_npc_erozion; 901 901 newscript->pGossipSelect = &GossipSelect_npc_erozion; 902 m_scripts[nrscripts++] = newscript;902 newscript->RegisterSelf(); 903 903 904 904 newscript = new Script; … … 907 907 newscript->pGossipSelect = &GossipSelect_npc_thrall_old_hillsbrad; 908 908 newscript->GetAI = GetAI_npc_thrall_old_hillsbrad; 909 m_scripts[nrscripts++] = newscript;909 newscript->RegisterSelf(); 910 910 911 911 newscript = new Script; … … 913 913 newscript->pGossipHello = &GossipHello_npc_taretha; 914 914 newscript->pGossipSelect = &GossipSelect_npc_taretha; 915 m_scripts[nrscripts++] = newscript;916 } 915 newscript->RegisterSelf(); 916 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp
r164 r260 745 745 newscript->Name="boss_fathomlord_karathress"; 746 746 newscript->GetAI = GetAI_boss_fathomlord_karathress; 747 m_scripts[nrscripts++] = newscript;747 newscript->RegisterSelf(); 748 748 749 749 newscript = new Script; 750 750 newscript->Name="boss_fathomguard_sharkkis"; 751 751 newscript->GetAI = GetAI_boss_fathomguard_sharkkis; 752 m_scripts[nrscripts++] = newscript;752 newscript->RegisterSelf(); 753 753 754 754 newscript = new Script; 755 755 newscript->Name="boss_fathomguard_tidalvess"; 756 756 newscript->GetAI = GetAI_boss_fathomguard_tidalvess; 757 m_scripts[nrscripts++] = newscript;757 newscript->RegisterSelf(); 758 758 759 759 newscript = new Script; 760 760 newscript->Name="boss_fathomguard_caribdis"; 761 761 newscript->GetAI = GetAI_boss_fathomguard_caribdis; 762 m_scripts[nrscripts++] = newscript;762 newscript->RegisterSelf(); 763 763 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_hydross_the_unstable.cpp
r182 r260 383 383 newscript->Name="boss_hydross_the_unstable"; 384 384 newscript->GetAI = GetAI_boss_hydross_the_unstable; 385 m_scripts[nrscripts++] = newscript;385 newscript->RegisterSelf(); 386 386 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lady_vashj.cpp
r257 r260 1030 1030 newscript->Name="boss_lady_vashj"; 1031 1031 newscript->GetAI = GetAI_boss_lady_vashj; 1032 m_scripts[nrscripts++] = newscript;1032 newscript->RegisterSelf(); 1033 1033 1034 1034 newscript = new Script; 1035 1035 newscript->Name="mob_enchanted_elemental"; 1036 1036 newscript->GetAI = GetAI_mob_enchanted_elemental; 1037 m_scripts[nrscripts++] = newscript;1037 newscript->RegisterSelf(); 1038 1038 1039 1039 newscript = new Script; 1040 1040 newscript->Name="mob_tainted_elemental"; 1041 1041 newscript->GetAI = GetAI_mob_tainted_elemental; 1042 m_scripts[nrscripts++] = newscript;1042 newscript->RegisterSelf(); 1043 1043 1044 1044 newscript = new Script; 1045 1045 newscript->Name="mob_toxic_sporebat"; 1046 1046 newscript->GetAI = GetAI_mob_toxic_sporebat; 1047 m_scripts[nrscripts++] = newscript;1047 newscript->RegisterSelf(); 1048 1048 1049 1049 newscript = new Script; 1050 1050 newscript->Name="mob_coilfang_elite"; 1051 1051 newscript->GetAI = GetAI_mob_coilfang_elite; 1052 m_scripts[nrscripts++] = newscript;1052 newscript->RegisterSelf(); 1053 1053 1054 1054 newscript = new Script; 1055 1055 newscript->Name="mob_coilfang_strider"; 1056 1056 newscript->GetAI = GetAI_mob_coilfang_strider; 1057 m_scripts[nrscripts++] = newscript;1057 newscript->RegisterSelf(); 1058 1058 1059 1059 newscript = new Script; 1060 1060 newscript->Name="mob_shield_generator_channel"; 1061 1061 newscript->GetAI = GetAI_mob_shield_generator_channel; 1062 m_scripts[nrscripts++] = newscript;1062 newscript->RegisterSelf(); 1063 1063 1064 1064 newscript = new Script; 1065 1065 newscript->Name="item_tainted_core"; 1066 1066 newscript->pItemUse = ItemUse_item_tainted_core; 1067 m_scripts[nrscripts++] = newscript;1067 newscript->RegisterSelf(); 1068 1068 } 1069 1069 -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_leotheras_the_blind.cpp
r257 r260 805 805 newscript->Name="boss_leotheras_the_blind"; 806 806 newscript->GetAI = GetAI_boss_leotheras_the_blind; 807 m_scripts[nrscripts++] = newscript;807 newscript->RegisterSelf(); 808 808 809 809 newscript = new Script; 810 810 newscript->Name="boss_leotheras_the_blind_demonform"; 811 811 newscript->GetAI = GetAI_boss_leotheras_the_blind_demonform; 812 m_scripts[nrscripts++] = newscript;812 newscript->RegisterSelf(); 813 813 814 814 newscript = new Script; 815 815 newscript->Name="mob_greyheart_spellbinder"; 816 816 newscript->GetAI = GetAI_mob_greyheart_spellbinder; 817 m_scripts[nrscripts++] = newscript;817 newscript->RegisterSelf(); 818 818 819 819 newscript = new Script; 820 820 newscript->Name="mob_inner_demon"; 821 821 newscript->GetAI = GetAI_mob_inner_demon; 822 m_scripts[nrscripts++] = newscript;822 newscript->RegisterSelf(); 823 823 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp
r229 r260 168 168 newscript->Name="boss_the_lurker_below"; 169 169 newscript->GetAI = GetAI_boss_the_lurker_below; 170 m_scripts[nrscripts++] = newscript;170 newscript->RegisterSelf(); 171 171 172 172 newscript = new Script; 173 173 newscript->Name="mob_coilfang_guardian"; 174 174 newscript->GetAI = GetAI_mob_coilfang_guardian; 175 m_scripts[nrscripts++] = newscript;175 newscript->RegisterSelf(); 176 176 177 177 newscript = new Script; 178 178 newscript->Name="mob_coilfang_ambusher"; 179 179 newscript->GetAI = GetAI_mob_coilfang_ambusher; 180 m_scripts[nrscripts++] = newscript;180 newscript->RegisterSelf(); 181 181 } 182 182 -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_morogrim_tidewalker.cpp
r229 r260 351 351 newscript->Name="boss_morogrim_tidewalker"; 352 352 newscript->GetAI = GetAI_boss_morogrim_tidewalker; 353 m_scripts[nrscripts++] = newscript;353 newscript->RegisterSelf(); 354 354 355 355 newscript = new Script; 356 356 newscript->Name="mob_water_globule"; 357 357 newscript->GetAI = GetAI_mob_water_globule; 358 m_scripts[nrscripts++] = newscript;358 newscript->RegisterSelf(); 359 359 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp
r187 r260 216 216 newscript->Name = "instance_serpent_shrine"; 217 217 newscript->GetInstanceData = GetInstanceData_instance_serpentshrine_cavern; 218 m_scripts[nrscripts++] = newscript;218 newscript->RegisterSelf(); 219 219 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp
r223 r260 189 189 newscript->Name="boss_hydromancer_thespia"; 190 190 newscript->GetAI = GetAI_boss_thespiaAI; 191 m_scripts[nrscripts++] = newscript;191 newscript->RegisterSelf(); 192 192 193 193 newscript = new Script; 194 194 newscript->Name="mob_coilfang_waterelemental"; 195 195 newscript->GetAI = GetAI_mob_coilfang_waterelementalAI; 196 m_scripts[nrscripts++] = newscript;196 newscript->RegisterSelf(); 197 197 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp
r166 r260 272 272 newscript->Name="boss_mekgineer_steamrigger"; 273 273 newscript->GetAI = GetAI_boss_mekgineer_steamrigger; 274 m_scripts[nrscripts++] = newscript;274 newscript->RegisterSelf(); 275 275 276 276 newscript = new Script; 277 277 newscript->Name="mob_steamrigger_mechanic"; 278 278 newscript->GetAI = GetAI_mob_steamrigger_mechanic; 279 m_scripts[nrscripts++] = newscript;279 newscript->RegisterSelf(); 280 280 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp
r223 r260 227 227 newscript->Name="mob_naga_distiller"; 228 228 newscript->GetAI = GetAI_mob_naga_distiller; 229 m_scripts[nrscripts++] = newscript;229 newscript->RegisterSelf(); 230 230 231 231 newscript = new Script; 232 232 newscript->Name="boss_warlord_kalithresh"; 233 233 newscript->GetAI = GetAI_boss_warlord_kalithresh; 234 m_scripts[nrscripts++] = newscript;234 newscript->RegisterSelf(); 235 235 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/instance_steam_vault.cpp
r90 r260 167 167 newscript->Name = "instance_steam_vault"; 168 168 newscript->GetInstanceData = GetInstanceData_instance_steam_vault; 169 m_scripts[nrscripts++] = newscript;169 newscript->RegisterSelf(); 170 170 } -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/underbog/boss_hungarfen.cpp
r90 r260 148 148 newscript->Name="boss_hungarfen"; 149 149 newscript->GetAI = GetAI_boss_hungarfen; 150 m_scripts[nrscripts++] = newscript;150 newscript->RegisterSelf(); 151 151 152 152 newscript = new Script; 153 153 newscript->Name="mob_underbog_mushroom"; 154 154 newscript->GetAI = GetAI_mob_underbog_mushroom; 155 m_scripts[nrscripts++] = newscript;155 newscript->RegisterSelf(); 156 156 } -
trunk/src/bindings/scripts/scripts/zone/dun_morogh/dun_morogh.cpp
r90 r260 95 95 newscript->Name="npc_narm_faulk"; 96 96 newscript->GetAI = GetAI_npc_narm_faulk; 97 m_scripts[nrscripts++] = newscript;97 newscript->RegisterSelf(); 98 98 } -
trunk/src/bindings/scripts/scripts/zone/dustwallow_marsh/dustwallow_marsh.cpp
r90 r260 205 205 newscript->Name="mobs_risen_husk_spirit"; 206 206 newscript->GetAI = GetAI_mobs_risen_husk_spirit; 207 m_scripts[nrscripts++] = newscript;207 newscript->RegisterSelf(); 208 208 209 209 newscript = new Script; 210 210 newscript->Name="npc_restless_apparition"; 211 211 newscript->pGossipHello = &GossipHello_npc_restless_apparition; 212 m_scripts[nrscripts++] = newscript;212 newscript->RegisterSelf(); 213 213 214 214 newscript = new Script; … … 216 216 newscript->GetAI = GetAI_npc_deserter_agitator; 217 217 newscript->pGossipHello = &GossipHello_npc_deserter_agitator; 218 m_scripts[nrscripts++] = newscript;218 newscript->RegisterSelf(); 219 219 220 220 newscript = new Script; … … 222 222 newscript->pGossipHello = &GossipHello_npc_lady_jaina_proudmoore; 223 223 newscript->pGossipSelect = &GossipSelect_npc_lady_jaina_proudmoore; 224 m_scripts[nrscripts++] = newscript;224 newscript->RegisterSelf(); 225 225 226 226 newscript = new Script; … … 228 228 newscript->pGossipHello = &GossipHello_npc_nat_pagle; 229 229 newscript->pGossipSelect = &GossipSelect_npc_nat_pagle; 230 m_scripts[nrscripts++] = newscript;231 } 230 newscript->RegisterSelf(); 231 } -
trunk/src/bindings/scripts/scripts/zone/eastern_plaguelands/eastern_plaguelands.cpp
r90 r260 159 159 newscript->Name="mobs_ghoul_flayer"; 160 160 newscript->GetAI = GetAI_mobs_ghoul_flayer; 161 m_scripts[nrscripts++] = newscript;161 newscript->RegisterSelf(); 162 162 163 163 newscript = new Script; … … 165 165 newscript->pGossipHello = &GossipHello_npc_augustus_the_touched; 166 166 newscript->pGossipSelect = &GossipSelect_npc_augustus_the_touched; 167 m_scripts[nrscripts++] = newscript;167 newscript->RegisterSelf(); 168 168 169 169 newscript = new Script; … … 171 171 newscript->GetAI = GetAI_npc_darrowshire_spirit; 172 172 newscript->pGossipHello = &GossipHello_npc_darrowshire_spirit; 173 m_scripts[nrscripts++] = newscript;173 newscript->RegisterSelf(); 174 174 175 175 newscript = new Script; … … 177 177 newscript->pGossipHello = &GossipHello_npc_tirion_fordring; 178 178 newscript->pGossipSelect = &GossipSelect_npc_tirion_fordring; 179 m_scripts[nrscripts++] = newscript;179 newscript->RegisterSelf(); 180 180 } -
trunk/src/bindings/scripts/scripts/zone/elwynn_forest/elwynn_forest.cpp
r90 r260 95 95 newscript->Name="npc_henze_faulk"; 96 96 newscript->GetAI = GetAI_npc_henze_faulk; 97 m_scripts[nrscripts++] = newscript;97 newscript->RegisterSelf(); 98 98 } -
trunk/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp
r90 r260 153 153 newscript->Name="mobs_mana_tapped"; 154 154 newscript->GetAI = GetAI_mobs_mana_tapped; 155 m_scripts[nrscripts++] = newscript;155 newscript->RegisterSelf(); 156 156 157 157 newscript = new Script; … … 160 160 newscript->pGossipHello = &GossipHello_npc_prospector_anvilward; 161 161 newscript->pGossipSelect = &GossipSelect_npc_prospector_anvilward; 162 m_scripts[nrscripts++] = newscript;162 newscript->RegisterSelf(); 163 163 } -
trunk/src/bindings/scripts/scripts/zone/felwood/felwood.cpp
r90 r260 86 86 newscript->pGossipHello = &GossipHello_npcs_riverbreeze_and_silversky; 87 87 newscript->pGossipSelect = &GossipSelect_npcs_riverbreeze_and_silversky; 88 m_scripts[nrscripts++] = newscript;88 newscript->RegisterSelf(); 89 89 } -
trunk/src/bindings/scripts/scripts/zone/feralas/feralas.cpp
r90 r260 77 77 newscript->pGossipHello = &GossipHello_npc_gregan_brewspewer; 78 78 newscript->pGossipSelect = &GossipSelect_npc_gregan_brewspewer; 79 m_scripts[nrscripts++] = newscript;79 newscript->RegisterSelf(); 80 80 81 81 newscript = new Script; 82 82 newscript->Name="npc_screecher_spirit"; 83 83 newscript->pGossipHello = &GossipHello_npc_screecher_spirit; 84 m_scripts[nrscripts++] = newscript;84 newscript->RegisterSelf(); 85 85 } -
trunk/src/bindings/scripts/scripts/zone/ghostlands/ghostlands.cpp
r205 r260 134 134 newscript->pGossipHello = &GossipHello_npc_blood_knight_dawnstar; 135 135 newscript->pGossipSelect = &GossipSelect_npc_blood_knight_dawnstar; 136 m_scripts[nrscripts++] = newscript;136 newscript->RegisterSelf(); 137 137 138 138 newscript = new Script; … … 140 140 newscript->pGossipHello = &GossipHello_npc_budd_nedreck; 141 141 newscript->pGossipSelect = &GossipSelect_npc_budd_nedreck; 142 m_scripts[nrscripts++] = newscript;142 newscript->RegisterSelf(); 143 143 144 144 newscript = new Script; … … 146 146 newscript->pGossipHello = &GossipHello_npc_rathis_tomber; 147 147 newscript->pGossipSelect = &GossipSelect_npc_rathis_tomber; 148 m_scripts[nrscripts++] = newscript;148 newscript->RegisterSelf(); 149 149 150 150 newscript = new Script; 151 151 newscript->Name = "go_gilded_brazier"; 152 152 newscript->pGOHello = &GOHello_gilded_brazier; 153 m_scripts[nrscripts++] = newscript;153 newscript->RegisterSelf(); 154 154 } -
trunk/src/bindings/scripts/scripts/zone/gruuls_lair/boss_gruul.cpp
r158 r260 301 301 newscript->Name="boss_gruul"; 302 302 newscript->GetAI = GetAI_boss_gruul; 303 m_scripts[nrscripts++] = newscript;303 newscript->RegisterSelf(); 304 304 } -
trunk/src/bindings/scripts/scripts/zone/gruuls_lair/boss_high_king_maulgar.cpp
r229 r260 818 818 newscript->Name="boss_high_king_maulgar"; 819 819 newscript->GetAI = GetAI_boss_high_king_maulgar; 820 m_scripts[nrscripts++] = newscript;820 newscript->RegisterSelf(); 821 821 822 822 newscript = new Script; 823 823 newscript->Name="boss_kiggler_the_crazed"; 824 824 newscript->GetAI = GetAI_boss_kiggler_the_crazed; 825 m_scripts[nrscripts++] = newscript;825 newscript->RegisterSelf(); 826 826 827 827 newscript = new Script; 828 828 newscript->Name="boss_blindeye_the_seer"; 829 829 newscript->GetAI = GetAI_boss_blindeye_the_seer; 830 m_scripts[nrscripts++] = newscript;830 newscript->RegisterSelf(); 831 831 832 832 newscript = new Script; 833 833 newscript->Name="boss_olm_the_summoner"; 834 834 newscript->GetAI = GetAI_boss_olm_the_summoner; 835 m_scripts[nrscripts++] = newscript;835 newscript->RegisterSelf(); 836 836 837 837 newscript = new Script; 838 838 newscript->Name="boss_krosh_firehand"; 839 839 newscript->GetAI = GetAI_boss_krosh_firehand; 840 m_scripts[nrscripts++] = newscript;840 newscript->RegisterSelf(); 841 841 } -
trunk/src/bindings/scripts/scripts/zone/gruuls_lair/instance_gruuls_lair.cpp
r98 r260 185 185 newscript->Name = "instance_gruuls_lair"; 186 186 newscript->GetInstanceData = GetInstanceData_instance_gruuls_lair; 187 m_scripts[nrscripts++] = newscript;187 newscript->RegisterSelf(); 188 188 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_broggok.cpp
r166 r260 124 124 newscript->Name="boss_broggok"; 125 125 newscript->GetAI = GetAI_boss_broggokAI; 126 m_scripts[nrscripts++] = newscript;126 newscript->RegisterSelf(); 127 127 128 128 newscript = new Script; 129 129 newscript->Name="mob_broggok_poisoncloud"; 130 130 newscript->GetAI = GetAI_mob_broggok_poisoncloudAI; 131 m_scripts[nrscripts++] = newscript;131 newscript->RegisterSelf(); 132 132 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp
r223 r260 226 226 newscript->Name="boss_kelidan_the_breaker"; 227 227 newscript->GetAI = GetAI_boss_kelidan_the_breaker; 228 m_scripts[nrscripts++] = newscript;228 newscript->RegisterSelf(); 229 229 230 230 newscript = new Script; 231 231 newscript->Name="mob_shadowmoon_channeler"; 232 232 newscript->GetAI = GetAI_mob_shadowmoon_channeler; 233 m_scripts[nrscripts++] = newscript;233 newscript->RegisterSelf(); 234 234 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_the_maker.cpp
r223 r260 128 128 newscript->Name="boss_the_maker"; 129 129 newscript->GetAI = GetAI_boss_the_makerAI; 130 m_scripts[nrscripts++] = newscript;130 newscript->RegisterSelf(); 131 131 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp
r166 r260 210 210 newscript->Name="boss_omor_the_unscarred"; 211 211 newscript->GetAI = GetAI_boss_omor_the_unscarredAI; 212 m_scripts[nrscripts++] = newscript;212 newscript->RegisterSelf(); 213 213 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp
r229 r260 165 165 newscript->Name="boss_watchkeeper_gargolmar"; 166 166 newscript->GetAI = GetAI_boss_watchkeeper_gargolmarAI; 167 m_scripts[nrscripts++] = newscript;167 newscript->RegisterSelf(); 168 168 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp
r203 r260 546 546 newscript->Name="boss_magtheridon"; 547 547 newscript->GetAI = GetAI_boss_magtheridon; 548 m_scripts[nrscripts++] = newscript;548 newscript->RegisterSelf(); 549 549 550 550 newscript = new Script; 551 551 newscript->Name="mob_hellfire_channeler"; 552 552 newscript->GetAI = GetAI_mob_hellfire_channeler; 553 m_scripts[nrscripts++] = newscript;553 newscript->RegisterSelf(); 554 554 555 555 newscript = new Script; 556 556 newscript->Name="go_manticron_cube"; 557 557 newscript->pGOHello = &GOHello_go_Manticron_Cube; 558 m_scripts[nrscripts++] = newscript;558 newscript->RegisterSelf(); 559 559 560 560 newscript = new Script; 561 561 newscript->Name="mob_abyssal"; 562 562 newscript->GetAI = GetAI_mob_abyssalAI; 563 m_scripts[nrscripts++] = newscript;563 newscript->RegisterSelf(); 564 564 565 565 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp
r257 r260 283 283 newscript->Name = "instance_magtheridons_lair"; 284 284 newscript->GetInstanceData = GetInstanceData_instance_magtheridons_lair; 285 m_scripts[nrscripts++] = newscript;285 newscript->RegisterSelf(); 286 286 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_nethekurse.cpp
r229 r260 445 445 newscript->Name="boss_grand_warlock_nethekurse"; 446 446 newscript->GetAI = GetAI_boss_grand_warlock_nethekurse; 447 m_scripts[nrscripts++] = newscript;447 newscript->RegisterSelf(); 448 448 449 449 newscript = new Script; 450 450 newscript->Name="mob_fel_orc_convert"; 451 451 newscript->GetAI = GetAI_mob_fel_orc_convert; 452 m_scripts[nrscripts++] = newscript;452 newscript->RegisterSelf(); 453 453 454 454 newscript = new Script; 455 455 newscript->Name="mob_lesser_shadow_fissure"; 456 456 newscript->GetAI = GetAI_mob_lesser_shadow_fissure; 457 m_scripts[nrscripts++] = newscript;457 newscript->RegisterSelf(); 458 458 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp
r166 r260 395 395 newscript->Name="boss_warbringer_omrogg"; 396 396 newscript->GetAI = GetAI_boss_warbringer_omrogg; 397 m_scripts[nrscripts++] = newscript;397 newscript->RegisterSelf(); 398 398 399 399 newscript = new Script; 400 400 newscript->Name="mob_omrogg_heads"; 401 401 newscript->GetAI = GetAI_mob_omrogg_heads; 402 m_scripts[nrscripts++] = newscript;402 newscript->RegisterSelf(); 403 403 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp
r90 r260 111 111 newscript->Name = "instance_shattered_halls"; 112 112 newscript->GetInstanceData = GetInstanceData_instance_shattered_halls; 113 m_scripts[nrscripts++] = newscript;113 newscript->RegisterSelf(); 114 114 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_peninsula/boss_doomlord_kazzak.cpp
r90 r260 138 138 newscript->Name="boss_doomlord_kazzak"; 139 139 newscript->GetAI = GetAI_boss_doomlordkazzak; 140 m_scripts[nrscripts++] = newscript;140 newscript->RegisterSelf(); 141 141 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_peninsula/hellfire_peninsula.cpp
r90 r260 172 172 newscript->pGossipHello = &GossipHello_npc_wing_commander_dabiree; 173 173 newscript->pGossipSelect = &GossipSelect_npc_wing_commander_dabiree; 174 m_scripts[nrscripts++] = newscript;174 newscript->RegisterSelf(); 175 175 176 176 newscript = new Script; … … 178 178 newscript->pGossipHello = &GossipHello_npc_gryphoneer_windbellow; 179 179 newscript->pGossipSelect = &GossipSelect_npc_gryphoneer_windbellow; 180 m_scripts[nrscripts++] = newscript;180 newscript->RegisterSelf(); 181 181 182 182 newscript = new Script; … … 184 184 newscript->pGossipHello = &GossipHello_npc_wing_commander_brack; 185 185 newscript->pGossipSelect = &GossipSelect_npc_wing_commander_brack; 186 m_scripts[nrscripts++] = newscript;186 newscript->RegisterSelf(); 187 187 } -
trunk/src/bindings/scripts/scripts/zone/ironforge/ironforge.cpp
r90 r260 90 90 newscript->pGossipHello = &GossipHello_npc_royal_historian_archesonus; 91 91 newscript->pGossipSelect = &GossipSelect_npc_royal_historian_archesonus; 92 m_scripts[nrscripts++] = newscript;92 newscript->RegisterSelf(); 93 93 } -
trunk/src/bindings/scripts/scripts/zone/isle_of_queldanas/isle_of_queldanas.cpp
r90 r260 141 141 newscript->pGossipHello = &GossipHello_npc_ayren_cloudbreaker; 142 142 newscript->pGossipSelect = &GossipSelect_npc_ayren_cloudbreaker; 143 m_scripts[nrscripts++] = newscript;143 newscript->RegisterSelf(); 144 144 145 145 newscript = new Script; 146 146 newscript->Name="npc_converted_sentry"; 147 147 newscript->GetAI = GetAI_npc_converted_sentry; 148 m_scripts[nrscripts++] = newscript;148 newscript->RegisterSelf(); 149 149 150 150 newscript = new Script; … … 152 152 newscript->pGossipHello = &GossipHello_npc_unrestrained_dragonhawk; 153 153 newscript->pGossipSelect = &GossipSelect_npc_unrestrained_dragonhawk; 154 m_scripts[nrscripts++] = newscript;154 newscript->RegisterSelf(); 155 155 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/boss_curator.cpp
r90 r260 197 197 newscript->Name="boss_curator"; 198 198 newscript->GetAI = GetAI_boss_curator; 199 m_scripts[nrscripts++] = newscript;199 newscript->RegisterSelf(); 200 200 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/boss_maiden_of_virtue.cpp
r90 r260 180 180 newscript->Name="boss_maiden_of_virtue"; 181 181 newscript->GetAI = GetAI_boss_maiden_of_virtue; 182 m_scripts[nrscripts++] = newscript;182 newscript->RegisterSelf(); 183 183 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp
r90 r260 363 363 newscript->Name="boss_attumen"; 364 364 newscript->GetAI = GetAI_boss_attumen; 365 m_scripts[nrscripts++] = newscript;365 newscript->RegisterSelf(); 366 366 367 367 newscript = new Script; 368 368 newscript->Name="boss_midnight"; 369 369 newscript->GetAI = GetAI_boss_midnight; 370 m_scripts[nrscripts++] = newscript;370 newscript->RegisterSelf(); 371 371 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/boss_moroes.cpp
r109 r260 836 836 newscript->Name="boss_moroes"; 837 837 newscript->GetAI = GetAI_boss_moroes; 838 m_scripts[nrscripts++] = newscript;838 newscript->RegisterSelf(); 839 839 840 840 newscript = new Script; 841 841 newscript->Name="boss_baroness_dorothea_millstipe"; 842 842 newscript->GetAI = GetAI_baroness_dorothea_millstipe; 843 m_scripts[nrscripts++] = newscript;843 newscript->RegisterSelf(); 844 844 845 845 newscript = new Script; 846 846 newscript->Name="boss_baron_rafe_dreuger"; 847 847 newscript->GetAI = GetAI_baron_rafe_dreuger; 848 m_scripts[nrscripts++] = newscript;848 newscript->RegisterSelf(); 849 849 850 850 newscript = new Script; 851 851 newscript->Name="boss_lady_catriona_von_indi"; 852 852 newscript->GetAI = GetAI_lady_catriona_von_indi; 853 m_scripts[nrscripts++] = newscript;853 newscript->RegisterSelf(); 854 854 855 855 newscript = new Script; 856 856 newscript->Name="boss_lady_keira_berrybuck"; 857 857 newscript->GetAI = GetAI_lady_keira_berrybuck; 858 m_scripts[nrscripts++] = newscript;858 newscript->RegisterSelf(); 859 859 860 860 newscript = new Script; 861 861 newscript->Name="boss_lord_robin_daris"; 862 862 newscript->GetAI = GetAI_lord_robin_daris; 863 m_scripts[nrscripts++] = newscript;863 newscript->RegisterSelf(); 864 864 865 865 newscript = new Script; 866 866 newscript->Name="boss_lord_crispin_ference"; 867 867 newscript->GetAI = GetAI_lord_crispin_ference; 868 m_scripts[nrscripts++] = newscript;868 newscript->RegisterSelf(); 869 869 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/boss_prince_malchezaar.cpp
r158 r260 667 667 newscript->Name="boss_malchezaar"; 668 668 newscript->GetAI = GetAI_boss_malchezaar; 669 m_scripts[nrscripts++] = newscript;669 newscript->RegisterSelf(); 670 670 671 671 newscript = new Script; 672 672 newscript->Name="netherspite_infernal"; 673 673 newscript->GetAI = GetAI_netherspite_infernal; 674 m_scripts[nrscripts++] = newscript;674 newscript->RegisterSelf(); 675 675 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/boss_shade_of_aran.cpp
r90 r260 655 655 newscript->Name="boss_shade_of_aran"; 656 656 newscript->GetAI = GetAI_boss_aran; 657 m_scripts[nrscripts++] = newscript;657 newscript->RegisterSelf(); 658 658 659 659 newscript = new Script; 660 660 newscript->Name="mob_shadow_of_aran"; 661 661 newscript->GetAI = GetAI_shadow_of_aran; 662 m_scripts[nrscripts++] = newscript;662 newscript->RegisterSelf(); 663 663 664 664 newscript = new Script; 665 665 newscript->Name="mob_aran_elemental"; 666 666 newscript->GetAI = GetAI_water_elemental; 667 m_scripts[nrscripts++] = newscript;667 newscript->RegisterSelf(); 668 668 669 669 //newscript = new Script; 670 670 //newscript->Name="mob_aran_blizzard"; 671 671 //newscript->GetAI = GetAI_boss_aran; 672 // m_scripts[nrscripts++] = newscript;672 //newscript->RegisterSelf(); 673 673 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/boss_terestian_illhoof.cpp
r109 r260 437 437 newscript->Name="boss_terestian_illhoof"; 438 438 newscript->GetAI = GetAI_boss_terestian_illhoof; 439 m_scripts[nrscripts++] = newscript;439 newscript->RegisterSelf(); 440 440 441 441 newscript = new Script; 442 442 newscript->Name="mob_karazhan_imp"; 443 443 newscript->GetAI = GetAI_mob_karazhan_imp; 444 m_scripts[nrscripts++] = newscript;444 newscript->RegisterSelf(); 445 445 446 446 newscript = new Script; 447 447 newscript->Name="mob_kilrek"; 448 448 newscript->GetAI = GetAI_mob_kilrek; 449 m_scripts[nrscripts++] = newscript;449 newscript->RegisterSelf(); 450 450 451 451 newscript = new Script; 452 452 newscript->Name = "mob_demon_chain"; 453 453 newscript->GetAI = GetAI_mob_demon_chain; 454 m_scripts[nrscripts++] = newscript;454 newscript->RegisterSelf(); 455 455 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp
r109 r260 1415 1415 newscript->GetAI = GetAI_boss_dorothee; 1416 1416 newscript->Name = "boss_dorothee"; 1417 m_scripts[nrscripts++] = newscript;1417 newscript->RegisterSelf(); 1418 1418 1419 1419 newscript = new Script; 1420 1420 newscript->GetAI = GetAI_boss_strawman; 1421 1421 newscript->Name = "boss_strawman"; 1422 m_scripts[nrscripts++] = newscript;1422 newscript->RegisterSelf(); 1423 1423 1424 1424 newscript = new Script; 1425 1425 newscript->GetAI = GetAI_boss_tinhead; 1426 1426 newscript->Name = "boss_tinhead"; 1427 m_scripts[nrscripts++] = newscript;1427 newscript->RegisterSelf(); 1428 1428 1429 1429 newscript = new Script; 1430 1430 newscript->GetAI = GetAI_boss_roar; 1431 1431 newscript->Name = "boss_roar"; 1432 m_scripts[nrscripts++] = newscript;1432 newscript->RegisterSelf(); 1433 1433 1434 1434 newscript = new Script; 1435 1435 newscript->GetAI = GetAI_boss_crone; 1436 1436 newscript->Name = "boss_crone"; 1437 m_scripts[nrscripts++] = newscript;1437 newscript->RegisterSelf(); 1438 1438 1439 1439 newscript = new Script; 1440 1440 newscript->GetAI = GetAI_mob_tito; 1441 1441 newscript->Name = "mob_tito"; 1442 m_scripts[nrscripts++] = newscript;1442 newscript->RegisterSelf(); 1443 1443 1444 1444 newscript = new Script; 1445 1445 newscript->GetAI = GetAI_mob_cyclone; 1446 1446 newscript->Name = "mob_cyclone"; 1447 m_scripts[nrscripts++] = newscript;1447 newscript->RegisterSelf(); 1448 1448 1449 1449 // Hood … … 1452 1452 newscript->pGossipSelect = GossipSelect_npc_grandmother; 1453 1453 newscript->Name = "npc_grandmother"; 1454 m_scripts[nrscripts++] = newscript;1454 newscript->RegisterSelf(); 1455 1455 1456 1456 newscript = new Script; 1457 1457 newscript->GetAI = GetAI_boss_bigbadwolf; 1458 1458 newscript->Name = "boss_bigbadwolf"; 1459 m_scripts[nrscripts++] = newscript;1459 newscript->RegisterSelf(); 1460 1460 1461 1461 // Romeo And Juliet … … 1463 1463 newscript->GetAI = GetAI_boss_julianne; 1464 1464 newscript->Name = "boss_julianne"; 1465 m_scripts[nrscripts++] = newscript;1465 newscript->RegisterSelf(); 1466 1466 1467 1467 newscript = new Script; 1468 1468 newscript->GetAI = GetAI_boss_romulo; 1469 1469 newscript->Name = "boss_romulo"; 1470 m_scripts[nrscripts++] = newscript;1471 } 1470 newscript->RegisterSelf(); 1471 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp
r90 r260 250 250 newscript->Name = "instance_karazhan"; 251 251 newscript->GetInstanceData = GetInstanceData_instance_karazhan; 252 m_scripts[nrscripts++] = newscript;252 newscript->RegisterSelf(); 253 253 } -
trunk/src/bindings/scripts/scripts/zone/karazhan/karazhan.cpp
r257 r260 461 461 newscript->pGossipHello = GossipHello_npc_barnes; 462 462 newscript->pGossipSelect = GossipSelect_npc_barnes; 463 m_scripts[nrscripts++] = newscript;463 newscript->RegisterSelf(); 464 464 465 465 newscript = new Script; … … 467 467 newscript->pGossipHello = GossipHello_npc_berthold; 468 468 newscript->pGossipSelect = GossipSelect_npc_berthold; 469 m_scripts[nrscripts++] = newscript;470 } 469 newscript->RegisterSelf(); 470 } -
trunk/src/bindings/scripts/scripts/zone/loch_modan/loch_modan.cpp
r90 r260 88 88 newscript->pGossipHello = &GossipHello_npc_mountaineer_pebblebitty; 89 89 newscript->pGossipSelect = &GossipSelect_npc_mountaineer_pebblebitty; 90 m_scripts[nrscripts++] = newscript;90 newscript->RegisterSelf(); 91 91 } -
trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_felblood_kaelthas.cpp
r257 r260 762 762 newscript->Name = "boss_felblood_kaelthas"; 763 763 newscript->GetAI = GetAI_boss_felblood_kaelthas; 764 m_scripts[nrscripts++] = newscript;764 newscript->RegisterSelf(); 765 765 766 766 newscript = new Script; 767 767 newscript->Name = "mob_arcane_sphere"; 768 768 newscript->GetAI = GetAI_mob_arcane_sphere; 769 m_scripts[nrscripts++] = newscript;769 newscript->RegisterSelf(); 770 770 771 771 newscript = new Script; 772 772 newscript->Name="mob_felkael_phoenix"; 773 773 newscript->GetAI = GetAI_mob_felkael_phoenix; 774 m_scripts[nrscripts++] = newscript;774 newscript->RegisterSelf(); 775 775 776 776 newscript = new Script; 777 777 newscript->Name="mob_felkael_phoenix_egg"; 778 778 newscript->GetAI = GetAI_mob_felkael_phoenix_egg; 779 m_scripts[nrscripts++] = newscript;779 newscript->RegisterSelf(); 780 780 781 781 newscript = new Script; 782 782 newscript->Name="mob_felkael_flamestrike"; 783 783 newscript->GetAI = GetAI_mob_felkael_flamestrike; 784 m_scripts[nrscripts++] = newscript;784 newscript->RegisterSelf(); 785 785 786 786 newscript = new Script; 787 787 newscript->Name="go_kael_orb"; 788 788 newscript->pGOHello = &GOHello_go_kael_orb; 789 m_scripts[nrscripts++] = newscript;789 newscript->RegisterSelf(); 790 790 791 791 newscript = new Script; 792 792 newscript->Name="go_movie_orb"; 793 793 newscript->pGOHello = &GOHello_go_movie_orb; 794 m_scripts[nrscripts++] = newscript;794 newscript->RegisterSelf(); 795 795 } -
trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_priestess_delrissa.cpp
r137 r260 1356 1356 newscript->Name="boss_priestess_delrissa"; 1357 1357 newscript->GetAI = GetAI_boss_priestess_delrissa; 1358 m_scripts[nrscripts++] = newscript;1358 newscript->RegisterSelf(); 1359 1359 1360 1360 newscript = new Script; 1361 1361 newscript->Name="boss_kagani_nightstrike"; 1362 1362 newscript->GetAI = GetAI_boss_kagani_nightstrike; 1363 m_scripts[nrscripts++] = newscript;1363 newscript->RegisterSelf(); 1364 1364 1365 1365 newscript = new Script; 1366 1366 newscript->Name="boss_ellris_duskhallow"; 1367 1367 newscript->GetAI = GetAI_ellris_duskhallow; 1368 m_scripts[nrscripts++] = newscript;1368 newscript->RegisterSelf(); 1369 1369 1370 1370 newscript = new Script; 1371 1371 newscript->Name="boss_eramas_brightblaze"; 1372 1372 newscript->GetAI = GetAI_eramas_brightblaze; 1373 m_scripts[nrscripts++] = newscript;1373 newscript->RegisterSelf(); 1374 1374 1375 1375 newscript = new Script; 1376 1376 newscript->Name="boss_yazzai"; 1377 1377 newscript->GetAI = GetAI_yazzai; 1378 m_scripts[nrscripts++] = newscript;1378 newscript->RegisterSelf(); 1379 1379 1380 1380 newscript = new Script; 1381 1381 newscript->Name="boss_warlord_salaris"; 1382 1382 newscript->GetAI = GetAI_warlord_salaris; 1383 m_scripts[nrscripts++] = newscript;1383 newscript->RegisterSelf(); 1384 1384 1385 1385 newscript = new Script; 1386 1386 newscript->Name="boss_garaxxas"; 1387 1387 newscript->GetAI = GetAI_garaxxas; 1388 m_scripts[nrscripts++] = newscript;1388 newscript->RegisterSelf(); 1389 1389 1390 1390 newscript = new Script; 1391 1391 newscript->Name="boss_apoko"; 1392 1392 newscript->GetAI = GetAI_apoko; 1393 m_scripts[nrscripts++] = newscript;1393 newscript->RegisterSelf(); 1394 1394 1395 1395 newscript = new Script; 1396 1396 newscript->Name="boss_zelfan"; 1397 1397 newscript->GetAI = GetAI_zelfan; 1398 m_scripts[nrscripts++] = newscript;1398 newscript->RegisterSelf(); 1399 1399 1400 1400 /*newscript = new Script; 1401 1401 newscript->Name="mob_high_explosive_sheep"; 1402 1402 newscript->GetAI = GetAI_mob_high_explosive_sheep; 1403 m_scripts[nrscripts++] = newscript;*/1403 newscript->RegisterSelf();*/ 1404 1404 1405 1405 /*newscript = new Script; 1406 1406 newscript->Name="mob_fizzle"; 1407 1407 newscript->GetAI = GetAI_mob_fizzle; 1408 m_scripts[nrscripts++] = newscript;*/1408 newscript->RegisterSelf();*/ 1409 1409 1410 1410 /*newscript = new Script; 1411 1411 newscript->Name="mob_sliver"; 1412 1412 newscript->GetAI = GetAI_mob_sliver; 1413 m_scripts[nrscripts++] = newscript;*/1413 newscript->RegisterSelf();*/ 1414 1414 } -
trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_selin_fireheart.cpp
r137 r260 404 404 newscript->Name="boss_selin_fireheart"; 405 405 newscript->GetAI = GetAI_boss_selin_fireheart; 406 m_scripts[nrscripts++] = newscript;406 newscript->RegisterSelf(); 407 407 408 408 newscript = new Script; 409 409 newscript->Name="mob_fel_crystal"; 410 410 newscript->GetAI = GetAI_mob_fel_crystal; 411 m_scripts[nrscripts++] = newscript;411 newscript->RegisterSelf(); 412 412 } -
trunk/src/bindings/scripts/scripts/zone/magisters_terrace/boss_vexallus.cpp
r137 r260 239 239 newscript->Name="boss_vexallus"; 240 240 newscript->GetAI = GetAI_boss_vexallus; 241 m_scripts[nrscripts++] = newscript;241 newscript->RegisterSelf(); 242 242 243 243 newscript = new Script; 244 244 newscript->Name="mob_pure_energy"; 245 245 newscript->GetAI = GetAI_mob_pure_energy; 246 m_scripts[nrscripts++] = newscript;246 newscript->RegisterSelf(); 247 247 } -
trunk/src/bindings/scripts/scripts/zone/magisters_terrace/instance_magisters_terrace.cpp
r137 r260 250 250 newscript->Name = "instance_magisters_terrace"; 251 251 newscript->GetInstanceData = GetInstanceData_instance_magisters_terrace; 252 m_scripts[nrscripts++] = newscript;252 newscript->RegisterSelf(); 253 253 } -
trunk/src/bindings/scripts/scripts/zone/maraudon/boss_celebras_the_cursed.cpp
r90 r260 94 94 newscript->Name="celebras_the_cursed"; 95 95 newscript->GetAI = GetAI_celebras_the_cursed; 96 m_scripts[nrscripts++] = newscript;96 newscript->RegisterSelf(); 97 97 } -
trunk/src/bindings/scripts/scripts/zone/maraudon/boss_landslide.cpp
r90 r260 91 91 newscript->Name="boss_landslide"; 92 92 newscript->GetAI = GetAI_boss_landslide; 93 m_scripts[nrscripts++] = newscript;93 newscript->RegisterSelf(); 94 94 } -
trunk/src/bindings/scripts/scripts/zone/maraudon/boss_noxxion.cpp
r90 r260 146 146 newscript->Name="boss_noxxion"; 147 147 newscript->GetAI = GetAI_boss_noxxion; 148 m_scripts[nrscripts++] = newscript;148 newscript->RegisterSelf(); 149 149 } -
trunk/src/bindings/scripts/scripts/zone/maraudon/boss_princess_theradras.cpp
r90 r260 105 105 newscript->Name="boss_princess_theradras"; 106 106 newscript->GetAI = GetAI_boss_ptheradras; 107 m_scripts[nrscripts++] = newscript;107 newscript->RegisterSelf(); 108 108 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_baron_geddon.cpp
r90 r260 102 102 newscript->Name="boss_baron_geddon"; 103 103 newscript->GetAI = GetAI_boss_baron_geddon; 104 m_scripts[nrscripts++] = newscript;104 newscript->RegisterSelf(); 105 105 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_garr.cpp
r90 r260 141 141 newscript->Name="boss_garr"; 142 142 newscript->GetAI = GetAI_boss_garr; 143 m_scripts[nrscripts++] = newscript;143 newscript->RegisterSelf(); 144 144 145 145 newscript = new Script; 146 146 newscript->Name="mob_firesworn"; 147 147 newscript->GetAI = GetAI_mob_firesworn; 148 m_scripts[nrscripts++] = newscript;148 newscript->RegisterSelf(); 149 149 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_gehennas.cpp
r90 r260 88 88 newscript->Name="boss_gehennas"; 89 89 newscript->GetAI = GetAI_boss_gehennas; 90 m_scripts[nrscripts++] = newscript;90 newscript->RegisterSelf(); 91 91 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_golemagg.cpp
r90 r260 193 193 newscript->Name="boss_golemagg"; 194 194 newscript->GetAI = GetAI_boss_golemagg; 195 m_scripts[nrscripts++] = newscript;195 newscript->RegisterSelf(); 196 196 197 197 newscript = new Script; 198 198 newscript->Name="mob_core_rager"; 199 199 newscript->GetAI = GetAI_mob_core_rager; 200 m_scripts[nrscripts++] = newscript;200 newscript->RegisterSelf(); 201 201 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_lucifron.cpp
r90 r260 87 87 newscript->Name="boss_lucifron"; 88 88 newscript->GetAI = GetAI_boss_lucifron; 89 m_scripts[nrscripts++] = newscript;89 newscript->RegisterSelf(); 90 90 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_magmadar.cpp
r90 r260 94 94 newscript->Name="boss_magmadar"; 95 95 newscript->GetAI = GetAI_boss_magmadar; 96 m_scripts[nrscripts++] = newscript;96 newscript->RegisterSelf(); 97 97 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_majordomo_executus.cpp
r90 r260 130 130 newscript->Name="boss_majordomo"; 131 131 newscript->GetAI = GetAI_boss_majordomo; 132 m_scripts[nrscripts++] = newscript;132 newscript->RegisterSelf(); 133 133 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_ragnaros.cpp
r158 r260 314 314 newscript->Name="boss_ragnaros"; 315 315 newscript->GetAI = GetAI_boss_ragnaros; 316 m_scripts[nrscripts++] = newscript;316 newscript->RegisterSelf(); 317 317 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_shazzrah.cpp
r90 r260 118 118 newscript->Name="boss_shazzrah"; 119 119 newscript->GetAI = GetAI_boss_shazzrah; 120 m_scripts[nrscripts++] = newscript;120 newscript->RegisterSelf(); 121 121 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/boss_sulfuron_harbinger.cpp
r90 r260 207 207 newscript->Name="boss_sulfuron"; 208 208 newscript->GetAI = GetAI_boss_sulfuron; 209 m_scripts[nrscripts++] = newscript;209 newscript->RegisterSelf(); 210 210 211 211 newscript = new Script; 212 212 newscript->Name="mob_flamewaker_priest"; 213 213 newscript->GetAI = GetAI_mob_flamewaker_priest; 214 m_scripts[nrscripts++] = newscript;214 newscript->RegisterSelf(); 215 215 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/instance_molten_core.cpp
r90 r260 254 254 newscript->Name="instance_molten_core"; 255 255 newscript->GetInstanceData = &GetInstance_instance_molten_core; 256 m_scripts[nrscripts++] = newscript;256 newscript->RegisterSelf(); 257 257 } -
trunk/src/bindings/scripts/scripts/zone/molten_core/molten_core.cpp
r90 r260 85 85 newscript->Name="mob_ancient_core_hound"; 86 86 newscript->GetAI = GetAI_mob_ancient_core_hound; 87 m_scripts[nrscripts++] = newscript;87 newscript->RegisterSelf(); 88 88 } -
trunk/src/bindings/scripts/scripts/zone/moonglade/moonglade.cpp
r204 r260 546 546 newscript->pGossipHello = &GossipHello_npc_bunthen_plainswind; 547 547 newscript->pGossipSelect = &GossipSelect_npc_bunthen_plainswind; 548 m_scripts[nrscripts++] = newscript;548 newscript->RegisterSelf(); 549 549 550 550 newscript = new Script; … … 552 552 newscript->pGossipHello = &GossipHello_npc_great_bear_spirit; 553 553 newscript->pGossipSelect = &GossipSelect_npc_great_bear_spirit; 554 m_scripts[nrscripts++] = newscript;554 newscript->RegisterSelf(); 555 555 556 556 newscript = new Script; … … 558 558 newscript->pGossipHello = &GossipHello_npc_silva_filnaveth; 559 559 newscript->pGossipSelect = &GossipSelect_npc_silva_filnaveth; 560 m_scripts[nrscripts++] = newscript;560 newscript->RegisterSelf(); 561 561 562 562 newscript = new Script; 563 563 newscript->Name="npc_clintar_dreamwalker"; 564 564 newscript->pQuestAccept = &QuestAccept_npc_clintar_dreamwalker; 565 m_scripts[nrscripts++] = newscript;565 newscript->RegisterSelf(); 566 566 567 567 newscript = new Script; 568 568 newscript->Name="npc_clintar_spirit"; 569 569 newscript->GetAI = GetAI_npc_clintar_spirit; 570 m_scripts[nrscripts++] = newscript;571 } 570 newscript->RegisterSelf(); 571 } -
trunk/src/bindings/scripts/scripts/zone/mulgore/mulgore.cpp
r90 r260 61 61 newscript->pGossipHello = &GossipHello_npc_skorn_whitecloud; 62 62 newscript->pGossipSelect = &GossipSelect_npc_skorn_whitecloud; 63 m_scripts[nrscripts++] = newscript;63 newscript->RegisterSelf(); 64 64 } -
trunk/src/bindings/scripts/scripts/zone/nagrand/nagrand.cpp
r204 r260 632 632 newscript->Name="mob_shattered_rumbler"; 633 633 newscript->GetAI = GetAI_mob_shattered_rumbler; 634 m_scripts[nrscripts++] = newscript;634 newscript->RegisterSelf(); 635 635 636 636 newscript = new Script; … … 639 639 newscript->pGossipHello = &GossipHello_mob_lump; 640 640 newscript->pGossipSelect = &GossipSelect_mob_lump; 641 m_scripts[nrscripts++] = newscript;641 newscript->RegisterSelf(); 642 642 643 643 newscript = new Script; 644 644 newscript->Name="mob_sunspring_villager"; 645 645 newscript->GetAI = GetAI_mob_sunspring_villager; 646 m_scripts[nrscripts++] = newscript;646 newscript->RegisterSelf(); 647 647 648 648 newscript = new Script; … … 651 651 newscript->pGossipSelect = &GossipSelect_npc_altruis_the_sufferer; 652 652 newscript->pQuestAccept = &QuestAccept_npc_altruis_the_sufferer; 653 m_scripts[nrscripts++] = newscript;653 newscript->RegisterSelf(); 654 654 655 655 newscript = new Script; … … 657 657 newscript->pGossipHello = &GossipHello_npc_greatmother_geyah; 658 658 newscript->pGossipSelect = &GossipSelect_npc_greatmother_geyah; 659 m_scripts[nrscripts++] = newscript;659 newscript->RegisterSelf(); 660 660 661 661 newscript = new Script; … … 663 663 newscript->pGossipHello = &GossipHello_npc_lantresor_of_the_blade; 664 664 newscript->pGossipSelect = &GossipSelect_npc_lantresor_of_the_blade; 665 m_scripts[nrscripts++] = newscript;665 newscript->RegisterSelf(); 666 666 667 667 newscript = new Script; 668 668 newscript->Name="npc_creditmarker_visit_with_ancestors"; 669 669 newscript->GetAI = GetAI_npc_creditmarker_visit_with_ancestors; 670 m_scripts[nrscripts++] = newscript;670 newscript->RegisterSelf(); 671 671 672 672 newscript = new Script; 673 673 newscript->Name="mob_sparrowhawk"; 674 674 newscript->GetAI = GetAI_mob_sparrowhawk; 675 m_scripts[nrscripts++] = newscript;676 } 675 newscript->RegisterSelf(); 676 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_anubrekhan.cpp
r229 r260 209 209 newscript->Name="boss_anubrekhan"; 210 210 newscript->GetAI = GetAI_boss_anubrekhan; 211 m_scripts[nrscripts++] = newscript;211 newscript->RegisterSelf(); 212 212 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_faerlina.cpp
r229 r260 198 198 newscript->Name="boss_faerlina"; 199 199 newscript->GetAI = GetAI_boss_faerlina; 200 m_scripts[nrscripts++] = newscript;200 newscript->RegisterSelf(); 201 201 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_gluth.cpp
r90 r260 171 171 newscript->Name="boss_gluth"; 172 172 newscript->GetAI = GetAI_boss_gluth; 173 m_scripts[nrscripts++] = newscript;173 newscript->RegisterSelf(); 174 174 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_highlord_mograine.cpp
r90 r260 175 175 newscript->Name="boss_highlord_mograine"; 176 176 newscript->GetAI = GetAI_boss_highlord_mograine; 177 m_scripts[nrscripts++] = newscript;177 newscript->RegisterSelf(); 178 178 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_kelthuzad.cpp
r90 r260 538 538 newscript->Name="boss_kelthuzad"; 539 539 newscript->GetAI = GetAI_boss_kelthuzadAI; 540 m_scripts[nrscripts++] = newscript;540 newscript->RegisterSelf(); 541 541 */ 542 542 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_lady_blaumeux.cpp
r90 r260 144 144 newscript->Name="boss_lady_blaumeux"; 145 145 newscript->GetAI = GetAI_boss_lady_blaumeux; 146 m_scripts[nrscripts++] = newscript;146 newscript->RegisterSelf(); 147 147 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_loatheb.cpp
r90 r260 213 213 newscript->Name="boss_loatheb"; 214 214 newscript->GetAI = GetAI_boss_loatheb; 215 m_scripts[nrscripts++] = newscript;215 newscript->RegisterSelf(); 216 216 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_maexxna.cpp
r90 r260 238 238 newscript->Name="boss_maexxna"; 239 239 newscript->GetAI = GetAI_boss_maexxna; 240 m_scripts[nrscripts++] = newscript;240 newscript->RegisterSelf(); 241 241 242 242 newscript = new Script; 243 243 newscript->Name="mob_webwrap"; 244 244 newscript->GetAI = GetAI_mob_webwrap; 245 m_scripts[nrscripts++] = newscript;245 newscript->RegisterSelf(); 246 246 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_noth.cpp
r90 r260 177 177 newscript->Name="boss_noth"; 178 178 newscript->GetAI = GetAI_boss_noth; 179 m_scripts[nrscripts++] = newscript;179 newscript->RegisterSelf(); 180 180 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_patchwerk.cpp
r90 r260 157 157 newscript->Name="boss_patchwerk"; 158 158 newscript->GetAI = GetAI_boss_patchwerk; 159 m_scripts[nrscripts++] = newscript;159 newscript->RegisterSelf(); 160 160 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_razuvious.cpp
r90 r260 164 164 newscript->Name="boss_razuvious"; 165 165 newscript->GetAI = GetAI_boss_razuvious; 166 m_scripts[nrscripts++] = newscript;166 newscript->RegisterSelf(); 167 167 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_sapphiron.cpp
r158 r260 196 196 newscript->Name="boss_sapphiron"; 197 197 newscript->GetAI = GetAI_boss_sapphiron; 198 m_scripts[nrscripts++] = newscript;198 newscript->RegisterSelf(); 199 199 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_sir_zeliek.cpp
r90 r260 143 143 newscript->Name="boss_sir_zeliek"; 144 144 newscript->GetAI = GetAI_boss_sir_zeliek; 145 m_scripts[nrscripts++] = newscript;145 newscript->RegisterSelf(); 146 146 } -
trunk/src/bindings/scripts/scripts/zone/naxxramas/boss_thane_korthazz.cpp
r90 r260 144 144 newscript->Name="boss_thane_korthazz"; 145 145 newscript->GetAI = GetAI_boss_thane_korthazz; 146 m_scripts[nrscripts++] = newscript;146 newscript->RegisterSelf(); 147 147 } -
trunk/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp
r90 r260 401 401 newscript->Name="go_manaforge_control_console"; 402 402 newscript->pGOHello = &GOHello_go_manaforge_control_console; 403 m_scripts[nrscripts++] = newscript;403 newscript->RegisterSelf(); 404 404 405 405 newscript = new Script; 406 406 newscript->Name="npc_manaforge_control_console"; 407 407 newscript->GetAI = GetAI_npc_manaforge_control_console; 408 m_scripts[nrscripts++] = newscript;408 newscript->RegisterSelf(); 409 409 410 410 newscript = new Script; … … 412 412 newscript->pGossipHello = &GossipHello_npc_protectorate_nether_drake; 413 413 newscript->pGossipSelect = &GossipSelect_npc_protectorate_nether_drake; 414 m_scripts[nrscripts++] = newscript;414 newscript->RegisterSelf(); 415 415 416 416 newscript = new Script; … … 418 418 newscript->pGossipHello = &GossipHello_npc_veronia; 419 419 newscript->pGossipSelect = &GossipSelect_npc_veronia; 420 m_scripts[nrscripts++] = newscript;421 } 420 newscript->RegisterSelf(); 421 } -
trunk/src/bindings/scripts/scripts/zone/onyxias_lair/boss_onyxia.cpp
r223 r260 230 230 newscript->Name="boss_onyxia"; 231 231 newscript->GetAI = GetAI_boss_onyxiaAI; 232 m_scripts[nrscripts++] = newscript;232 newscript->RegisterSelf(); 233 233 } -
trunk/src/bindings/scripts/scripts/zone/orgrimmar/orgrimmar.cpp
r90 r260 248 248 newscript->pGossipHello = &GossipHello_npc_neeru_fireblade; 249 249 newscript->pGossipSelect = &GossipSelect_npc_neeru_fireblade; 250 m_scripts[nrscripts++] = newscript;250 newscript->RegisterSelf(); 251 251 252 252 newscript = new Script; … … 255 255 newscript->pQuestAccept = &QuestAccept_npc_shenthul; 256 256 newscript->pReceiveEmote = &ReciveEmote_npc_shenthul; 257 m_scripts[nrscripts++] = newscript;257 newscript->RegisterSelf(); 258 258 259 259 newscript = new Script; … … 262 262 newscript->pGossipHello = &GossipHello_npc_thrall_warchief; 263 263 newscript->pGossipSelect = &GossipSelect_npc_thrall_warchief; 264 m_scripts[nrscripts++] = newscript;265 } 264 newscript->RegisterSelf(); 265 } -
trunk/src/bindings/scripts/scripts/zone/razorfen_downs/boss_amnennar_the_coldbringer.cpp
r90 r260 137 137 newscript->Name="boss_amnennar_the_coldbringer"; 138 138 newscript->GetAI = GetAI_boss_amnennar_the_coldbringer; 139 m_scripts[nrscripts++] = newscript;139 newscript->RegisterSelf(); 140 140 } -
trunk/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_ayamiss.cpp
r90 r260 104 104 newscript->Name="boss_ayamiss"; 105 105 newscript->GetAI = GetAI_boss_ayamiss; 106 m_scripts[nrscripts++] = newscript;106 newscript->RegisterSelf(); 107 107 } -
trunk/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_kurinnaxx.cpp
r90 r260 90 90 newscript->Name="boss_kurinnaxx"; 91 91 newscript->GetAI = GetAI_boss_kurinnaxx; 92 m_scripts[nrscripts++] = newscript;92 newscript->RegisterSelf(); 93 93 } -
trunk/src/bindings/scripts/scripts/zone/ruins_of_ahnqiraj/boss_moam.cpp
r90 r260 114 114 newscript->Name="boss_moam"; 115 115 newscript->GetAI = GetAI_boss_moam; 116 m_scripts[nrscripts++] = newscript;116 newscript->RegisterSelf(); 117 117 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_arcanist_doan.cpp
r90 r260 168 168 newscript->Name="boss_arcanist_doan"; 169 169 newscript->GetAI = GetAI_boss_arcanist_doan; 170 m_scripts[nrscripts++] = newscript;170 newscript->RegisterSelf(); 171 171 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_azshir_the_sleepless.cpp
r90 r260 94 94 newscript->Name="boss_azshir_the_sleepless"; 95 95 newscript->GetAI = GetAI_boss_azshir_the_sleepless; 96 m_scripts[nrscripts++] = newscript;96 newscript->RegisterSelf(); 97 97 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_bloodmage_thalnos.cpp
r90 r260 133 133 newscript->Name="boss_bloodmage_thalnos"; 134 134 newscript->GetAI = GetAI_boss_bloodmage_thalnos; 135 m_scripts[nrscripts++] = newscript;135 newscript->RegisterSelf(); 136 136 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_herod.cpp
r90 r260 194 194 newscript->Name="boss_herod"; 195 195 newscript->GetAI = GetAI_boss_herod; 196 m_scripts[nrscripts++] = newscript;196 newscript->RegisterSelf(); 197 197 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp
r90 r260 129 129 newscript->Name="boss_high_inquisitor_fairbanks"; 130 130 newscript->GetAI = GetAI_boss_high_inquisitor_fairbanks; 131 m_scripts[nrscripts++] = newscript;131 newscript->RegisterSelf(); 132 132 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_high_inquisitor_whitemane.cpp
r90 r260 174 174 newscript->Name="boss_high_inquisitor_whitemane"; 175 175 newscript->GetAI = GetAI_boss_high_inquisitor_whitemane; 176 m_scripts[nrscripts++] = newscript;176 newscript->RegisterSelf(); 177 177 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_houndmaster_loksey.cpp
r90 r260 75 75 newscript->Name="boss_houndmaster_loksey"; 76 76 newscript->GetAI = GetAI_boss_houndmaster_loksey; 77 m_scripts[nrscripts++] = newscript;77 newscript->RegisterSelf(); 78 78 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_interrogator_vishas.cpp
r90 r260 110 110 newscript->Name="boss_interrogator_vishas"; 111 111 newscript->GetAI = GetAI_boss_interrogator_vishas; 112 m_scripts[nrscripts++] = newscript;112 newscript->RegisterSelf(); 113 113 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_scarlet_commander_mograine.cpp
r90 r260 157 157 newscript->Name="boss_scarlet_commander_mograine"; 158 158 newscript->GetAI = GetAI_boss_scarlet_commander_mograine; 159 m_scripts[nrscripts++] = newscript;159 newscript->RegisterSelf(); 160 160 } -
trunk/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_scorn.cpp
r90 r260 97 97 newscript->Name="boss_scorn"; 98 98 newscript->GetAI = GetAI_boss_scorn; 99 m_scripts[nrscripts++] = newscript;99 newscript->RegisterSelf(); 100 100 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_darkmaster_gandling.cpp
r90 r260 189 189 newscript->Name="boss_darkmaster_gandling"; 190 190 newscript->GetAI = GetAI_boss_darkmaster_gandling; 191 m_scripts[nrscripts++] = newscript;191 newscript->RegisterSelf(); 192 192 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_death_knight_darkreaver.cpp
r90 r260 56 56 newscript->Name="boss_death_knight_darkreaver"; 57 57 newscript->GetAI = GetAI_boss_death_knight_darkreaver; 58 m_scripts[nrscripts++] = newscript;58 newscript->RegisterSelf(); 59 59 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_doctor_theolen_krastinov.cpp
r90 r260 105 105 newscript->Name="boss_doctor_theolen_krastinov"; 106 106 newscript->GetAI = GetAI_boss_theolenkrastinov; 107 m_scripts[nrscripts++] = newscript;107 newscript->RegisterSelf(); 108 108 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_illucia_barov.cpp
r90 r260 113 113 newscript->Name="boss_illucia_barov"; 114 114 newscript->GetAI = GetAI_boss_illuciabarov; 115 m_scripts[nrscripts++] = newscript;115 newscript->RegisterSelf(); 116 116 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_instructor_malicia.cpp
r90 r260 149 149 newscript->Name="boss_instructor_malicia"; 150 150 newscript->GetAI = GetAI_boss_instructormalicia; 151 m_scripts[nrscripts++] = newscript;151 newscript->RegisterSelf(); 152 152 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_jandice_barov.cpp
r223 r260 213 213 newscript->Name="boss_jandice_barov"; 214 214 newscript->GetAI = GetAI_boss_jandicebarov; 215 m_scripts[nrscripts++] = newscript;215 newscript->RegisterSelf(); 216 216 217 217 newscript = new Script; 218 218 newscript->Name="mob_illusionofjandicebarov"; 219 219 newscript->GetAI = GetAI_mob_illusionofjandicebarov; 220 m_scripts[nrscripts++] = newscript;220 newscript->RegisterSelf(); 221 221 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_kormok.cpp
r90 r260 152 152 newscript->Name="boss_kormok"; 153 153 newscript->GetAI = GetAI_boss_kormok; 154 m_scripts[nrscripts++] = newscript;154 newscript->RegisterSelf(); 155 155 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_lord_alexei_barov.cpp
r90 r260 95 95 newscript->Name="boss_lord_alexei_barov"; 96 96 newscript->GetAI = GetAI_boss_lordalexeibarov; 97 m_scripts[nrscripts++] = newscript;97 newscript->RegisterSelf(); 98 98 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_lorekeeper_polkelt.cpp
r90 r260 110 110 newscript->Name="boss_lorekeeper_polkelt"; 111 111 newscript->GetAI = GetAI_boss_lorekeeperpolkelt; 112 m_scripts[nrscripts++] = newscript;112 newscript->RegisterSelf(); 113 113 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_ras_frostwhisper.cpp
r90 r260 122 122 newscript->Name="boss_boss_ras_frostwhisper"; 123 123 newscript->GetAI = GetAI_boss_rasfrost; 124 m_scripts[nrscripts++] = newscript;124 newscript->RegisterSelf(); 125 125 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_the_ravenian.cpp
r90 r260 115 115 newscript->Name="boss_the_ravenian"; 116 116 newscript->GetAI = GetAI_boss_theravenian; 117 m_scripts[nrscripts++] = newscript;117 newscript->RegisterSelf(); 118 118 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_vectus.cpp
r90 r260 92 92 newscript->Name="boss_vectus"; 93 93 newscript->GetAI = GetAI_boss_vectus; 94 m_scripts[nrscripts++] = newscript;94 newscript->RegisterSelf(); 95 95 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/instance_scholomance.cpp
r90 r260 99 99 newscript->Name = "instance_scholomance"; 100 100 newscript->GetInstanceData = GetInstanceData_instance_scholomance; 101 m_scripts[nrscripts++] = newscript;101 newscript->RegisterSelf(); 102 102 } -
trunk/src/bindings/scripts/scripts/zone/searing_gorge/searing_gorge.cpp
r90 r260 144 144 newscript->pGossipHello = &GossipHello_npc_kalaran_windblade; 145 145 newscript->pGossipSelect = &GossipSelect_npc_kalaran_windblade; 146 m_scripts[nrscripts++] = newscript;146 newscript->RegisterSelf(); 147 147 148 148 newscript = new Script; … … 150 150 newscript->pGossipHello = &GossipHello_npc_lothos_riftwaker; 151 151 newscript->pGossipSelect = &GossipSelect_npc_lothos_riftwaker; 152 m_scripts[nrscripts++] = newscript;152 newscript->RegisterSelf(); 153 153 154 154 newscript = new Script; … … 156 156 newscript->pGossipHello = &GossipHello_npc_zamael_lunthistle; 157 157 newscript->pGossipSelect = &GossipSelect_npc_zamael_lunthistle; 158 m_scripts[nrscripts++] = newscript;158 newscript->RegisterSelf(); 159 159 } -
trunk/src/bindings/scripts/scripts/zone/shadowfang_keep/instance_shadowfang_keep.cpp
r90 r260 149 149 newscript->Name = "instance_shadowfang_keep"; 150 150 newscript->GetInstanceData = GetInstanceData_instance_shadowfang_keep; 151 m_scripts[nrscripts++] = newscript;151 newscript->RegisterSelf(); 152 152 } -
trunk/src/bindings/scripts/scripts/zone/shadowfang_keep/shadowfang_keep.cpp
r90 r260 114 114 newscript->pGossipSelect = &GossipSelect_npc_shadowfang_prisoner; 115 115 newscript->GetAI = GetAI_npc_shadowfang_prisoner; 116 m_scripts[nrscripts++] = newscript;116 newscript->RegisterSelf(); 117 117 } -
trunk/src/bindings/scripts/scripts/zone/shadowmoon_valley/boss_doomwalker.cpp
r223 r260 213 213 newscript->Name="boss_doomwalker"; 214 214 newscript->GetAI = GetAI_boss_doomwalker; 215 m_scripts[nrscripts++] = newscript;215 newscript->RegisterSelf(); 216 216 } -
trunk/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp
r141 r260 1107 1107 newscript->Name = "mob_mature_netherwing_drake"; 1108 1108 newscript->GetAI = GetAI_mob_mature_netherwing_drake; 1109 m_scripts[nrscripts++] = newscript;1109 newscript->RegisterSelf(); 1110 1110 1111 1111 newscript = new Script; 1112 1112 newscript->Name = "mob_enslaved_netherwing_drake"; 1113 1113 newscript->GetAI = GetAI_mob_enslaved_netherwing_drake; 1114 m_scripts[nrscripts++] = newscript;1114 newscript->RegisterSelf(); 1115 1115 1116 1116 newscript = new Script; 1117 1117 newscript->Name = "mob_dragonmaw_peon"; 1118 1118 newscript->GetAI = GetAI_mob_dragonmaw_peon; 1119 m_scripts[nrscripts++] = newscript;1119 newscript->RegisterSelf(); 1120 1120 1121 1121 newscript = new Script; … … 1123 1123 newscript->pGossipHello = &GossipHello_npc_drake_dealer_hurlunk; 1124 1124 newscript->pGossipSelect = &GossipSelect_npc_drake_dealer_hurlunk; 1125 m_scripts[nrscripts++] = newscript;1125 newscript->RegisterSelf(); 1126 1126 1127 1127 newscript = new Script; 1128 1128 newscript->Name="npc_invis_legion_teleporter"; 1129 1129 newscript->GetAI = GetAI_npc_invis_legion_teleporter; 1130 m_scripts[nrscripts++] = newscript;1130 newscript->RegisterSelf(); 1131 1131 1132 1132 newscript = new Script; … … 1134 1134 newscript->pGossipHello = &GossipHello_npcs_flanis_swiftwing_and_kagrosh; 1135 1135 newscript->pGossipSelect = &GossipSelect_npcs_flanis_swiftwing_and_kagrosh; 1136 m_scripts[nrscripts++] = newscript;1136 newscript->RegisterSelf(); 1137 1137 1138 1138 newscript = new Script; … … 1140 1140 newscript->pGossipHello = &GossipHello_npc_murkblood_overseer; 1141 1141 newscript->pGossipSelect = &GossipSelect_npc_murkblood_overseer; 1142 m_scripts[nrscripts++] = newscript;1142 newscript->RegisterSelf(); 1143 1143 1144 1144 newscript = new Script; … … 1146 1146 newscript->pGossipHello = &GossipHello_npc_neltharaku; 1147 1147 newscript->pGossipSelect = &GossipSelect_npc_neltharaku; 1148 m_scripts[nrscripts++] = newscript;1148 newscript->RegisterSelf(); 1149 1149 1150 1150 newscript = new Script; 1151 1151 newscript->Name = "npc_karynaku"; 1152 1152 newscript->pQuestAccept = &QuestAccept_npc_karynaku; 1153 m_scripts[nrscripts++] = newscript;1153 newscript->RegisterSelf(); 1154 1154 1155 1155 newscript = new Script; … … 1157 1157 newscript->pGossipHello = &GossipHello_npc_oronok_tornheart; 1158 1158 newscript->pGossipSelect = &GossipSelect_npc_oronok_tornheart; 1159 m_scripts[nrscripts++] = newscript;1159 newscript->RegisterSelf(); 1160 1160 1161 1161 newscript = new Script; … … 1163 1163 newscript->GetAI = GetAI_Overlord_Morghor; 1164 1164 newscript->pQuestAccept = &QuestAccept_Overlord_Morghor; 1165 m_scripts[nrscripts++] = newscript;1165 newscript->RegisterSelf(); 1166 1166 1167 1167 newscript = new Script; 1168 1168 newscript->Name = "npc_lord_illidan_stormrage"; 1169 1169 newscript->GetAI = GetAI_Lord_Illidan; 1170 m_scripts[nrscripts++] = newscript;1170 newscript->RegisterSelf(); 1171 1171 1172 1172 newscript = new Script; … … 1175 1175 newscript->pGossipHello = &GossipHello_npc_yarzill_fly; 1176 1176 newscript->pGossipSelect = &GossipSelect_npc_yarzill_fly; 1177 m_scripts[nrscripts++] = newscript;1178 } 1177 newscript->RegisterSelf(); 1178 } -
trunk/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp
r90 r260 415 415 newscript->pGossipHello = &GossipHello_npc_raliq_the_drunk; 416 416 newscript->pGossipSelect = &GossipSelect_npc_raliq_the_drunk; 417 m_scripts[nrscripts++] = newscript;417 newscript->RegisterSelf(); 418 418 419 419 newscript = new Script; … … 421 421 newscript->GetAI = GetAI_npc_salsalabim; 422 422 newscript->pGossipHello = &GossipHello_npc_salsalabim; 423 m_scripts[nrscripts++] = newscript;423 newscript->RegisterSelf(); 424 424 425 425 newscript = new Script; … … 427 427 newscript->pGossipHello = &GossipHello_npc_shattrathflaskvendors; 428 428 newscript->pGossipSelect = &GossipSelect_npc_shattrathflaskvendors; 429 m_scripts[nrscripts++] = newscript;429 newscript->RegisterSelf(); 430 430 431 431 newscript = new Script; … … 433 433 newscript->pGossipHello = &GossipHello_npc_zephyr; 434 434 newscript->pGossipSelect = &GossipSelect_npc_zephyr; 435 m_scripts[nrscripts++] = newscript;435 newscript->RegisterSelf(); 436 436 437 437 newscript = new Script; 438 438 newscript->Name="npc_kservant"; 439 439 newscript->GetAI = GetAI_npc_kservantAI; 440 m_scripts[nrscripts++] = newscript;441 } 440 newscript->RegisterSelf(); 441 } -
trunk/src/bindings/scripts/scripts/zone/silithus/silithus.cpp
r90 r260 146 146 newscript->pGossipHello = &GossipHello_npcs_rutgar_and_frankal; 147 147 newscript->pGossipSelect = &GossipSelect_npcs_rutgar_and_frankal; 148 m_scripts[nrscripts++] = newscript;148 newscript->RegisterSelf(); 149 149 } -
trunk/src/bindings/scripts/scripts/zone/silvermoon/silvermoon_city.cpp
r101 r260 100 100 newscript->Name="npc_blood_knight_stillblade"; 101 101 newscript->GetAI = GetAI_npc_blood_knight_stillblade; 102 m_scripts[nrscripts++] = newscript;102 newscript->RegisterSelf(); 103 103 } -
trunk/src/bindings/scripts/scripts/zone/silverpine_forest/silverpine_forest.cpp
r90 r260 97 97 newscript->pGossipSelect = &GossipSelect_npc_astor_hadren; 98 98 newscript->GetAI = GetAI_npc_astor_hadren; 99 m_scripts[nrscripts++] = newscript;99 newscript->RegisterSelf(); 100 100 } -
trunk/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp
r90 r260 77 77 newscript->pGossipHello = &GossipHello_npc_braug_dimspirit; 78 78 newscript->pGossipSelect = &GossipSelect_npc_braug_dimspirit; 79 m_scripts[nrscripts++] = newscript;79 newscript->RegisterSelf(); 80 80 } -
trunk/src/bindings/scripts/scripts/zone/stormwind/stormwind_city.cpp
r90 r260 246 246 newscript->pGossipHello = &GossipHello_npc_archmage_malin; 247 247 newscript->pGossipSelect = &GossipSelect_npc_archmage_malin; 248 m_scripts[nrscripts++] = newscript;248 newscript->RegisterSelf(); 249 249 250 250 newscript = new Script; … … 252 252 newscript->GetAI = GetAI_npc_bartleby; 253 253 newscript->pQuestAccept = &QuestAccept_npc_bartleby; 254 m_scripts[nrscripts++] = newscript;254 newscript->RegisterSelf(); 255 255 256 256 newscript = new Script; … … 258 258 newscript->GetAI = GetAI_npc_dashel_stonefist; 259 259 newscript->pQuestAccept = &QuestAccept_npc_dashel_stonefist; 260 m_scripts[nrscripts++] = newscript;260 newscript->RegisterSelf(); 261 261 262 262 newscript = new Script; 263 263 newscript->Name = "npc_general_marcus_jonathan"; 264 264 newscript->pReceiveEmote = &ReceiveEmote_npc_general_marcus_jonathan; 265 m_scripts[nrscripts++] = newscript;265 newscript->RegisterSelf(); 266 266 267 267 newscript = new Script; … … 269 269 newscript->pGossipHello = &GossipHello_npc_lady_katrana_prestor; 270 270 newscript->pGossipSelect = &GossipSelect_npc_lady_katrana_prestor; 271 m_scripts[nrscripts++] = newscript;272 } 271 newscript->RegisterSelf(); 272 } -
trunk/src/bindings/scripts/scripts/zone/stranglethorn_vale/stranglethorn_vale.cpp
r90 r260 104 104 newscript->Name = "mob_yenniku"; 105 105 newscript->GetAI = GetAI_mob_yenniku; 106 m_scripts[nrscripts++] = newscript;106 newscript->RegisterSelf(); 107 107 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_baron_rivendare.cpp
r90 r260 212 212 newscript->Name="boss_baron_rivendare"; 213 213 newscript->GetAI = GetAI_boss_baron_rivendare; 214 m_scripts[nrscripts++] = newscript;214 newscript->RegisterSelf(); 215 215 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_baroness_anastari.cpp
r90 r260 121 121 newscript->Name="boss_baroness_anastari"; 122 122 newscript->GetAI = GetAI_boss_baroness_anastari; 123 m_scripts[nrscripts++] = newscript;123 newscript->RegisterSelf(); 124 124 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_cannon_master_willey.cpp
r90 r260 218 218 newscript->Name="boss_cannon_master_willey"; 219 219 newscript->GetAI = GetAI_boss_cannon_master_willey; 220 m_scripts[nrscripts++] = newscript;220 newscript->RegisterSelf(); 221 221 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_dathrohan_balnazzar.cpp
r90 r260 313 313 newscript->Name="boss_dathrohan_balnazzar"; 314 314 newscript->GetAI = GetAI_boss_dathrohan_balnazzar; 315 m_scripts[nrscripts++] = newscript;315 newscript->RegisterSelf(); 316 316 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_magistrate_barthilas.cpp
r90 r260 111 111 newscript->Name="boss_magistrate_barthilas"; 112 112 newscript->GetAI = GetAI_boss_magistrate_barthilas; 113 m_scripts[nrscripts++] = newscript;113 newscript->RegisterSelf(); 114 114 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_maleki_the_pallid.cpp
r90 r260 116 116 newscript->Name="boss_maleki_the_pallid"; 117 117 newscript->GetAI = GetAI_boss_maleki_the_pallid; 118 m_scripts[nrscripts++] = newscript;118 newscript->RegisterSelf(); 119 119 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_nerubenkan.cpp
r90 r260 135 135 newscript->Name="boss_nerubenkan"; 136 136 newscript->GetAI = GetAI_boss_nerubenkan; 137 m_scripts[nrscripts++] = newscript;137 newscript->RegisterSelf(); 138 138 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_order_of_silver_hand.cpp
r90 r260 158 158 newscript->Name="boss_silver_hand_bosses"; 159 159 newscript->GetAI = GetAI_boss_silver_hand_bossesAI; 160 m_scripts[nrscripts++] = newscript;160 newscript->RegisterSelf(); 161 161 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_postmaster_malown.cpp
r90 r260 141 141 newscript->Name="boss_postmaster_malown"; 142 142 newscript->GetAI = GetAI_boss_postmaster_malown; 143 m_scripts[nrscripts++] = newscript;143 newscript->RegisterSelf(); 144 144 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_ramstein_the_gorger.cpp
r90 r260 89 89 newscript->Name="boss_ramstein_the_gorger"; 90 90 newscript->GetAI = GetAI_boss_ramstein_the_gorger; 91 m_scripts[nrscripts++] = newscript;91 newscript->RegisterSelf(); 92 92 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/boss_timmy_the_cruel.cpp
r229 r260 97 97 newscript->Name="boss_timmy_the_cruel"; 98 98 newscript->GetAI = GetAI_boss_timmy_the_cruel; 99 m_scripts[nrscripts++] = newscript;99 newscript->RegisterSelf(); 100 100 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/instance_stratholme.cpp
r90 r260 74 74 newscript->Name = "instance_stratholme"; 75 75 newscript->GetInstanceData = GetInstanceData_instance_stratholme; 76 m_scripts[nrscripts++] = newscript;76 newscript->RegisterSelf(); 77 77 } -
trunk/src/bindings/scripts/scripts/zone/stratholme/stratholme.cpp
r90 r260 311 311 newscript->Name="mob_freed_soul"; 312 312 newscript->GetAI = GetAI_mob_freed_soul; 313 m_scripts[nrscripts++] = newscript;313 newscript->RegisterSelf(); 314 314 315 315 newscript = new Script; 316 316 newscript->Name="mob_restless_soul"; 317 317 newscript->GetAI = GetAI_mob_restless_soul; 318 m_scripts[nrscripts++] = newscript;318 newscript->RegisterSelf(); 319 319 320 320 newscript = new Script; … … 322 322 newscript->GetAI = GetAI_mobs_spectral_ghostly_citizen; 323 323 newscript->pReceiveEmote = &ReciveEmote_mobs_spectral_ghostly_citizen; 324 m_scripts[nrscripts++] = newscript;324 newscript->RegisterSelf(); 325 325 326 326 newscript = new Script; 327 327 newscript->Name="mob_mindless_skeleton"; 328 328 newscript->GetAI = GetAI_mob_mindless_skeleton; 329 m_scripts[nrscripts++] = newscript;329 newscript->RegisterSelf(); 330 330 331 331 newscript = new Script; 332 332 newscript->Name="mob_thuzadin_acolyte"; 333 333 newscript->GetAI = GetAI_mob_thuzadin_acolyte; 334 m_scripts[nrscripts++] = newscript;335 } 334 newscript->RegisterSelf(); 335 } -
trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_brutallus.cpp
r141 r260 179 179 newscript->Name="boss_brutallus"; 180 180 newscript->GetAI = GetAI_boss_brutallus; 181 m_scripts[nrscripts++] = newscript;181 newscript->RegisterSelf(); 182 182 } -
trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_eredar_twins.cpp
r229 r260 762 762 newscript->Name="boss_sacrolash"; 763 763 newscript->GetAI = GetAI_boss_sacrolash; 764 m_scripts[nrscripts++] = newscript;764 newscript->RegisterSelf(); 765 765 766 766 newscript = new Script; 767 767 newscript->Name="boss_alythess"; 768 768 newscript->GetAI = GetAI_boss_alythess; 769 m_scripts[nrscripts++] = newscript;769 newscript->RegisterSelf(); 770 770 771 771 newscript = new Script; 772 772 newscript->Name="mob_shadow_image"; 773 773 newscript->GetAI = GetAI_mob_shadow_image; 774 m_scripts[nrscripts++] = newscript;774 newscript->RegisterSelf(); 775 775 } -
trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_felmyst.cpp
r257 r260 575 575 newscript->Name="boss_felmyst"; 576 576 newscript->GetAI = GetAI_boss_felmyst; 577 m_scripts[nrscripts++] = newscript;577 newscript->RegisterSelf(); 578 578 579 579 newscript = new Script; 580 580 newscript->Name="mob_felmyst_vapor"; 581 581 newscript->GetAI = GetAI_mob_felmyst_vapor; 582 m_scripts[nrscripts++] = newscript;582 newscript->RegisterSelf(); 583 583 584 584 newscript = new Script; 585 585 newscript->Name="mob_felmyst_trail"; 586 586 newscript->GetAI = GetAI_mob_felmyst_trail; 587 m_scripts[nrscripts++] = newscript;587 newscript->RegisterSelf(); 588 588 } -
trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp
r257 r260 681 681 newscript->Name="boss_kalecgos"; 682 682 newscript->GetAI = GetAI_boss_kalecgos; 683 m_scripts[nrscripts++] = newscript;683 newscript->RegisterSelf(); 684 684 685 685 newscript = new Script; 686 686 newscript->Name="boss_sathrovarr"; 687 687 newscript->GetAI = GetAI_boss_Sathrovarr; 688 m_scripts[nrscripts++] = newscript;688 newscript->RegisterSelf(); 689 689 690 690 newscript = new Script; 691 691 newscript->Name="boss_kalec"; 692 692 newscript->GetAI = GetAI_boss_kalec; 693 m_scripts[nrscripts++] = newscript;693 newscript->RegisterSelf(); 694 694 695 695 newscript = new Script; 696 696 newscript->Name="kalocegos_teleporter"; 697 697 newscript->pGOHello = &GOkalocegos_teleporter; 698 m_scripts[nrscripts++] = newscript;698 newscript->RegisterSelf(); 699 699 } -
trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/instance_sunwell_plateau.cpp
r239 r260 193 193 newscript->Name = "instance_sunwell_plateau"; 194 194 newscript->GetInstanceData = GetInstanceData_instance_sunwell_plateau; 195 m_scripts[nrscripts++] = newscript;195 newscript->RegisterSelf(); 196 196 } -
trunk/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp
r90 r260 375 375 newscript->Name="mob_aquementas"; 376 376 newscript->GetAI = GetAI_mob_aquementas; 377 m_scripts[nrscripts++] = newscript;377 newscript->RegisterSelf(); 378 378 379 379 newscript = new Script; 380 380 newscript->Name="npc_custodian_of_time"; 381 381 newscript->GetAI = GetAI_npc_custodian_of_time; 382 m_scripts[nrscripts++] = newscript;382 newscript->RegisterSelf(); 383 383 384 384 newscript = new Script; … … 386 386 newscript->pGossipHello = &GossipHello_npc_marin_noggenfogger; 387 387 newscript->pGossipSelect = &GossipSelect_npc_marin_noggenfogger; 388 m_scripts[nrscripts++] = newscript;388 newscript->RegisterSelf(); 389 389 390 390 newscript = new Script; … … 393 393 newscript->pGossipSelect = &GossipSelect_npc_steward_of_time; 394 394 newscript->pQuestAccept = &QuestAccept_npc_steward_of_time; 395 m_scripts[nrscripts++] = newscript;395 newscript->RegisterSelf(); 396 396 397 397 newscript = new Script; … … 399 399 newscript->pGossipHello = &GossipHello_npc_stone_watcher_of_norgannon; 400 400 newscript->pGossipSelect = &GossipSelect_npc_stone_watcher_of_norgannon; 401 m_scripts[nrscripts++] = newscript;402 } 401 newscript->RegisterSelf(); 402 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/arcatraz.cpp
r229 r260 576 576 newscript->Name="npc_millhouse_manastorm"; 577 577 newscript->GetAI = GetAI_npc_millhouse_manastorm; 578 m_scripts[nrscripts++] = newscript;578 newscript->RegisterSelf(); 579 579 580 580 newscript = new Script; 581 581 newscript->Name="npc_warden_mellichar"; 582 582 newscript->GetAI = GetAI_npc_warden_mellichar; 583 m_scripts[nrscripts++] = newscript;583 newscript->RegisterSelf(); 584 584 585 585 newscript = new Script; 586 586 newscript->Name="mob_zerekethvoidzone"; 587 587 newscript->GetAI = GetAI_mob_zerekethvoidzoneAI; 588 m_scripts[nrscripts++] = newscript;588 newscript->RegisterSelf(); 589 589 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp
r229 r260 368 368 newscript->Name="boss_harbinger_skyriss"; 369 369 newscript->GetAI = GetAI_boss_harbinger_skyriss; 370 m_scripts[nrscripts++] = newscript;370 newscript->RegisterSelf(); 371 371 372 372 newscript = new Script; 373 373 newscript->Name="boss_harbinger_skyriss_illusion"; 374 374 newscript->GetAI = GetAI_boss_harbinger_skyriss_illusion; 375 m_scripts[nrscripts++] = newscript;375 newscript->RegisterSelf(); 376 376 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/arcatraz/instance_arcatraz.cpp
r90 r260 221 221 newscript->Name = "instance_arcatraz"; 222 222 newscript->GetInstanceData = GetInstanceData_instance_arcatraz; 223 m_scripts[nrscripts++] = newscript;223 newscript->RegisterSelf(); 224 224 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_high_botanist_freywinn.cpp
r90 r260 212 212 newscript->Name="boss_high_botanist_freywinn"; 213 213 newscript->GetAI = GetAI_boss_high_botanist_freywinn; 214 m_scripts[nrscripts++] = newscript;214 newscript->RegisterSelf(); 215 215 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_laj.cpp
r90 r260 195 195 newscript->Name="boss_laj"; 196 196 newscript->GetAI = GetAI_boss_laj; 197 m_scripts[nrscripts++] = newscript;197 newscript->RegisterSelf(); 198 198 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_warp_splinter.cpp
r223 r260 294 294 newscript->Name="boss_warp_splinter"; 295 295 newscript->GetAI = GetAI_boss_warp_splinter; 296 m_scripts[nrscripts++] = newscript;296 newscript->RegisterSelf(); 297 297 298 298 newscript = new Script; 299 299 newscript->Name="mob_warp_splinter_treant"; 300 300 newscript->GetAI = GetAI_mob_treant; 301 m_scripts[nrscripts++] = newscript;301 newscript->RegisterSelf(); 302 302 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_alar.cpp
r158 r260 506 506 newscript->Name="boss_alar"; 507 507 newscript->GetAI = GetAI_boss_alar; 508 m_scripts[nrscripts++] = newscript;508 newscript->RegisterSelf(); 509 509 510 510 newscript = new Script; 511 511 newscript->Name="mob_ember_of_alar"; 512 512 newscript->GetAI = GetAI_mob_ember_of_alar; 513 m_scripts[nrscripts++] = newscript;513 newscript->RegisterSelf(); 514 514 515 515 newscript = new Script; 516 516 newscript->Name="mob_flame_patch_alar"; 517 517 newscript->GetAI = GetAI_mob_flame_patch_alar; 518 m_scripts[nrscripts++] = newscript;518 newscript->RegisterSelf(); 519 519 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_astromancer.cpp
r204 r260 537 537 newscript->Name="boss_high_astromancer_solarian"; 538 538 newscript->GetAI = GetAI_boss_high_astromancer_solarian; 539 m_scripts[nrscripts++] = newscript;539 newscript->RegisterSelf(); 540 540 541 541 newscript = new Script; 542 542 newscript->Name="mob_solarium_priest"; 543 543 newscript->GetAI = GetAI_mob_solarium_priest; 544 m_scripts[nrscripts++] = newscript;544 newscript->RegisterSelf(); 545 545 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_kaelthas.cpp
r229 r260 1582 1582 newscript->Name="boss_kaelthas"; 1583 1583 newscript->GetAI = GetAI_boss_kaelthas; 1584 m_scripts[nrscripts++] = newscript;1584 newscript->RegisterSelf(); 1585 1585 1586 1586 newscript = new Script; 1587 1587 newscript->Name="boss_thaladred_the_darkener"; 1588 1588 newscript->GetAI = GetAI_boss_thaladred_the_darkener; 1589 m_scripts[nrscripts++] = newscript;1589 newscript->RegisterSelf(); 1590 1590 1591 1591 newscript = new Script; 1592 1592 newscript->Name="boss_lord_sanguinar"; 1593 1593 newscript->GetAI = GetAI_boss_lord_sanguinar; 1594 m_scripts[nrscripts++] = newscript;1594 newscript->RegisterSelf(); 1595 1595 1596 1596 newscript = new Script; 1597 1597 newscript->Name="boss_grand_astromancer_capernian"; 1598 1598 newscript->GetAI = GetAI_boss_grand_astromancer_capernian; 1599 m_scripts[nrscripts++] = newscript;1599 newscript->RegisterSelf(); 1600 1600 1601 1601 newscript = new Script; 1602 1602 newscript->Name="boss_master_engineer_telonicus"; 1603 1603 newscript->GetAI = GetAI_boss_master_engineer_telonicus; 1604 m_scripts[nrscripts++] = newscript;1604 newscript->RegisterSelf(); 1605 1605 1606 1606 newscript = new Script; 1607 1607 newscript->Name= "mob_kael_flamestrike"; 1608 1608 newscript->GetAI = GetAI_mob_kael_flamestrike; 1609 m_scripts[nrscripts++] = newscript;1609 newscript->RegisterSelf(); 1610 1610 1611 1611 newscript = new Script; 1612 1612 newscript->Name="mob_phoenix"; 1613 1613 newscript->GetAI = GetAI_mob_phoenix; 1614 m_scripts[nrscripts++] = newscript;1614 newscript->RegisterSelf(); 1615 1615 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp
r204 r260 196 196 newscript->Name="boss_void_reaver"; 197 197 newscript->GetAI = GetAI_boss_void_reaver; 198 m_scripts[nrscripts++] = newscript;198 newscript->RegisterSelf(); 199 199 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/instance_the_eye.cpp
r204 r260 173 173 newscript->Name = "instance_the_eye"; 174 174 newscript->GetInstanceData = GetInstanceData_instance_the_eye; 175 m_scripts[nrscripts++] = newscript;175 newscript->RegisterSelf(); 176 176 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/the_eye.cpp
r90 r260 95 95 newscript->Name="mob_crystalcore_devastator"; 96 96 newscript->GetAI = GetAI_mob_crystalcore_devastator; 97 m_scripts[nrscripts++] = newscript;97 newscript->RegisterSelf(); 98 98 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp
r223 r260 158 158 newscript->Name="boss_gatewatcher_iron_hand"; 159 159 newscript->GetAI = GetAI_boss_gatewatcher_iron_hand; 160 m_scripts[nrscripts++] = newscript;160 newscript->RegisterSelf(); 161 161 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp
r223 r260 278 278 newscript->Name="boss_nethermancer_sepethrea"; 279 279 newscript->GetAI = GetAI_boss_nethermancer_sepethrea; 280 m_scripts[nrscripts++] = newscript;280 newscript->RegisterSelf(); 281 281 282 282 newscript = new Script; 283 283 newscript->Name="mob_ragin_flames"; 284 284 newscript->GetAI = GetAI_mob_ragin_flames; 285 m_scripts[nrscripts++] = newscript;285 newscript->RegisterSelf(); 286 286 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp
r223 r260 298 298 newscript->Name="boss_pathaleon_the_calculator"; 299 299 newscript->GetAI = GetAI_boss_pathaleon_the_calculator; 300 m_scripts[nrscripts++] = newscript;300 newscript->RegisterSelf(); 301 301 302 302 newscript = new Script; 303 303 newscript->Name="mob_nether_wraith"; 304 304 newscript->GetAI = GetAI_mob_nether_wraith; 305 m_scripts[nrscripts++] = newscript;305 newscript->RegisterSelf(); 306 306 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/instance_mechanar.cpp
r223 r260 87 87 newscript->Name = "instance_mechanar"; 88 88 newscript->GetInstanceData = GetInstanceData_instance_mechanar; 89 m_scripts[nrscripts++] = newscript;89 newscript->RegisterSelf(); 90 90 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_bug_trio.cpp
r109 r260 335 335 newscript->Name="boss_kri"; 336 336 newscript->GetAI = GetAI_boss_kri; 337 m_scripts[nrscripts++] = newscript;337 newscript->RegisterSelf(); 338 338 339 339 newscript = new Script; 340 340 newscript->Name="boss_vem"; 341 341 newscript->GetAI = GetAI_boss_vem; 342 m_scripts[nrscripts++] = newscript;342 newscript->RegisterSelf(); 343 343 344 344 newscript = new Script; 345 345 newscript->Name="boss_yauj"; 346 346 newscript->GetAI = GetAI_boss_yauj; 347 m_scripts[nrscripts++] = newscript;347 newscript->RegisterSelf(); 348 348 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp
r257 r260 1330 1330 newscript->Name="boss_eye_of_cthun"; 1331 1331 newscript->GetAI = GetAI_eye_of_cthun; 1332 m_scripts[nrscripts++] = newscript;1332 newscript->RegisterSelf(); 1333 1333 1334 1334 newscript = new Script; 1335 1335 newscript->Name="boss_cthun"; 1336 1336 newscript->GetAI = GetAI_cthun; 1337 m_scripts[nrscripts++] = newscript;1337 newscript->RegisterSelf(); 1338 1338 1339 1339 newscript = new Script; 1340 1340 newscript->Name="mob_eye_tentacle"; 1341 1341 newscript->GetAI = GetAI_eye_tentacle; 1342 m_scripts[nrscripts++] = newscript;1342 newscript->RegisterSelf(); 1343 1343 1344 1344 newscript = new Script; 1345 1345 newscript->Name="mob_claw_tentacle"; 1346 1346 newscript->GetAI = GetAI_claw_tentacle; 1347 m_scripts[nrscripts++] = newscript;1347 newscript->RegisterSelf(); 1348 1348 1349 1349 newscript = new Script; 1350 1350 newscript->Name="mob_giant_claw_tentacle"; 1351 1351 newscript->GetAI = GetAI_giant_claw_tentacle; 1352 m_scripts[nrscripts++] = newscript;1352 newscript->RegisterSelf(); 1353 1353 1354 1354 newscript = new Script; 1355 1355 newscript->Name="mob_giant_eye_tentacle"; 1356 1356 newscript->GetAI = GetAI_giant_eye_tentacle; 1357 m_scripts[nrscripts++] = newscript;1357 newscript->RegisterSelf(); 1358 1358 1359 1359 newscript = new Script; 1360 1360 newscript->Name="mob_giant_flesh_tentacle"; 1361 1361 newscript->GetAI = GetAI_flesh_tentacle; 1362 m_scripts[nrscripts++] = newscript;1362 newscript->RegisterSelf(); 1363 1363 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_fankriss.cpp
r90 r260 187 187 newscript->Name="boss_fankriss"; 188 188 newscript->GetAI = GetAI_boss_fankriss; 189 m_scripts[nrscripts++] = newscript;189 newscript->RegisterSelf(); 190 190 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_huhuran.cpp
r90 r260 140 140 newscript->Name="boss_huhuran"; 141 141 newscript->GetAI = GetAI_boss_huhuran; 142 m_scripts[nrscripts++] = newscript;142 newscript->RegisterSelf(); 143 143 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_ouro.cpp
r90 r260 137 137 newscript->Name="boss_ouro"; 138 138 newscript->GetAI = GetAI_boss_ouro; 139 m_scripts[nrscripts++] = newscript;139 newscript->RegisterSelf(); 140 140 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_sartura.cpp
r223 r260 260 260 newscript->Name="boss_sartura"; 261 261 newscript->GetAI = GetAI_boss_sartura; 262 m_scripts[nrscripts++] = newscript;262 newscript->RegisterSelf(); 263 263 264 264 newscript = new Script; 265 265 newscript->Name="mob_sartura_royal_guard"; 266 266 newscript->GetAI = GetAI_mob_sartura_royal_guard; 267 m_scripts[nrscripts++] = newscript;267 newscript->RegisterSelf(); 268 268 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_skeram.cpp
r158 r260 311 311 newscript->Name="boss_skeram"; 312 312 newscript->GetAI = GetAI_boss_skeram; 313 m_scripts[nrscripts++] = newscript;313 newscript->RegisterSelf(); 314 314 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_twinemperors.cpp
r229 r260 690 690 newscript->Name="boss_veknilash"; 691 691 newscript->GetAI = GetAI_boss_veknilash; 692 m_scripts[nrscripts++] = newscript;692 newscript->RegisterSelf(); 693 693 694 694 newscript = new Script; 695 695 newscript->Name="boss_veklor"; 696 696 newscript->GetAI = GetAI_boss_veklor; 697 m_scripts[nrscripts++] = newscript;697 newscript->RegisterSelf(); 698 698 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp
r90 r260 162 162 newscript->Name = "instance_temple_of_ahnqiraj"; 163 163 newscript->GetInstanceData = GetInstanceData_instance_temple_of_ahnqiraj; 164 m_scripts[nrscripts++] = newscript;164 newscript->RegisterSelf(); 165 165 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp
r90 r260 310 310 newscript->Name="mob_anubisath_sentinel"; 311 311 newscript->GetAI = GetAI_mob_anubisath_sentinelAI; 312 m_scripts[nrscripts++] = newscript;312 newscript->RegisterSelf(); 313 313 } 314 314 -
trunk/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp
r90 r260 369 369 newscript->Name="mob_unkor_the_ruthless"; 370 370 newscript->GetAI = GetAI_mob_unkor_the_ruthless; 371 m_scripts[nrscripts++] = newscript;371 newscript->RegisterSelf(); 372 372 373 373 newscript = new Script; 374 374 newscript->Name="mob_infested_root_walker"; 375 375 newscript->GetAI = GetAI_mob_infested_root_walker; 376 m_scripts[nrscripts++] = newscript;376 newscript->RegisterSelf(); 377 377 378 378 newscript = new Script; 379 379 newscript->Name="mob_rotting_forest_rager"; 380 380 newscript->GetAI = GetAI_mob_rotting_forest_rager; 381 m_scripts[nrscripts++] = newscript;381 newscript->RegisterSelf(); 382 382 383 383 newscript = new Script; 384 384 newscript->Name="mob_netherweb_victim"; 385 385 newscript->GetAI = GetAI_mob_netherweb_victim; 386 m_scripts[nrscripts++] = newscript;386 newscript->RegisterSelf(); 387 387 388 388 newscript = new Script; … … 390 390 newscript->pGossipHello = &GossipHello_npc_floon; 391 391 newscript->pGossipSelect = &GossipSelect_npc_floon; 392 m_scripts[nrscripts++] = newscript;392 newscript->RegisterSelf(); 393 393 394 394 newscript = new Script; … … 396 396 newscript->pGossipHello = &GossipHello_npc_skyguard_handler_deesak; 397 397 newscript->pGossipSelect = &GossipSelect_npc_skyguard_handler_deesak; 398 m_scripts[nrscripts++] = newscript;399 } 398 newscript->RegisterSelf(); 399 } -
trunk/src/bindings/scripts/scripts/zone/thunder_bluff/thunder_bluff.cpp
r90 r260 133 133 newscript->pGossipHello = &GossipHello_npc_cairne_bloodhoof; 134 134 newscript->pGossipSelect = &GossipSelect_npc_cairne_bloodhoof; 135 m_scripts[nrscripts++] = newscript;135 newscript->RegisterSelf(); 136 136 } -
trunk/src/bindings/scripts/scripts/zone/tirisfal_glades/tirisfal_glades.cpp
r90 r260 85 85 newscript->GetAI = GetAI_npc_calvin_montague; 86 86 newscript->pQuestAccept = &QuestAccept_npc_calvin_montague; 87 m_scripts[nrscripts++] = newscript;87 newscript->RegisterSelf(); 88 88 } -
trunk/src/bindings/scripts/scripts/zone/uldaman/boss_ironaya.cpp
r90 r260 104 104 newscript->Name="boss_ironaya"; 105 105 newscript->GetAI = GetAI_boss_ironaya; 106 m_scripts[nrscripts++] = newscript;106 newscript->RegisterSelf(); 107 107 } -
trunk/src/bindings/scripts/scripts/zone/uldaman/uldaman.cpp
r90 r260 178 178 newscript->Name="mob_jadespine_basilisk"; 179 179 newscript->GetAI = GetAI_mob_jadespine_basilisk; 180 m_scripts[nrscripts++] = newscript;180 newscript->RegisterSelf(); 181 181 182 182 newscript = new Script; … … 184 184 newscript->pGossipHello = &GossipHello_npc_lore_keeper_of_norgannon; 185 185 newscript->pGossipSelect = &GossipSelect_npc_lore_keeper_of_norgannon; 186 m_scripts[nrscripts++] = newscript;186 newscript->RegisterSelf(); 187 187 } -
trunk/src/bindings/scripts/scripts/zone/undercity/undercity.cpp
r90 r260 246 246 newscript->GetAI = GetAI_npc_lady_sylvanas_windrunner; 247 247 newscript->pChooseReward = &ChooseReward_npc_lady_sylvanas_windrunner; 248 m_scripts[nrscripts++] = newscript;248 newscript->RegisterSelf(); 249 249 250 250 newscript = new Script; 251 251 newscript->Name="npc_highborne_lamenter"; 252 252 newscript->GetAI = GetAI_npc_highborne_lamenter; 253 m_scripts[nrscripts++] = newscript;253 newscript->RegisterSelf(); 254 254 255 255 newscript = new Script; … … 257 257 newscript->pGossipHello = &GossipHello_npc_parqual_fintallas; 258 258 newscript->pGossipSelect = &GossipSelect_npc_parqual_fintallas; 259 m_scripts[nrscripts++] = newscript;260 } 259 newscript->RegisterSelf(); 260 } -
trunk/src/bindings/scripts/scripts/zone/western_plaguelands/western_plaguelands.cpp
r90 r260 168 168 newscript->pGossipHello = &GossipHello_npcs_dithers_and_arbington; 169 169 newscript->pGossipSelect = &GossipSelect_npcs_dithers_and_arbington; 170 m_scripts[nrscripts++] = newscript;170 newscript->RegisterSelf(); 171 171 172 172 newscript = new Script; 173 173 newscript->Name="npc_the_scourge_cauldron"; 174 174 newscript->GetAI = GetAI_npc_the_scourge_cauldron; 175 m_scripts[nrscripts++] = newscript;175 newscript->RegisterSelf(); 176 176 } -
trunk/src/bindings/scripts/scripts/zone/winterspring/winterspring.cpp
r90 r260 142 142 newscript->pGossipHello = &GossipHello_npc_lorax; 143 143 newscript->pGossipSelect = &GossipSelect_npc_lorax; 144 m_scripts[nrscripts++] = newscript;144 newscript->RegisterSelf(); 145 145 146 146 newscript = new Script; … … 148 148 newscript->pGossipHello = &GossipHello_npc_rivern_frostwind; 149 149 newscript->pGossipSelect = &GossipSelect_npc_rivern_frostwind; 150 m_scripts[nrscripts++] = newscript;150 newscript->RegisterSelf(); 151 151 152 152 newscript = new Script; … … 154 154 newscript->pGossipHello = &GossipHello_npc_witch_doctor_mauari; 155 155 newscript->pGossipSelect = &GossipSelect_npc_witch_doctor_mauari; 156 m_scripts[nrscripts++] = newscript;156 newscript->RegisterSelf(); 157 157 } -
trunk/src/bindings/scripts/scripts/zone/zangarmarsh/zangarmarsh.cpp
r90 r260 262 262 newscript->pGossipHello = &GossipHello_npcs_ashyen_and_keleth; 263 263 newscript->pGossipSelect = &GossipSelect_npcs_ashyen_and_keleth; 264 m_scripts[nrscripts++] = newscript;264 newscript->RegisterSelf(); 265 265 266 266 newscript = new Script; … … 268 268 newscript->pGossipHello = &GossipHello_npc_cooshcoosh; 269 269 newscript->pGossipSelect = &GossipSelect_npc_cooshcoosh; 270 m_scripts[nrscripts++] = newscript;270 newscript->RegisterSelf(); 271 271 272 272 newscript = new Script; … … 274 274 newscript->pGossipHello = &GossipHello_npc_elder_kuruti; 275 275 newscript->pGossipSelect = &GossipSelect_npc_elder_kuruti; 276 m_scripts[nrscripts++] = newscript;276 newscript->RegisterSelf(); 277 277 278 278 newscript = new Script; … … 280 280 newscript->pGossipHello = &GossipHello_npc_mortog_steamhead; 281 281 newscript->pGossipSelect = &GossipSelect_npc_mortog_steamhead; 282 m_scripts[nrscripts++] = newscript;283 } 282 newscript->RegisterSelf(); 283 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/boss_akilzon.cpp
r154 r260 462 462 newscript->Name="boss_akilzon"; 463 463 newscript->GetAI = GetAI_boss_akilzon; 464 m_scripts[nrscripts++] = newscript;464 newscript->RegisterSelf(); 465 465 466 466 newscript = new Script; 467 467 newscript->Name="mob_akilzon_eagle"; 468 468 newscript->GetAI = GetAI_mob_soaring_eagle; 469 m_scripts[nrscripts++] = newscript;469 newscript->RegisterSelf(); 470 470 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/boss_halazzi.cpp
r154 r260 395 395 newscript->Name="boss_halazzi"; 396 396 newscript->GetAI = GetAI_boss_halazziAI; 397 m_scripts[nrscripts++] = newscript;397 newscript->RegisterSelf(); 398 398 399 399 newscript = new Script; 400 400 newscript->Name="mob_halazzi_lynx"; 401 401 newscript->GetAI = GetAI_boss_spiritlynxAI; 402 m_scripts[nrscripts++] = newscript;402 newscript->RegisterSelf(); 403 403 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/boss_hexlord.cpp
r257 r260 869 869 newscript->Name="boss_hexlord_malacrass"; 870 870 newscript->GetAI = GetAI_boss_hex_lord_malacrass; 871 m_scripts[nrscripts++] = newscript;871 newscript->RegisterSelf(); 872 872 873 873 newscript = new Script; 874 874 newscript->Name="boss_thurg"; 875 875 newscript->GetAI = GetAI_boss_thurg; 876 m_scripts[nrscripts++] = newscript;876 newscript->RegisterSelf(); 877 877 878 878 newscript = new Script; 879 879 newscript->Name="boss_gazakroth"; 880 880 newscript->GetAI = GetAI_boss_gazakroth; 881 m_scripts[nrscripts++] = newscript;881 newscript->RegisterSelf(); 882 882 883 883 newscript = new Script; 884 884 newscript->Name="boss_lord_raadan"; 885 885 newscript->GetAI = GetAI_boss_lord_raadan; 886 m_scripts[nrscripts++] = newscript;886 newscript->RegisterSelf(); 887 887 888 888 newscript = new Script; 889 889 newscript->Name="boss_darkheart"; 890 890 newscript->GetAI = GetAI_boss_darkheart; 891 m_scripts[nrscripts++] = newscript;891 newscript->RegisterSelf(); 892 892 893 893 newscript = new Script; 894 894 newscript->Name="boss_slither"; 895 895 newscript->GetAI = GetAI_boss_slither; 896 m_scripts[nrscripts++] = newscript;896 newscript->RegisterSelf(); 897 897 898 898 newscript = new Script; 899 899 newscript->Name="boss_fenstalker"; 900 900 newscript->GetAI = GetAI_boss_fenstalker; 901 m_scripts[nrscripts++] = newscript;901 newscript->RegisterSelf(); 902 902 903 903 newscript = new Script; 904 904 newscript->Name="boss_koragg"; 905 905 newscript->GetAI = GetAI_boss_koragg; 906 m_scripts[nrscripts++] = newscript;906 newscript->RegisterSelf(); 907 907 908 908 newscript = new Script; 909 909 newscript->Name="boss_alyson_antille"; 910 910 newscript->GetAI = GetAI_boss_alyson_antille; 911 m_scripts[nrscripts++] = newscript;911 newscript->RegisterSelf(); 912 912 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/boss_janalai.cpp
r257 r260 707 707 newscript->Name="boss_janalai"; 708 708 newscript->GetAI = GetAI_boss_janalaiAI; 709 m_scripts[nrscripts++] = newscript;709 newscript->RegisterSelf(); 710 710 711 711 newscript = new Script; 712 712 newscript->Name="mob_janalai_firebomb"; 713 713 newscript->GetAI = GetAI_mob_jandalai_firebombAI; 714 m_scripts[nrscripts++] = newscript;714 newscript->RegisterSelf(); 715 715 716 716 newscript = new Script; 717 717 newscript->Name="mob_janalai_hatcher"; 718 718 newscript->GetAI = GetAI_mob_amanishi_hatcherAI; 719 m_scripts[nrscripts++] = newscript;719 newscript->RegisterSelf(); 720 720 721 721 newscript = new Script; 722 722 newscript->Name="mob_janalai_hatchling"; 723 723 newscript->GetAI = GetAI_mob_hatchlingAI; 724 m_scripts[nrscripts++] = newscript;724 newscript->RegisterSelf(); 725 725 726 726 newscript = new Script; 727 727 newscript->Name="mob_janalai_egg"; 728 728 newscript->GetAI = GetAI_mob_eggAI; 729 m_scripts[nrscripts++] = newscript;729 newscript->RegisterSelf(); 730 730 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/boss_nalorakk.cpp
r90 r260 301 301 newscript->Name="boss_nalorakk"; 302 302 newscript->GetAI = GetAI_boss_nalorakk; 303 m_scripts[nrscripts++] = newscript;303 newscript->RegisterSelf(); 304 304 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/boss_zuljin.cpp
r158 r260 630 630 newscript->Name="boss_zuljin"; 631 631 newscript->GetAI = GetAI_boss_zuljin; 632 m_scripts[nrscripts++] = newscript;632 newscript->RegisterSelf(); 633 633 634 634 newscript = new Script; 635 635 newscript->Name="do_nothing"; 636 636 newscript->GetAI = GetAI_do_nothing; 637 m_scripts[nrscripts++] = newscript;637 newscript->RegisterSelf(); 638 638 639 639 newscript = new Script; 640 640 newscript->Name="mob_zuljin_vortex"; 641 641 newscript->GetAI = GetAI_feather_vortexAI; 642 m_scripts[nrscripts++] = newscript;642 newscript->RegisterSelf(); 643 643 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/instance_zulaman.cpp
r257 r260 329 329 newscript->Name = "instance_zulaman"; 330 330 newscript->GetInstanceData = GetInstanceData_instance_zulaman; 331 m_scripts[nrscripts++] = newscript;331 newscript->RegisterSelf(); 332 332 } -
trunk/src/bindings/scripts/scripts/zone/zulaman/zulaman.cpp
r90 r260 172 172 newscript->Name="npc_forest_frog"; 173 173 newscript->GetAI = GetAI_npc_forest_frog; 174 m_scripts[nrscripts++] = newscript;174 newscript->RegisterSelf(); 175 175 176 176 newscript = new Script; … … 179 179 newscript->pGossipHello = GossipHello_npc_zulaman_hostage; 180 180 newscript->pGossipSelect = GossipSelect_npc_zulaman_hostage; 181 m_scripts[nrscripts++] = newscript;181 newscript->RegisterSelf(); 182 182 } -
trunk/src/bindings/scripts/scripts/zone/zulfarrak/zulfarrak.cpp
r90 r260 214 214 newscript->pGossipHello = &GossipHello_npc_sergeant_bly; 215 215 newscript->pGossipSelect = &GossipSelect_npc_sergeant_bly; 216 m_scripts[nrscripts++] = newscript;216 newscript->RegisterSelf(); 217 217 218 218 newscript = new Script; … … 221 221 newscript->pGossipHello = &GossipHello_npc_weegli_blastfuse; 222 222 newscript->pGossipSelect = &GossipSelect_npc_weegli_blastfuse; 223 m_scripts[nrscripts++] = newscript;224 } 223 newscript->RegisterSelf(); 224 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_arlokk.cpp
r109 r260 208 208 newscript->Name="boss_arlokk"; 209 209 newscript->GetAI = GetAI_boss_arlokk; 210 m_scripts[nrscripts++] = newscript;210 newscript->RegisterSelf(); 211 211 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_gahzranka.cpp
r90 r260 89 89 newscript->Name="boss_gahzranka"; 90 90 newscript->GetAI = GetAI_boss_gahzranka; 91 m_scripts[nrscripts++] = newscript;91 newscript->RegisterSelf(); 92 92 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_grilek.cpp
r109 r260 89 89 newscript->Name="boss_grilek"; 90 90 newscript->GetAI = GetAI_boss_grilek; 91 m_scripts[nrscripts++] = newscript;91 newscript->RegisterSelf(); 92 92 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_hakkar.cpp
r90 r260 253 253 newscript->Name="boss_hakkar"; 254 254 newscript->GetAI = GetAI_boss_hakkar; 255 m_scripts[nrscripts++] = newscript;255 newscript->RegisterSelf(); 256 256 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_hazzarah.cpp
r90 r260 97 97 newscript->Name="boss_hazzarah"; 98 98 newscript->GetAI = GetAI_boss_hazzarah; 99 m_scripts[nrscripts++] = newscript;99 newscript->RegisterSelf(); 100 100 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_jeklik.cpp
r109 r260 289 289 newscript->Name="boss_jeklik"; 290 290 newscript->GetAI = GetAI_boss_jeklik; 291 m_scripts[nrscripts++] = newscript;291 newscript->RegisterSelf(); 292 292 293 293 newscript = new Script; 294 294 newscript->Name="mob_batrider"; 295 295 newscript->GetAI = GetAI_mob_batrider; 296 m_scripts[nrscripts++] = newscript;296 newscript->RegisterSelf(); 297 297 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_jindo.cpp
r90 r260 259 259 newscript->Name="boss_jindo"; 260 260 newscript->GetAI = GetAI_boss_jindo; 261 m_scripts[nrscripts++] = newscript;261 newscript->RegisterSelf(); 262 262 263 263 newscript = new Script; 264 264 newscript->Name="mob_healing_ward"; 265 265 newscript->GetAI = GetAI_mob_healing_ward; 266 m_scripts[nrscripts++] = newscript;266 newscript->RegisterSelf(); 267 267 268 268 newscript = new Script; 269 269 newscript->Name="mob_shade_of_jindo"; 270 270 newscript->GetAI = GetAI_mob_shade_of_jindo; 271 m_scripts[nrscripts++] = newscript;272 } 271 newscript->RegisterSelf(); 272 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_mandokir.cpp
r109 r260 303 303 newscript->Name="boss_mandokir"; 304 304 newscript->GetAI = GetAI_boss_mandokir; 305 m_scripts[nrscripts++] = newscript;305 newscript->RegisterSelf(); 306 306 307 307 newscript = new Script; 308 308 newscript->Name="mob_ohgan"; 309 309 newscript->GetAI = GetAI_mob_ohgan; 310 m_scripts[nrscripts++] = newscript;310 newscript->RegisterSelf(); 311 311 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_marli.cpp
r109 r260 245 245 newscript->Name="boss_marli"; 246 246 newscript->GetAI = GetAI_boss_marli; 247 m_scripts[nrscripts++] = newscript;247 newscript->RegisterSelf(); 248 248 249 249 newscript = new Script; 250 250 newscript->Name="mob_spawn_of_marli"; 251 251 newscript->GetAI = GetAI_mob_spawn_of_marli; 252 m_scripts[nrscripts++] = newscript;252 newscript->RegisterSelf(); 253 253 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_renataki.cpp
r109 r260 148 148 newscript->Name="boss_renataki"; 149 149 newscript->GetAI = GetAI_boss_renataki; 150 m_scripts[nrscripts++] = newscript;150 newscript->RegisterSelf(); 151 151 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_thekal.cpp
r109 r260 532 532 newscript->Name="boss_thekal"; 533 533 newscript->GetAI = GetAI_boss_thekal; 534 m_scripts[nrscripts++] = newscript;534 newscript->RegisterSelf(); 535 535 536 536 newscript = new Script; 537 537 newscript->Name="mob_zealot_lorkhan"; 538 538 newscript->GetAI = GetAI_mob_zealot_lorkhan; 539 m_scripts[nrscripts++] = newscript;539 newscript->RegisterSelf(); 540 540 541 541 newscript = new Script; 542 542 newscript->Name="mob_zealot_zath"; 543 543 newscript->GetAI = GetAI_mob_zealot_zath; 544 m_scripts[nrscripts++] = newscript;544 newscript->RegisterSelf(); 545 545 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_venoxis.cpp
r90 r260 197 197 newscript->Name="boss_venoxis"; 198 198 newscript->GetAI = GetAI_boss_venoxis; 199 m_scripts[nrscripts++] = newscript;199 newscript->RegisterSelf(); 200 200 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/boss_wushoolay.cpp
r90 r260 81 81 newscript->Name="boss_wushoolay"; 82 82 newscript->GetAI = GetAI_boss_wushoolay; 83 m_scripts[nrscripts++] = newscript;83 newscript->RegisterSelf(); 84 84 } -
trunk/src/bindings/scripts/scripts/zone/zulgurub/instance_zulgurub.cpp
r90 r260 235 235 newscript->Name = "instance_zulgurub"; 236 236 newscript->GetInstanceData = GetInstanceData_instance_zulgurub; 237 m_scripts[nrscripts++] = newscript;237 newscript->RegisterSelf(); 238 238 } -
trunk/src/game/AuctionHouse.cpp
r229 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 90 90 return false; 91 91 } 92 data << auction->Id;93 data << pItem->GetUInt32Value(OBJECT_FIELD_ENTRY);92 data << (uint32) auction->Id; 93 data << (uint32) pItem->GetEntry(); 94 94 95 95 for (uint8 i = 0; i < MAX_INSPECTED_ENCHANTMENT_SLOT; i++) … … 246 246 return; 247 247 } 248 // prevent sending bag with items (cheat: can be placed in bag after adding equip ped empty bag to auction)248 // prevent sending bag with items (cheat: can be placed in bag after adding equiped empty bag to auction) 249 249 if(!it) 250 250 { … … 717 717 if (il) 718 718 { 719 if (il->Name.size() > loc_idx&& !il->Name[loc_idx].empty())719 if (il->Name.size() > size_t(loc_idx) && !il->Name[loc_idx].empty()) 720 720 name = il->Name[loc_idx]; 721 721 } -
trunk/src/game/Bag.cpp
r177 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 42 42 for(int i = 0; i < MAX_BAG_SIZE; ++i) 43 43 if (m_bagslot[i]) 44 44 delete m_bagslot[i]; 45 45 } 46 46 … … 72 72 Object::_Create( guidlow, 0, HIGHGUID_CONTAINER ); 73 73 74 Set UInt32Value(OBJECT_FIELD_ENTRY,itemid);74 SetEntry(itemid); 75 75 SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f); 76 76 … … 86 86 SetUInt32Value(CONTAINER_FIELD_NUM_SLOTS, itemProto->ContainerSlots); 87 87 88 // Clean ning 20 slots88 // Cleaning 20 slots 89 89 for (uint8 i = 0; i < MAX_BAG_SIZE; i++) 90 90 { … … 214 214 if(m_bagslot[i]->GetGUID() == guid) 215 215 return i; 216 216 217 return NULL_SLOT; 217 218 } … … 221 222 if( slot < GetBagSize() ) 222 223 return m_bagslot[slot]; 223 224 224 225 return NULL; 225 226 } -
trunk/src/game/Chat.cpp
r233 r260 64 64 }; 65 65 66 static ChatCommand serverIdleRestartCommandTable[] = 67 { 68 { "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL }, 69 { "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerIdleRestartCommand, "", NULL }, 70 { NULL, 0, false, NULL, "", NULL } 71 }; 72 73 static ChatCommand serverIdleShutdownCommandTable[] = 74 { 75 { "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL }, 76 { "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerIdleShutDownCommand, "", NULL }, 77 { NULL, 0, false, NULL, "", NULL } 78 }; 79 80 static ChatCommand serverRestartCommandTable[] = 81 { 82 { "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL }, 83 { "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerRestartCommand, "", NULL }, 84 { NULL, 0, false, NULL, "", NULL } 85 }; 86 87 static ChatCommand serverShutdownCommandTable[] = 88 { 89 { "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL }, 90 { "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCommand, "", NULL }, 91 { NULL, 0, false, NULL, "", NULL } 92 }; 93 66 94 static ChatCommand serverCommandTable[] = 67 95 { 68 96 { "corpses", SEC_GAMEMASTER, true, &ChatHandler::HandleServerCorpsesCommand, "", NULL }, 69 97 { "exit", SEC_CONSOLE, true, &ChatHandler::HandleServerExitCommand, "", NULL }, 70 { "idlerestart", SEC_ADMINISTRATOR, true, &ChatHandler::HandleIdleRestartCommand, "", NULL},71 { "idleshutdown", SEC_ADMINISTRATOR, true, &ChatHandler::HandleIdleShutDownCommand, "", NULL},98 { "idlerestart", SEC_ADMINISTRATOR, true, NULL, "", serverIdleRestartCommandTable }, 99 { "idleshutdown", SEC_ADMINISTRATOR, true, NULL, "", serverShutdownCommandTable }, 72 100 { "info", SEC_PLAYER, true, &ChatHandler::HandleServerInfoCommand, "", NULL }, 73 101 { "motd", SEC_PLAYER, true, &ChatHandler::HandleServerMotdCommand, "", NULL }, 74 { "restart", SEC_ADMINISTRATOR, true, &ChatHandler::HandleRestartCommand, "", NULL},75 { "shutdown", SEC_ADMINISTRATOR, true, &ChatHandler::HandleShutDownCommand, "", NULL},102 { "restart", SEC_ADMINISTRATOR, true, NULL, "", serverRestartCommandTable }, 103 { "shutdown", SEC_ADMINISTRATOR, true, NULL, "", serverShutdownCommandTable }, 76 104 { "set", SEC_ADMINISTRATOR, true, NULL, "", serverSetCommandTable }, 77 105 { NULL, 0, false, NULL, "", NULL } -
trunk/src/game/Chat.h
r233 r260 176 176 bool HandleModifyRepCommand(const char* args); 177 177 bool HandleModifyArenaCommand(const char* args); 178 bool HandleModifyGenderCommand(const char* args); 178 179 179 180 bool HandleNpcAddCommand(const char* args); … … 192 193 bool HandleNpcSpawnDistCommand(const char* args); 193 194 bool HandleNpcSpawnTimeCommand(const char* args); 195 bool HandleNpcTameCommand(const char* args); 194 196 bool HandleNpcTextEmoteCommand(const char* args); 195 197 bool HandleNpcUnFollowCommand(const char* args); … … 216 218 bool HandleReloadCreatureQuestRelationsCommand(const char* args); 217 219 bool HandleReloadCreatureQuestInvRelationsCommand(const char* args); 220 bool HandleReloadDbScriptStringCommand(const char* args); 218 221 bool HandleReloadGameGraveyardZoneCommand(const char* args); 219 222 bool HandleReloadGameObjectScriptsCommand(const char* args); … … 271 274 bool HandleServerCorpsesCommand(const char* args); 272 275 bool HandleServerExitCommand(const char* args); 276 bool HandleServerIdleRestartCommand(const char* args); 277 bool HandleServerIdleShutDownCommand(const char* args); 273 278 bool HandleServerInfoCommand(const char* args); 274 279 bool HandleServerMotdCommand(const char* args); 280 bool HandleServerRestartCommand(const char* args); 275 281 bool HandleServerSetMotdCommand(const char* args); 276 282 bool HandleServerSetLogLevelCommand(const char* args); 283 bool HandleServerShutDownCommand(const char* args); 284 bool HandleServerShutDownCancelCommand(const char* args); 277 285 278 286 bool HandleAddHonorCommand(const char* args); … … 328 336 bool HandleBanListCharacterCommand(const char* args); 329 337 bool HandleBanListIPCommand(const char* args); 330 bool HandleIdleRestartCommand(const char* args);331 bool HandleIdleShutDownCommand(const char* args);332 bool HandleShutDownCommand(const char* args);333 bool HandleRestartCommand(const char* args);334 bool HandleSecurityCommand(const char* args);335 338 bool HandleGoXYCommand(const char* args); 336 339 bool HandleGoXYZCommand(const char* args); … … 366 369 bool HandleAddItemCommand(const char* args); 367 370 bool HandleAddItemSetCommand(const char* args); 368 bool HandleModifyGenderCommand(const char* args);369 371 bool HandlePetTpCommand(const char* args); 370 372 bool HandlePetUnlearnCommand(const char* args); -
trunk/src/game/Creature.cpp
r230 r260 178 178 float x,y,z,o; 179 179 GetRespawnCoord(x, y, z, &o); 180 MapManager::Instance().GetMap(GetMapId(), this)->CreatureRelocation(this,x,y,z,o);180 GetMap()->CreatureRelocation(this,x,y,z,o); 181 181 } 182 182 … … 210 210 } 211 211 212 Set UInt32Value(OBJECT_FIELD_ENTRY, Entry);// normal entry always212 SetEntry(Entry); // normal entry always 213 213 m_creatureInfo = cinfo; // map mode related always 214 214 … … 353 353 lootForBody = false; 354 354 355 if(m_originalEntry != Get UInt32Value(OBJECT_FIELD_ENTRY))355 if(m_originalEntry != GetEntry()) 356 356 UpdateEntry(m_originalEntry); 357 357 … … 372 372 373 373 //Call AI respawn virtual function 374 AI()->JustRespawned();375 376 MapManager::Instance().GetMap(GetMapId(), this)->Add(this);374 i_AI->JustRespawned(); 375 376 GetMap()->Add(this); 377 377 } 378 378 break; … … 436 436 // do not allow the AI to be changed during update 437 437 m_AI_locked = true; 438 AI()->UpdateAI(diff);438 i_AI->UpdateAI(diff); 439 439 m_AI_locked = false; 440 440 } … … 2097 2097 } 2098 2098 2099 char const* Creature::GetScriptName() const 2100 { 2101 return ObjectMgr::GetCreatureTemplate(GetEntry())->ScriptName; 2099 std::string Creature::GetScriptName() 2100 { 2101 return objmgr.GetScriptName(GetScriptId()); 2102 } 2103 2104 uint32 Creature::GetScriptId() 2105 { 2106 return ObjectMgr::GetCreatureTemplate(GetEntry())->ScriptID; 2102 2107 } 2103 2108 -
trunk/src/game/Creature.h
r230 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 206 206 uint32 MechanicImmuneMask; 207 207 uint32 flags_extra; 208 char const* ScriptName;208 uint32 ScriptID; 209 209 uint32 GetRandomValidModelId() const; 210 210 uint32 GetFirstValidModelId() const; 211 211 212 // helpers 212 213 SkillType GetRequiredLootSkill() const 213 214 { … … 219 220 return SKILL_SKINNING; // normal case 220 221 } 221 222 222 223 bool isTameable() const 223 224 { … … 499 500 CreatureInfo const *GetCreatureInfo() const { return m_creatureInfo; } 500 501 CreatureDataAddon const* GetCreatureAddon() const; 501 char const* GetScriptName() const; 502 503 std::string GetScriptName(); 504 uint32 GetScriptId(); 502 505 503 506 void prepareGossipMenu( Player *pPlayer, uint32 gossipid = 0 ); … … 525 528 // overwrite WorldObject function for proper name localization 526 529 const char* GetNameForLocaleIdx(int32 locale_idx) const; 527 530 528 531 void setDeathState(DeathState s); // overwrite virtual Unit::setDeathState 529 532 -
trunk/src/game/CreatureAI.cpp
r207 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 -
trunk/src/game/CreatureAIImpl.h
r102 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 #ifndef CREATUREAIIMPL_H -
trunk/src/game/CreatureAIRegistry.cpp
r174 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 -
trunk/src/game/CreatureAISelector.cpp
r174 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 -
trunk/src/game/Formulas.h
r111 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 30 30 inline uint32 hk_honor_at_level(uint32 level, uint32 count=1) 31 31 { 32 return (uint32) 32 return (uint32)ceil(count*(-0.53177f + 0.59357f * exp((level +23.54042f) / 26.07859f ))); 33 33 } 34 34 } … … 81 81 inline uint32 BaseGain(uint32 pl_level, uint32 mob_level, ContentLevels content) 82 82 { 83 //TODO: need modifier for CONTENT_71_80 different from CONTENT_61_70? 83 84 const uint32 nBaseExp = content == CONTENT_1_60 ? 45 : 235; 84 85 if( mob_level >= pl_level ) -
trunk/src/game/GMTicketHandler.cpp
r229 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 67 67 recv_data >> ticketText; 68 68 69 CharacterDatabase.escape_string(ticketText);70 71 69 if(GMTicket* ticket = ticketmgr.GetGMTicket(GetPlayer()->GetGUIDLow())) 72 70 ticket->SetText(ticketText.c_str()); … … 106 104 sLog.outDebug("TicketCreate: map %u, x %f, y %f, z %f, text %s, unk1 %u, unk2 %u", map, x, y, z, ticketText.c_str(), unk1, unk2); 107 105 108 CharacterDatabase.escape_string(ticketText); 109 110 if(GMTicket* ticket = ticketmgr.GetGMTicket(GetPlayer()->GetGUIDLow())) 106 if(ticketmgr.GetGMTicket(GetPlayer()->GetGUIDLow())) 111 107 { 112 108 WorldPacket data( SMSG_GMTICKET_CREATE, 4 ); -
trunk/src/game/GMTicketMgr.h
r229 r260 51 51 m_text = text ? text : ""; 52 52 m_lastUpdate = time(NULL); 53 CharacterDatabase.PExecute("UPDATE character_ticket SET ticket_text = '%s' WHERE guid = '%u'", m_text.c_str(), m_guid); 53 54 std::string escapedString = m_text; 55 CharacterDatabase.escape_string(escapedString); 56 CharacterDatabase.PExecute("UPDATE character_ticket SET ticket_text = '%s' WHERE guid = '%u'", escapedString.c_str(), m_guid); 54 57 } 55 58 … … 63 66 CharacterDatabase.BeginTransaction(); 64 67 DeleteFromDB(); 65 CharacterDatabase.PExecute("INSERT INTO character_ticket (guid, ticket_text) VALUES ('%u', '%s')", m_guid, GetText()); 68 69 std::string escapedString = m_text; 70 CharacterDatabase.escape_string(escapedString); 71 72 CharacterDatabase.PExecute("INSERT INTO character_ticket (guid, ticket_text) VALUES ('%u', '%s')", m_guid, escapedString.c_str()); 66 73 CharacterDatabase.CommitTransaction(); 67 74 } -
trunk/src/game/GameObject.h
r230 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 358 358 } raw; 359 359 }; 360 char *ScriptName;360 uint32 ScriptId; 361 361 }; 362 362 -
trunk/src/game/Item.cpp
r102 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 180 180 return true; 181 181 case ITEM_SUBCLASS_SOUL_CONTAINER: 182 if(!(pProto->BagFamily & BAG_FAMILY_MASK_S HARDS))182 if(!(pProto->BagFamily & BAG_FAMILY_MASK_SOUL_SHARDS)) 183 183 return false; 184 184 return true; … … 248 248 Object::_Create( guidlow, 0, HIGHGUID_ITEM ); 249 249 250 Set UInt32Value(OBJECT_FIELD_ENTRY,itemid);250 SetEntry(itemid); 251 251 SetFloatValue(OBJECT_FIELD_SCALE_X, 1.0f); 252 252 … … 430 430 ItemPrototype const *Item::GetProto() const 431 431 { 432 return objmgr.GetItemPrototype(Get UInt32Value(OBJECT_FIELD_ENTRY));432 return objmgr.GetItemPrototype(GetEntry()); 433 433 } 434 434 … … 763 763 { 764 764 // Better lost small time at check in comparison lost time at item save to DB. 765 if( GetUInt32Value(ITEM_FIELD_ENCHANTMENT + slot*MAX_ENCHANTMENT_OFFSET + ENCHANTMENT_ID_OFFSET)==id && 766 GetUInt32Value(ITEM_FIELD_ENCHANTMENT + slot*MAX_ENCHANTMENT_OFFSET + ENCHANTMENT_DURATION_OFFSET)==duration && 767 GetUInt32Value(ITEM_FIELD_ENCHANTMENT + slot*MAX_ENCHANTMENT_OFFSET + ENCHANTMENT_CHARGES_OFFSET)==charges ) 765 if((GetEnchantmentId(slot) == id) && (GetEnchantmentDuration(slot) == duration) && (GetEnchantmentCharges(slot) == charges)) 768 766 return; 769 767 … … 776 774 void Item::SetEnchantmentDuration(EnchantmentSlot slot, uint32 duration) 777 775 { 778 if(Get UInt32Value(ITEM_FIELD_ENCHANTMENT + slot*MAX_ENCHANTMENT_OFFSET + ENCHANTMENT_DURATION_OFFSET)==duration)776 if(GetEnchantmentDuration(slot) == duration) 779 777 return; 780 778 … … 785 783 void Item::SetEnchantmentCharges(EnchantmentSlot slot, uint32 charges) 786 784 { 785 if(GetEnchantmentCharges(slot) == charges) 786 return; 787 787 788 SetUInt32Value(ITEM_FIELD_ENCHANTMENT + slot*MAX_ENCHANTMENT_OFFSET + ENCHANTMENT_CHARGES_OFFSET,charges); 788 789 SetState(ITEM_CHANGED); … … 791 792 void Item::ClearEnchantment(EnchantmentSlot slot) 792 793 { 793 if(!Get UInt32Value(ITEM_FIELD_ENCHANTMENT + slot*MAX_ENCHANTMENT_OFFSET + ENCHANTMENT_ID_OFFSET))794 return; 795 796 for( int x=0;x<3;x++)797 SetUInt32Value(ITEM_FIELD_ENCHANTMENT + slot*MAX_ENCHANTMENT_OFFSET + x, 0);794 if(!GetEnchantmentId(slot)) 795 return; 796 797 for(uint8 x = 0; x < 3; ++x) 798 SetUInt32Value(ITEM_FIELD_ENCHANTMENT + slot*MAX_ENCHANTMENT_OFFSET + x, 0); 798 799 SetState(ITEM_CHANGED); 799 800 } -
trunk/src/game/Item.h
r102 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 229 229 bool GemsFitSockets() const; 230 230 231 uint32 GetEntry() const { return GetUInt32Value(OBJECT_FIELD_ENTRY); }232 231 uint32 GetCount() const { return GetUInt32Value (ITEM_FIELD_STACK_COUNT); } 233 232 void SetCount(uint32 value) { SetUInt32Value (ITEM_FIELD_STACK_COUNT, value); } -
trunk/src/game/ItemEnchantmentMgr.cpp
r206 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 -
trunk/src/game/ItemEnchantmentMgr.h
r102 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 -
trunk/src/game/ItemHandler.cpp
r229 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 314 314 if (il) 315 315 { 316 if (il->Name.size() > loc_idx&& !il->Name[loc_idx].empty())316 if (il->Name.size() > size_t(loc_idx) && !il->Name[loc_idx].empty()) 317 317 Name = il->Name[loc_idx]; 318 if (il->Description.size() > loc_idx&& !il->Description[loc_idx].empty())318 if (il->Description.size() > size_t(loc_idx) && !il->Description[loc_idx].empty()) 319 319 Description = il->Description[loc_idx]; 320 320 } … … 361 361 data << pProto->Damage[i].DamageType; 362 362 } 363 364 // resistances (7) 363 365 data << pProto->Armor; 364 366 data << pProto->HolyRes; … … 368 370 data << pProto->ShadowRes; 369 371 data << pProto->ArcaneRes; 372 370 373 data << pProto->Delay; 371 374 data << pProto->Ammo_type; 372 373 data << (float)pProto->RangedModRange; 375 data << pProto->RangedModRange; 376 374 377 for(int s = 0; s < 5; s++) 375 378 { … … 977 980 if (il) 978 981 { 979 if (il->Name.size() > loc_idx&& !il->Name[loc_idx].empty())982 if (il->Name.size() > size_t(loc_idx) && !il->Name[loc_idx].empty()) 980 983 Name = il->Name[loc_idx]; 981 984 } … … 1028 1031 } 1029 1032 1030 if(item==gift) // not poss ible with pacjket from real client1033 if(item==gift) // not possable with pacjket from real client 1031 1034 { 1032 1035 _player->SendEquipError( EQUIP_ERR_WRAPPED_CANT_BE_WRAPPED, item, NULL ); … … 1073 1076 CharacterDatabase.BeginTransaction(); 1074 1077 CharacterDatabase.PExecute("INSERT INTO character_gifts VALUES ('%u', '%u', '%u', '%u')", GUID_LOPART(item->GetOwnerGUID()), item->GetGUIDLow(), item->GetEntry(), item->GetUInt32Value(ITEM_FIELD_FLAGS)); 1075 item->Set UInt32Value(OBJECT_FIELD_ENTRY, gift->GetUInt32Value(OBJECT_FIELD_ENTRY));1078 item->SetEntry(gift->GetEntry()); 1076 1079 1077 1080 switch (item->GetEntry()) 1078 1081 { 1079 case 5042: item->Set UInt32Value(OBJECT_FIELD_ENTRY,5043); break;1080 case 5048: item->Set UInt32Value(OBJECT_FIELD_ENTRY,5044); break;1081 case 17303: item->Set UInt32Value(OBJECT_FIELD_ENTRY,17302); break;1082 case 17304: item->Set UInt32Value(OBJECT_FIELD_ENTRY,17305); break;1083 case 17307: item->Set UInt32Value(OBJECT_FIELD_ENTRY,17308); break;1084 case 21830: item->Set UInt32Value(OBJECT_FIELD_ENTRY,21831); break;1082 case 5042: item->SetEntry( 5043); break; 1083 case 5048: item->SetEntry( 5044); break; 1084 case 17303: item->SetEntry(17302); break; 1085 case 17304: item->SetEntry(17305); break; 1086 case 17307: item->SetEntry(17308); break; 1087 case 21830: item->SetEntry(21831); break; 1085 1088 } 1086 1089 item->SetUInt64Value(ITEM_FIELD_GIFTCREATOR, _player->GetGUID()); -
trunk/src/game/ItemPrototype.h
r257 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 100 100 ITEM_FLAGS_USEABLE_IN_ARENA = 0x00200000, 101 101 ITEM_FLAGS_THROWABLE = 0x00400000, // not used in game for check trow possibility, only for item in game tooltip 102 ITEM_FLAGS_SPECIALUSE = 0x00800000 // last used flag in 2.3.0 102 ITEM_FLAGS_SPECIALUSE = 0x00800000, // last used flag in 2.3.0 103 ITEM_FLAGS_BOA = 0x08000000, // bind on account 104 ITEM_FLAGS_MILLABLE = 0x20000000 103 105 }; 104 106 … … 107 109 BAG_FAMILY_MASK_ARROWS = 0x00000001, 108 110 BAG_FAMILY_MASK_BULLETS = 0x00000002, 109 BAG_FAMILY_MASK_S HARDS= 0x00000004,111 BAG_FAMILY_MASK_SOUL_SHARDS = 0x00000004, 110 112 BAG_FAMILY_MASK_LEATHERWORKING_SUPP = 0x00000008, 111 BAG_FAMILY_MASK_ UNUSED = 0x00000010, // not used currently113 BAG_FAMILY_MASK_INSCRIPTION_SUPP = 0x00000010, 112 114 BAG_FAMILY_MASK_HERBS = 0x00000020, 113 115 BAG_FAMILY_MASK_ENCHANTING_SUPP = 0x00000040, … … 117 119 BAG_FAMILY_MASK_MINING_SUPP = 0x00000400, 118 120 BAG_FAMILY_MASK_SOULBOUND_EQUIPMENT = 0x00000800, 119 BAG_FAMILY_MASK_VANITY_PETS = 0x00001000 120 }; 121 122 /* TODO: Not entirely positive on need for this?? 123 enum SOCKET_CONTENT (); 124 */ 121 BAG_FAMILY_MASK_VANITY_PETS = 0x00001000, 122 BAG_FAMILY_MASK_CURRENCY_TOKENS = 0x00002000, 123 BAG_FAMILY_MASK_QUEST_ITEMS = 0x00004000 124 }; 125 125 126 126 enum SocketColor … … 276 276 }; 277 277 278 #define MAX_ITEM_SUBCLASS_ARMOR 10278 #define MAX_ITEM_SUBCLASS_ARMOR 10 279 279 280 280 enum ItemSubclassReagent … … 390 390 391 391 #define MAX_ITEM_SUBCLASS_JUNK 6 392 393 enum ItemSubclassGlyph 394 { 395 ITEM_SUBCLASS_GLYPH_WARRIOR = 1, 396 ITEM_SUBCLASS_GLYPH_PALADIN = 2, 397 ITEM_SUBCLASS_GLYPH_HUNTER = 3, 398 ITEM_SUBCLASS_GLYPH_ROGUE = 4, 399 ITEM_SUBCLASS_GLYPH_PRIEST = 5, 400 ITEM_SUBCLASS_GLYPH_DEATH_KNIGHT = 6, 401 ITEM_SUBCLASS_GLYPH_SHAMAN = 7, 402 ITEM_SUBCLASS_GLYPH_MAGE = 8, 403 ITEM_SUBCLASS_GLYPH_WARLOCK = 9, 404 ITEM_SUBCLASS_GLYPH_DRUID = 11 405 }; 406 407 #define MAX_ITEM_SUBCLASS_GLYPH 12 392 408 393 409 const uint32 MaxItemSubclassValues[MAX_ITEM_CLASS] = … … 525 541 uint32 RequiredDisenchantSkill; 526 542 float ArmorDamageModifier; 527 char* ScriptName;543 uint32 ScriptId; 528 544 uint32 DisenchantID; 529 545 uint32 FoodType; -
trunk/src/game/Level2.cpp
r230 r260 2362 2362 // Check 2363 2363 // Remember: "show" must also be the name of a column! 2364 if( (show != "emote") && (show != "spell") && (show != "text 1") && (show != "text2")2365 && (show != "text 3") && (show != "text4") && (show != "text5")2364 if( (show != "emote") && (show != "spell") && (show != "textid1") && (show != "textid2") 2365 && (show != "textid3") && (show != "textid4") && (show != "textid5") 2366 2366 && (show != "waittime") && (show != "del") && (show != "move") && (show != "add") 2367 2367 && (show != "model1") && (show != "model2") && (show != "orientation")) … … 2703 2703 PSendSysMessage(LANG_WAYPOINT_CREATNOTFOUND, lowguid); 2704 2704 SetSentErrorMessage(true); 2705 return false; 2706 } 2707 2708 // set in game textids not supported 2709 if( show == "textid1" || show == "textid2" || show == "textid3" || 2710 show == "textid4" || show == "textid5" ) 2711 { 2705 2712 return false; 2706 2713 } … … 2843 2850 2844 2851 QueryResult *result = 2845 WorldDatabase.PQuery( "SELECT id, point, waittime, emote, spell, text 1, text2, text3, text4, text5, model1, model2 FROM creature_movement WHERE wpguid = %u",2852 WorldDatabase.PQuery( "SELECT id, point, waittime, emote, spell, textid1, textid2, textid3, textid4, textid5, model1, model2 FROM creature_movement WHERE wpguid = %u", 2846 2853 target->GetGUIDLow() ); 2847 2854 if(!result) … … 2855 2862 PSendSysMessage(LANG_WAYPOINT_NOTFOUNDSEARCH, target->GetGUID()); 2856 2863 2857 result = WorldDatabase.PQuery( "SELECT id, point, waittime, emote, spell, text 1, text2, text3, text4, text5, model1, model2 FROM creature_movement WHERE (abs(position_x - %f) <= %s ) and (abs(position_y - %f) <= %s ) and (abs(position_z - %f) <= %s )",2864 result = WorldDatabase.PQuery( "SELECT id, point, waittime, emote, spell, textid1, textid2, textid3, textid4, textid5, model1, model2 FROM creature_movement WHERE (abs(position_x - %f) <= %s ) and (abs(position_y - %f) <= %s ) and (abs(position_z - %f) <= %s )", 2858 2865 target->GetPositionX(), maxDIFF, target->GetPositionY(), maxDIFF, target->GetPositionZ(), maxDIFF); 2859 2866 if(!result) … … 2872 2879 uint32 emote = fields[3].GetUInt32(); 2873 2880 uint32 spell = fields[4].GetUInt32(); 2874 const char * text1 = fields[5].GetString(); 2875 const char * text2 = fields[6].GetString(); 2876 const char * text3 = fields[7].GetString(); 2877 const char * text4 = fields[8].GetString(); 2878 const char * text5 = fields[9].GetString(); 2881 uint32 textid[MAX_WAYPOINT_TEXT]; 2882 for(int i = 0; i < MAX_WAYPOINT_TEXT; ++i) 2883 textid[i] = fields[5+i].GetUInt32(); 2879 2884 uint32 model1 = fields[10].GetUInt32(); 2880 2885 uint32 model2 = fields[11].GetUInt32(); … … 2889 2894 PSendSysMessage(LANG_WAYPOINT_INFO_EMOTE, emote); 2890 2895 PSendSysMessage(LANG_WAYPOINT_INFO_SPELL, spell); 2891 PSendSysMessage(LANG_WAYPOINT_INFO_TEXT, 1, text1); 2892 PSendSysMessage(LANG_WAYPOINT_INFO_TEXT, 2, text2); 2893 PSendSysMessage(LANG_WAYPOINT_INFO_TEXT, 3, text3); 2894 PSendSysMessage(LANG_WAYPOINT_INFO_TEXT, 4, text4); 2895 PSendSysMessage(LANG_WAYPOINT_INFO_TEXT, 5, text5); 2896 for(int i = 0; i < MAX_WAYPOINT_TEXT; ++i) 2897 PSendSysMessage(LANG_WAYPOINT_INFO_TEXT, i+1, textid[i], (textid[i] ? GetTrinityString(textid[i]) : "")); 2896 2898 2897 2899 }while( result->NextRow() ); … … 3214 3216 3215 3217 QueryResult *result = WorldDatabase.PQuery( 3216 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14153217 "SELECT point, position_x, position_y, position_z, orientation, model1, model2, waittime, emote, spell, text 1, text2, text3, text4, text5, id FROM creature_movement WHERE id = '%u' ORDER BY point", lowguid );3218 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3219 "SELECT point, position_x, position_y, position_z, orientation, model1, model2, waittime, emote, spell, textid1, textid2, textid3, textid4, textid5, id FROM creature_movement WHERE id = '%u' ORDER BY point", lowguid ); 3218 3220 3219 3221 if (!result) … … 3232 3234 3233 3235 outfile << "INSERT INTO creature_movement "; 3234 outfile << "( id, point, position_x, position_y, position_z, orientation, model1, model2, waittime, emote, spell, text 1, text2, text3, text4, text5 ) VALUES ";3236 outfile << "( id, point, position_x, position_y, position_z, orientation, model1, model2, waittime, emote, spell, textid1, textid2, textid3, textid4, textid5 ) VALUES "; 3235 3237 3236 3238 outfile << "( "; … … 3257 3259 outfile << fields[9].GetUInt32(); // spell 3258 3260 outfile << ", "; 3259 const char *tmpChar = fields[10].GetString(); 3260 if( !tmpChar ) 3261 { 3262 outfile << "NULL"; // text1 3263 } 3264 else 3265 { 3266 outfile << "'"; 3267 outfile << tmpChar; // text1 3268 outfile << "'"; 3269 } 3261 outfile << fields[10].GetUInt32(); // textid1 3270 3262 outfile << ", "; 3271 tmpChar = fields[11].GetString(); 3272 if( !tmpChar ) 3273 { 3274 outfile << "NULL"; // text2 3275 } 3276 else 3277 { 3278 outfile << "'"; 3279 outfile << tmpChar; // text2 3280 outfile << "'"; 3281 } 3263 outfile << fields[11].GetUInt32(); // textid2 3282 3264 outfile << ", "; 3283 tmpChar = fields[12].GetString(); 3284 if( !tmpChar ) 3285 { 3286 outfile << "NULL"; // text3 3287 } 3288 else 3289 { 3290 outfile << "'"; 3291 outfile << tmpChar; // text3 3292 outfile << "'"; 3293 } 3265 outfile << fields[12].GetUInt32(); // textid3 3294 3266 outfile << ", "; 3295 tmpChar = fields[13].GetString(); 3296 if( !tmpChar ) 3297 { 3298 outfile << "NULL"; // text4 3299 } 3300 else 3301 { 3302 outfile << "'"; 3303 outfile << tmpChar; // text4 3304 outfile << "'"; 3305 } 3267 outfile << fields[13].GetUInt32(); // textid4 3306 3268 outfile << ", "; 3307 tmpChar = fields[14].GetString(); 3308 if( !tmpChar ) 3309 { 3310 outfile << "NULL"; // text5 3311 } 3312 else 3313 { 3314 outfile << "'"; 3315 outfile << tmpChar; // text5 3316 outfile << "'"; 3317 } 3269 outfile << fields[14].GetUInt32(); // textid5 3318 3270 outfile << ");\n "; 3319 3271 -
trunk/src/game/Level3.cpp
r235 r260 136 136 HandleReloadSpellScriptsCommand("a"); 137 137 SendGlobalSysMessage("DB tables `*_scripts` reloaded."); 138 HandleReloadDbScriptStringCommand("a"); 138 139 return true; 139 140 } … … 599 600 SendGlobalSysMessage("DB table `spell_scripts` reloaded."); 600 601 602 return true; 603 } 604 605 bool ChatHandler::HandleReloadDbScriptStringCommand(const char* arg) 606 { 607 sLog.outString( "Re-Loading Script strings from `db_script_string`..."); 608 objmgr.LoadDbScriptStrings(); 609 SendGlobalSysMessage("DB table `db_script_string` reloaded."); 601 610 return true; 602 611 } … … 1768 1777 // search highest talent rank 1769 1778 uint32 spellid = 0; 1770 for(int rank = 4; rank >= 0; --rank) 1779 int rank = 4; 1780 for(; rank >= 0; --rank) 1771 1781 { 1772 1782 if(talentInfo->RankID[rank]!=0) … … 4646 4656 } 4647 4657 4648 bool ChatHandler::HandleShutDownCommand(const char* args) 4658 bool ChatHandler::HandleServerShutDownCancelCommand(const char* args) 4659 { 4660 sWorld.ShutdownCancel(); 4661 return true; 4662 } 4663 4664 bool ChatHandler::HandleServerShutDownCommand(const char* args) 4649 4665 { 4650 4666 if(!*args) 4651 4667 return false; 4652 4668 4653 if(std::string(args)=="cancel") 4654 { 4655 sWorld.ShutdownCancel(); 4669 char* time_str = strtok ((char*) args, " "); 4670 char* exitcode_str = strtok (NULL, ""); 4671 4672 int32 time = atoi (time_str); 4673 4674 ///- Prevent interpret wrong arg value as 0 secs shutdown time 4675 if(time == 0 && (time_str[0]!='0' || time_str[1]!='\0') || time < 0) 4676 return false; 4677 4678 if (exitcode_str) 4679 { 4680 int32 exitcode = atoi (exitcode_str); 4681 4682 // Handle atoi() errors 4683 if (exitcode == 0 && (exitcode_str[0] != '0' || exitcode_str[1] != '\0')) 4684 return false; 4685 4686 // Exit code should be in range of 0-125, 126-255 is used 4687 // in many shells for their own return codes and code > 255 4688 // is not supported in many others 4689 if (exitcode < 0 || exitcode > 125) 4690 return false; 4691 4692 sWorld.ShutdownServ (time, 0, exitcode); 4656 4693 } 4657 4694 else 4658 { 4659 int32 time = atoi(args); 4660 4661 ///- Prevent interpret wrong arg value as 0 secs shutdown time 4662 if(time == 0 && (args[0]!='0' || args[1]!='\0') || time < 0) 4695 sWorld.ShutdownServ(time,0,SHUTDOWN_EXIT_CODE); 4696 return true; 4697 } 4698 4699 bool ChatHandler::HandleServerRestartCommand(const char* args) 4700 { 4701 if(!*args) 4702 return false; 4703 4704 char* time_str = strtok ((char*) args, " "); 4705 char* exitcode_str = strtok (NULL, ""); 4706 4707 int32 time = atoi (time_str); 4708 4709 ///- Prevent interpret wrong arg value as 0 secs shutdown time 4710 if(time == 0 && (time_str[0]!='0' || time_str[1]!='\0') || time < 0) 4711 return false; 4712 4713 if (exitcode_str) 4714 { 4715 int32 exitcode = atoi (exitcode_str); 4716 4717 // Handle atoi() errors 4718 if (exitcode == 0 && (exitcode_str[0] != '0' || exitcode_str[1] != '\0')) 4663 4719 return false; 4664 4720 4665 sWorld.ShutdownServ(time); 4666 } 4667 return true; 4668 } 4669 4670 bool ChatHandler::HandleRestartCommand(const char* args) 4721 // Exit code should be in range of 0-125, 126-255 is used 4722 // in many shells for their own return codes and code > 255 4723 // is not supported in many others 4724 if (exitcode < 0 || exitcode > 125) 4725 return false; 4726 4727 sWorld.ShutdownServ (time, SHUTDOWN_MASK_RESTART, exitcode); 4728 } 4729 else 4730 sWorld.ShutdownServ(time, SHUTDOWN_MASK_RESTART, RESTART_EXIT_CODE); 4731 return true; 4732 } 4733 4734 bool ChatHandler::HandleServerIdleRestartCommand(const char* args) 4671 4735 { 4672 4736 if(!*args) 4673 4737 return false; 4674 4738 4675 if(std::string(args)=="cancel") 4676 { 4677 sWorld.ShutdownCancel(); 4739 char* time_str = strtok ((char*) args, " "); 4740 char* exitcode_str = strtok (NULL, ""); 4741 4742 int32 time = atoi (time_str); 4743 4744 ///- Prevent interpret wrong arg value as 0 secs shutdown time 4745 if(time == 0 && (time_str[0]!='0' || time_str[1]!='\0') || time < 0) 4746 return false; 4747 4748 if (exitcode_str) 4749 { 4750 int32 exitcode = atoi (exitcode_str); 4751 4752 // Handle atoi() errors 4753 if (exitcode == 0 && (exitcode_str[0] != '0' || exitcode_str[1] != '\0')) 4754 return false; 4755 4756 // Exit code should be in range of 0-125, 126-255 is used 4757 // in many shells for their own return codes and code > 255 4758 // is not supported in many others 4759 if (exitcode < 0 || exitcode > 125) 4760 return false; 4761 4762 sWorld.ShutdownServ (time, SHUTDOWN_MASK_RESTART|SHUTDOWN_MASK_IDLE, exitcode); 4678 4763 } 4679 4764 else 4680 { 4681 int32 time = atoi(args); 4682 4683 ///- Prevent interpret wrong arg value as 0 secs shutdown time 4684 if(time == 0 && (args[0]!='0' || args[1]!='\0') || time < 0) 4765 sWorld.ShutdownServ(time,SHUTDOWN_MASK_RESTART|SHUTDOWN_MASK_IDLE,RESTART_EXIT_CODE); 4766 return true; 4767 } 4768 4769 bool ChatHandler::HandleServerIdleShutDownCommand(const char* args) 4770 { 4771 if(!*args) 4772 return false; 4773 4774 char* time_str = strtok ((char*) args, " "); 4775 char* exitcode_str = strtok (NULL, ""); 4776 4777 int32 time = atoi (time_str); 4778 4779 ///- Prevent interpret wrong arg value as 0 secs shutdown time 4780 if(time == 0 && (time_str[0]!='0' || time_str[1]!='\0') || time < 0) 4781 return false; 4782 4783 if (exitcode_str) 4784 { 4785 int32 exitcode = atoi (exitcode_str); 4786 4787 // Handle atoi() errors 4788 if (exitcode == 0 && (exitcode_str[0] != '0' || exitcode_str[1] != '\0')) 4685 4789 return false; 4686 4790 4687 sWorld.ShutdownServ(time, SHUTDOWN_MASK_RESTART); 4688 } 4689 return true; 4690 } 4691 4692 bool ChatHandler::HandleIdleRestartCommand(const char* args) 4693 { 4694 if(!*args) 4695 return false; 4696 4697 if(std::string(args)=="cancel") 4698 { 4699 sWorld.ShutdownCancel(); 4791 // Exit code should be in range of 0-125, 126-255 is used 4792 // in many shells for their own return codes and code > 255 4793 // is not supported in many others 4794 if (exitcode < 0 || exitcode > 125) 4795 return false; 4796 4797 sWorld.ShutdownServ (time, SHUTDOWN_MASK_IDLE, exitcode); 4700 4798 } 4701 4799 else 4702 { 4703 int32 time = atoi(args); 4704 4705 ///- Prevent interpret wrong arg value as 0 secs shutdown time 4706 if(time == 0 && (args[0]!='0' || args[1]!='\0') || time < 0) 4707 return false; 4708 4709 sWorld.ShutdownServ(time,SHUTDOWN_MASK_RESTART+SHUTDOWN_MASK_IDLE); 4710 } 4711 return true; 4712 } 4713 4714 bool ChatHandler::HandleIdleShutDownCommand(const char* args) 4715 { 4716 if(!*args) 4717 return false; 4718 4719 if(std::string(args)=="cancel") 4720 { 4721 sWorld.ShutdownCancel(); 4722 } 4723 else 4724 { 4725 int32 time = atoi(args); 4726 4727 ///- Prevent interpret wrong arg value as 0 secs shutdown time 4728 if(time == 0 && (args[0]!='0' || args[1]!='\0') || time < 0) 4729 return false; 4730 4731 sWorld.ShutdownServ(time,SHUTDOWN_MASK_IDLE); 4732 } 4800 sWorld.ShutdownServ(time,SHUTDOWN_MASK_IDLE,SHUTDOWN_EXIT_CODE); 4733 4801 return true; 4734 4802 } -
trunk/src/game/Mail.cpp
r229 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 188 188 return; 189 189 } 190 191 190 if (mailItem.item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_CONJURED) || mailItem.item->GetUInt32Value(ITEM_FIELD_DURATION)) 192 191 { … … 195 194 } 196 195 197 198 199 200 201 196 if(COD && mailItem.item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_WRAPPED)) 197 { 198 pl->SendMailResult(0, 0, MAIL_ERR_CANT_SEND_WRAPPED_COD); 199 return; 200 } 202 201 } 203 202 } -
trunk/src/game/Map.cpp
r257 r260 1714 1714 if (mInstance) 1715 1715 { 1716 i_script = mInstance->script;1716 i_script_id = mInstance->script_id; 1717 1717 i_data = Script->CreateInstanceData(this); 1718 1718 } … … 1731 1731 if(data) 1732 1732 { 1733 sLog.outDebug("Loading instance data for `%s` with id %u", i_script.c_str(), i_InstanceId);1733 sLog.outDebug("Loading instance data for `%s` with id %u", objmgr.GetScriptName(i_script_id), i_InstanceId); 1734 1734 i_data->Load(data); 1735 1735 } … … 1739 1739 else 1740 1740 { 1741 sLog.outDebug("New instance data, \"%s\" ,initialized!", i_script.c_str());1741 sLog.outDebug("New instance data, \"%s\" ,initialized!", objmgr.GetScriptName(i_script_id)); 1742 1742 i_data->Initialize(); 1743 1743 } -
trunk/src/game/Map.h
r257 r260 106 106 float startLocZ; 107 107 float startLocO; 108 char const* script;108 uint32 script_id; 109 109 }; 110 110 … … 344 344 void CreateInstanceData(bool load); 345 345 bool Reset(uint8 method); 346 std::string GetScript() { return i_script; }346 uint32 GetScriptId() { return i_script_id; } 347 347 InstanceData* GetInstanceData() { return i_data; } 348 348 void PermBindAllPlayers(Player *player); … … 356 356 bool m_unloadWhenEmpty; 357 357 InstanceData* i_data; 358 std::string i_script; 359 // only online players that are inside the instance currently 360 // TODO ? - use the grid instead to access the players 361 PlayerList i_Players; 358 uint32 i_script_id; 362 359 }; 363 360 -
trunk/src/game/MapManager.cpp
r257 r260 223 223 } 224 224 225 void MapManager::DeleteInstance(uint32 mapid, uint32 instanceId , uint8 mode)225 void MapManager::DeleteInstance(uint32 mapid, uint32 instanceId) 226 226 { 227 227 Map *m = _GetBaseMap(mapid); -
trunk/src/game/MapManager.h
r206 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 28 28 #include "Map.h" 29 29 #include "GridStates.h" 30 30 31 class Transport; 31 32 … … 45 46 // only const version for outer users 46 47 Map const* GetBaseMap(uint32 id) const { return const_cast<MapManager*>(this)->_GetBaseMap(id); } 47 void DeleteInstance(uint32 mapid, uint32 instanceId , uint8 mode);48 void DeleteInstance(uint32 mapid, uint32 instanceId); 48 49 49 50 inline uint16 GetAreaFlag(uint32 mapid, float x, float y) const -
trunk/src/game/ObjectMgr.cpp
r230 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 22 22 #include "Database/DatabaseEnv.h" 23 23 #include "Database/SQLStorage.h" 24 #include "Database/SQLStorageImpl.h" 24 25 25 26 #include "Log.h" … … 117 118 m_hiDoGuid = 1; 118 119 m_hiCorpseGuid = 1; 119 120 120 m_hiPetNumber = 1; 121 m_ItemTextId = 1; 122 m_mailid = 1; 123 m_auctionid = 1; 124 m_guildId = 1; 125 m_arenaTeamId = 1; 121 126 122 127 mGuildBankTabPrice.resize(GUILD_BANK_MAX_TABS); … … 416 421 417 422 //prepare mail data... : 418 uint32 itemTextId = this->CreateItemText( msgAuctionWonBody.str() );423 uint32 itemTextId = CreateItemText( msgAuctionWonBody.str() ); 419 424 420 425 // set owner to bidder (to prevent delete item with sender char deleting) … … 467 472 sLog.outDebug("AuctionSalePending body string : %s", msgAuctionSalePendingBody.str().c_str()); 468 473 469 uint32 itemTextId = this->CreateItemText( msgAuctionSalePendingBody.str() );474 uint32 itemTextId = CreateItemText( msgAuctionSalePendingBody.str() ); 470 475 471 476 WorldSession::SendMailTo(owner, MAIL_AUCTION, MAIL_STATIONERY_AUCTION, auction->location, auction->owner, msgAuctionSalePendingSubject.str(), itemTextId, NULL, 0, 0, MAIL_CHECK_MASK_AUCTION); … … 499 504 sLog.outDebug("AuctionSuccessful body string : %s", auctionSuccessfulBody.str().c_str()); 500 505 501 uint32 itemTextId = this->CreateItemText( auctionSuccessfulBody.str() );506 uint32 itemTextId = CreateItemText( auctionSuccessfulBody.str() ); 502 507 503 508 uint32 profit = auction->bid + auction->deposit - auctionCut; … … 546 551 // will delete item or place to receiver mail list 547 552 WorldSession::SendMailTo(owner, MAIL_AUCTION, MAIL_STATIONERY_AUCTION, auction->location, GUID_LOPART(owner_guid), subject.str(), 0, &mi, 0, 0, MAIL_CHECK_MASK_NONE); 548 549 553 } 550 554 // owner not found … … 564 568 void ObjectMgr::LoadCreatureLocales() 565 569 { 566 mCreatureLocaleMap.clear(); 567 570 mCreatureLocaleMap.clear(); // need for reload case 571 568 572 QueryResult *result = WorldDatabase.Query("SELECT entry,name_loc1,subname_loc1,name_loc2,subname_loc2,name_loc3,subname_loc3,name_loc4,subname_loc4,name_loc5,subname_loc5,name_loc6,subname_loc6,name_loc7,subname_loc7,name_loc8,subname_loc8 FROM locales_creature"); 569 573 … … 624 628 sLog.outString( ">> Loaded %u creature locale strings", mCreatureLocaleMap.size() ); 625 629 } 626 630 627 631 void ObjectMgr::LoadNpcOptionLocales() 628 632 { … … 693 697 } 694 698 699 struct SQLCreatureLoader : public SQLStorageLoaderBase<SQLCreatureLoader> 700 { 701 template<class D> 702 void convert_from_str(uint32 field_pos, char *src, D &dst) 703 { 704 dst = D(objmgr.GetScriptId(src)); 705 } 706 }; 707 695 708 void ObjectMgr::LoadCreatureTemplates() 696 709 { 697 sCreatureStorage.Load(); 710 SQLCreatureLoader loader; 711 loader.Load(sCreatureStorage); 698 712 699 713 sLog.outString( ">> Loaded %u creature definitions", sCreatureStorage.RecordCount ); … … 1513 1527 aItem->location = fields[11].GetUInt8(); 1514 1528 //check if sold item exists 1515 if ( this->GetAItem( aItem->item_guidlow ) )1529 if ( GetAItem( aItem->item_guidlow ) ) 1516 1530 { 1517 1531 GetAuctionsMap( aItem->location )->AddAuction(aItem); … … 1533 1547 void ObjectMgr::LoadItemLocales() 1534 1548 { 1535 mItemLocaleMap.clear(); 1536 1549 mItemLocaleMap.clear(); // need for reload case 1550 1537 1551 QueryResult *result = WorldDatabase.Query("SELECT entry,name_loc1,description_loc1,name_loc2,description_loc2,name_loc3,description_loc3,name_loc4,description_loc4,name_loc5,description_loc5,name_loc6,description_loc6,name_loc7,description_loc7,name_loc8,description_loc8 FROM locales_item"); 1538 1552 … … 1595 1609 } 1596 1610 1611 struct SQLItemLoader : public SQLStorageLoaderBase<SQLItemLoader> 1612 { 1613 template<class D> 1614 void convert_from_str(uint32 field_pos, char *src, D &dst) 1615 { 1616 dst = D(objmgr.GetScriptId(src)); 1617 } 1618 }; 1619 1597 1620 void ObjectMgr::LoadItemPrototypes() 1598 1621 { 1599 sItemStorage.Load (); 1622 SQLItemLoader loader; 1623 loader.Load(sItemStorage); 1600 1624 sLog.outString( ">> Loaded %u item prototypes", sItemStorage.RecordCount ); 1601 1625 sLog.outString(); … … 2507 2531 if (sWorld.getConfig(CONFIG_EXPANSION) < 1 && (race == RACE_BLOODELF || race == RACE_DRAENEI)) 2508 2532 continue; 2509 2533 2510 2534 // skip expansion classes if not playing with expansion 2511 2535 if (sWorld.getConfig(CONFIG_EXPANSION) < 2 && class_ == CLASS_DEATH_KNIGHT) … … 3556 3580 void ObjectMgr::LoadQuestLocales() 3557 3581 { 3558 mQuestLocaleMap.clear(); 3582 mQuestLocaleMap.clear(); // need for reload case 3559 3583 3560 3584 QueryResult *result = WorldDatabase.Query("SELECT entry," … … 3750 3774 scripts.clear(); // need for reload support 3751 3775 3752 QueryResult *result = WorldDatabase.PQuery( "SELECT id,delay,command,datalong,datalong2,data text, x, y, z, o FROM %s", tablename );3776 QueryResult *result = WorldDatabase.PQuery( "SELECT id,delay,command,datalong,datalong2,dataint, x, y, z, o FROM %s", tablename ); 3753 3777 3754 3778 uint32 count = 0; … … 3772 3796 Field *fields = result->Fetch(); 3773 3797 ScriptInfo tmp; 3774 tmp.id = fields[0].GetUInt32();3775 tmp.delay = fields[1].GetUInt32();3776 tmp.command = fields[2].GetUInt32();3777 tmp.datalong = fields[3].GetUInt32();3798 tmp.id = fields[0].GetUInt32(); 3799 tmp.delay = fields[1].GetUInt32(); 3800 tmp.command = fields[2].GetUInt32(); 3801 tmp.datalong = fields[3].GetUInt32(); 3778 3802 tmp.datalong2 = fields[4].GetUInt32(); 3779 tmp.data text = fields[5].GetCppString();3780 tmp.x = fields[6].GetFloat();3781 tmp.y = fields[7].GetFloat();3782 tmp.z = fields[8].GetFloat();3783 tmp.o = fields[9].GetFloat();3803 tmp.dataint = fields[5].GetInt32(); 3804 tmp.x = fields[6].GetFloat(); 3805 tmp.y = fields[7].GetFloat(); 3806 tmp.z = fields[8].GetFloat(); 3807 tmp.o = fields[9].GetFloat(); 3784 3808 3785 3809 // generic command args check … … 3793 3817 continue; 3794 3818 } 3819 if(tmp.dataint==0) 3820 { 3821 sLog.outErrorDb("Table `%s` has invalid talk text id (dataint = %i) in SCRIPT_COMMAND_TALK for script id %u",tablename,tmp.dataint,tmp.id); 3822 continue; 3823 } 3824 if(tmp.dataint < MIN_DB_SCRIPT_STRING_ID || tmp.dataint >= MAX_DB_SCRIPT_STRING_ID) 3825 { 3826 sLog.outErrorDb("Table `%s` has out of range text id (dataint = %i expected %u-%u) in SCRIPT_COMMAND_TALK for script id %u",tablename,tmp.dataint,MIN_DB_SCRIPT_STRING_ID,MAX_DB_SCRIPT_STRING_ID,tmp.id); 3827 continue; 3828 } 3829 3830 // if(!objmgr.GetMangosStringLocale(tmp.dataint)) will checked after db_script_string loading 3795 3831 break; 3796 3832 } … … 4157 4193 void ObjectMgr::LoadPageTextLocales() 4158 4194 { 4159 mPageTextLocaleMap.clear(); 4160 4195 mPageTextLocaleMap.clear(); // need for reload case 4196 4161 4197 QueryResult *result = WorldDatabase.Query("SELECT entry,text_loc1,text_loc2,text_loc3,text_loc4,text_loc5,text_loc6,text_loc7,text_loc8 FROM locales_page_text"); 4162 4198 … … 4207 4243 } 4208 4244 4245 struct SQLInstanceLoader : public SQLStorageLoaderBase<SQLInstanceLoader> 4246 { 4247 template<class D> 4248 void convert_from_str(uint32 field_pos, char *src, D &dst) 4249 { 4250 dst = D(objmgr.GetScriptId(src)); 4251 } 4252 }; 4253 4209 4254 void ObjectMgr::LoadInstanceTemplate() 4210 4255 { 4211 sInstanceTemplate.Load(); 4256 SQLInstanceLoader loader; 4257 loader.Load(sInstanceTemplate); 4212 4258 4213 4259 for(uint32 i = 0; i < sInstanceTemplate.MaxEntry; i++) … … 4325 4371 void ObjectMgr::LoadNpcTextLocales() 4326 4372 { 4327 mNpcTextLocaleMap.clear(); 4328 4373 mNpcTextLocaleMap.clear(); // need for reload case 4374 4329 4375 QueryResult *result = WorldDatabase.Query("SELECT entry," 4330 4376 "Text0_0_loc1,Text0_1_loc1,Text1_0_loc1,Text1_1_loc1,Text2_0_loc1,Text2_1_loc1,Text3_0_loc1,Text3_1_loc1,Text4_0_loc1,Text4_1_loc1,Text5_0_loc1,Text5_1_loc1,Text6_0_loc1,Text6_1_loc1,Text7_0_loc1,Text7_1_loc1," … … 4623 4669 4624 4670 uint32 Trigger_ID = fields[0].GetUInt32(); 4625 std::string scriptName = fields[1].GetCppString();4671 const char *scriptName = fields[1].GetString(); 4626 4672 4627 4673 AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(Trigger_ID); … … 4631 4677 continue; 4632 4678 } 4633 mAreaTriggerScripts[Trigger_ID] = scriptName;4679 mAreaTriggerScripts[Trigger_ID] = GetScriptId(scriptName); 4634 4680 } while( result->NextRow() ); 4635 4681 … … 4639 4685 sLog.outString( ">> Loaded %u areatrigger scripts", count ); 4640 4686 } 4687 4641 4688 uint32 ObjectMgr::GetNearestTaxiNode( float x, float y, float z, uint32 mapid ) 4642 4689 { … … 4697 4744 uint16 ObjectMgr::GetTaxiMount( uint32 id, uint32 team ) 4698 4745 { 4699 uint 32mount_entry = 0;4700 uint 32mount_id = 0;4746 uint16 mount_entry = 0; 4747 uint16 mount_id = 0; 4701 4748 4702 4749 TaxiNodesEntry const* node = sTaxiNodesStore.LookupEntry(id); 4703 if 4750 if(node) 4704 4751 { 4705 4752 if (team == ALLIANCE) mount_entry = node->alliance_mount_type; … … 4940 4987 } 4941 4988 4942 // find now nearest graveyard at same map4943 4989 if(entryNear) 4944 4990 return entryNear; … … 5181 5227 { 5182 5228 m_hiCharGuid = (*result)[0].GetUInt32()+1; 5183 5184 5229 delete result; 5185 5230 } … … 5189 5234 { 5190 5235 m_hiCreatureGuid = (*result)[0].GetUInt32()+1; 5191 5192 5236 delete result; 5193 5237 } 5194 5238 5195 result = CharacterDatabase.Query( "SELECT MAX(id) FROM character_pet" ); 5196 if( result ) 5197 { 5198 m_hiPetGuid = (*result)[0].GetUInt32()+1; 5199 5200 delete result; 5201 } 5239 // pet guids are not saved to DB, set to 0 (pet guid != pet id) 5240 m_hiPetGuid = 0; 5202 5241 5203 5242 result = CharacterDatabase.Query( "SELECT MAX(guid) FROM item_instance" ); … … 5205 5244 { 5206 5245 m_hiItemGuid = (*result)[0].GetUInt32()+1; 5207 5208 5246 delete result; 5209 5247 } … … 5219 5257 { 5220 5258 m_hiGoGuid = (*result)[0].GetUInt32()+1; 5221 5222 5259 delete result; 5223 5260 } … … 5227 5264 { 5228 5265 m_auctionid = (*result)[0].GetUInt32()+1; 5229 5230 5266 delete result; 5231 5267 } 5232 else 5233 { 5234 m_auctionid = 0; 5235 } 5268 5236 5269 result = CharacterDatabase.Query( "SELECT MAX(id) FROM mail" ); 5237 5270 if( result ) 5238 5271 { 5239 5272 m_mailid = (*result)[0].GetUInt32()+1; 5240 5241 5273 delete result; 5242 5274 } 5243 else 5244 { 5245 m_mailid = 0; 5246 } 5275 5247 5276 result = CharacterDatabase.Query( "SELECT MAX(id) FROM item_text" ); 5248 5277 if( result ) 5249 5278 { 5250 m_ItemTextId = (*result)[0].GetUInt32(); 5251 5279 m_ItemTextId = (*result)[0].GetUInt32()+1; 5252 5280 delete result; 5253 5281 } 5254 else5255 m_ItemTextId = 0;5256 5282 5257 5283 result = CharacterDatabase.Query( "SELECT MAX(guid) FROM corpse" ); … … 5259 5285 { 5260 5286 m_hiCorpseGuid = (*result)[0].GetUInt32()+1; 5261 5262 5287 delete result; 5263 5288 } 5289 5290 result = CharacterDatabase.Query("SELECT MAX(arenateamid) FROM arena_team"); 5291 if (result) 5292 { 5293 m_arenaTeamId = (*result)[0].GetUInt32()+1; 5294 delete result; 5295 } 5296 5297 result = CharacterDatabase.Query( "SELECT MAX(guildid) FROM guild" ); 5298 if (result) 5299 { 5300 m_guildId = (*result)[0].GetUInt32()+1; 5301 delete result; 5302 } 5303 } 5304 5305 uint32 ObjectMgr::GenerateArenaTeamId() 5306 { 5307 if(m_arenaTeamId>=0xFFFFFFFE) 5308 { 5309 sLog.outError("Arena team ids overflow!! Can't continue, shutting down server. "); 5310 World::StopNow(ERROR_EXIT_CODE); 5311 } 5312 return m_arenaTeamId++; 5313 } 5314 5315 uint32 ObjectMgr::GenerateGuildId() 5316 { 5317 if(m_guildId>=0xFFFFFFFE) 5318 { 5319 sLog.outError("Guild ids overflow!! Can't continue, shutting down server. "); 5320 World::StopNow(ERROR_EXIT_CODE); 5321 } 5322 return m_guildId++; 5264 5323 } 5265 5324 5266 5325 uint32 ObjectMgr::GenerateAuctionID() 5267 5326 { 5268 ++m_auctionid; 5269 if(m_auctionid>=0xFFFFFFFF) 5327 if(m_auctionid>=0xFFFFFFFE) 5270 5328 { 5271 5329 sLog.outError("Auctions ids overflow!! Can't continue, shutting down server. "); 5272 sWorld.m_stopEvent = true;5273 } 5274 return m_auctionid ;5330 World::StopNow(ERROR_EXIT_CODE); 5331 } 5332 return m_auctionid++; 5275 5333 } 5276 5334 5277 5335 uint32 ObjectMgr::GenerateMailID() 5278 5336 { 5279 ++m_mailid; 5280 if(m_mailid>=0xFFFFFFFF) 5337 if(m_mailid>=0xFFFFFFFE) 5281 5338 { 5282 5339 sLog.outError("Mail ids overflow!! Can't continue, shutting down server. "); 5283 sWorld.m_stopEvent = true;5284 } 5285 return m_mailid ;5340 World::StopNow(ERROR_EXIT_CODE); 5341 } 5342 return m_mailid++; 5286 5343 } 5287 5344 5288 5345 uint32 ObjectMgr::GenerateItemTextID() 5289 5346 { 5290 ++m_ItemTextId; 5291 if(m_ItemTextId>=0xFFFFFFFF) 5347 if(m_ItemTextId>=0xFFFFFFFE) 5292 5348 { 5293 5349 sLog.outError("Item text ids overflow!! Can't continue, shutting down server. "); 5294 sWorld.m_stopEvent = true;5295 } 5296 return m_ItemTextId ;5350 World::StopNow(ERROR_EXIT_CODE); 5351 } 5352 return m_ItemTextId++; 5297 5353 } 5298 5354 … … 5316 5372 { 5317 5373 case HIGHGUID_ITEM: 5318 ++m_hiItemGuid; 5319 if(m_hiItemGuid>=0xFFFFFFFF) 5374 if(m_hiItemGuid>=0xFFFFFFFE) 5320 5375 { 5321 5376 sLog.outError("Item guid overflow!! Can't continue, shutting down server. "); 5322 sWorld.m_stopEvent = true;5323 } 5324 return m_hiItemGuid ;5377 World::StopNow(ERROR_EXIT_CODE); 5378 } 5379 return m_hiItemGuid++; 5325 5380 case HIGHGUID_UNIT: 5326 ++m_hiCreatureGuid; 5327 if(m_hiCreatureGuid>=0x00FFFFFF) 5381 if(m_hiCreatureGuid>=0x00FFFFFE) 5328 5382 { 5329 5383 sLog.outError("Creature guid overflow!! Can't continue, shutting down server. "); 5330 sWorld.m_stopEvent = true;5331 } 5332 return m_hiCreatureGuid ;5384 World::StopNow(ERROR_EXIT_CODE); 5385 } 5386 return m_hiCreatureGuid++; 5333 5387 case HIGHGUID_PET: 5334 ++m_hiPetGuid; 5335 if(m_hiPetGuid>=0x00FFFFFF) 5388 if(m_hiPetGuid>=0x00FFFFFE) 5336 5389 { 5337 5390 sLog.outError("Pet guid overflow!! Can't continue, shutting down server. "); 5338 sWorld.m_stopEvent = true;5339 } 5340 return m_hiPetGuid ;5391 World::StopNow(ERROR_EXIT_CODE); 5392 } 5393 return m_hiPetGuid++; 5341 5394 case HIGHGUID_PLAYER: 5342 ++m_hiCharGuid; 5343 if(m_hiCharGuid>=0xFFFFFFFF) 5395 if(m_hiCharGuid>=0xFFFFFFFE) 5344 5396 { 5345 5397 sLog.outError("Players guid overflow!! Can't continue, shutting down server. "); 5346 sWorld.m_stopEvent = true;5347 } 5348 return m_hiCharGuid ;5398 World::StopNow(ERROR_EXIT_CODE); 5399 } 5400 return m_hiCharGuid++; 5349 5401 case HIGHGUID_GAMEOBJECT: 5350 ++m_hiGoGuid; 5351 if(m_hiGoGuid>=0x00FFFFFF) 5402 if(m_hiGoGuid>=0x00FFFFFE) 5352 5403 { 5353 5404 sLog.outError("Gameobject guid overflow!! Can't continue, shutting down server. "); 5354 sWorld.m_stopEvent = true;5355 } 5356 return m_hiGoGuid ;5405 World::StopNow(ERROR_EXIT_CODE); 5406 } 5407 return m_hiGoGuid++; 5357 5408 case HIGHGUID_CORPSE: 5358 ++m_hiCorpseGuid; 5359 if(m_hiCorpseGuid>=0xFFFFFFFF) 5409 if(m_hiCorpseGuid>=0xFFFFFFFE) 5360 5410 { 5361 5411 sLog.outError("Corpse guid overflow!! Can't continue, shutting down server. "); 5362 sWorld.m_stopEvent = true;5363 } 5364 return m_hiCorpseGuid ;5412 World::StopNow(ERROR_EXIT_CODE); 5413 } 5414 return m_hiCorpseGuid++; 5365 5415 case HIGHGUID_DYNAMICOBJECT: 5366 ++m_hiDoGuid; 5367 if(m_hiDoGuid>=0xFFFFFFFF) 5416 if(m_hiDoGuid>=0xFFFFFFFE) 5368 5417 { 5369 5418 sLog.outError("DynamicObject guid overflow!! Can't continue, shutting down server. "); 5370 sWorld.m_stopEvent = true;5371 } 5372 return m_hiDoGuid ;5419 World::StopNow(ERROR_EXIT_CODE); 5420 } 5421 return m_hiDoGuid++; 5373 5422 default: 5374 5423 ASSERT(0); … … 5381 5430 void ObjectMgr::LoadGameObjectLocales() 5382 5431 { 5383 mGameObjectLocaleMap.clear(); 5384 5432 mGameObjectLocaleMap.clear(); // need for reload case 5433 5385 5434 QueryResult *result = WorldDatabase.Query("SELECT entry," 5386 5435 "name_loc1,name_loc2,name_loc3,name_loc4,name_loc5,name_loc6,name_loc7,name_loc8," … … 5450 5499 } 5451 5500 5501 struct SQLGameObjectLoader : public SQLStorageLoaderBase<SQLGameObjectLoader> 5502 { 5503 template<class D> 5504 void convert_from_str(uint32 field_pos, char *src, D &dst) 5505 { 5506 dst = D(objmgr.GetScriptId(src)); 5507 } 5508 }; 5509 5452 5510 void ObjectMgr::LoadGameobjectInfo() 5453 5511 { 5454 sGOStorage.Load(); 5512 SQLGameObjectLoader loader; 5513 loader.Load(sGOStorage); 5455 5514 5456 5515 // some checks … … 6625 6684 } 6626 6685 6627 const char* ObjectMgr::GetAreaTriggerScriptName(uint32id)6628 { 6629 AreaTriggerScriptMap::const_iterator i = mAreaTriggerScripts.find( id);6686 uint32 ObjectMgr::GetAreaTriggerScriptId(uint32 trigger_id) 6687 { 6688 AreaTriggerScriptMap::const_iterator i = mAreaTriggerScripts.find(trigger_id); 6630 6689 if(i!= mAreaTriggerScripts.end()) 6631 return i->second .c_str();6632 return "";6690 return i->second; 6691 return 0; 6633 6692 } 6634 6693 … … 6675 6734 return false; 6676 6735 } 6677 6678 6679 6680 6736 case CONDITION_NO_AURA: 6737 return !player->HasAura(value1, value2); 6738 case CONDITION_ACTIVE_EVENT: 6739 return gameeventmgr.IsActiveEvent(value1); 6681 6740 default: 6682 6741 return false; … … 6799 6858 break; 6800 6859 } 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6860 case CONDITION_NO_AURA: 6861 { 6862 if(!sSpellStore.LookupEntry(value1)) 6863 { 6864 sLog.outErrorDb("Aura condition requires to have non existing spell (Id: %d), skipped", value1); 6865 return false; 6866 } 6867 if(value2 > 2) 6868 { 6869 sLog.outErrorDb("Aura condition requires to have non existing effect index (%u) (must be 0..2), skipped", value2); 6870 return false; 6871 } 6872 break; 6873 } 6874 case CONDITION_ACTIVE_EVENT: 6875 { 6876 GameEvent::GameEventDataMap const& events = gameeventmgr.GetEventMap(); 6877 if(value1 >=events.size() || !events[value1].isValid()) 6878 { 6879 sLog.outErrorDb("Active event condition requires existed event id (%u), skipped", value1); 6880 return false; 6881 } 6882 break; 6883 } 6825 6884 } 6826 6885 return true; … … 6952 7011 if(itr->first > new_id) 6953 7012 new_id = itr->first; 6954 7013 6955 7014 // use next 6956 7015 ++new_id; … … 6992 7051 void ObjectMgr::LoadTrainerSpell() 6993 7052 { 6994 // For reload case 7053 // For reload case 6995 7054 for (CacheTrainerSpellMap::iterator itr = m_mCacheTrainerSpellMap.begin(); itr != m_mCacheTrainerSpellMap.end(); ++itr) 6996 7055 itr->second.Clear(); … … 7083 7142 void ObjectMgr::LoadVendors() 7084 7143 { 7085 // For reload case 7144 // For reload case 7086 7145 for (CacheVendorItemMap::iterator itr = m_mCacheVendorItemMap.begin(); itr != m_mCacheVendorItemMap.end(); ++itr) 7087 7146 itr->second.Clear(); … … 7190 7249 "SELECT id,gossip_id,npcflag,icon,action,box_money,coded,option_text,box_text " 7191 7250 "FROM npc_option"); 7251 7192 7252 if( !result ) 7193 7253 { … … 7342 7402 } 7343 7403 7404 void ObjectMgr::LoadScriptNames() 7405 { 7406 m_scriptNames.push_back(""); 7407 QueryResult *result = WorldDatabase.Query( 7408 "SELECT DISTINCT(ScriptName) FROM creature_template WHERE ScriptName <> '' " 7409 "UNION " 7410 "SELECT DISTINCT(ScriptName) FROM gameobject_template WHERE ScriptName <> '' " 7411 "UNION " 7412 "SELECT DISTINCT(ScriptName) FROM item_template WHERE ScriptName <> '' " 7413 "UNION " 7414 "SELECT DISTINCT(ScriptName) FROM areatrigger_scripts WHERE ScriptName <> '' " 7415 "UNION " 7416 "SELECT DISTINCT(script) FROM instance_template WHERE script <> ''"); 7417 if(result) 7418 { 7419 do 7420 { 7421 m_scriptNames.push_back((*result)[0].GetString()); 7422 } while (result->NextRow()); 7423 delete result; 7424 } 7425 7426 std::sort(m_scriptNames.begin(), m_scriptNames.end()); 7427 } 7428 7429 uint32 ObjectMgr::GetScriptId(const char *name) 7430 { 7431 // use binary search to find the script name in the sorted vector 7432 // assume "" is the first element 7433 if(!name) return 0; 7434 ScriptNameMap::const_iterator itr = 7435 std::lower_bound(m_scriptNames.begin(), m_scriptNames.end(), name); 7436 if(itr == m_scriptNames.end()) return 0; 7437 return itr - m_scriptNames.begin(); 7438 } 7439 7440 void ObjectMgr::CheckScripts(ScriptMapMap const& scripts,std::set<int32>& ids) 7441 { 7442 for(ScriptMapMap::const_iterator itrMM = scripts.begin(); itrMM != scripts.end(); ++itrMM) 7443 { 7444 for(ScriptMap::const_iterator itrM = itrMM->second.begin(); itrM != itrMM->second.end(); ++itrM) 7445 { 7446 if(itrM->second.dataint) 7447 { 7448 if(!GetTrinityStringLocale (itrM->second.dataint)) 7449 sLog.outErrorDb( "Table `db_script_string` has not existed string id %u", *itrM); 7450 7451 if(ids.count(itrM->second.dataint)) 7452 ids.erase(itrM->second.dataint); 7453 } 7454 } 7455 } 7456 } 7457 7458 void ObjectMgr::LoadDbScriptStrings() 7459 { 7460 LoadTrinityStrings(WorldDatabase,"db_script_string",MIN_DB_SCRIPT_STRING_ID,MAX_DB_SCRIPT_STRING_ID); 7461 7462 std::set<int32> ids; 7463 7464 for(int32 i = MIN_DB_SCRIPT_STRING_ID; i < MAX_DB_SCRIPT_STRING_ID; ++i) 7465 if(GetTrinityStringLocale(i)) 7466 ids.insert(i); 7467 7468 CheckScripts(sQuestEndScripts,ids); 7469 CheckScripts(sQuestStartScripts,ids); 7470 CheckScripts(sSpellScripts,ids); 7471 CheckScripts(sGameObjectScripts,ids); 7472 CheckScripts(sEventScripts,ids); 7473 7474 for(std::set<int32>::const_iterator itr = ids.begin(); itr != ids.end(); ++itr) 7475 sLog.outErrorDb( "Table `db_script_string` has unused string id %u", *itr); 7476 } 7477 7344 7478 // Functions for scripting access 7345 const char* GetAreaTriggerScriptNameById(uint32id)7346 { 7347 return objmgr.GetAreaTriggerScript Name(id);7479 uint32 GetAreaTriggerScriptId(uint32 trigger_id) 7480 { 7481 return objmgr.GetAreaTriggerScriptId(trigger_id); 7348 7482 } 7349 7483 … … 7360 7494 return objmgr.LoadTrinityStrings(db,table,end_value,start_value); 7361 7495 } 7496 7497 uint32 TRINITY_DLL_SPEC GetScriptId(const char *name) 7498 { 7499 return objmgr.GetScriptId(name); 7500 } 7501 7502 ObjectMgr::ScriptNameMap & GetScriptNames() 7503 { 7504 return objmgr.GetScriptNames(); 7505 } -
trunk/src/game/ObjectMgr.h
r206 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 85 85 uint32 datalong; 86 86 uint32 datalong2; 87 std::string datatext;87 int32 dataint; 88 88 float x; 89 89 float y; … … 128 128 129 129 typedef UNORDERED_MAP<uint64/*(instance,guid) pair*/,time_t> RespawnTimes; 130 131 132 // mangos string ranges 133 #define MIN_TRINITY_STRING_ID 1 134 #define MAX_TRINITY_STRING_ID 2000000000 135 #define MIN_DB_SCRIPT_STRING_ID MAX_TRINITY_STRING_ID 136 #define MAX_DB_SCRIPT_STRING_ID 2000010000 130 137 131 138 struct TrinityStringLocale … … 208 215 CONDITION_QUESTTAKEN = 9, // quest_id 0, for condition true while quest active. 209 216 CONDITION_AD_COMMISSION_AURA = 10, // 0 0, for condition true while one from AD ñommission aura active 210 211 217 CONDITION_NO_AURA = 11, // spell_id effindex 218 CONDITION_ACTIVE_EVENT = 12, // event_id 212 219 }; 213 220 … … 251 258 // NPC gossip text id 252 259 typedef UNORDERED_MAP<uint32, uint32> CacheNpcTextIdMap; 253 260 typedef std::list<GossipOption> CacheNpcOptionList; 254 261 255 262 typedef UNORDERED_MAP<uint32, VendorItemData> CacheVendorItemMap; … … 300 307 typedef UNORDERED_MAP<uint32, Quest*> QuestMap; 301 308 309 302 310 typedef UNORDERED_MAP<uint32, AreaTrigger> AreaTriggerMap; 303 311 304 typedef UNORDERED_MAP<uint32, std::string> AreaTriggerScriptMap;312 typedef UNORDERED_MAP<uint32, uint32> AreaTriggerScriptMap; 305 313 306 314 typedef UNORDERED_MAP<uint32, ReputationOnKillEntry> RepOnKillMap; … … 309 317 310 318 typedef UNORDERED_MAP<uint32, PetCreateSpellEntry> PetCreateSpellMap; 319 320 typedef std::vector<std::string> ScriptNameMap; 311 321 312 322 Player* GetPlayer(const char* name) const { return ObjectAccessor::Instance().FindPlayerByName(name);} … … 477 487 AreaTrigger const* GetGoBackTrigger(uint32 Map) const; 478 488 479 const char* GetAreaTriggerScriptName(uint32id);489 uint32 GetAreaTriggerScriptId(uint32 trigger_id); 480 490 481 491 ReputationOnKillEntry const* GetReputationOnKilEntry(uint32 id) const … … 523 533 524 534 bool LoadTrinityStrings(DatabaseType& db, char const* table, int32 min_value, int32 max_value); 525 bool LoadTrinityStrings() { return LoadTrinityStrings(WorldDatabase,"trinity_string",1,std::numeric_limits<int32>::max()); } 535 bool LoadTrinityStrings() { return LoadTrinityStrings(WorldDatabase,"trinity_string",MIN_TRINITY_STRING_ID,MAX_TRINITY_STRING_ID); } 536 void LoadDbScriptStrings(); 526 537 void LoadPetCreateSpells(); 527 538 void LoadCreatureLocales(); … … 593 604 uint32 GenerateItemTextID(); 594 605 uint32 GeneratePetNumber(); 606 uint32 GenerateArenaTeamId(); 607 uint32 GenerateGuildId(); 595 608 596 609 void LoadPlayerInfoInCache(); … … 669 682 return &itr->second; 670 683 } 671 672 684 NpcOptionLocale const* GetNpcOptionLocale(uint32 entry) const 673 685 { … … 694 706 const char *GetTrinityString(int32 entry, int locale_idx) const; 695 707 const char *GetTrinityStringForDBCLocale(int32 entry) const { return GetTrinityString(entry,DBCLocaleIndex); } 696 708 int32 GetDBCLocaleIndex() const { return DBCLocaleIndex; } 697 709 void SetDBCLocaleIndex(uint32 lang) { DBCLocaleIndex = GetIndexForLocale(LocaleConstant(lang)); } 698 710 … … 733 745 LocaleConstant GetLocaleForIndex(int i); 734 746 // guild bank tabs 735 const uint32 GetGuildBankTabPrice(uint8 Index){ return Index < GUILD_BANK_MAX_TABS ? mGuildBankTabPrice[Index] : 0; }747 uint32 GetGuildBankTabPrice(uint8 Index) const { return Index < GUILD_BANK_MAX_TABS ? mGuildBankTabPrice[Index] : 0; } 736 748 737 749 uint16 GetConditionId(ConditionType condition, uint32 value1, uint32 value2); … … 754 766 bool AddGameTele(GameTele& data); 755 767 bool DeleteGameTele(std::string name); 756 768 757 769 CacheNpcOptionList const& GetNpcOptions() const { return m_mCacheNpcOptionList; } 758 770 … … 762 774 if(iter == m_mCacheNpcTextIdMap.end()) 763 775 return 0; 764 776 765 777 return iter->second; 766 778 } … … 783 795 return &iter->second; 784 796 } 785 void AddVendorItem(uint32 entry,uint32 item, uint32 maxcount, uint32 incrtime, uint32 ExtendedCost, bool savetodb = true); 786 bool RemoveVendorItem(uint32 entry,uint32 item, bool savetodb = true); 787 bool IsVendorItemValid( uint32 vendor_entry, uint32 item, uint32 maxcount, uint32 ptime, uint32 ExtendedCost, Player* pl = NULL, std::set<uint32>* skip_vendors = NULL, uint32 ORnpcflag = 0) const; 788 797 void AddVendorItem(uint32 entry,uint32 item, uint32 maxcount, uint32 incrtime, uint32 ExtendedCost, bool savetodb = true); // for event 798 bool RemoveVendorItem(uint32 entry,uint32 item, bool savetodb = true); // for event 799 bool IsVendorItemValid( uint32 vendor_entry, uint32 item, uint32 maxcount, uint32 ptime, uint32 ExtendedCost, Player* pl = NULL, std::set<uint32>* skip_vendors = NULL, uint32 ORnpcflag = 0 ) const; 800 801 void LoadScriptNames(); 802 ScriptNameMap &GetScriptNames() { return m_scriptNames; } 803 const char * GetScriptName(uint32 id) { return id < m_scriptNames.size() ? m_scriptNames[id].c_str() : ""; } 804 uint32 GetScriptId(const char *name); 789 805 protected: 806 807 // first free id for selected id type 790 808 uint32 m_auctionid; 791 809 uint32 m_mailid; 792 810 uint32 m_ItemTextId; 793 811 uint32 m_arenaTeamId; 812 uint32 m_guildId; 813 uint32 m_hiPetNumber; 814 815 // first free low guid for seelcted guid type 794 816 uint32 m_hiCharGuid; 795 817 uint32 m_hiCreatureGuid; … … 800 822 uint32 m_hiCorpseGuid; 801 823 802 uint32 m_hiPetNumber; 803 804 QuestMap mQuestTemplates; 824 QuestMap mQuestTemplates; 805 825 806 826 typedef UNORDERED_MAP<uint32, GossipText*> GossipTextMap; … … 849 869 GameTeleMap m_GameTeleMap; 850 870 871 ScriptNameMap m_scriptNames; 872 851 873 typedef std::vector<LocaleConstant> LocalForIndex; 852 874 LocalForIndex m_LocalForIndex; … … 856 878 private: 857 879 void LoadScripts(ScriptMapMap& scripts, char const* tablename); 880 void CheckScripts(ScriptMapMap const& scripts,std::set<int32>& ids); 858 881 void ConvertCreatureAddonAuras(CreatureDataAddon* addon, char const* table, char const* guidEntryStr); 859 882 void LoadQuestRelationsHelper(QuestRelations& map,char const* table); … … 908 931 909 932 // scripting access functions 910 bool TRINITY_DLL_SPEC LoadTrinityStrings(DatabaseType& db, char const* table,int32 start_value = -1, int32 end_value = std::numeric_limits<int32>::min()); 911 TRINITY_DLL_SPEC const char* GetAreaTriggerScriptNameById(uint32 id); 933 TRINITY_DLL_SPEC bool LoadTrinityStrings(DatabaseType& db, char const* table,int32 start_value = -1, int32 end_value = std::numeric_limits<int32>::min()); 934 TRINITY_DLL_SPEC uint32 GetAreaTriggerScriptId(uint32 trigger_id); 935 TRINITY_DLL_SPEC uint32 GetScriptId(const char *name); 936 TRINITY_DLL_SPEC ObjectMgr::ScriptNameMap& GetScriptNames(); 912 937 913 938 #endif -
trunk/src/game/PlayerDump.cpp
r112 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 278 278 // for guid set stop if set is empty 279 279 if(guids && guids->empty()) 280 return; // nothing to do280 return; // nothing to do 281 281 282 282 // setup for guids case start position … … 344 344 FILE *fout = fopen(file.c_str(), "w"); 345 345 if (!fout) 346 346 return DUMP_FILE_OPEN_ERROR; 347 347 348 348 std::string dump = GetDump(guid); … … 372 372 } 373 373 } 374 374 375 FILE *fin = fopen(file.c_str(), "r"); 375 376 if(!fin) 376 377 return DUMP_FILE_OPEN_ERROR; 377 378 378 379 QueryResult * result = NULL; … … 391 392 else incHighest = false; 392 393 } 393 else guid = objmgr.m_hiCharGuid; 394 else 395 guid = objmgr.m_hiCharGuid; 394 396 395 397 // normalize the name if specified and check if it exists … … 469 471 case DTT_CHAR_TABLE: 470 472 if(!changenth(line, 1, newguid)) 471 473 ROLLBACK(DUMP_FILE_BROKEN); 472 474 break; 473 475 … … 475 477 { 476 478 if(!changenth(line, 1, newguid)) 477 479 ROLLBACK(DUMP_FILE_BROKEN); 478 480 479 481 // guid, data field:guid, items 480 482 if(!changenth(line, 2, chraccount)) 481 ROLLBACK(DUMP_FILE_BROKEN); 482 483 ROLLBACK(DUMP_FILE_BROKEN); 483 484 std::string vals = getnth(line, 3); 484 485 if(!changetoknth(vals, OBJECT_FIELD_GUID+1, newguid)) 485 ROLLBACK(DUMP_FILE_BROKEN); 486 486 ROLLBACK(DUMP_FILE_BROKEN); 487 487 for(uint16 field = PLAYER_FIELD_INV_SLOT_HEAD; field < PLAYER_FARSIGHT; field++) 488 488 if(!changetokGuid(vals, field+1, items, objmgr.m_hiItemGuid, true)) 489 ROLLBACK(DUMP_FILE_BROKEN); 490 489 ROLLBACK(DUMP_FILE_BROKEN); 491 490 if(!changenth(line, 3, vals.c_str())) 492 ROLLBACK(DUMP_FILE_BROKEN); 493 491 ROLLBACK(DUMP_FILE_BROKEN); 494 492 if (name == "") 495 493 { … … 504 502 // rename on login: `at_login` field 30 in raw field list 505 503 if(!changenth(line, 30, "1")) 506 504 ROLLBACK(DUMP_FILE_BROKEN); 507 505 } 508 506 } 509 507 else if(!changenth(line, 4, name.c_str())) 510 508 ROLLBACK(DUMP_FILE_BROKEN); 511 509 512 510 break; … … 515 513 { 516 514 if(!changenth(line, 1, newguid)) 517 515 ROLLBACK(DUMP_FILE_BROKEN); 518 516 519 517 // bag, item 520 518 if(!changeGuid(line, 2, items, objmgr.m_hiItemGuid, true)) 521 522 523 519 ROLLBACK(DUMP_FILE_BROKEN); 520 if(!changeGuid(line, 4, items, objmgr.m_hiItemGuid)) 521 ROLLBACK(DUMP_FILE_BROKEN); 524 522 break; 525 523 } … … 528 526 // item, owner, data field:item, owner guid 529 527 if(!changeGuid(line, 1, items, objmgr.m_hiItemGuid)) 530 ROLLBACK(DUMP_FILE_BROKEN); 531 if(!changenth(line, 2, newguid)) 532 ROLLBACK(DUMP_FILE_BROKEN); 533 528 ROLLBACK(DUMP_FILE_BROKEN); 529 if(!changenth(line, 2, newguid)) 530 ROLLBACK(DUMP_FILE_BROKEN); 534 531 std::string vals = getnth(line,3); 535 532 if(!changetokGuid(vals, OBJECT_FIELD_GUID+1, items, objmgr.m_hiItemGuid)) 536 537 538 539 540 533 ROLLBACK(DUMP_FILE_BROKEN); 534 if(!changetoknth(vals, ITEM_FIELD_OWNER+1, newguid)) 535 ROLLBACK(DUMP_FILE_BROKEN); 536 if(!changenth(line, 3, vals.c_str())) 537 ROLLBACK(DUMP_FILE_BROKEN); 541 538 break; 542 539 } … … 545 542 // guid,item_guid, 546 543 if(!changenth(line, 1, newguid)) 547 548 549 544 ROLLBACK(DUMP_FILE_BROKEN); 545 if(!changeGuid(line, 2, items, objmgr.m_hiItemGuid)) 546 ROLLBACK(DUMP_FILE_BROKEN); 550 547 break; 551 548 } … … 570 567 // item, entry, owner, ... 571 568 if(!changenth(line, 1, newpetid)) 572 573 574 569 ROLLBACK(DUMP_FILE_BROKEN); 570 if(!changenth(line, 3, newguid)) 571 ROLLBACK(DUMP_FILE_BROKEN); 575 572 576 573 break; … … 583 580 std::map<uint32, uint32> :: const_iterator petids_iter = petids.find(atoi(currpetid)); 584 581 if(petids_iter == petids.end()) // couldn't find new inserted id 585 582 ROLLBACK(DUMP_FILE_BROKEN); 586 583 587 584 snprintf(newpetid, 20, "%d", petids_iter->second); 588 585 589 586 if(!changenth(line, 1, newpetid)) 590 587 ROLLBACK(DUMP_FILE_BROKEN); 591 588 592 589 break; … … 596 593 // id,messageType,stationery,sender,receiver 597 594 if(!changeGuid(line, 1, mails, objmgr.m_mailid)) 598 599 600 595 ROLLBACK(DUMP_FILE_BROKEN); 596 if(!changenth(line, 5, newguid)) 597 ROLLBACK(DUMP_FILE_BROKEN); 601 598 break; 602 599 } … … 605 602 // mail_id,item_guid,item_template,receiver 606 603 if(!changeGuid(line, 1, mails, objmgr.m_mailid)) 607 608 609 610 611 604 ROLLBACK(DUMP_FILE_BROKEN); 605 if(!changeGuid(line, 2, items, objmgr.m_hiItemGuid)) 606 ROLLBACK(DUMP_FILE_BROKEN); 607 if(!changenth(line, 4, newguid)) 608 ROLLBACK(DUMP_FILE_BROKEN); 612 609 break; 613 610 } … … 618 615 619 616 if(!CharacterDatabase.Execute(line.c_str())) 620 617 ROLLBACK(DUMP_FILE_BROKEN); 621 618 } 622 619 -
trunk/src/game/SpellHandler.cpp
r252 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 55 55 } 56 56 57 if(pItem->GetGUID() != item_guid) 58 { 59 pUser->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL ); 60 return; 61 } 62 57 63 sLog.outDetail("WORLD: CMSG_USE_ITEM packet, bagIndex: %u, slot: %u, spell_count: %u , cast_count: %u, Item: %u, data length = %i", bagIndex, slot, spell_count, cast_count, pItem->GetEntry(), recvPacket.size()); 58 64 … … 238 244 239 245 pItem->SetUInt64Value(ITEM_FIELD_GIFTCREATOR, 0); 240 pItem->Set UInt32Value(OBJECT_FIELD_ENTRY,entry);246 pItem->SetEntry(entry); 241 247 pItem->SetUInt32Value(ITEM_FIELD_FLAGS, flags); 242 248 pItem->SetState(ITEM_CHANGED, pUser); … … 260 266 261 267 uint64 guid; 262 uint32 spellId = OPEN_CHEST;263 268 264 269 recv_data >> guid; … … 323 328 324 329 Spell *spell = new Spell(_player, spellInfo, false); 325 spell->m_cast_count = cast_count; // set count of casts330 spell->m_cast_count = cast_count; // set count of casts 326 331 spell->prepare(&targets); 327 332 } -
trunk/src/game/WaypointManager.cpp
r207 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 25 25 #include "ProgressBar.h" 26 26 #include "MapManager.h" 27 #include "ObjectMgr.h" 27 28 28 29 INSTANTIATE_SINGLETON_1(WaypointManager); … … 30 31 bool WaypointBehavior::isEmpty() 31 32 { 32 return emote == 0 && spell == 0 && model1 == 0 && model2 == 0 && text[0].empty() && 33 text[1].empty() && text[2].empty() && text[3].empty() && text[4].empty(); 33 if (emote || spell || model1 || model2) 34 return false; 35 36 for(int i = 0; i < MAX_WAYPOINT_TEXT; ++i) 37 if(textid[i]) 38 return false; 39 40 return true; 34 41 } 35 42 36 43 WaypointBehavior::WaypointBehavior(const WaypointBehavior &b) 37 44 { 38 emote = b.emote; spell = b.spell; model1 = b.model1; model2 = b.model2; 39 text[0] = b.text[0]; text[1] = b.text[1]; text[2] = b.text[2]; 40 text[3] = b.text[3]; text[4] = b.text[4]; 45 emote = b.emote; 46 spell = b.spell; 47 model1 = b.model1; 48 model2 = b.model2; 49 for(int i=0; i < MAX_WAYPOINT_TEXT; ++i) 50 textid[i] = b.textid[i]; 41 51 } 42 52 … … 67 77 } 68 78 69 result = WorldDatabase.Query("SELECT position_x, position_y, position_z, orientation, model1, model2, waittime, emote, spell, text 1, text2, text3, text4, text5, id, point FROM creature_movement");79 result = WorldDatabase.Query("SELECT position_x, position_y, position_z, orientation, model1, model2, waittime, emote, spell, textid1, textid2, textid3, textid4, textid5, id, point FROM creature_movement"); 70 80 if(result) 71 81 { … … 114 124 be.emote = fields[7].GetUInt32(); 115 125 be.spell = fields[8].GetUInt32(); 116 be.text[0] = fields[9].GetCppString(); 117 be.text[1] = fields[10].GetCppString(); 118 be.text[2] = fields[11].GetCppString(); 119 be.text[3] = fields[12].GetCppString(); 120 be.text[4] = fields[13].GetCppString(); 126 127 // load and store without holes in array 128 int j = 0; 129 for(int i = 0; i < MAX_WAYPOINT_TEXT; ++i) 130 { 131 be.textid[j] = fields[9+i].GetUInt32(); 132 if(be.textid[j]) 133 { 134 if (be.textid[j] < MIN_DB_SCRIPT_STRING_ID || be.textid[j] >= MAX_DB_SCRIPT_STRING_ID) 135 { 136 sLog.outErrorDb( "Table `db_script_string` not have string id %u", be.textid[j]); 137 continue; 138 } 139 140 if (!objmgr.GetTrinityStringLocale (be.textid[j])) 141 { 142 sLog.outErrorDb("ERROR: Waypoint path %d (point %d), have invalid text id (%i) in `textid%d, ignored.", 143 id, point, be.textid[j], i+1); 144 continue; 145 } 146 147 ++j; // to next internal field 148 } 149 } 150 // fill array tail 151 for(; j < MAX_WAYPOINT_TEXT; ++j) 152 be.textid[j] = 0; 121 153 122 154 // save memory by not storing empty behaviors … … 266 298 if(!node.behavior) node.behavior = new WaypointBehavior(); 267 299 268 if(field == "text1") node.behavior->text[0] = text ? text : "";269 if(field == "text2") node.behavior->text[1] = text ? text : "";270 if(field == "text3") node.behavior->text[2] = text ? text : "";271 if(field == "text4") node.behavior->text[3] = text ? text : "";272 if(field == "text5") node.behavior->text[4] = text ? text : "";300 // if(field == "text1") node.behavior->text[0] = text ? text : ""; 301 // if(field == "text2") node.behavior->text[1] = text ? text : ""; 302 // if(field == "text3") node.behavior->text[2] = text ? text : ""; 303 // if(field == "text4") node.behavior->text[3] = text ? text : ""; 304 // if(field == "text5") node.behavior->text[4] = text ? text : ""; 273 305 if(field == "emote") node.behavior->emote = text ? atoi(text) : 0; 274 306 if(field == "spell") node.behavior->spell = text ? atoi(text) : 0; -
trunk/src/game/WaypointManager.h
r206 r260 26 26 #include "Utilities/UnorderedMap.h" 27 27 28 #define MAX_WAYPOINT_TEXT 5 28 29 struct WaypointBehavior 29 30 { 30 31 uint32 emote; 31 32 uint32 spell; 32 std::string text[5];33 int32 textid[MAX_WAYPOINT_TEXT]; 33 34 uint32 model1; 34 35 uint32 model2; -
trunk/src/game/WaypointMovementGenerator.cpp
r229 r260 22 22 creature_movement Table 23 23 24 alter table creature_movement add `text 1` varchar(255) default NULL;25 alter table creature_movement add `text 2` varchar(255) default NULL;26 alter table creature_movement add `text 3` varchar(255) default NULL;27 alter table creature_movement add `text 4` varchar(255) default NULL;28 alter table creature_movement add `text 5` varchar(255) default NULL;24 alter table creature_movement add `textid1` int(11) NOT NULL default '0'; 25 alter table creature_movement add `textid2` int(11) NOT NULL default '0'; 26 alter table creature_movement add `textid3` int(11) NOT NULL default '0'; 27 alter table creature_movement add `textid4` int(11) NOT NULL default '0'; 28 alter table creature_movement add `textid5` int(11) NOT NULL default '0'; 29 29 alter table creature_movement add `emote` int(10) unsigned default '0'; 30 30 alter table creature_movement add `spell` int(5) unsigned default '0'; … … 149 149 if(behavior->model1 != 0) 150 150 creature.SetDisplayId(behavior->model1); 151 if( !behavior->text[0].empty())151 if(behavior->textid[0]) 152 152 { 153 // Only one text is set154 if( !behavior->text[1].empty())153 // Not only one text is set 154 if( behavior->textid[1] ) 155 155 { 156 156 // Select one from max 5 texts (0 and 1 already checked) 157 157 int i = 2; 158 for( ; i < 5; ++i )159 if( behavior->text[i].empty())158 for( ; i < MAX_WAYPOINT_TEXT; ++i ) 159 if( !behavior->textid[i] ) 160 160 break; 161 161 162 creature.Say(behavior->text[rand() % i].c_str(), 0, 0); 163 162 creature.Say(behavior->textid[rand() % i], 0, 0); 164 163 } 165 164 else 166 creature.Say(behavior->text [0].c_str(), 0, 0);165 creature.Say(behavior->textid[0], 0, 0); 167 166 } 168 167 } // wpBehaviour found -
trunk/src/game/World.cpp
r230 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 67 67 68 68 volatile bool World::m_stopEvent = false; 69 uint8 World::m_ExitCode = SHUTDOWN_EXIT_CODE; 69 70 volatile uint32 World::m_worldLoopCounter = 0; 70 71 … … 543 544 m_configs[CONFIG_SOCKET_SELECTTIME] = sConfig.GetIntDefault("SocketSelectTime", DEFAULT_SOCKET_SELECT_TIME); 544 545 545 546 546 m_configs[CONFIG_GROUP_XP_DISTANCE] = sConfig.GetIntDefault("MaxGroupXPDistance", 74); 547 547 /// \todo Add MonsterSight and GuarderSight (with meaning) in Trinityd.conf or put them as define … … 606 606 } 607 607 608 609 608 if(reload) 610 609 { … … 770 769 m_configs[CONFIG_THREAT_RADIUS] = sConfig.GetIntDefault("ThreatRadius", 100); 771 770 772 // always use declined names in the Russian client773 m_configs[CONFIG_DECLINED_NAMES_USED] = 771 // always use declined names in the russian client 772 m_configs[CONFIG_DECLINED_NAMES_USED] = 774 773 (m_configs[CONFIG_REALM_ZONE] == REALM_ZONE_RUSSIAN) ? true : sConfig.GetBoolDefault("DeclinedNames", false); 775 774 … … 966 965 DetectDBCLang(); 967 966 967 sLog.outString( "Loading Script Names..."); 968 objmgr.LoadScriptNames(); 969 968 970 sLog.outString( "Loading InstanceTemplate" ); 969 971 objmgr.LoadInstanceTemplate(); … … 1081 1083 sLog.outString( "Loading Tavern Area Triggers..." ); 1082 1084 objmgr.LoadTavernAreaTriggers(); 1083 1085 1084 1086 sLog.outString( "Loading AreaTrigger script names..." ); 1085 1087 objmgr.LoadAreaTriggerScripts(); 1086 1087 1088 1088 1089 sLog.outString( "Loading Graveyard-zone links..."); … … 1165 1166 sLog.outString( "Loading Npc Text Id..." ); 1166 1167 objmgr.LoadNpcTextId(); // must be after load Creature and NpcText 1167 1168 1168 1169 sLog.outString( "Loading Npc Options..." ); 1169 1170 objmgr.LoadNpcOptions(); … … 1193 1194 objmgr.LoadEventScripts(); // must be after load Creature/Gameobject(Template/Data) 1194 1195 1196 sLog.outString( "Loading Scripts text locales..." ); // must be after Load*Scripts calls 1197 objmgr.LoadDbScriptStrings(); 1198 1195 1199 sLog.outString( "Initializing Scripts..." ); 1196 1200 if(!LoadScriptingModule()) … … 1263 1267 sLog.outString( "WORLD: World initialized" ); 1264 1268 } 1269 1265 1270 void World::DetectDBCLang() 1266 1271 { … … 1463 1468 } 1464 1469 1465 MapManager::Instance().DoDelayedMovesAndRemoves(); ///- Move all creatures with "delayed move" and remove and delete all objects with "delayed remove" 1470 /// </ul> 1471 ///- Move all creatures with "delayed move" and remove and delete all objects with "delayed remove" 1472 MapManager::Instance().DoDelayedMovesAndRemoves(); 1466 1473 1467 1474 // update the instance reset times … … 1583 1590 } 1584 1591 1592 //if(source && !source->IsInWorld()) source = NULL; 1593 1585 1594 Object* target = NULL; 1586 1595 … … 1610 1619 } 1611 1620 1621 //if(target && !target->IsInWorld()) target = NULL; 1622 1612 1623 switch (step.script->command) 1613 1624 { … … 1637 1648 { 1638 1649 case 0: // Say 1639 ((Creature *)source)->Say(step.script->data text.c_str(), LANG_UNIVERSAL, unit_target);1650 ((Creature *)source)->Say(step.script->dataint, LANG_UNIVERSAL, unit_target); 1640 1651 break; 1641 1652 case 1: // Whisper … … 1645 1656 break; 1646 1657 } 1647 ((Creature *)source)->Whisper(step.script->data text.c_str(),unit_target);1658 ((Creature *)source)->Whisper(step.script->dataint,unit_target); 1648 1659 break; 1649 1660 case 2: // Yell 1650 ((Creature *)source)->Yell(step.script->data text.c_str(), LANG_UNIVERSAL, unit_target);1661 ((Creature *)source)->Yell(step.script->dataint, LANG_UNIVERSAL, unit_target); 1651 1662 break; 1652 1663 case 3: // Emote text 1653 ((Creature *)source)->TextEmote(step.script->data text.c_str(), unit_target);1664 ((Creature *)source)->TextEmote(step.script->dataint, unit_target); 1654 1665 break; 1655 1666 default: … … 1702 1713 } 1703 1714 ((Unit *)source)->SendMonsterMoveWithSpeed(step.script->x, step.script->y, step.script->z, ((Unit *)source)->GetUnitMovementFlags(), step.script->datalong2 ); 1704 MapManager::Instance().GetMap(((Unit *)source)->GetMapId(), ((Unit *)source))->CreatureRelocation(((Creature *)source), step.script->x, step.script->y, step.script->z, 0);1715 ((Unit *)source)->GetMap()->CreatureRelocation(((Creature *)source), step.script->x, step.script->y, step.script->z, 0); 1705 1716 break; 1706 1717 case SCRIPT_COMMAND_FLAG_SET: … … 1852 1863 go->SetRespawnTime(time_to_despawn); //despawn object in ? seconds 1853 1864 1854 MapManager::Instance().GetMap(go->GetMapId(), go)->Add(go);1865 go->GetMap()->Add(go); 1855 1866 break; 1856 1867 } … … 2374 2385 2375 2386 ///- if there is a shutdown timer 2376 if( m_ShutdownTimer > 0 && elapsed > 0)2387 if(!m_stopEvent && m_ShutdownTimer > 0 && elapsed > 0) 2377 2388 { 2378 2389 ///- ... and it is overdue, stop the world (set m_stopEvent) … … 2380 2391 { 2381 2392 if(!(m_ShutdownMask & SHUTDOWN_MASK_IDLE) || GetActiveAndQueuedSessionCount()==0) 2382 m_stopEvent = true; 2393 m_stopEvent = true; // exist code already set 2383 2394 else 2384 2395 m_ShutdownTimer = 1; // minimum timer value to wait idle state … … 2395 2406 2396 2407 /// Shutdown the server 2397 void World::ShutdownServ(uint32 time, uint32 options) 2398 { 2408 void World::ShutdownServ(uint32 time, uint32 options, uint8 exitcode) 2409 { 2410 // ignore if server shutdown at next tick 2411 if(m_stopEvent) 2412 return; 2413 2399 2414 m_ShutdownMask = options; 2415 m_ExitCode = exitcode; 2400 2416 2401 2417 ///- If the shutdown time is 0, set m_stopEvent (except if shutdown is 'idle' with remaining sessions) … … 2403 2419 { 2404 2420 if(!(options & SHUTDOWN_MASK_IDLE) || GetActiveAndQueuedSessionCount()==0) 2405 m_stopEvent = true; 2421 m_stopEvent = true; // exist code already set 2406 2422 else 2407 2423 m_ShutdownTimer = 1; //So that the session count is re-evaluated at next world tick … … 2448 2464 void World::ShutdownCancel() 2449 2465 { 2450 if(!m_ShutdownTimer) 2466 // nothing cancel or too later 2467 if(!m_ShutdownTimer || m_stopEvent) 2451 2468 return; 2452 2469 … … 2455 2472 m_ShutdownMask = 0; 2456 2473 m_ShutdownTimer = 0; 2474 m_ExitCode = SHUTDOWN_EXIT_CODE; // to default value 2457 2475 SendServerMessage(msgid); 2458 2476 2459 DEBUG_LOG("Server %s cancel ed.",(m_ShutdownMask & SHUTDOWN_MASK_RESTART ? "restart" : "shuttingdown"));2477 DEBUG_LOG("Server %s cancelled.",(m_ShutdownMask & SHUTDOWN_MASK_RESTART ? "restart" : "shuttingdown")); 2460 2478 } 2461 2479 … … 2502 2520 if(!itr->second->Update(diff)) // As interval = 0 2503 2521 { 2522 RemoveQueuedPlayer (itr->second); 2504 2523 delete itr->second; 2505 2524 m_sessions.erase(itr); -
trunk/src/game/World.h
r229 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 52 52 }; 53 53 54 enum ShutdownExitCode 55 { 56 SHUTDOWN_EXIT_CODE = 0, 57 ERROR_EXIT_CODE = 1, 58 RESTART_EXIT_CODE = 2, 59 }; 60 54 61 /// Timers for different object refresh rates 55 62 enum WorldTimers … … 62 69 WUPDATE_CORPSES = 5, 63 70 WUPDATE_EVENTS = 6, 64 WUPDATE_COUNT = 7, 65 71 WUPDATE_COUNT = 7 66 72 }; 67 73 … … 106 112 CONFIG_INSTANCE_IGNORE_RAID, 107 113 CONFIG_BATTLEGROUND_CAST_DESERTER, 114 CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE, 115 CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY, 108 116 CONFIG_INSTANCE_RESET_TIME_HOUR, 109 117 CONFIG_INSTANCE_UNLOAD_DELAY, … … 144 152 CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF, 145 153 CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF, 154 CONFIG_DETECT_POS_COLLISION, 146 155 CONFIG_RESTRICTED_LFG_CHANNEL, 147 156 CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL, … … 317 326 struct CliCommandHolder 318 327 { 319 320 321 322 323 324 325 326 327 328 329 330 331 332 328 typedef void Print(const char*); 329 330 char *m_command; 331 Print* m_print; 332 333 CliCommandHolder(const char *command, Print* zprint) 334 : m_print(zprint) 335 { 336 size_t len = strlen(command)+1; 337 m_command = new char[len]; 338 memcpy(m_command, command, len); 339 } 340 341 ~CliCommandHolder() { delete[] m_command; } 333 342 }; 334 343 … … 337 346 { 338 347 public: 339 static volatile bool m_stopEvent;340 348 static volatile uint32 m_worldLoopCounter; 341 349 … … 345 353 WorldSession* FindSession(uint32 id) const; 346 354 void AddSession(WorldSession *s); 347 348 355 bool RemoveSession(uint32 id); 349 356 /// Get the number of current active sessions … … 408 415 void LoadConfigSettings(bool reload = false); 409 416 410 void SendWorldText(int32 string_id, ...); 417 void SendWorldText(int32 string_id, ...); 411 418 void SendGlobalMessage(WorldPacket *packet, WorldSession *self = 0, uint32 team = 0); 412 419 void SendZoneMessage(uint32 zone, WorldPacket *packet, WorldSession *self = 0, uint32 team = 0); … … 415 422 416 423 /// Are we in the middle of a shutdown? 417 uint32 GetShutdownMask() const { return m_ShutdownMask; }418 424 bool IsShutdowning() const { return m_ShutdownTimer > 0; } 419 void ShutdownServ(uint32 time, uint32 options = 0);425 void ShutdownServ(uint32 time, uint32 options, uint8 exitcode); 420 426 void ShutdownCancel(); 421 427 void ShutdownMsg(bool show = false, Player* player = NULL); 428 static uint8 GetExitCode() { return m_ExitCode; } 429 static void StopNow(uint8 exitcode) { m_stopEvent = true; m_ExitCode = exitcode; } 430 static bool IsStopped() { return m_stopEvent; } 422 431 423 432 void Update(time_t diff); … … 454 463 void KickAllQueued(); 455 464 BanReturn BanAccount(BanMode mode, std::string nameOrIP, std::string duration, std::string reason, std::string author); 456 465 bool RemoveBanAccount(BanMode mode, std::string nameOrIP); 457 466 458 467 void ScriptsStart(std::map<uint32, std::multimap<uint32, ScriptInfo> > const& scripts, uint32 id, Object* source, Object* target); … … 482 491 LocaleConstant GetAvailableDbcLocale(LocaleConstant locale) const { if(m_availableDbcLocaleMask & (1 << locale)) return locale; else return m_defaultDbcLocale; } 483 492 484 485 486 487 488 489 490 493 //used World DB version 494 void LoadDBVersion(); 495 char const* GetDBVersion() { return m_DBVersion.c_str(); } 496 497 //used Script version 498 void SetScriptsVersion(char const* version) { m_ScriptsVersion = version ? version : "unknown scripting library"; } 499 char const* GetScriptsVersion() { return m_ScriptsVersion.c_str(); } 491 500 492 501 protected: … … 499 508 void ResetDailyQuests(); 500 509 private: 510 static volatile bool m_stopEvent; 511 static uint8 m_ExitCode; 512 uint32 m_ShutdownTimer; 513 uint32 m_ShutdownMask; 514 501 515 time_t m_startTime; 502 516 time_t m_gameTime; … … 526 540 std::set<uint32> m_forbiddenMapIds; 527 541 528 uint32 m_ShutdownTimer;529 uint32 m_ShutdownMask;530 531 542 // for max speed access 532 543 static float m_MaxVisibleDistanceForCreature; … … 546 557 //Player Queue 547 558 Queue m_QueuedPlayer; 548 559 549 560 //sessions that are added async 550 561 void AddSession_(WorldSession* s); 551 562 ZThread::LockedQueue<WorldSession*, ZThread::FastMutex> addSessQueue; 552 563 553 554 555 564 //used versions 565 std::string m_DBVersion; 566 std::string m_ScriptsVersion; 556 567 }; 557 568 -
trunk/src/shared/Database/DBCStores.cpp
r229 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 122 122 // DBC used only for initialization sTaxiPathSetBySource at startup. 123 123 TaxiPathNodesByPath sTaxiPathNodesByPath; 124 struct TaxiPathNodeEntry 125 { 126 uint32 path; 127 uint32 index; 128 uint32 mapid; 129 float x; 130 float y; 131 float z; 132 uint32 actionFlag; 133 uint32 delay; 134 }; 124 135 125 static DBCStorage <TaxiPathNodeEntry> sTaxiPathNodeStore(TaxiPathNodeEntryfmt); 136 137 126 DBCStorage <TotemCategoryEntry> sTotemCategoryStore(TotemCategoryEntryfmt); 138 139 127 DBCStorage <WorldMapAreaEntry> sWorldMapAreaStore(WorldMapAreaEntryfmt); 140 128 DBCStorage <WorldSafeLocsEntry> sWorldSafeLocsStore(WorldSafeLocsEntryfmt); … … 236 224 } 237 225 } 238 226 239 227 LoadDBC(availableDbcLocales,bar,bad_dbc_files,sFactionTemplateStore, dbcPath,"FactionTemplate.dbc"); 240 228 LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGemPropertiesStore, dbcPath,"GemProperties.dbc"); … … 284 272 { 285 273 SkillLineAbilityEntry const *skillLine = sSkillLineAbilityStore.LookupEntry(j); 286 274 287 275 if(!skillLine) 288 276 continue; … … 291 279 292 280 if(spellInfo && (spellInfo->Attributes & 0x1D0) == 0x1D0) 293 { 281 { 294 282 for (unsigned int i = 1; i < sCreatureFamilyStore.GetNumRows(); ++i) 295 283 { … … 298 286 continue; 299 287 300 if(skillLine->skillId != cFamily->skillLine && skillLine->skillId != cFamily->skillLine2)288 if(skillLine->skillId != cFamily->skillLine[0] && skillLine->skillId != cFamily->skillLine[1]) 301 289 continue; 302 290 … … 310 298 LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellFocusObjectStore, dbcPath,"SpellFocusObject.dbc"); 311 299 LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellItemEnchantmentStore,dbcPath,"SpellItemEnchantment.dbc"); 312 313 300 LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellItemEnchantmentConditionStore,dbcPath,"SpellItemEnchantmentCondition.dbc"); 314 301 LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellRadiusStore, dbcPath,"SpellRadius.dbc"); … … 456 443 // check at up-to-date DBC files (71 is last char title added in 2.4.3) 457 444 // check at up-to-date DBC files (1768 is last area added in 2.4.3) 458 if( !sSpellStore.LookupEntry(53085) || 459 !sSkillLineAbilityStore.LookupEntry(17514) || 445 if( !sSpellStore.LookupEntry(53085) || 446 !sSkillLineAbilityStore.LookupEntry(17514) || 460 447 !sMapStore.LookupEntry(598) || 461 !sGemPropertiesStore.LookupEntry(1127) || 462 !sItemExtendedCostStore.LookupEntry(2425) || 448 !sGemPropertiesStore.LookupEntry(1127) || 449 !sItemExtendedCostStore.LookupEntry(2425) || 463 450 !sCharTitlesStore.LookupEntry(71) || 464 451 !sAreaStore.LookupEntry(1768) ) -
trunk/src/shared/Database/DBCStores.h
r102 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 76 76 bool Load(char const* fn) 77 77 { 78 79 78 DBCFile dbc; 80 79 // Check if load was sucessful, only then continue -
trunk/src/shared/Database/DBCStructure.h
r230 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 22 22 #define DBCSTRUCTURE_H 23 23 24 #include "DBCEnums.h" 24 25 #include "Platform/Define.h" 25 26 … … 36 37 #pragma pack(push,1) 37 38 #endif 38 39 enum AreaTeams40 {41 AREATEAM_NONE = 0,42 AREATEAM_ALLY = 2,43 AREATEAM_HORDE = 444 };45 46 enum AreaFlags47 {48 AREA_FLAG_SNOW = 0x00000001, // snow (only Dun Morogh, Naxxramas, Razorfen Downs and Winterspring)49 AREA_FLAG_UNK1 = 0x00000002, // unknown, (only Naxxramas and Razorfen Downs)50 AREA_FLAG_UNK2 = 0x00000004, // Only used on development map51 AREA_FLAG_SLAVE_CAPITAL = 0x00000008, // slave capital city flag?52 AREA_FLAG_UNK3 = 0x00000010, // unknown53 AREA_FLAG_SLAVE_CAPITAL2 = 0x00000020, // slave capital city flag?54 AREA_FLAG_UNK4 = 0x00000040, // many zones have this flag55 AREA_FLAG_ARENA = 0x00000080, // arena, both instanced and world arenas56 AREA_FLAG_CAPITAL = 0x00000100, // main capital city flag57 AREA_FLAG_CITY = 0x00000200, // only for one zone named "City" (where it located?)58 AREA_FLAG_OUTLAND = 0x00000400, // outland zones? (only Eye of the Storm not have this flag, but have 0x00004000 flag)59 AREA_FLAG_SANCTUARY = 0x00000800, // sanctuary area (PvP disabled)60 AREA_FLAG_NEED_FLY = 0x00001000, // only Netherwing Ledge, Socrethar's Seat, Tempest Keep, The Arcatraz, The Botanica, The Mechanar, Sorrow Wing Point, Dragonspine Ridge, Netherwing Mines, Dragonmaw Base Camp, Dragonmaw Skyway61 AREA_FLAG_UNUSED1 = 0x00002000, // not used now (no area/zones with this flag set in 2.4.2)62 AREA_FLAG_OUTLAND2 = 0x00004000, // outland zones? (only Circle of Blood Arena not have this flag, but have 0x00000400 flag)63 AREA_FLAG_PVP = 0x00008000, // pvp objective area? (Death's Door also has this flag although it's no pvp object area)64 AREA_FLAG_ARENA_INSTANCE = 0x00010000, // used by instanced arenas only65 AREA_FLAG_UNUSED2 = 0x00020000, // not used now (no area/zones with this flag set in 2.4.2)66 AREA_FLAG_UNK5 = 0x00040000, // just used for Amani Pass, Hatchet Hills67 AREA_FLAG_LOWLEVEL = 0x00100000 // used for some starting areas with area_level <=1568 };69 70 enum FactionTemplateFlags71 {72 FACTION_TEMPLATE_FLAG_CONTESTED_GUARD = 0x00001000, // faction will attack players that were involved in PvP combats73 };74 39 75 40 struct AreaTableEntry … … 180 145 // 64 string flags, unused 181 146 // 65-67 unused 182 uint32 addon;// 68 (0 - original race, 1 - tbc addon, ...)147 uint32 addon; // 68 (0 - original race, 1 - tbc addon, ...) 183 148 }; 184 149 … … 194 159 { 195 160 uint32 ID; // 0 196 float minScale; // 1 197 uint32 minScaleLevel; // 2 0/1 161 float minScale; // 1 162 uint32 minScaleLevel; // 2 0/1 198 163 float maxScale; // 3 199 164 uint32 maxScaleLevel; // 4 0/60 200 uint32 skillLine; // 5 201 uint32 skillLine2; // 6 165 uint32 skillLine[2]; // 5-6 202 166 uint32 petFoodMask; // 7 203 167 char* Name[16]; // 8-23 … … 243 207 //char* description[16]; // 36-51 unused 244 208 // 52 string flags, unused 245 };246 247 enum FactionMasks248 {249 FACTION_MASK_PLAYER = 1, // any player250 FACTION_MASK_ALLIANCE = 2, // player or creature from alliance team251 FACTION_MASK_HORDE = 4, // player or creature from horde team252 FACTION_MASK_MONSTER = 8 // aggressive creature from monster team253 // if none flags set then non-aggressive creature254 209 }; 255 210 … … 302 257 303 258 #define GT_MAX_LEVEL 100 259 304 260 struct GtCombatRatingsEntry 305 261 { … … 430 386 // 17 name flags, unused 431 387 //char* content[16]; // 18-33 432 };433 434 enum MapTypes435 {436 MAP_COMMON = 0,437 MAP_INSTANCE = 1,438 MAP_RAID = 2,439 MAP_BATTLEGROUND = 3,440 MAP_ARENA = 4441 388 }; 442 389 … … 544 491 // 36 string flags, not used 545 492 uint32 spellIcon; // 37 546 };547 548 enum AbilytyLearnType549 {550 ABILITY_LEARNED_ON_GET_PROFESSION_SKILL = 1,551 ABILITY_LEARNED_ON_GET_RACE_OR_CLASS_SKILL = 2552 493 }; 553 494 … … 759 700 }; 760 701 761 enum ItemEnchantmentType762 {763 ITEM_ENCHANTMENT_TYPE_NONE = 0,764 ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL = 1,765 ITEM_ENCHANTMENT_TYPE_DAMAGE = 2,766 ITEM_ENCHANTMENT_TYPE_EQUIP_SPELL = 3,767 ITEM_ENCHANTMENT_TYPE_RESISTANCE = 4,768 ITEM_ENCHANTMENT_TYPE_STAT = 5,769 ITEM_ENCHANTMENT_TYPE_TOTEM = 6770 };771 772 702 struct SpellItemEnchantmentEntry 773 703 { … … 827 757 }; 828 758 829 struct TaxiPathEntry830 {831 uint32 ID;832 uint32 from;833 uint32 to;834 uint32 price;835 };836 837 759 struct TaxiNodesEntry 838 760 { … … 848 770 }; 849 771 850 enum TotemCategoryType 851 { 852 TOTEM_CATEGORY_TYPE_KNIFE = 1, 853 TOTEM_CATEGORY_TYPE_TOTEM = 2, 854 TOTEM_CATEGORY_TYPE_ROD = 3, 855 TOTEM_CATEGORY_TYPE_PICK = 21, 856 TOTEM_CATEGORY_TYPE_STONE = 22, 857 TOTEM_CATEGORY_TYPE_HAMMER = 23, 858 TOTEM_CATEGORY_TYPE_SPANNER = 24 772 struct TaxiPathEntry 773 { 774 uint32 ID; 775 uint32 from; 776 uint32 to; 777 uint32 price; 778 }; 779 780 struct TaxiPathNodeEntry 781 { 782 uint32 path; 783 uint32 index; 784 uint32 mapid; 785 float x; 786 float y; 787 float z; 788 uint32 actionFlag; 789 uint32 delay; 859 790 }; 860 791 -
trunk/src/shared/Database/SQLStorage.cpp
r102 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 21 21 #include "SQLStorage.h" 22 #include "ProgressBar.h" 23 #include "Log.h" 24 #include "dbcfile.h" 22 #include "SQLStorageImpl.h" 25 23 26 24 #ifdef DO_POSTGRESQL … … 30 28 #endif 31 29 32 const char CreatureInfofmt[]="iiiiiisssiiiiiiiiiiffiffiiiiiiiiiiiffiiiiiiiiiiiiiiiiiiisiilliiis"; 30 const char CreatureInfosrcfmt[]="iiiiiisssiiiiiiiiiiffiffiiiiiiiiiiiffiiiiiiiiiiiiiiiiiiisiilliiis"; 31 const char CreatureInfodstfmt[]="iiiiiisssiiiiiiiiiiffiffiiiiiiiiiiiffiiiiiiiiiiiiiiiiiiisiilliiii"; 33 32 const char CreatureDataAddonInfofmt[]="iiiiiiis"; 34 33 const char CreatureModelfmt[]="iffbi"; 35 34 const char CreatureInfoAddonInfofmt[]="iiiiiiis"; 36 35 const char EquipmentInfofmt[]="iiiiiiiiii"; 37 const char GameObjectInfofmt[]="iiissiifiiiiiiiiiiiiiiiiiiiiiiiis"; 38 const char ItemPrototypefmt[]="iiiisiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffiffiffiffiffiiiiiiiiiifiiifiiiiiifiiiiiifiiiiiifiiiiiifiiiisiiiiiiiiiiiiiiiiiiiiiiiiifsiiiii"; 36 const char GameObjectInfosrcfmt[]="iiissiifiiiiiiiiiiiiiiiiiiiiiiiis"; 37 const char GameObjectInfodstfmt[]="iiissiifiiiiiiiiiiiiiiiiiiiiiiiii"; 38 const char ItemPrototypesrcfmt[]="iiiisiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffiffiffiffiffiiiiiiiiiifiiifiiiiiifiiiiiifiiiiiifiiiiiifiiiisiiiiiiiiiiiiiiiiiiiiiiiiifsiiiii"; 39 const char ItemPrototypedstfmt[]="iiiisiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiffiffiffiffiffiiiiiiiiiifiiifiiiiiifiiiiiifiiiiiifiiiiiifiiiisiiiiiiiiiiiiiiiiiiiiiiiiifiiiiii"; 39 40 const char PageTextfmt[]="isi"; 40 41 const char SpellThreatfmt[]="ii"; 41 const char InstanceTemplatefmt[]="iiiiiiffffs"; 42 const char InstanceTemplatesrcfmt[]="iiiiiiffffs"; 43 const char InstanceTemplatedstfmt[]="iiiiiiffffi"; 42 44 43 SQLStorage sCreatureStorage(CreatureInfo fmt,"entry","creature_template");45 SQLStorage sCreatureStorage(CreatureInfosrcfmt, CreatureInfodstfmt, "entry","creature_template"); 44 46 SQLStorage sCreatureDataAddonStorage(CreatureDataAddonInfofmt,"guid","creature_addon"); 45 47 SQLStorage sCreatureModelStorage(CreatureModelfmt,"modelid","creature_model_info"); 46 48 SQLStorage sCreatureInfoAddonStorage(CreatureInfoAddonInfofmt,"entry","creature_template_addon"); 47 49 SQLStorage sEquipmentStorage(EquipmentInfofmt,"entry","creature_equip_template"); 48 SQLStorage sGOStorage(GameObjectInfo fmt,"entry","gameobject_template");49 SQLStorage sItemStorage(ItemPrototype fmt,"entry","item_template");50 SQLStorage sGOStorage(GameObjectInfosrcfmt, GameObjectInfodstfmt, "entry","gameobject_template"); 51 SQLStorage sItemStorage(ItemPrototypesrcfmt, ItemPrototypedstfmt, "entry","item_template"); 50 52 SQLStorage sPageTextStore(PageTextfmt,"entry","page_text"); 51 53 SQLStorage sSpellThreatStore(SpellThreatfmt,"entry","spell_threat"); 52 SQLStorage sInstanceTemplate(InstanceTemplate fmt,"map","instance_template");54 SQLStorage sInstanceTemplate(InstanceTemplatesrcfmt, InstanceTemplatedstfmt, "map","instance_template"); 53 55 54 56 void SQLStorage::Free () … … 56 58 uint32 offset=0; 57 59 for(uint32 x=0;x<iNumFields;x++) 58 if ( format[x]==FT_STRING)60 if (dst_format[x]==FT_STRING) 59 61 { 60 62 for(uint32 y=0;y<MaxEntry;y++) … … 62 64 delete [] *(char**)((char*)(pIndex[y])+offset); 63 65 64 offset +=sizeof(char*);66 offset += sizeof(char*); 65 67 } 66 else if ( format[x]==FT_LOGIC)67 offset +=sizeof(bool);68 else if ( format[x]==FT_BYTE)69 offset +=sizeof(char);68 else if (dst_format[x]==FT_LOGIC) 69 offset += sizeof(bool); 70 else if (dst_format[x]==FT_BYTE) 71 offset += sizeof(char); 70 72 else 71 offset +=4;73 offset += 4; 72 74 73 75 delete [] pIndex; … … 75 77 } 76 78 77 void SQLStorage::Load 79 void SQLStorage::Load() 78 80 { 79 uint32 maxi; 80 Field *fields; 81 QueryResult *result = WorldDatabase.PQuery("SELECT MAX(%s) FROM %s",entry_field,table); 82 if(!result) 83 { 84 sLog.outError("Error loading %s table (not exist?)\n",table); 85 exit(1); // Stop server at loading non exited table or not accessable table 86 } 87 88 maxi= (*result)[0].GetUInt32()+1; 89 delete result; 90 91 result = WorldDatabase.PQuery("SELECT COUNT(*) FROM %s",table); 92 if(result) 93 { 94 fields = result->Fetch(); 95 RecordCount=fields[0].GetUInt32(); 96 delete result; 97 } 98 else 99 RecordCount = 0; 100 101 result = WorldDatabase.PQuery("SELECT * FROM %s",table); 102 103 if(!result) 104 { 105 sLog.outError("%s table is empty!\n",table); 106 RecordCount = 0; 107 return; 108 } 109 110 uint32 recordsize=0; 111 uint32 offset=0; 112 113 if(iNumFields!=result->GetFieldCount()) 114 { 115 RecordCount = 0; 116 sLog.outError("Error in %s table, probably sql file format was updated (there should be %d fields in sql).\n",table,iNumFields); 117 delete result; 118 exit(1); // Stop server at loading broken or non-compatiable table. 119 } 120 121 //get struct size 122 uint32 sc=0; 123 uint32 bo=0; 124 uint32 bb=0; 125 for(uint32 x=0;x<iNumFields;x++) 126 if(format[x]==FT_STRING) 127 ++sc; 128 else if (format[x]==FT_LOGIC) 129 ++bo; 130 else if (format[x]==FT_BYTE) 131 ++bb; 132 recordsize=(iNumFields-sc-bo-bb)*4+sc*sizeof(char*)+bo*sizeof(bool)+bb*sizeof(char); 133 134 char** newIndex=new char*[maxi]; 135 memset(newIndex,0,maxi*sizeof(char*)); 136 137 char * _data= new char[RecordCount *recordsize]; 138 uint32 count=0; 139 barGoLink bar( RecordCount ); 140 do 141 { 142 fields = result->Fetch(); 143 bar.step(); 144 char *p=(char*)&_data[recordsize*count]; 145 newIndex[fields[0].GetUInt32()]=p; 146 147 offset=0; 148 for(uint32 x=0;x<iNumFields;x++) 149 switch(format[x]) 150 { 151 case FT_LOGIC: 152 *((bool*)(&p[offset]))=(fields[x].GetUInt32()>0); 153 offset+=sizeof(bool); 154 break; 155 case FT_BYTE: 156 *((char*)(&p[offset]))=(fields[x].GetUInt8()); 157 offset+=sizeof(char); 158 break; 159 case FT_INT: 160 *((uint32*)(&p[offset]))=fields[x].GetUInt32(); 161 offset+=sizeof(uint32); 162 break; 163 case FT_FLOAT: 164 *((float*)(&p[offset]))=fields[x].GetFloat(); 165 offset+=sizeof(float); 166 break; 167 case FT_STRING: 168 char const* tmp = fields[x].GetString(); 169 char* st; 170 if(!tmp) 171 { 172 st=new char[1]; 173 *st=0; 174 } 175 else 176 { 177 uint32 l=strlen(tmp)+1; 178 st=new char[l]; 179 memcpy(st,tmp,l); 180 } 181 *((char**)(&p[offset]))=st; 182 offset+=sizeof(char*); 183 break; 184 } 185 ++count; 186 }while( result->NextRow() ); 187 188 delete result; 189 190 pIndex =newIndex; 191 MaxEntry=maxi; 192 data=_data; 81 SQLStorageLoader loader; 82 loader.Load(*this); 193 83 } -
trunk/src/shared/Database/SQLStorage.h
r102 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 27 27 class SQLStorage 28 28 { 29 template<class T> 30 friend struct SQLStorageLoaderBase; 31 29 32 public: 30 33 31 SQLStorage(const char* fmt,const char * _entry_field,const char * sqlname)34 SQLStorage(const char* fmt, const char * _entry_field, const char * sqlname) 32 35 { 33 format=fmt; 34 entry_field = _entry_field; 35 table=sqlname; 36 data=NULL; 37 pIndex=NULL; 38 iNumFields =strlen(fmt); 39 MaxEntry = 0; 36 src_format = fmt; 37 dst_format = fmt; 38 init(_entry_field, sqlname); 40 39 } 40 41 SQLStorage(const char* src_fmt, const char* dst_fmt, const char * _entry_field, const char * sqlname) 42 { 43 src_format = src_fmt; 44 dst_format = dst_fmt; 45 init(_entry_field, sqlname); 46 } 47 48 41 49 ~SQLStorage() 42 50 { … … 57 65 uint32 MaxEntry; 58 66 uint32 iNumFields; 67 59 68 void Load(); 60 69 void Free(); 70 61 71 private: 72 void init(const char * _entry_field, const char * sqlname) 73 { 74 entry_field = _entry_field; 75 table=sqlname; 76 data=NULL; 77 pIndex=NULL; 78 iNumFields = strlen(src_format); 79 MaxEntry = 0; 80 } 81 62 82 char** pIndex; 63 83 64 84 char *data; 65 const char *format; 85 const char *src_format; 86 const char *dst_format; 66 87 const char *table; 67 88 const char *entry_field; 68 89 //bool HasString; 69 90 }; 91 92 template <class T> 93 struct SQLStorageLoaderBase 94 { 95 public: 96 void Load(SQLStorage &storage); 97 98 template<class S, class D> 99 void convert(uint32 field_pos, S src, D &dst); 100 template<class S> 101 void convert_to_str(uint32 field_pos, S src, char * & dst); 102 template<class D> 103 void convert_from_str(uint32 field_pos, char * src, D& dst); 104 void convert_str_to_str(uint32 field_pos, char *src, char *&dst); 105 106 private: 107 template<class V> 108 void storeValue(V value, SQLStorage &store, char *p, int x, uint32 &offset); 109 void storeValue(char * value, SQLStorage &store, char *p, int x, uint32 &offset); 110 }; 111 112 struct SQLStorageLoader : public SQLStorageLoaderBase<SQLStorageLoader> 113 { 114 }; 115 70 116 #endif -
trunk/src/shared/Database/dbcfile.cpp
r102 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 -
trunk/src/shared/Database/dbcfile.h
r102 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 -
trunk/src/shared/ProgressBar.cpp
r102 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 -
trunk/src/shared/ProgressBar.h
r102 r260 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 #ifndef TRINITYCORE_PROGRESSBAR_H -
trunk/src/trinitycore/CliRunnable.cpp
r237 r260 170 170 { 171 171 SendSysMessage(LANG_COMMAND_EXIT); 172 World:: m_stopEvent = true;172 World::StopNow(SHUTDOWN_EXIT_CODE); 173 173 return true; 174 174 } … … 311 311 312 312 ///- As long as the World is running (no World::m_stopEvent), get the command line and handle it 313 while (!World:: m_stopEvent)313 while (!World::IsStopped()) 314 314 { 315 315 fflush(stdout); 316 316 #ifdef linux 317 while (!kb_hit_return() && !World:: m_stopEvent)317 while (!kb_hit_return() && !World::IsStopped()) 318 318 // With this, we limit CLI to 10commands/second 319 319 usleep(100); 320 if (World:: m_stopEvent)320 if (World::IsStopped()) 321 321 break; 322 322 #endif … … 349 349 else if (feof(stdin)) 350 350 { 351 World:: m_stopEvent = true;351 World::StopNow(SHUTDOWN_EXIT_CODE); 352 352 } 353 353 } -
trunk/src/trinitycore/Master.cpp
r237 r260 78 78 m_lastchange = 0; 79 79 w_lastchange = 0; 80 while(!World:: m_stopEvent)80 while(!World::IsStopped()) 81 81 { 82 82 ZThread::Thread::sleep(1000); … … 173 173 // if use ra spend time waiting for io, if not use ra ,just sleep 174 174 if (usera) 175 while (!World:: m_stopEvent)175 while (!World::IsStopped()) 176 176 { 177 177 h.Select (0, socketSelecttime); … … 179 179 } 180 180 else 181 while (!World:: m_stopEvent)181 while (!World::IsStopped()) 182 182 { 183 183 ZThread::Thread::sleep (static_cast<unsigned long> (socketSelecttime / 1000)); … … 324 324 { 325 325 sLog.outError ("Failed to start network"); 326 World:: m_stopEvent = true;326 World::StopNow(ERROR_EXIT_CODE); 327 327 // go down and shutdown the server 328 328 } … … 395 395 UnloadScriptingModule(); 396 396 397 return sWorld.GetShutdownMask() & SHUTDOWN_MASK_RESTART ? 2 : 0; 397 // Exit the process with specified return value 398 return World::GetExitCode(); 398 399 } 399 400 … … 478 479 479 480 /// Handle termination signals 480 /** Put the World::m_stopEvent to 'true' if a termination signal is caught **/481 481 void Master::_OnSignal(int s) 482 482 { … … 484 484 { 485 485 case SIGINT: 486 World::StopNow(RESTART_EXIT_CODE); 487 break; 486 488 case SIGTERM: 487 489 #ifdef _WIN32 488 490 case SIGBREAK: 489 491 #endif 490 World:: m_stopEvent = true;492 World::StopNow(SHUTDOWN_EXIT_CODE); 491 493 break; 492 494 } -
trunk/src/trinitycore/WorldRunnable.cpp
r237 r260 52 52 53 53 ///- While we have not World::m_stopEvent, update the world 54 while (!World:: m_stopEvent)54 while (!World::IsStopped()) 55 55 { 56 56 ++World::m_worldLoopCounter;