aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--README.md2
-rw-r--r--cmake/compiler/clang/settings.cmake3
-rw-r--r--cmake/compiler/gcc/settings.cmake12
-rw-r--r--cmake/compiler/msvc/settings.cmake15
-rw-r--r--dep/PackageList.txt2
-rw-r--r--dep/jemalloc/COPYING4
-rw-r--r--dep/jemalloc/ChangeLog107
-rw-r--r--dep/jemalloc/README18
-rw-r--r--dep/jemalloc/VERSION2
-rw-r--r--dep/jemalloc/include/jemalloc/internal/arena.h127
-rw-r--r--dep/jemalloc/include/jemalloc/internal/chunk_dss.h2
-rw-r--r--dep/jemalloc/include/jemalloc/internal/ckh.h2
-rw-r--r--dep/jemalloc/include/jemalloc/internal/hash.h20
-rw-r--r--dep/jemalloc/include/jemalloc/internal/huge.h6
-rw-r--r--dep/jemalloc/include/jemalloc/internal/jemalloc_internal.h197
-rw-r--r--dep/jemalloc/include/jemalloc/internal/private_namespace.h34
-rw-r--r--dep/jemalloc/include/jemalloc/internal/prng.h4
-rw-r--r--dep/jemalloc/include/jemalloc/internal/prof.h92
-rw-r--r--dep/jemalloc/include/jemalloc/internal/ql.h36
-rw-r--r--dep/jemalloc/include/jemalloc/internal/qr.h22
-rw-r--r--dep/jemalloc/include/jemalloc/internal/rb.h4
-rw-r--r--dep/jemalloc/include/jemalloc/internal/rtree.h50
-rw-r--r--dep/jemalloc/include/jemalloc/internal/tcache.h5
-rw-r--r--dep/jemalloc/include/jemalloc/internal/tsd.h39
-rw-r--r--dep/jemalloc/include/jemalloc/internal/util.h22
-rw-r--r--dep/jemalloc/include/jemalloc/jemalloc.h187
-rw-r--r--dep/jemalloc/jemalloc_defs.h.in.cmake6
-rw-r--r--dep/jemalloc/src/arena.c971
-rw-r--r--dep/jemalloc/src/bitmap.c2
-rw-r--r--dep/jemalloc/src/chunk.c30
-rw-r--r--dep/jemalloc/src/chunk_dss.c15
-rw-r--r--dep/jemalloc/src/chunk_mmap.c4
-rw-r--r--dep/jemalloc/src/ckh.c12
-rw-r--r--dep/jemalloc/src/ctl.c329
-rw-r--r--dep/jemalloc/src/huge.c56
-rw-r--r--dep/jemalloc/src/jemalloc.c1191
-rw-r--r--dep/jemalloc/src/mutex.c2
-rw-r--r--dep/jemalloc/src/prof.c640
-rw-r--r--dep/jemalloc/src/quarantine.c13
-rw-r--r--dep/jemalloc/src/rtree.c78
-rw-r--r--dep/jemalloc/src/stats.c8
-rw-r--r--dep/jemalloc/src/tcache.c9
-rw-r--r--dep/jemalloc/src/tsd.c36
-rw-r--r--dep/jemalloc/src/util.c85
-rw-r--r--dep/jemalloc/src/zone.c2
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_08_25_00_auth.sql (renamed from sql/updates/auth/2013_08_25_00_auth.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_08_30_00_auth_misc.sql (renamed from sql/updates/auth/2013_08_30_00_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_08_30_01_auth_misc.sql (renamed from sql/updates/auth/2013_08_30_01_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_08_30_02_auth_misc.sql (renamed from sql/updates/auth/2013_08_30_02_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_08_30_03_auth_misc.sql (renamed from sql/updates/auth/2013_08_30_03_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_08_30_04_auth_misc.sql (renamed from sql/updates/auth/2013_08_30_04_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_01_00_auth_misc.sql (renamed from sql/updates/auth/2013_09_01_00_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_01_01_auth_misc.sql (renamed from sql/updates/auth/2013_09_01_01_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_00_auth_misc.sql (renamed from sql/updates/auth/2013_09_02_00_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_01_auth_misc.sql (renamed from sql/updates/auth/2013_09_02_01_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_02_auth_misc.sql (renamed from sql/updates/auth/2013_09_02_02_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_03_auth_misc.sql (renamed from sql/updates/auth/2013_09_02_03_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_04_auth_misc.sql (renamed from sql/updates/auth/2013_09_02_04_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_05_auth_misc.sql (renamed from sql/updates/auth/2013_09_02_05_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_06_auth_misc.sql (renamed from sql/updates/auth/2013_09_02_06_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_07_auth_misc.sql (renamed from sql/updates/auth/2013_09_02_07_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_08_auth_misc.sql (renamed from sql/updates/auth/2013_09_02_08_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_09_auth_misc.sql (renamed from sql/updates/auth/2013_09_02_09_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_10_auth_misc.sql (renamed from sql/updates/auth/2013_09_02_10_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_11_auth_misc.sql (renamed from sql/updates/auth/2013_09_02_11_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_12_auth_misc.sql (renamed from sql/updates/auth/2013_09_02_12_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_13_auth_misc.sql (renamed from sql/updates/auth/2013_09_02_13_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_14_auth_misc.sql (renamed from sql/updates/auth/2013_09_02_14_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_15_auth_misc.sql (renamed from sql/updates/auth/2013_09_02_15_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_16_auth_misc.sql (renamed from sql/updates/auth/2013_09_02_16_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_17_auth_misc.sql (renamed from sql/updates/auth/2013_09_02_17_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_00_auth_misc.sql (renamed from sql/updates/auth/2013_09_10_00_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_01_auth_misc.sql (renamed from sql/updates/auth/2013_09_10_01_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_02_auth_misc.sql (renamed from sql/updates/auth/2013_09_10_02_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_03_auth_misc.sql (renamed from sql/updates/auth/2013_09_10_03_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_04_auth_misc.sql (renamed from sql/updates/auth/2013_09_10_04_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_05_auth_misc.sql (renamed from sql/updates/auth/2013_09_10_05_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_06_auth_misc.sql (renamed from sql/updates/auth/2013_09_10_06_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_07_auth_misc.sql (renamed from sql/updates/auth/2013_09_10_07_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_08_auth_misc.sql (renamed from sql/updates/auth/2013_09_10_08_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_09_auth_misc.sql (renamed from sql/updates/auth/2013_09_10_09_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_10_auth_misc.sql (renamed from sql/updates/auth/2013_09_10_10_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_11_auth_misc.sql (renamed from sql/updates/auth/2013_09_10_11_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_12_auth_misc.sql (renamed from sql/updates/auth/2013_09_10_12_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_13_auth_misc.sql (renamed from sql/updates/auth/2013_09_10_13_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_14_auth_misc.sql (renamed from sql/updates/auth/2013_09_10_14_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_15_auth_misc.sql (renamed from sql/updates/auth/2013_09_10_15_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_29_00_auth_misc.sql (renamed from sql/updates/auth/2013_09_29_00_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_10_16_00_auth_misc.sql (renamed from sql/updates/auth/2013_10_16_00_auth_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_11_11_00_auth_logs.sql (renamed from sql/updates/auth/2013_11_11_00_auth_logs.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_12_01_00_auth_rbac_permissions.sql (renamed from sql/updates/auth/2013_12_01_00_auth_rbac_permissions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_12_01_01_auth_rbac_permissions.sql (renamed from sql/updates/auth/2013_12_01_01_auth_rbac_permissions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2014_01_19_00_auth_rbac_permissions.sql (renamed from sql/updates/auth/2014_01_19_00_auth_rbac_permissions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2014_01_19_01_auth_rbac_permissions.sql (renamed from sql/updates/auth/2014_01_19_01_auth_rbac_permissions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/characters/2013_07_19_00_characters_corpse.sql (renamed from sql/updates/characters/2013_07_19_00_characters_corpse.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/characters/2014_01_12_00_characters_guild.sql (renamed from sql/updates/characters/2014_01_12_00_characters_guild.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_17_00_world_version.sql (renamed from sql/updates/world/2013_07_17_00_world_version.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_17_01_world_conditions.sql (renamed from sql/updates/world/2013_07_17_01_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_17_02_world_gossip.sql (renamed from sql/updates/world/2013_07_17_02_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_17_03_world_gossip.sql (renamed from sql/updates/world/2013_07_17_03_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_17_04_world_spell_script_names.sql (renamed from sql/updates/world/2013_07_17_04_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_18_00_world_conditions.sql (renamed from sql/updates/world/2013_07_18_00_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_18_01_world_koralon.sql (renamed from sql/updates/world/2013_07_18_01_world_koralon.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_18_02_world_spell_script_names.sql (renamed from sql/updates/world/2013_07_18_02_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_18_02_world_the_flesh_giant_slayer.sql (renamed from sql/updates/world/2013_07_18_02_world_the_flesh_giant_slayer.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_18_03_world_equipment.sql (renamed from sql/updates/world/2013_07_18_03_world_equipment.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_19_00_world_misc.sql (renamed from sql/updates/world/2013_07_19_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_20_00_world_gameobject.sql (renamed from sql/updates/world/2013_07_20_00_world_gameobject.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_20_01_world_misc.sql (renamed from sql/updates/world/2013_07_20_01_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_23_00_world_misc.sql (renamed from sql/updates/world/2013_07_23_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_23_02_world_creature_template.sql (renamed from sql/updates/world/2013_07_23_02_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_24_00_world_spell_script_names.sql (renamed from sql/updates/world/2013_07_24_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_24_01_world_spell_ranks_335.sql (renamed from sql/updates/world/2013_07_24_01_world_spell_ranks_335.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_24_02_world_trinity_strings.sql (renamed from sql/updates/world/2013_07_24_02_world_trinity_strings.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_24_03_world_spell_proc_event_335.sql (renamed from sql/updates/world/2013_07_24_03_world_spell_proc_event_335.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_25_00_world_spell_script_names.sql (renamed from sql/updates/world/2013_07_25_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_25_01_world_conditions.sql (renamed from sql/updates/world/2013_07_25_01_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_27_00_world_spell_script_names.sql (renamed from sql/updates/world/2013_07_27_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_28_00_world_gameobjects.sql (renamed from sql/updates/world/2013_07_28_00_world_gameobjects.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_28_01_world_sai.sql (renamed from sql/updates/world/2013_07_28_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_29_00_world_drak_tharon_keep.sql (renamed from sql/updates/world/2013_07_29_00_world_drak_tharon_keep.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_29_01_world_spelldifficulty_dbc.sql (renamed from sql/updates/world/2013_07_29_01_world_spelldifficulty_dbc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_31_00_world_spell_script_names.sql (renamed from sql/updates/world/2013_07_31_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_03_00_world_misc.sql (renamed from sql/updates/world/2013_08_03_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_04_00_world_quests.sql (renamed from sql/updates/world/2013_08_04_00_world_quests.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_04_01_world_sai.sql (renamed from sql/updates/world/2013_08_04_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_04_02_world_sai.sql (renamed from sql/updates/world/2013_08_04_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_04_03_world_sai.sql (renamed from sql/updates/world/2013_08_04_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_04_04_world_trinity_string.sql (renamed from sql/updates/world/2013_08_04_04_world_trinity_string.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_05_00_world_sai.sql (renamed from sql/updates/world/2013_08_05_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_05_01_world_misc.sql (renamed from sql/updates/world/2013_08_05_01_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_05_01_world_trinity_string.sql (renamed from sql/updates/world/2013_08_05_01_world_trinity_string.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_05_02_world_quest_relation_tables.sql (renamed from sql/updates/world/2013_08_05_02_world_quest_relation_tables.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_06_00_world_item_template.sql (renamed from sql/updates/world/2013_08_06_00_world_item_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_06_01_world_hor.sql (renamed from sql/updates/world/2013_08_06_01_world_hor.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_06_02_world_command.sql (renamed from sql/updates/world/2013_08_06_02_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_06_03_world_area_4522.sql (renamed from sql/updates/world/2013_08_06_03_world_area_4522.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_06_04_world_sai.sql (renamed from sql/updates/world/2013_08_06_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_06_05_world_misc.sql (renamed from sql/updates/world/2013_08_06_05_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_00_world_creature_template.sql (renamed from sql/updates/world/2013_08_07_00_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_01_world_misc.sql (renamed from sql/updates/world/2013_08_07_01_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_02_world_misc.sql (renamed from sql/updates/world/2013_08_07_02_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_03_world_drak_tharon_keep.sql (renamed from sql/updates/world/2013_08_07_03_world_drak_tharon_keep.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_04_world_misc.sql (renamed from sql/updates/world/2013_08_07_04_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_05_world_misc.sql (renamed from sql/updates/world/2013_08_07_05_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_06_world_drak_tharon_keep.sql (renamed from sql/updates/world/2013_08_07_06_world_drak_tharon_keep.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_06_world_sai.sql (renamed from sql/updates/world/2013_08_07_06_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_07_world_pathing.sql (renamed from sql/updates/world/2013_08_07_07_world_pathing.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_08_world_sai.sql (renamed from sql/updates/world/2013_08_07_08_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_09_world_sai.sql (renamed from sql/updates/world/2013_08_07_09_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_10_world_sai.sql (renamed from sql/updates/world/2013_08_07_10_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_11_world_sai.sql (renamed from sql/updates/world/2013_08_07_11_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_12_world_sai.sql (renamed from sql/updates/world/2013_08_07_12_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_13_world_creature_template.sql (renamed from sql/updates/world/2013_08_07_13_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_14_world_sai_335.sql (renamed from sql/updates/world/2013_08_07_14_world_sai_335.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_08_00_world_creature_template.sql (renamed from sql/updates/world/2013_08_08_00_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_08_01_world_creature_template.sql (renamed from sql/updates/world/2013_08_08_01_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_08_02_world_creature_template.sql (renamed from sql/updates/world/2013_08_08_02_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_00_world_sai.sql (renamed from sql/updates/world/2013_08_09_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_01_world_sai.sql (renamed from sql/updates/world/2013_08_09_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_02_world_cond_335.sql (renamed from sql/updates/world/2013_08_09_02_world_cond_335.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_03_world_sai.sql (renamed from sql/updates/world/2013_08_09_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_04_world_sai.sql (renamed from sql/updates/world/2013_08_09_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_05_world_sai.sql (renamed from sql/updates/world/2013_08_09_05_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_06_world_ainame.sql (renamed from sql/updates/world/2013_08_09_06_world_ainame.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_07_world_sai.sql (renamed from sql/updates/world/2013_08_09_07_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_08_world_creature_template.sql (renamed from sql/updates/world/2013_08_09_08_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_08_world_go_template.sql (renamed from sql/updates/world/2013_08_09_08_world_go_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_09_world_sai.sql (renamed from sql/updates/world/2013_08_09_09_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_10_world_sai.sql (renamed from sql/updates/world/2013_08_09_10_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_11_world_disables.sql (renamed from sql/updates/world/2013_08_09_11_world_disables.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_10_00_world_eai_335.sql (renamed from sql/updates/world/2013_08_10_00_world_eai_335.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_10_01_world_creature.sql (renamed from sql/updates/world/2013_08_10_01_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_10_02_world_spell_target_position.sql (renamed from sql/updates/world/2013_08_10_02_world_spell_target_position.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_10_03_world_creature_text.sql (renamed from sql/updates/world/2013_08_10_03_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_11_00_world_spell_script_names.sql (renamed from sql/updates/world/2013_08_11_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_11_01_world_eai_335.sql (renamed from sql/updates/world/2013_08_11_01_world_eai_335.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_11_02_world_spell_misc.sql (renamed from sql/updates/world/2013_08_11_02_world_spell_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_11_03_world_misc.sql (renamed from sql/updates/world/2013_08_11_03_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_11_04_world_spell_proc_event.sql (renamed from sql/updates/world/2013_08_11_04_world_spell_proc_event.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_14_00_world_gameobject_loot_template_335.sql (renamed from sql/updates/world/2013_08_14_00_world_gameobject_loot_template_335.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_14_01_world_gameobject.sql (renamed from sql/updates/world/2013_08_14_01_world_gameobject.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_14_01_world_gameobject_loot_template.sql (renamed from sql/updates/world/2013_08_14_01_world_gameobject_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_15_00_world_sai.sql (renamed from sql/updates/world/2013_08_15_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_15_01_world_sai.sql (renamed from sql/updates/world/2013_08_15_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_15_02_world_spell_proc_event.sql (renamed from sql/updates/world/2013_08_15_02_world_spell_proc_event.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_16_00_world_drak_tharon_keep.sql (renamed from sql/updates/world/2013_08_16_00_world_drak_tharon_keep.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_16_02_world_sai.sql (renamed from sql/updates/world/2013_08_16_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_16_03_world_misc.sql (renamed from sql/updates/world/2013_08_16_03_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_16_04_world_SAI.sql (renamed from sql/updates/world/2013_08_16_04_world_SAI.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_17_00_world_misc.sql (renamed from sql/updates/world/2013_08_17_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_17_01_world_misc.sql (renamed from sql/updates/world/2013_08_17_01_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_17_02_world_misc.sql (renamed from sql/updates/world/2013_08_17_02_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_17_03_world_misc.sql (renamed from sql/updates/world/2013_08_17_03_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_17_04_world_misc.sql (renamed from sql/updates/world/2013_08_17_04_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_17_05_world_misc.sql (renamed from sql/updates/world/2013_08_17_05_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_18_00_world_spell_script_names_335.sql (renamed from sql/updates/world/2013_08_18_00_world_spell_script_names_335.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_19_00_world_sai.sql (renamed from sql/updates/world/2013_08_19_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_19_01_world_creature_text.sql (renamed from sql/updates/world/2013_08_19_01_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_19_02_world_sai.sql (renamed from sql/updates/world/2013_08_19_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_22_00_world_sai.sql (renamed from sql/updates/world/2013_08_22_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_22_01_world_sai.sql (renamed from sql/updates/world/2013_08_22_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_23_00_world_db_errors.sql (renamed from sql/updates/world/2013_08_23_00_world_db_errors.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_23_01_world_db_errors.sql (renamed from sql/updates/world/2013_08_23_01_world_db_errors.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_24_00_world_sai.sql (renamed from sql/updates/world/2013_08_24_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_24_01_world_conditions.sql (renamed from sql/updates/world/2013_08_24_01_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_24_02_world_sai.sql (renamed from sql/updates/world/2013_08_24_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_24_03_world_sai.sql (renamed from sql/updates/world/2013_08_24_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_25_00_world_creature.sql (renamed from sql/updates/world/2013_08_25_00_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_25_01_world_sai.sql (renamed from sql/updates/world/2013_08_25_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_00_world_sai.sql (renamed from sql/updates/world/2013_08_26_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_01_world_sai.sql (renamed from sql/updates/world/2013_08_26_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_02_world_db_errors.sql (renamed from sql/updates/world/2013_08_26_02_world_db_errors.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_03_world_auchindoun.sql (renamed from sql/updates/world/2013_08_26_03_world_auchindoun.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_04_world_sai.sql (renamed from sql/updates/world/2013_08_26_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_05_world_comments.sql (renamed from sql/updates/world/2013_08_26_05_world_comments.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_06_world_loot.sql (renamed from sql/updates/world/2013_08_26_06_world_loot.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_07_world_sai.sql (renamed from sql/updates/world/2013_08_26_07_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_27_00_world_sai.sql (renamed from sql/updates/world/2013_08_27_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_27_01_world_instance_template.sql (renamed from sql/updates/world/2013_08_27_01_world_instance_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_27_02_world_reputation_reward_rate.sql (renamed from sql/updates/world/2013_08_27_02_world_reputation_reward_rate.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_27_03_world_reputation_reward_rate.sql (renamed from sql/updates/world/2013_08_27_03_world_reputation_reward_rate.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_27_04_world_reputation_reward_rate.sql (renamed from sql/updates/world/2013_08_27_04_world_reputation_reward_rate.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_00_world_misc.sql (renamed from sql/updates/world/2013_08_28_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_01_world_creature.sql (renamed from sql/updates/world/2013_08_28_01_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_02_world_quest_template.sql (renamed from sql/updates/world/2013_08_28_02_world_quest_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_03_world_sai.sql (renamed from sql/updates/world/2013_08_28_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_04_world_conditions.sql (renamed from sql/updates/world/2013_08_28_04_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_05_world_misc.sql (renamed from sql/updates/world/2013_08_28_05_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_06_world_sai.sql (renamed from sql/updates/world/2013_08_28_06_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_07_world_sai.sql (renamed from sql/updates/world/2013_08_28_07_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_08_world_update.sql (renamed from sql/updates/world/2013_08_28_08_world_update.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_29_00_world_sai.sql (renamed from sql/updates/world/2013_08_29_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_29_01_world_update.sql (renamed from sql/updates/world/2013_08_29_01_world_update.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_29_02_world_sai.sql (renamed from sql/updates/world/2013_08_29_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_29_03_world_quest_template.sql (renamed from sql/updates/world/2013_08_29_03_world_quest_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_29_04_world_db_errors.sql (renamed from sql/updates/world/2013_08_29_04_world_db_errors.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_00_world_gameobject_loot_template.sql (renamed from sql/updates/world/2013_08_30_00_world_gameobject_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_01_world_command.sql (renamed from sql/updates/world/2013_08_30_01_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_02_world_command.sql (renamed from sql/updates/world/2013_08_30_02_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_03_world_command.sql (renamed from sql/updates/world/2013_08_30_03_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_04_world_command.sql (renamed from sql/updates/world/2013_08_30_04_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_05_world_command.sql (renamed from sql/updates/world/2013_08_30_05_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_06_world_command.sql (renamed from sql/updates/world/2013_08_30_06_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_07_world_eai_sai.sql (renamed from sql/updates/world/2013_08_30_07_world_eai_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_08_world_sai.sql (renamed from sql/updates/world/2013_08_30_08_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_09_world_spell_script_names.sql (renamed from sql/updates/world/2013_08_30_09_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_00_world_reputation_reward_rate.sql (renamed from sql/updates/world/2013_08_31_00_world_reputation_reward_rate.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_01_world_gameobject_loot_template.sql (renamed from sql/updates/world/2013_08_31_01_world_gameobject_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_02_world_sai.sql (renamed from sql/updates/world/2013_08_31_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_03_world_creature_text.sql (renamed from sql/updates/world/2013_08_31_03_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_04_world_spell_script_names.sql (renamed from sql/updates/world/2013_08_31_04_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_05_world_creature_template.sql (renamed from sql/updates/world/2013_08_31_05_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_06_world_smart_scripts.sql (renamed from sql/updates/world/2013_08_31_06_world_smart_scripts.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_07_world_creature.sql (renamed from sql/updates/world/2013_08_31_07_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_08_world_command.sql (renamed from sql/updates/world/2013_08_31_08_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_00_world_spell_script_names.sql (renamed from sql/updates/world/2013_09_01_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_01_world_trinity_string.sql (renamed from sql/updates/world/2013_09_01_01_world_trinity_string.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_02_world_smart_scripts.sql (renamed from sql/updates/world/2013_09_01_02_world_smart_scripts.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_03_world_smart_scripts.sql (renamed from sql/updates/world/2013_09_01_03_world_smart_scripts.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_04_world_smart_scripts.sql (renamed from sql/updates/world/2013_09_01_04_world_smart_scripts.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_05_world_skinning_loot_template.sql (renamed from sql/updates/world/2013_09_01_05_world_skinning_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_06_world_misc.sql (renamed from sql/updates/world/2013_09_01_06_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_07_world_trinity_strings.sql (renamed from sql/updates/world/2013_09_01_07_world_trinity_strings.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_00_world_smart_scripts.sql (renamed from sql/updates/world/2013_09_02_00_world_smart_scripts.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_01_world_command.sql (renamed from sql/updates/world/2013_09_02_01_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_02_world_command.sql (renamed from sql/updates/world/2013_09_02_02_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_03_world_command.sql (renamed from sql/updates/world/2013_09_02_03_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_04_world_command.sql (renamed from sql/updates/world/2013_09_02_04_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_05_world_command.sql (renamed from sql/updates/world/2013_09_02_05_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_06_world_command.sql (renamed from sql/updates/world/2013_09_02_06_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_07_world_command.sql (renamed from sql/updates/world/2013_09_02_07_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_08_world_command.sql (renamed from sql/updates/world/2013_09_02_08_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_09_world_command.sql (renamed from sql/updates/world/2013_09_02_09_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_10_world_command.sql (renamed from sql/updates/world/2013_09_02_10_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_11_world_command.sql (renamed from sql/updates/world/2013_09_02_11_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_12_world_command.sql (renamed from sql/updates/world/2013_09_02_12_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_13_world_command.sql (renamed from sql/updates/world/2013_09_02_13_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_14_world_command.sql (renamed from sql/updates/world/2013_09_02_14_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_15_world_command.sql (renamed from sql/updates/world/2013_09_02_15_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_16_world_command.sql (renamed from sql/updates/world/2013_09_02_16_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_17_world_command.sql (renamed from sql/updates/world/2013_09_02_17_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_18_world_command.sql (renamed from sql/updates/world/2013_09_02_18_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_19_world_spelldifficulty_dbc.sql (renamed from sql/updates/world/2013_09_02_19_world_spelldifficulty_dbc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_20_world_sai.sql (renamed from sql/updates/world/2013_09_02_20_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_03_00_world_smart_scripts.sql (renamed from sql/updates/world/2013_09_03_00_world_smart_scripts.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_03_01_world_creature.sql (renamed from sql/updates/world/2013_09_03_01_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_03_02_world_update.sql (renamed from sql/updates/world/2013_09_03_02_world_update.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_03_03_world_sai.sql (renamed from sql/updates/world/2013_09_03_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_03_04_world_sai.sql (renamed from sql/updates/world/2013_09_03_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_04_00_world_sai.sql (renamed from sql/updates/world/2013_09_04_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_04_01_world_sai.sql (renamed from sql/updates/world/2013_09_04_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_04_02_world_spawns_sai.sql (renamed from sql/updates/world/2013_09_04_02_world_spawns_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_04_03_world_isle_of_conquest.sql (renamed from sql/updates/world/2013_09_04_03_world_isle_of_conquest.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_06_00_world_misc.sql (renamed from sql/updates/world/2013_09_06_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_06_01_world_misc.sql (renamed from sql/updates/world/2013_09_06_01_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_06_02_world_misc.sql (renamed from sql/updates/world/2013_09_06_02_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_07_00_world_updates.sql (renamed from sql/updates/world/2013_09_07_00_world_updates.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_07_01_world_sai.sql (renamed from sql/updates/world/2013_09_07_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_08_00_world_sai.sql (renamed from sql/updates/world/2013_09_08_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_08_01_world_update.sql (renamed from sql/updates/world/2013_09_08_01_world_update.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_09_00_world_sai.sql (renamed from sql/updates/world/2013_09_09_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_00_world_conditions.sql (renamed from sql/updates/world/2013_09_10_00_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_01_world_command.sql (renamed from sql/updates/world/2013_09_10_01_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_02_world_command.sql (renamed from sql/updates/world/2013_09_10_02_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_03_world_sai.sql (renamed from sql/updates/world/2013_09_10_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_04_world_command.sql (renamed from sql/updates/world/2013_09_10_04_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_05_world_command.sql (renamed from sql/updates/world/2013_09_10_05_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_06_world_command.sql (renamed from sql/updates/world/2013_09_10_06_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_07_world_command.sql (renamed from sql/updates/world/2013_09_10_07_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_08_world_command.sql (renamed from sql/updates/world/2013_09_10_08_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_09_world_command.sql (renamed from sql/updates/world/2013_09_10_09_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_10_world_command.sql (renamed from sql/updates/world/2013_09_10_10_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_11_world_command.sql (renamed from sql/updates/world/2013_09_10_11_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_12_world_command.sql (renamed from sql/updates/world/2013_09_10_12_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_13_world_command.sql (renamed from sql/updates/world/2013_09_10_13_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_14_world_command.sql (renamed from sql/updates/world/2013_09_10_14_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_15_world_command.sql (renamed from sql/updates/world/2013_09_10_15_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_16_world_command.sql (renamed from sql/updates/world/2013_09_10_16_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_17_world_command.sql (renamed from sql/updates/world/2013_09_10_17_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_18_world_command.sql (renamed from sql/updates/world/2013_09_10_18_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_19_world_command.sql (renamed from sql/updates/world/2013_09_10_19_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_20_world_creature_template.sql (renamed from sql/updates/world/2013_09_10_20_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_21_world_updates.sql (renamed from sql/updates/world/2013_09_10_21_world_updates.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_11_00_world_cond.sql (renamed from sql/updates/world/2013_09_11_00_world_cond.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_11_01_world_sai.sql (renamed from sql/updates/world/2013_09_11_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_12_00_world_sai.sql (renamed from sql/updates/world/2013_09_12_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_13_00_world_conditions.sql (renamed from sql/updates/world/2013_09_13_00_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_14_00_world_update.sql (renamed from sql/updates/world/2013_09_14_00_world_update.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_14_01_world_gobject.sql (renamed from sql/updates/world/2013_09_14_01_world_gobject.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_16_00_world_sai.sql (renamed from sql/updates/world/2013_09_16_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_16_01_world_sai.sql (renamed from sql/updates/world/2013_09_16_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_16_02_world_sai.sql (renamed from sql/updates/world/2013_09_16_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_17_00_world_error.sql (renamed from sql/updates/world/2013_09_17_00_world_error.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_17_01_world_sai_comp.sql (renamed from sql/updates/world/2013_09_17_01_world_sai_comp.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_18_00_world_sai.sql (renamed from sql/updates/world/2013_09_18_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_18_01_world_achievement_criteria_data.sql (renamed from sql/updates/world/2013_09_18_01_world_achievement_criteria_data.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_19_00_world_db_errors.sql (renamed from sql/updates/world/2013_09_19_00_world_db_errors.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_19_01_world_db_errors.sql (renamed from sql/updates/world/2013_09_19_01_world_db_errors.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_20_00_world_gameobject_template.sql (renamed from sql/updates/world/2013_09_20_00_world_gameobject_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_20_01_world_sai.sql (renamed from sql/updates/world/2013_09_20_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_21_00_world_sai.sql (renamed from sql/updates/world/2013_09_21_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_22_00_world_sai.sql (renamed from sql/updates/world/2013_09_22_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_24_00_world_sai.sql (renamed from sql/updates/world/2013_09_24_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_26_00_world_sai.sql (renamed from sql/updates/world/2013_09_26_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_26_01_world_sai.sql (renamed from sql/updates/world/2013_09_26_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_27_00_world_sai.sql (renamed from sql/updates/world/2013_09_27_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_28_00_world_update.sql (renamed from sql/updates/world/2013_09_28_00_world_update.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_28_01_world_update.sql (renamed from sql/updates/world/2013_09_28_01_world_update.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_00_world_misc.sql (renamed from sql/updates/world/2013_09_29_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_01_world_sai.sql (renamed from sql/updates/world/2013_09_29_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_02_world_sai.sql (renamed from sql/updates/world/2013_09_29_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_03_world_sai.sql (renamed from sql/updates/world/2013_09_29_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_04_world_updatesi.sql (renamed from sql/updates/world/2013_09_29_04_world_updatesi.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_05_world_updates.sql (renamed from sql/updates/world/2013_09_29_05_world_updates.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_06_world_sai.sql (renamed from sql/updates/world/2013_09_29_06_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_07_world_sai.sql (renamed from sql/updates/world/2013_09_29_07_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_30_00_world_item_loot_template.sql (renamed from sql/updates/world/2013_09_30_00_world_item_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_30_01_world_item_loot_template.sql (renamed from sql/updates/world/2013_09_30_01_world_item_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_30_02_world_sai_335.sql (renamed from sql/updates/world/2013_09_30_02_world_sai_335.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_30_03_world_misc.sql (renamed from sql/updates/world/2013_09_30_03_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_30_04_world_update.sql (renamed from sql/updates/world/2013_09_30_04_world_update.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_01_00_world_misc.sql (renamed from sql/updates/world/2013_10_01_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_01_00_world_sai.sql (renamed from sql/updates/world/2013_10_01_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_05_00_world_sai.sql (renamed from sql/updates/world/2013_10_05_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_06_00_world_sai.sql (renamed from sql/updates/world/2013_10_06_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_07_00_world_cond.sql (renamed from sql/updates/world/2013_10_07_00_world_cond.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_07_01_world_sai.sql (renamed from sql/updates/world/2013_10_07_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_08_00_world_conditions.sql (renamed from sql/updates/world/2013_10_08_00_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_09_00_world_update.sql (renamed from sql/updates/world/2013_10_09_00_world_update.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_10_00_world_misc.sql (renamed from sql/updates/world/2013_10_10_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_10_01_world_update.sql (renamed from sql/updates/world/2013_10_10_01_world_update.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_11_00_world_sai.sql (renamed from sql/updates/world/2013_10_11_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_12_00_world_sai.sql (renamed from sql/updates/world/2013_10_12_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_13_00_world_disable.sql (renamed from sql/updates/world/2013_10_13_00_world_disable.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_13_01_world_spelldifficulty_dbc.sql (renamed from sql/updates/world/2013_10_13_01_world_spelldifficulty_dbc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_16_00_world_misc.sql (renamed from sql/updates/world/2013_10_16_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_16_00_world_trinity_string.sql (renamed from sql/updates/world/2013_10_16_00_world_trinity_string.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_16_01_world_sai.sql (renamed from sql/updates/world/2013_10_16_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_16_02_world_game_graveyard_zone.sql (renamed from sql/updates/world/2013_10_16_02_world_game_graveyard_zone.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_17_00_world_creature_model_info.sql (renamed from sql/updates/world/2013_10_17_00_world_creature_model_info.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_19_00_world_gossip.sql (renamed from sql/updates/world/2013_10_19_00_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_19_01_world_gameobject_template.sql (renamed from sql/updates/world/2013_10_19_01_world_gameobject_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_20_00_world_conditions.sql (renamed from sql/updates/world/2013_10_20_00_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_20_01_world_spell_proc_event.sql (renamed from sql/updates/world/2013_10_20_01_world_spell_proc_event.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_20_02_world_gossip.sql (renamed from sql/updates/world/2013_10_20_02_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_21_00_world_sai.sql (renamed from sql/updates/world/2013_10_21_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_22_00_world_disables.sql (renamed from sql/updates/world/2013_10_22_00_world_disables.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_23_00_world_sai.sql (renamed from sql/updates/world/2013_10_23_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_23_01_world_sai.sql (renamed from sql/updates/world/2013_10_23_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_24_00_world_sai.sql (renamed from sql/updates/world/2013_10_24_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_24_01_world_errors.sql (renamed from sql/updates/world/2013_10_24_01_world_errors.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_24_02_world_sai.sql (renamed from sql/updates/world/2013_10_24_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_24_03_world_sai.sql (renamed from sql/updates/world/2013_10_24_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_25_00_world_update.sql (renamed from sql/updates/world/2013_10_25_00_world_update.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_27_00_world_conditions.sql (renamed from sql/updates/world/2013_10_27_00_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_28_00_world_sai.sql (renamed from sql/updates/world/2013_10_28_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_00_world_creature_template.sql (renamed from sql/updates/world/2013_11_02_00_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_01_world_misc.sql (renamed from sql/updates/world/2013_11_02_01_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_02_world_creature_loot_template.sql (renamed from sql/updates/world/2013_11_02_02_world_creature_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_03_world_sai.sql (renamed from sql/updates/world/2013_11_02_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_04_world_sai.sql (renamed from sql/updates/world/2013_11_02_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_05_world_creature_template.sql (renamed from sql/updates/world/2013_11_02_05_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_06_world_loot.sql (renamed from sql/updates/world/2013_11_02_06_world_loot.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_07_world_misc.sql (renamed from sql/updates/world/2013_11_02_07_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_00_world_sai.sql (renamed from sql/updates/world/2013_11_03_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_01_world_sai.sql (renamed from sql/updates/world/2013_11_03_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_02_world_gameobject_335.sql (renamed from sql/updates/world/2013_11_03_02_world_gameobject_335.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_03_world_creature_template.sql (renamed from sql/updates/world/2013_11_03_03_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_04_world_creature_template.sql (renamed from sql/updates/world/2013_11_03_04_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_05_world_gameobject.sql (renamed from sql/updates/world/2013_11_03_05_world_gameobject.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_06_world_conditions.sql (renamed from sql/updates/world/2013_11_03_06_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_07_world_sai.sql (renamed from sql/updates/world/2013_11_03_07_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_08_world_creature_template.sql (renamed from sql/updates/world/2013_11_03_08_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_09_world_sai.sql (renamed from sql/updates/world/2013_11_03_09_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_10_world_quest_template.sql (renamed from sql/updates/world/2013_11_03_10_world_quest_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_11_world_creature_text.sql (renamed from sql/updates/world/2013_11_03_11_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_12_world_sai.sql (renamed from sql/updates/world/2013_11_03_12_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_13_world_sai.sql (renamed from sql/updates/world/2013_11_03_13_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_14_world_sai.sql (renamed from sql/updates/world/2013_11_03_14_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_15_world_quest_template.sql (renamed from sql/updates/world/2013_11_03_15_world_quest_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_16_world_sai.sql (renamed from sql/updates/world/2013_11_03_16_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_17_world_gameobject.sql (renamed from sql/updates/world/2013_11_03_17_world_gameobject.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_18_world_disables.sql (renamed from sql/updates/world/2013_11_03_18_world_disables.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_19_world_misc.sql (renamed from sql/updates/world/2013_11_03_19_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_20_world_disables.sql (renamed from sql/updates/world/2013_11_03_20_world_disables.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_20_world_spell_area.sql (renamed from sql/updates/world/2013_11_03_20_world_spell_area.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_22_world_creature_questender.sql (renamed from sql/updates/world/2013_11_03_22_world_creature_questender.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_23_world_creature_template.sql (renamed from sql/updates/world/2013_11_03_23_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_24_world_misc.sql (renamed from sql/updates/world/2013_11_03_24_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_25_world_misc.sql (renamed from sql/updates/world/2013_11_03_25_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_26_world_misc.sql (renamed from sql/updates/world/2013_11_03_26_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_27_world_misc.sql (renamed from sql/updates/world/2013_11_03_27_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_28_world_misc.sql (renamed from sql/updates/world/2013_11_03_28_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_29_world_misc.sql (renamed from sql/updates/world/2013_11_03_29_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_30_world_misc.sql (renamed from sql/updates/world/2013_11_03_30_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_31_world_misc.sql (renamed from sql/updates/world/2013_11_03_31_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_32_world_misc.sql (renamed from sql/updates/world/2013_11_03_32_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_33_world_misc.sql (renamed from sql/updates/world/2013_11_03_33_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_34_world_quest_template.sql (renamed from sql/updates/world/2013_11_03_34_world_quest_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_35_world_misc.sql (renamed from sql/updates/world/2013_11_03_35_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_36_world_misc.sql (renamed from sql/updates/world/2013_11_03_36_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_37_world_misc.sql (renamed from sql/updates/world/2013_11_03_37_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_38_world_misc.sql (renamed from sql/updates/world/2013_11_03_38_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_39_world_misc.sql (renamed from sql/updates/world/2013_11_03_39_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_40_world_misc.sql (renamed from sql/updates/world/2013_11_03_40_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_41_world_npc_vendor.sql (renamed from sql/updates/world/2013_11_03_41_world_npc_vendor.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_42_world_creature.sql (renamed from sql/updates/world/2013_11_03_42_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_43_world_misc.sql (renamed from sql/updates/world/2013_11_03_43_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_44_world_misc.sql (renamed from sql/updates/world/2013_11_03_44_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_00_world_creature_template.sql (renamed from sql/updates/world/2013_11_04_00_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_01_world_misc.sql (renamed from sql/updates/world/2013_11_04_01_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_02_world_misc.sql (renamed from sql/updates/world/2013_11_04_02_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_03_world_misc.sql (renamed from sql/updates/world/2013_11_04_03_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_04_world_misc.sql (renamed from sql/updates/world/2013_11_04_04_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_05_world_misc.sql (renamed from sql/updates/world/2013_11_04_05_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_06_world_misc.sql (renamed from sql/updates/world/2013_11_04_06_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_07_world_sai.sql (renamed from sql/updates/world/2013_11_04_07_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_08_world_sai.sql (renamed from sql/updates/world/2013_11_04_08_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_05_00_world_sai.sql (renamed from sql/updates/world/2013_11_05_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_06_00_world_creature_formations.sql (renamed from sql/updates/world/2013_11_06_00_world_creature_formations.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_06_01_world_creature_formations.sql (renamed from sql/updates/world/2013_11_06_01_world_creature_formations.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_07_00_world_creature_template.sql (renamed from sql/updates/world/2013_11_07_00_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_07_01_world_smart_scripts.sql (renamed from sql/updates/world/2013_11_07_01_world_smart_scripts.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_07_02_world_creature_text.sql (renamed from sql/updates/world/2013_11_07_02_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_07_03_world_creature_text.sql (renamed from sql/updates/world/2013_11_07_03_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_07_04_world_creature_text.sql (renamed from sql/updates/world/2013_11_07_04_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_07_05_world_misc.sql (renamed from sql/updates/world/2013_11_07_05_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_08_00_world_misc.sql (renamed from sql/updates/world/2013_11_08_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_00_world_misc.sql (renamed from sql/updates/world/2013_11_10_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_01_world_misc.sql (renamed from sql/updates/world/2013_11_10_01_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_02_world_misc.sql (renamed from sql/updates/world/2013_11_10_02_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_03_world_sai.sql (renamed from sql/updates/world/2013_11_10_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_04_world_waypoints.sql (renamed from sql/updates/world/2013_11_10_04_world_waypoints.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_05_world_creature_addon.sql (renamed from sql/updates/world/2013_11_10_05_world_creature_addon.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_06_world_misc.sql (renamed from sql/updates/world/2013_11_10_06_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_07_world_conditions.sql (renamed from sql/updates/world/2013_11_10_07_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_00_world_eai.sql (renamed from sql/updates/world/2013_11_13_00_world_eai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_01_world_creature_ai_text.sql (renamed from sql/updates/world/2013_11_13_01_world_creature_ai_text.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_02_world_sai.sql (renamed from sql/updates/world/2013_11_13_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_03_world_sai.sql (renamed from sql/updates/world/2013_11_13_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_04_world_sai.sql (renamed from sql/updates/world/2013_11_13_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_05_world_sai.sql (renamed from sql/updates/world/2013_11_13_05_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_06_world_sai.sql (renamed from sql/updates/world/2013_11_13_06_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_07_world_sai.sql (renamed from sql/updates/world/2013_11_13_07_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_08_world_sai.sql (renamed from sql/updates/world/2013_11_13_08_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_00_world_misc.sql (renamed from sql/updates/world/2013_11_15_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_01_world_sai.sql (renamed from sql/updates/world/2013_11_15_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_02_world_sai.sql (renamed from sql/updates/world/2013_11_15_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_03_world_sai.sql (renamed from sql/updates/world/2013_11_15_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_04_world_sai.sql (renamed from sql/updates/world/2013_11_15_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_05_world_sai.sql (renamed from sql/updates/world/2013_11_15_05_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_06_world_sai.sql (renamed from sql/updates/world/2013_11_15_06_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_07_world_sai.sql (renamed from sql/updates/world/2013_11_15_07_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_08_world_sai.sql (renamed from sql/updates/world/2013_11_15_08_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_09_world_sai.sql (renamed from sql/updates/world/2013_11_15_09_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_10_world_sai.sql (renamed from sql/updates/world/2013_11_15_10_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_16_00_world_sai.sql (renamed from sql/updates/world/2013_11_16_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_16_01_world_sai.sql (renamed from sql/updates/world/2013_11_16_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_16_02_world_sai.sql (renamed from sql/updates/world/2013_11_16_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_17_00_world_sai.sql (renamed from sql/updates/world/2013_11_17_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_23_00_world_creature_text.sql (renamed from sql/updates/world/2013_11_23_00_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_23_01_world_sai.sql (renamed from sql/updates/world/2013_11_23_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_23_02_world_misc.sql (renamed from sql/updates/world/2013_11_23_02_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_24_00_world_spell_script_names.sql (renamed from sql/updates/world/2013_11_24_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_24_01_world_oculus.sql (renamed from sql/updates/world/2013_11_24_01_world_oculus.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_24_02_world_sai.sql (renamed from sql/updates/world/2013_11_24_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_25_00_world_item_loot_template.sql (renamed from sql/updates/world/2013_11_25_00_world_item_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_00_world_areatrigger_tavern.sql (renamed from sql/updates/world/2013_11_27_00_world_areatrigger_tavern.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_01_world_sai.sql (renamed from sql/updates/world/2013_11_27_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_02_world_sai.sql (renamed from sql/updates/world/2013_11_27_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_03_world_sai.sql (renamed from sql/updates/world/2013_11_27_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_04_world_sai.sql (renamed from sql/updates/world/2013_11_27_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_05_world_creature.sql (renamed from sql/updates/world/2013_11_27_05_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_06_world_sai.sql (renamed from sql/updates/world/2013_11_27_06_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_07_world_sai.sql (renamed from sql/updates/world/2013_11_27_07_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_08_world_sai.sql (renamed from sql/updates/world/2013_11_27_08_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_09_world_sai.sql (renamed from sql/updates/world/2013_11_27_09_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_28_00_world_misc.sql (renamed from sql/updates/world/2013_11_28_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_28_01_world_creature_template.sql (renamed from sql/updates/world/2013_11_28_01_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_28_02_world_misc.sql (renamed from sql/updates/world/2013_11_28_02_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_29_00_world_sai.sql (renamed from sql/updates/world/2013_11_29_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_29_01_world_sai.sql (renamed from sql/updates/world/2013_11_29_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_29_02_world_sai.sql (renamed from sql/updates/world/2013_11_29_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_29_03_world_sai.sql (renamed from sql/updates/world/2013_11_29_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_29_04_world_sai.sql (renamed from sql/updates/world/2013_11_29_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_29_05_world_sai.sql (renamed from sql/updates/world/2013_11_29_05_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_29_06_world_sai.sql (renamed from sql/updates/world/2013_11_29_06_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_30_00_world_sai.sql (renamed from sql/updates/world/2013_11_30_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_30_01_world_sai.sql (renamed from sql/updates/world/2013_11_30_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_30_02_world_sai.sql (renamed from sql/updates/world/2013_11_30_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_30_03_world_sai.sql (renamed from sql/updates/world/2013_11_30_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_00_world_creature_ai.sql (renamed from sql/updates/world/2013_12_01_00_world_creature_ai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_01_world_sai.sql (renamed from sql/updates/world/2013_12_01_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_02_world_command.sql (renamed from sql/updates/world/2013_12_01_02_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_03_world_sai.sql (renamed from sql/updates/world/2013_12_01_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_04_world_sai.sql (renamed from sql/updates/world/2013_12_01_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_05_world_misc.sql (renamed from sql/updates/world/2013_12_01_05_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_06_world_misc.sql (renamed from sql/updates/world/2013_12_01_06_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_07_world_sai.sql (renamed from sql/updates/world/2013_12_01_07_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_02_00_world_sai.sql (renamed from sql/updates/world/2013_12_02_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_02_01_world_sai.sql (renamed from sql/updates/world/2013_12_02_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_02_02_world_sai.sql (renamed from sql/updates/world/2013_12_02_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_04_00_world_sai.sql (renamed from sql/updates/world/2013_12_04_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_04_01_world_misc.sql (renamed from sql/updates/world/2013_12_04_01_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_04_02_world_misc.sql (renamed from sql/updates/world/2013_12_04_02_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_04_03_world_spells.sql (renamed from sql/updates/world/2013_12_04_03_world_spells.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_04_04_world_sai.sql (renamed from sql/updates/world/2013_12_04_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_04_05_world_sai.sql (renamed from sql/updates/world/2013_12_04_05_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_04_06_world_sai.sql (renamed from sql/updates/world/2013_12_04_06_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_05_00_world_misc.sql (renamed from sql/updates/world/2013_12_05_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_05_01_world_sai.sql (renamed from sql/updates/world/2013_12_05_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_05_02_world_sai.sql (renamed from sql/updates/world/2013_12_05_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_07_00_world_misc.sql (renamed from sql/updates/world/2013_12_07_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_07_01_world_sai.sql (renamed from sql/updates/world/2013_12_07_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_07_02_world_sai.sql (renamed from sql/updates/world/2013_12_07_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_08_00_world_creature_text.sql (renamed from sql/updates/world/2013_12_08_00_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_08_01_world_misc.sql (renamed from sql/updates/world/2013_12_08_01_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_08_02_world_misc.sql (renamed from sql/updates/world/2013_12_08_02_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_09_00_world_misc.sql (renamed from sql/updates/world/2013_12_09_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_09_01_world_waypoints.sql (renamed from sql/updates/world/2013_12_09_01_world_waypoints.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_09_02_world_waypoints.sql (renamed from sql/updates/world/2013_12_09_02_world_waypoints.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_09_03_world_misc.sql (renamed from sql/updates/world/2013_12_09_03_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_09_04_world_creature_template.sql (renamed from sql/updates/world/2013_12_09_04_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_11_00_world_waypoints.sql (renamed from sql/updates/world/2013_12_11_00_world_waypoints.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_11_01_world_misc.sql (renamed from sql/updates/world/2013_12_11_01_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_11_02_world_sai.sql (renamed from sql/updates/world/2013_12_11_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_14_00_world_sai.sql (renamed from sql/updates/world/2013_12_14_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_14_01_world_misc.sql (renamed from sql/updates/world/2013_12_14_01_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_15_00_world_creature_template.sql (renamed from sql/updates/world/2013_12_15_00_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_15_01_world_creature_template.sql (renamed from sql/updates/world/2013_12_15_01_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_16_00_world_sai.sql (renamed from sql/updates/world/2013_12_16_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_17_00_world_sai.sql (renamed from sql/updates/world/2013_12_17_00_world_sai.sql)2
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_18_00_world_misc.sql (renamed from sql/updates/world/2013_12_18_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_18_01_world_sai.sql (renamed from sql/updates/world/2013_12_18_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_18_02_world_misc.sql (renamed from sql/updates/world/2013_12_18_02_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_19_00_world_misc.sql (renamed from sql/updates/world/2013_12_19_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_19_01_world_sai.sql (renamed from sql/updates/world/2013_12_19_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_19_02_world_sai.sql (renamed from sql/updates/world/2013_12_19_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_19_03_world_misc.sql (renamed from sql/updates/world/2013_12_19_03_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_19_04_world_misc.sql (renamed from sql/updates/world/2013_12_19_04_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_20_00_world_misc.sql (renamed from sql/updates/world/2013_12_20_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_20_01_world_conditions.sql (renamed from sql/updates/world/2013_12_20_01_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_20_02_world_sai.sql (renamed from sql/updates/world/2013_12_20_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_21_00_world_sai.sql (renamed from sql/updates/world/2013_12_21_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_00_world_sai.sql (renamed from sql/updates/world/2013_12_22_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_01_world_misc.sql (renamed from sql/updates/world/2013_12_22_01_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_02_world_misc.sql (renamed from sql/updates/world/2013_12_22_02_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_03_world_quest_template.sql (renamed from sql/updates/world/2013_12_22_03_world_quest_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_04_world_creature.sql (renamed from sql/updates/world/2013_12_22_04_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_05_world_misc.sql (renamed from sql/updates/world/2013_12_22_05_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_06_world_misc.sql (renamed from sql/updates/world/2013_12_22_06_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_07_world_creature_text.sql (renamed from sql/updates/world/2013_12_22_07_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_08_world_creature_text.sql (renamed from sql/updates/world/2013_12_22_08_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_09_world_sai.sql (renamed from sql/updates/world/2013_12_22_09_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_00_world_misc.sql (renamed from sql/updates/world/2013_12_23_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_01_world_misc.sql (renamed from sql/updates/world/2013_12_23_01_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_02_world_gossip.sql (renamed from sql/updates/world/2013_12_23_02_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_03_world_misc.sql (renamed from sql/updates/world/2013_12_23_03_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_04_world_misc.sql (renamed from sql/updates/world/2013_12_23_04_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_05_world_condition.sql (renamed from sql/updates/world/2013_12_23_05_world_condition.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_06_world_sai.sql (renamed from sql/updates/world/2013_12_23_06_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_07_world_creature_template.sql (renamed from sql/updates/world/2013_12_23_07_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_08_world_creature_text.sql (renamed from sql/updates/world/2013_12_23_08_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_24_00_world_misc.sql (renamed from sql/updates/world/2013_12_24_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_24_01_world_misc.sql (renamed from sql/updates/world/2013_12_24_01_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_24_02_world_gameobject_template.sql (renamed from sql/updates/world/2013_12_24_02_world_gameobject_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_24_03_world_creature_template.sql (renamed from sql/updates/world/2013_12_24_03_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_25_00_world_misc.sql (renamed from sql/updates/world/2013_12_25_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_25_01_world_misc.sql (renamed from sql/updates/world/2013_12_25_01_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_25_02_world_misc.sql (renamed from sql/updates/world/2013_12_25_02_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_25_03_world_misc.sql (renamed from sql/updates/world/2013_12_25_03_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_27_00_world_sai.sql (renamed from sql/updates/world/2013_12_27_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_27_01_world_creature_formations.sql (renamed from sql/updates/world/2013_12_27_01_world_creature_formations.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_28_00_world_creature_classlevelstats.sql (renamed from sql/updates/world/2013_12_28_00_world_creature_classlevelstats.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_28_01_world_creature_classlevelstats.sql (renamed from sql/updates/world/2013_12_28_01_world_creature_classlevelstats.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_28_02_world_sai.sql (renamed from sql/updates/world/2013_12_28_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_28_03_world_creature_classlevelstats.sql (renamed from sql/updates/world/2013_12_28_03_world_creature_classlevelstats.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_29_00_world_creature_classlevelstats.sql (renamed from sql/updates/world/2013_12_29_00_world_creature_classlevelstats.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_29_01_world_creature_classlevelstats.sql (renamed from sql/updates/world/2013_12_29_01_world_creature_classlevelstats.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_30_00_world_creature_classlevelstats.sql (renamed from sql/updates/world/2013_12_30_00_world_creature_classlevelstats.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_30_01_world_creature_classlevelstats.sql (renamed from sql/updates/world/2013_12_30_01_world_creature_classlevelstats.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_30_02_world_creature_classlevelstats.sql (renamed from sql/updates/world/2013_12_30_02_world_creature_classlevelstats.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_30_03_world_creature_classlevelstats.sql (renamed from sql/updates/world/2013_12_30_03_world_creature_classlevelstats.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_31_00_world_creature_classlevelstats.sql (renamed from sql/updates/world/2013_12_31_00_world_creature_classlevelstats.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_04_00_world_creature_classlevelstats.sql (renamed from sql/updates/world/2014_01_04_00_world_creature_classlevelstats.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_04_01_world_spelldifficulty_dbc.sql (renamed from sql/updates/world/2014_01_04_01_world_spelldifficulty_dbc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_04_02_world_spelldifficulty_dbc.sql (renamed from sql/updates/world/2014_01_04_02_world_spelldifficulty_dbc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_07_00_world_creature_template.sql (renamed from sql/updates/world/2014_01_07_00_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_08_00_world_creature_template.sql (renamed from sql/updates/world/2014_01_08_00_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_09_00_world_misc.sql (renamed from sql/updates/world/2014_01_09_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_09_01_world_creature.sql (renamed from sql/updates/world/2014_01_09_01_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_12_00_world_sai.sql (renamed from sql/updates/world/2014_01_12_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_15_00_world_misc.sql (renamed from sql/updates/world/2014_01_15_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_17_00_world_trinity_string.sql (renamed from sql/updates/world/2014_01_17_00_world_trinity_string.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_19_00_world_misc.sql (renamed from sql/updates/world/2014_01_19_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_19_01_world_command.sql (renamed from sql/updates/world/2014_01_19_01_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_19_02_world_command.sql (renamed from sql/updates/world/2014_01_19_02_world_command.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_21_00_world_sai.sql (renamed from sql/updates/world/2014_01_21_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_22_00_world_sai.sql (renamed from sql/updates/world/2014_01_22_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_22_01_world_creature_template.sql (renamed from sql/updates/world/2014_01_22_01_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_00_world_quest_template.sql (renamed from sql/updates/world/2014_01_23_00_world_quest_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_01_world_conditions.sql (renamed from sql/updates/world/2014_01_23_01_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_02_world_sai.sql (renamed from sql/updates/world/2014_01_23_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_03_world_conditions.sql (renamed from sql/updates/world/2014_01_23_03_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_04_world_game_event_creature.sql (renamed from sql/updates/world/2014_01_23_04_world_game_event_creature.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_05_world_creature_template.sql (renamed from sql/updates/world/2014_01_23_05_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_06_world_creature.sql (renamed from sql/updates/world/2014_01_23_06_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_07_world_spell_bonus_data.sql (renamed from sql/updates/world/2014_01_23_07_world_spell_bonus_data.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_08_world_graveyard.sql (renamed from sql/updates/world/2014_01_23_08_world_graveyard.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_09_world_npc_trainer.sql (renamed from sql/updates/world/2014_01_23_09_world_npc_trainer.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_10_world_creature_loot_template.sql (renamed from sql/updates/world/2014_01_23_10_world_creature_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_11_world_creature_template.sql (renamed from sql/updates/world/2014_01_23_11_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_12_world_sai.sql (renamed from sql/updates/world/2014_01_23_12_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_13_world_misc.sql (renamed from sql/updates/world/2014_01_23_13_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_14_world_creature_template.sql (renamed from sql/updates/world/2014_01_23_14_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_15_world_spell_script_names.sql (renamed from sql/updates/world/2014_01_23_15_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_00_world_spell_script_name.sql (renamed from sql/updates/world/2014_01_24_00_world_spell_script_name.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_01_world_sai.sql (renamed from sql/updates/world/2014_01_24_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_02_world_creature_template.sql (renamed from sql/updates/world/2014_01_24_02_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_03_world_sai.sql (renamed from sql/updates/world/2014_01_24_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_04_world_sai.sql (renamed from sql/updates/world/2014_01_24_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_05_world_creature_queststarter.sql (renamed from sql/updates/world/2014_01_24_05_world_creature_queststarter.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_06_world_gameobject_loot_template.sql (renamed from sql/updates/world/2014_01_24_06_world_gameobject_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_07_world_sai.sql (renamed from sql/updates/world/2014_01_24_07_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_00_world_sai.sql (renamed from sql/updates/world/2014_01_26_00_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_01_world_sai.sql (renamed from sql/updates/world/2014_01_26_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_02_world_sai.sql (renamed from sql/updates/world/2014_01_26_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_04_world_sai.sql (renamed from sql/updates/world/2014_01_26_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_05_world_sai.sql (renamed from sql/updates/world/2014_01_26_05_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_06_world_spells.sql (renamed from sql/updates/world/2014_01_26_06_world_spells.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_07_world_spell_script_names.sql (renamed from sql/updates/world/2014_01_26_07_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_08_world_creature_template.sql (renamed from sql/updates/world/2014_01_26_08_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_09_world_spell_script_names_335.sql (renamed from sql/updates/world/2014_01_26_09_world_spell_script_names_335.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_00_world_creature_queststarter.sql (renamed from sql/updates/world/2014_01_27_00_world_creature_queststarter.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_01_world_creature.sql (renamed from sql/updates/world/2014_01_27_01_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_02_world_creature_template.sql (renamed from sql/updates/world/2014_01_27_02_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_03_world_quest.sql (renamed from sql/updates/world/2014_01_27_03_world_quest.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_04_world_conditions.sql (renamed from sql/updates/world/2014_01_27_04_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_05_world_spell_target_position.sql (renamed from sql/updates/world/2014_01_27_05_world_spell_target_position.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_06_world_gameobject.sql (renamed from sql/updates/world/2014_01_27_06_world_gameobject.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_07_world_creature_template.sql (renamed from sql/updates/world/2014_01_27_07_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_08_world_creature_template.sql (renamed from sql/updates/world/2014_01_27_08_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_09_world_gameobject.sql (renamed from sql/updates/world/2014_01_27_09_world_gameobject.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_10_world_creature_template.sql (renamed from sql/updates/world/2014_01_27_10_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_11_world_creature_model_info.sql (renamed from sql/updates/world/2014_01_27_11_world_creature_model_info.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_12_world_creature_template.sql (renamed from sql/updates/world/2014_01_27_12_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_13_world_creature_template.sql (renamed from sql/updates/world/2014_01_27_13_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_14_world_creature_template.sql (renamed from sql/updates/world/2014_01_27_14_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_15_world_creature_template.sql (renamed from sql/updates/world/2014_01_27_15_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_16_world_creature_template.sql (renamed from sql/updates/world/2014_01_27_16_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_17_world_creature_template.sql (renamed from sql/updates/world/2014_01_27_17_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_18_world_creature_template.sql (renamed from sql/updates/world/2014_01_27_18_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_19_world_creature_template.sql (renamed from sql/updates/world/2014_01_27_19_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_20_world_creature_template.sql (renamed from sql/updates/world/2014_01_27_20_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_28_00_world_creature_template.sql (renamed from sql/updates/world/2014_01_28_00_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_28_01_world_creature_template.sql (renamed from sql/updates/world/2014_01_28_01_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_28_02_world_creature_template.sql (renamed from sql/updates/world/2014_01_28_02_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_28_03_world_creature_template.sql (renamed from sql/updates/world/2014_01_28_03_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_28_04_world_creature_template.sql (renamed from sql/updates/world/2014_01_28_04_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_28_05_world_creature_template.sql (renamed from sql/updates/world/2014_01_28_05_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_29_00_world_spell_script_names.sql (renamed from sql/updates/world/2014_01_29_00_world_spell_script_names.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_31_00_world_spell_custom_attr.sql (renamed from sql/updates/world/2014_01_31_00_world_spell_custom_attr.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_31_01_world_item_template.sql (renamed from sql/updates/world/2014_01_31_01_world_item_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_01_01_world_creature_formations.sql (renamed from sql/updates/world/2014_02_01_01_world_creature_formations.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_04_00_world_access_requirement.sql (renamed from sql/updates/world/2014_02_04_00_world_access_requirement.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_04_01_world_sai.sql (renamed from sql/updates/world/2014_02_04_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_06_00_world_gameobject.sql (renamed from sql/updates/world/2014_02_06_00_world_gameobject.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_08_00_world_item_template.sql (renamed from sql/updates/world/2014_02_08_00_world_item_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_09_00_world_creature_template.sql (renamed from sql/updates/world/2014_02_09_00_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_09_01_world_creature_template.sql (renamed from sql/updates/world/2014_02_09_01_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_09_02_world_creature_template.sql (renamed from sql/updates/world/2014_02_09_02_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_09_03_world_creature_template.sql (renamed from sql/updates/world/2014_02_09_03_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_09_04_world_creature_template.sql (renamed from sql/updates/world/2014_02_09_04_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_09_05_world_conditions.sql (renamed from sql/updates/world/2014_02_09_05_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_09_06_world_achievements.sql (renamed from sql/updates/world/2014_02_09_06_world_achievements.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_11_00_world_creature_template.sql (renamed from sql/updates/world/2014_02_11_00_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_12_00_world_quest_template.sql (renamed from sql/updates/world/2014_02_12_00_world_quest_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_16_00_world_creature.sql (renamed from sql/updates/world/2014_02_16_00_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_16_01_world_creature_template.sql (renamed from sql/updates/world/2014_02_16_01_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_16_02_world_creature.sql (renamed from sql/updates/world/2014_02_16_02_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_16_03_world_reputation_reward_rate.sql (renamed from sql/updates/world/2014_02_16_03_world_reputation_reward_rate.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_18_00_world_creature.sql (renamed from sql/updates/world/2014_02_18_00_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_00_world_misc.sql (renamed from sql/updates/world/2014_02_20_00_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_01_world_misc.sql (renamed from sql/updates/world/2014_02_20_01_world_misc.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_02_world_creature.sql (renamed from sql/updates/world/2014_02_20_02_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_03_world_quest_template.sql (renamed from sql/updates/world/2014_02_20_03_world_quest_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_04_world_creature.sql (renamed from sql/updates/world/2014_02_20_04_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_05_world_creature.sql (renamed from sql/updates/world/2014_02_20_05_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_06_world_creature.sql (renamed from sql/updates/world/2014_02_20_06_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_07_world_creature.sql (renamed from sql/updates/world/2014_02_20_07_world_creature.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_23_00_world_conditions.sql (renamed from sql/updates/world/2014_02_23_00_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_23_01_world_sai.sql (renamed from sql/updates/world/2014_02_23_01_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_23_02_world_item_template.sql (renamed from sql/updates/world/2014_02_23_02_world_item_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_23_03_world_conditions.sql (renamed from sql/updates/world/2014_02_23_03_world_conditions.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_23_04_world_item_template.sql (renamed from sql/updates/world/2014_02_23_04_world_item_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_27_00_world_gameobject.sql (renamed from sql/updates/world/2014_02_27_00_world_gameobject.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_27_01_world_npc_trainer.sql (renamed from sql/updates/world/2014_02_27_01_world_npc_trainer.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_27_02_world_sai.sql (renamed from sql/updates/world/2014_02_27_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_27_03_world_sai.sql (renamed from sql/updates/world/2014_02_27_03_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_27_04_world_sai.sql (renamed from sql/updates/world/2014_02_27_04_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_03_00_world_creature_text.sql (renamed from sql/updates/world/2014_03_03_00_world_creature_text.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_03_01_world_gossip.sql (renamed from sql/updates/world/2014_03_03_01_world_gossip.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_03_02_world_sai.sql (renamed from sql/updates/world/2014_03_03_02_world_sai.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_04_00_world_creature_loot_template.sql (renamed from sql/updates/world/2014_03_04_00_world_creature_loot_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_06_00_world_creature_template.sql (renamed from sql/updates/world/2014_03_06_00_world_creature_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_06_01_world_item_template.sql (renamed from sql/updates/world/2014_03_06_01_world_item_template.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_06_02_world_battlemaster_entry.sql (renamed from sql/updates/world/2014_03_06_02_world_battlemaster_entry.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_09_00_world_spell_group.sql (renamed from sql/updates/world/2014_03_09_00_world_spell_group.sql)0
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_13_00_world_sai.sql6
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_13_01_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_00_world_creature.sql3
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_01_world_sai.sql7
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_02_world_sai.sql7
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_03_world_sai.sql4
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_04_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_05_world_item_template.sql3
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_17_00_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_18_00_world_quest.sql20
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_18_00_world_sai.sql62
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_19_00_world_conditions.sql4
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_19_00_world_tele.sql2
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_19_01_world_conditions.sql9
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_19_01_world_reputation_reward_rate.sql2
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_20_00_world_creature_equip_template.sql1
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_20_01_world_sai.sql4
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_21_00_world_sai.sql10
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_22_00_world_creature_template.sql1
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_22_01_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_22_02_world_creature_text.sql12
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_23_00_world_misc.sql397
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_00_world_misc.sql4
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_01_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_02_world_creature_classlevelstats.sql2
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_02_world_quest.sql16
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_04_world_quest_templte.sql2
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_05_world_sai.sql3
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_06_world_sai.sql5
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_07_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_08_world_sai.sql2
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_09_world_misc.sql6
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_10_world_conditions.sql4
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_25_00_world_creature.sql2
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_26_00_world_sai.sql5
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_26_01_world_sai.sql1
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_28_00_world_page_text.sql9
-rw-r--r--sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_28_01_world_page_text.sql15
-rw-r--r--sql/updates/world/2014_03_29_00_world_version.sql1
-rw-r--r--src/server/authserver/Authentication/TOTP.h2
-rw-r--r--src/server/collision/Management/MMapManager.h1
-rw-r--r--src/server/collision/Models/GameObjectModel.cpp48
-rw-r--r--src/server/collision/Models/GameObjectModel.h6
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp70
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.cpp50
-rw-r--r--src/server/game/AI/SmartScripts/SmartScriptMgr.h16
-rw-r--r--src/server/game/Battlegrounds/Battleground.cpp24
-rw-r--r--src/server/game/Battlegrounds/Battleground.h4
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp2
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp2
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp16
-rw-r--r--src/server/game/Conditions/ConditionMgr.cpp5
-rw-r--r--src/server/game/DataStores/DBCStores.cpp17
-rw-r--r--src/server/game/DataStores/DBCStores.h2
-rw-r--r--src/server/game/DataStores/DBCStructure.h18
-rw-r--r--src/server/game/DataStores/DBCfmt.h1
-rw-r--r--src/server/game/DungeonFinding/LFGMgr.cpp1
-rw-r--r--src/server/game/Entities/Creature/Creature.h8
-rw-r--r--src/server/game/Entities/Creature/GossipDef.cpp9
-rw-r--r--src/server/game/Entities/Creature/GossipDef.h9
-rw-r--r--src/server/game/Entities/DynamicObject/DynamicObject.cpp33
-rw-r--r--src/server/game/Entities/DynamicObject/DynamicObject.h4
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp23
-rw-r--r--src/server/game/Entities/GameObject/GameObject.h2
-rw-r--r--src/server/game/Entities/Object/Object.cpp37
-rw-r--r--src/server/game/Entities/Pet/Pet.cpp3
-rw-r--r--src/server/game/Entities/Player/Player.cpp12
-rw-r--r--src/server/game/Entities/Transport/Transport.cpp152
-rw-r--r--src/server/game/Entities/Transport/Transport.h28
-rw-r--r--src/server/game/Entities/Unit/StatSystem.cpp4
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp15
-rw-r--r--src/server/game/Entities/Unit/Unit.h6
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp6
-rw-r--r--src/server/game/Handlers/AddonHandler.cpp2
-rw-r--r--src/server/game/Handlers/MiscHandler.cpp13
-rw-r--r--src/server/game/Maps/Map.cpp271
-rw-r--r--src/server/game/Maps/Map.h30
-rw-r--r--src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp4
-rw-r--r--src/server/game/Movement/Spline/MovementTypedefs.h6
-rw-r--r--src/server/game/Movement/Spline/Spline.h2
-rw-r--r--src/server/game/Scripting/ScriptLoader.cpp2
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp4
-rw-r--r--src/server/game/Spells/Spell.cpp62
-rw-r--r--src/server/game/Spells/Spell.h6
-rw-r--r--src/server/game/Spells/SpellEffects.cpp2
-rw-r--r--src/server/game/Spells/SpellMgr.cpp9
-rw-r--r--src/server/game/Spells/SpellMgr.h8
-rw-r--r--src/server/game/Spells/SpellScript.h1
-rw-r--r--src/server/game/Tickets/TicketMgr.cpp4
-rw-r--r--src/server/scripts/Commands/cs_misc.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp7
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp7
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp22
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp11
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp20
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp99
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp33
-rw-r--r--src/server/scripts/EasternKingdoms/zone_westfall.cpp75
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp3
-rw-r--r--src/server/scripts/Kalimdor/RazorfenDowns/boss_glutton.cpp1
-rw-r--r--src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp2
-rw-r--r--src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp6
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp14
-rw-r--r--src/server/scripts/Kalimdor/zone_mulgore.cpp37
-rw-r--r--src/server/scripts/Kalimdor/zone_silithus.cpp6
-rw-r--r--src/server/scripts/Kalimdor/zone_tanaris.cpp37
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp8
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp2
-rw-r--r--src/server/scripts/Northrend/CMakeLists.txt1
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp12
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp2
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp5
-rw-r--r--src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp15
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp24
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp2484
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp103
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h67
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp172
-rw-r--r--src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp33
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_borean_tundra.cpp35
-rw-r--r--src/server/scripts/Northrend/zone_dragonblight.cpp1
-rw-r--r--src/server/scripts/Northrend/zone_storm_peaks.cpp36
-rw-r--r--src/server/scripts/Northrend/zone_zuldrak.cpp6
-rw-r--r--src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp6
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp48
-rw-r--r--src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp6
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp7
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp7
-rw-r--r--src/server/scripts/Outland/zone_blades_edge_mountains.cpp1
-rw-r--r--src/server/scripts/Outland/zone_netherstorm.cpp10
-rw-r--r--src/server/scripts/Spells/spell_dk.cpp4
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp33
-rw-r--r--src/server/scripts/Spells/spell_mage.cpp4
-rw-r--r--src/server/scripts/Spells/spell_pet.cpp6
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp2
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp4
-rw-r--r--src/server/scripts/Spells/spell_rogue.cpp2
-rw-r--r--src/server/scripts/Spells/spell_warlock.cpp5
-rw-r--r--src/server/scripts/Spells/spell_warrior.cpp2
-rw-r--r--src/server/shared/Common.h10
-rw-r--r--src/server/shared/Database/AdhocStatement.cpp4
-rw-r--r--src/server/shared/Database/DatabaseWorkerPool.h3
-rw-r--r--src/server/shared/Database/QueryHolder.cpp3
-rw-r--r--src/server/shared/Dynamic/LinkedList.h15
-rw-r--r--src/server/shared/Dynamic/LinkedReference/Reference.h4
-rw-r--r--src/server/shared/Logging/AppenderFile.cpp2
-rw-r--r--src/tools/vmap4_extractor/mpq_libmpq04.h5
903 files changed, 7455 insertions, 2356 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 45bb3bd58aa..21fa378fad0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,7 +12,7 @@
project(TrinityCore)
# CMake policies (can not be handled elsewhere)
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.9)
cmake_policy(SET CMP0005 OLD)
# add this options before PROJECT keyword
diff --git a/README.md b/README.md
index 6b078c2134d..2a1dca52942 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@ website at [TrinityCore.org](http://www.trinitycore.org).
+ Processor with SSE2 support
+ ACE ≥ 5.8.3 (included for Windows)
+ MySQL ≥ 5.1.0 (included for Windows)
-+ CMake ≥ 2.8.0
++ CMake ≥ 2.8.11.2 / 2.8.9 (Windows / Linux)
+ OpenSSL ≥ 1.0.0
+ GCC ≥ 4.7.2 (Linux only)
+ MS Visual Studio ≥ 12 (2013) (Windows only)
diff --git a/cmake/compiler/clang/settings.cmake b/cmake/compiler/clang/settings.cmake
index ae07b1fc39b..2de9e79ad88 100644
--- a/cmake/compiler/clang/settings.cmake
+++ b/cmake/compiler/clang/settings.cmake
@@ -13,3 +13,6 @@ if(WITH_COREDEBUG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3")
message(STATUS "Clang: Debug-flags set (-g3)")
endif()
+
+# -Wno-narrowing needed to suppress a warning in g3d
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-narrowing")
diff --git a/cmake/compiler/gcc/settings.cmake b/cmake/compiler/gcc/settings.cmake
index 25ee96c8562..acd71e82fd9 100644
--- a/cmake/compiler/gcc/settings.cmake
+++ b/cmake/compiler/gcc/settings.cmake
@@ -1,6 +1,18 @@
# Set build-directive (used in core to tell which buildtype we used)
add_definitions(-D_BUILD_DIRECTIVE='"${CMAKE_BUILD_TYPE}"')
+set(GCC_EXPECTED_VERSION 4.7.2)
+
+if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS GCC_EXPECTED_VERSION)
+ message(FATAL_ERROR "GCC: TrinityCore requires version ${GCC_EXPECTED_VERSION} to build but found ${CMAKE_CXX_COMPILER_VERSION}")
+endif()
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+message(STATUS "GCC: Enabled c++11 support")
+
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
+message(STATUS "GCC: Enabled C99 support")
+
if(PLATFORM EQUAL 32)
# Required on 32-bit systems to enable SSE2 (standard on x64)
set(SSE_FLAGS "-msse2 -mfpmath=sse")
diff --git a/cmake/compiler/msvc/settings.cmake b/cmake/compiler/msvc/settings.cmake
index f303b6ed761..3194967c346 100644
--- a/cmake/compiler/msvc/settings.cmake
+++ b/cmake/compiler/msvc/settings.cmake
@@ -1,6 +1,12 @@
# set up output paths for executable binaries (.exe-files, and .dll-files on DLL-capable platforms)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+set(MSVC_EXPECTED_VERSION 18.0)
+
+if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS MSVC_EXPECTED_VERSION)
+ message(FATAL_ERROR "MSVC: TrinityCore requires version ${MSVC_EXPECTED_VERSION} (MSVC 2013) to build but found ${CMAKE_CXX_COMPILER_VERSION}")
+endif()
+
# set up output paths ofr static libraries etc (commented out - shown here as an example only)
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
@@ -42,13 +48,10 @@ message(STATUS "MSVC: Disabled NON-SECURE warnings")
add_definitions(-D_CRT_NONSTDC_NO_WARNINGS)
message(STATUS "MSVC: Disabled POSIX warnings")
-# disable warnings in Visual Studio 8 and above if not wanted
if(NOT WITH_WARNINGS)
- if(MSVC AND NOT CMAKE_GENERATOR MATCHES "Visual Studio 7")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996 /wd4355 /wd4244 /wd4985 /wd4267 /wd4619")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996 /wd4355 /wd4244 /wd4985 /wd4267 /wd4619")
- message(STATUS "MSVC: Disabled generic compiletime warnings")
- endif()
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996 /wd4355 /wd4244 /wd4985 /wd4267 /wd4619")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996 /wd4355 /wd4244 /wd4985 /wd4267 /wd4619")
+ message(STATUS "MSVC: Disabled generic compiletime warnings")
endif()
# Specify the maximum PreCompiled Header memory allocation limit
diff --git a/dep/PackageList.txt b/dep/PackageList.txt
index f932591ae32..602e9f12bb8 100644
--- a/dep/PackageList.txt
+++ b/dep/PackageList.txt
@@ -14,7 +14,7 @@ G3D (a commercial-grade C++ 3D engine available as Open Source (BSD License)
jemalloc (a general-purpose scalable concurrent malloc-implementation)
http://www.canonware.com/jemalloc/
- Version: 3.3.1
+ Version: 3.5.1
libMPQ (a library for reading MPQ files)
https://libmpq.org/
diff --git a/dep/jemalloc/COPYING b/dep/jemalloc/COPYING
index 019e8132275..bdda0feb9e5 100644
--- a/dep/jemalloc/COPYING
+++ b/dep/jemalloc/COPYING
@@ -1,10 +1,10 @@
Unless otherwise specified, files in the jemalloc source distribution are
subject to the following license:
--------------------------------------------------------------------------------
-Copyright (C) 2002-2013 Jason Evans <jasone@canonware.com>.
+Copyright (C) 2002-2014 Jason Evans <jasone@canonware.com>.
All rights reserved.
Copyright (C) 2007-2012 Mozilla Foundation. All rights reserved.
-Copyright (C) 2009-2013 Facebook, Inc. All rights reserved.
+Copyright (C) 2009-2014 Facebook, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff --git a/dep/jemalloc/ChangeLog b/dep/jemalloc/ChangeLog
index fc096d8f42f..c0ca338b076 100644
--- a/dep/jemalloc/ChangeLog
+++ b/dep/jemalloc/ChangeLog
@@ -3,8 +3,107 @@ bug fixes are all mentioned, but internal enhancements are omitted here for
brevity (even though they are more fun to write about). Much more detail can be
found in the git revision history:
- http://www.canonware.com/cgi-bin/gitweb.cgi?p=jemalloc.git
- git://canonware.com/jemalloc.git
+ https://github.com/jemalloc/jemalloc
+
+* 3.5.1 (February 25, 2014)
+
+ This version primarily addresses minor bugs in test code.
+
+ Bug fixes:
+ - Configure Solaris/Illumos to use MADV_FREE.
+ - Fix junk filling for mremap(2)-based huge reallocation. This is only
+ relevant if configuring with the --enable-mremap option specified.
+ - Avoid compilation failure if 'restrict' C99 keyword is not supported by the
+ compiler.
+ - Add a configure test for SSE2 rather than assuming it is usable on i686
+ systems. This fixes test compilation errors, especially on 32-bit Linux
+ systems.
+ - Fix mallctl argument size mismatches (size_t vs. uint64_t) in the stats unit
+ test.
+ - Fix/remove flawed alignment-related overflow tests.
+ - Prevent compiler optimizations that could change backtraces in the
+ prof_accum unit test.
+
+* 3.5.0 (January 22, 2014)
+
+ This version focuses on refactoring and automated testing, though it also
+ includes some non-trivial heap profiling optimizations not mentioned below.
+
+ New features:
+ - Add the *allocx() API, which is a successor to the experimental *allocm()
+ API. The *allocx() functions are slightly simpler to use because they have
+ fewer parameters, they directly return the results of primary interest, and
+ mallocx()/rallocx() avoid the strict aliasing pitfall that
+ allocm()/rallocm() share with posix_memalign(). Note that *allocm() is
+ slated for removal in the next non-bugfix release.
+ - Add support for LinuxThreads.
+
+ Bug fixes:
+ - Unless heap profiling is enabled, disable floating point code and don't link
+ with libm. This, in combination with e.g. EXTRA_CFLAGS=-mno-sse on x64
+ systems, makes it possible to completely disable floating point register
+ use. Some versions of glibc neglect to save/restore caller-saved floating
+ point registers during dynamic lazy symbol loading, and the symbol loading
+ code uses whatever malloc the application happens to have linked/loaded
+ with, the result being potential floating point register corruption.
+ - Report ENOMEM rather than EINVAL if an OOM occurs during heap profiling
+ backtrace creation in imemalign(). This bug impacted posix_memalign() and
+ aligned_alloc().
+ - Fix a file descriptor leak in a prof_dump_maps() error path.
+ - Fix prof_dump() to close the dump file descriptor for all relevant error
+ paths.
+ - Fix rallocm() to use the arena specified by the ALLOCM_ARENA(s) flag for
+ allocation, not just deallocation.
+ - Fix a data race for large allocation stats counters.
+ - Fix a potential infinite loop during thread exit. This bug occurred on
+ Solaris, and could affect other platforms with similar pthreads TSD
+ implementations.
+ - Don't junk-fill reallocations unless usable size changes. This fixes a
+ violation of the *allocx()/*allocm() semantics.
+ - Fix growing large reallocation to junk fill new space.
+ - Fix huge deallocation to junk fill when munmap is disabled.
+ - Change the default private namespace prefix from empty to je_, and change
+ --with-private-namespace-prefix so that it prepends an additional prefix
+ rather than replacing je_. This reduces the likelihood of applications
+ which statically link jemalloc experiencing symbol name collisions.
+ - Add missing private namespace mangling (relevant when
+ --with-private-namespace is specified).
+ - Add and use JEMALLOC_INLINE_C so that static inline functions are marked as
+ static even for debug builds.
+ - Add a missing mutex unlock in a malloc_init_hard() error path. In practice
+ this error path is never executed.
+ - Fix numerous bugs in malloc_strotumax() error handling/reporting. These
+ bugs had no impact except for malformed inputs.
+ - Fix numerous bugs in malloc_snprintf(). These bugs were not exercised by
+ existing calls, so they had no impact.
+
+* 3.4.1 (October 20, 2013)
+
+ Bug fixes:
+ - Fix a race in the "arenas.extend" mallctl that could cause memory corruption
+ of internal data structures and subsequent crashes.
+ - Fix Valgrind integration flaws that caused Valgrind warnings about reads of
+ uninitialized memory in:
+ + arena chunk headers
+ + internal zero-initialized data structures (relevant to tcache and prof
+ code)
+ - Preserve errno during the first allocation. A readlink(2) call during
+ initialization fails unless /etc/malloc.conf exists, so errno was typically
+ set during the first allocation prior to this fix.
+ - Fix compilation warnings reported by gcc 4.8.1.
+
+* 3.4.0 (June 2, 2013)
+
+ This version is essentially a small bugfix release, but the addition of
+ aarch64 support requires that the minor version be incremented.
+
+ Bug fixes:
+ - Fix race-triggered deadlocks in chunk_record(). These deadlocks were
+ typically triggered by multiple threads concurrently deallocating huge
+ objects.
+
+ New features:
+ - Add support for the aarch64 architecture.
* 3.3.1 (March 6, 2013)
@@ -15,7 +114,7 @@ found in the git revision history:
- Fix a locking order bug that could cause deadlock during fork if heap
profiling were enabled.
- Fix a chunk recycling bug that could cause the allocator to lose track of
- whether a chunk was zeroed. On FreeBSD, NetBSD, and OS X, it could cause
+ whether a chunk was zeroed. On FreeBSD, NetBSD, and OS X, it could cause
corruption if allocating via sbrk(2) (unlikely unless running with the
"dss:primary" option specified). This was completely harmless on Linux
unless using mlockall(2) (and unlikely even then, unless the
@@ -47,7 +146,7 @@ found in the git revision history:
Bug fixes:
- Fix "arenas.extend" mallctl to output the number of arenas.
- - Fix chunk_recycyle() to unconditionally inform Valgrind that returned memory
+ - Fix chunk_recycle() to unconditionally inform Valgrind that returned memory
is undefined.
- Fix build break on FreeBSD related to alloca.h.
diff --git a/dep/jemalloc/README b/dep/jemalloc/README
index 7661683bae7..9b268f42288 100644
--- a/dep/jemalloc/README
+++ b/dep/jemalloc/README
@@ -1,10 +1,14 @@
-jemalloc is a general-purpose scalable concurrent malloc(3) implementation.
-This distribution is a "portable" implementation that currently targets
-FreeBSD, Linux, Apple OS X, and MinGW. jemalloc is included as the default
-allocator in the FreeBSD and NetBSD operating systems, and it is used by the
-Mozilla Firefox web browser on Microsoft Windows-related platforms. Depending
-on your needs, one of the other divergent versions may suit your needs better
-than this distribution.
+jemalloc is a general purpose malloc(3) implementation that emphasizes
+fragmentation avoidance and scalable concurrency support. jemalloc first came
+into use as the FreeBSD libc allocator in 2005, and since then it has found its
+way into numerous applications that rely on its predictable behavior. In 2010
+jemalloc development efforts broadened to include developer support features
+such as heap profiling, Valgrind integration, and extensive monitoring/tuning
+hooks. Modern jemalloc releases continue to be integrated back into FreeBSD,
+and therefore versatility remains critical. Ongoing development efforts trend
+toward making jemalloc among the best allocators for a broad range of demanding
+applications, and eliminating/mitigating weaknesses that have practical
+repercussions for real world applications.
The COPYING file contains copyright and licensing information.
diff --git a/dep/jemalloc/VERSION b/dep/jemalloc/VERSION
index 900c82d1043..24870eef790 100644
--- a/dep/jemalloc/VERSION
+++ b/dep/jemalloc/VERSION
@@ -1 +1 @@
-3.3.1-0-g9ef9d9e8c271cdf14f664b871a8f98c827714784
+3.5.1-0-g7709a64c59daf0b1f938be49472fcc499e1bd136
diff --git a/dep/jemalloc/include/jemalloc/internal/arena.h b/dep/jemalloc/include/jemalloc/internal/arena.h
index f2c18f43543..9d000c03dec 100644
--- a/dep/jemalloc/include/jemalloc/internal/arena.h
+++ b/dep/jemalloc/include/jemalloc/internal/arena.h
@@ -158,6 +158,7 @@ struct arena_chunk_map_s {
};
typedef rb_tree(arena_chunk_map_t) arena_avail_tree_t;
typedef rb_tree(arena_chunk_map_t) arena_run_tree_t;
+typedef ql_head(arena_chunk_map_t) arena_chunk_mapelms_t;
/* Arena chunk header. */
struct arena_chunk_s {
@@ -174,11 +175,12 @@ struct arena_chunk_s {
size_t nruns_avail;
/*
- * Number of available run adjacencies. Clean and dirty available runs
- * are not coalesced, which causes virtual memory fragmentation. The
- * ratio of (nruns_avail-nruns_adjac):nruns_adjac is used for tracking
- * this fragmentation.
- * */
+ * Number of available run adjacencies that purging could coalesce.
+ * Clean and dirty available runs are not coalesced, which causes
+ * virtual memory fragmentation. The ratio of
+ * (nruns_avail-nruns_adjac):nruns_adjac is used for tracking this
+ * fragmentation.
+ */
size_t nruns_adjac;
/*
@@ -404,7 +406,16 @@ void arena_tcache_fill_small(arena_t *arena, tcache_bin_t *tbin,
size_t binind, uint64_t prof_accumbytes);
void arena_alloc_junk_small(void *ptr, arena_bin_info_t *bin_info,
bool zero);
+#ifdef JEMALLOC_JET
+typedef void (arena_redzone_corruption_t)(void *, size_t, bool, size_t,
+ uint8_t);
+extern arena_redzone_corruption_t *arena_redzone_corruption;
+typedef void (arena_dalloc_junk_small_t)(void *, arena_bin_info_t *);
+extern arena_dalloc_junk_small_t *arena_dalloc_junk_small;
+#else
void arena_dalloc_junk_small(void *ptr, arena_bin_info_t *bin_info);
+#endif
+void arena_quarantine_junk_small(void *ptr, size_t usize);
void *arena_malloc_small(arena_t *arena, size_t size, bool zero);
void *arena_malloc_large(arena_t *arena, size_t size, bool zero);
void *arena_palloc(arena_t *arena, size_t size, size_t alignment, bool zero);
@@ -415,10 +426,18 @@ void arena_dalloc_bin(arena_t *arena, arena_chunk_t *chunk, void *ptr,
size_t pageind, arena_chunk_map_t *mapelm);
void arena_dalloc_small(arena_t *arena, arena_chunk_t *chunk, void *ptr,
size_t pageind);
+#ifdef JEMALLOC_JET
+typedef void (arena_dalloc_junk_large_t)(void *, size_t);
+extern arena_dalloc_junk_large_t *arena_dalloc_junk_large;
+#endif
void arena_dalloc_large_locked(arena_t *arena, arena_chunk_t *chunk,
void *ptr);
void arena_dalloc_large(arena_t *arena, arena_chunk_t *chunk, void *ptr);
-void *arena_ralloc_no_move(void *ptr, size_t oldsize, size_t size,
+#ifdef JEMALLOC_JET
+typedef void (arena_ralloc_junk_large_t)(void *, size_t, size_t);
+extern arena_ralloc_junk_large_t *arena_ralloc_junk_large;
+#endif
+bool arena_ralloc_no_move(void *ptr, size_t oldsize, size_t size,
size_t extra, bool zero);
void *arena_ralloc(arena_t *arena, void *ptr, size_t oldsize, size_t size,
size_t extra, size_t alignment, bool zero, bool try_tcache_alloc,
@@ -441,6 +460,7 @@ void arena_postfork_child(arena_t *arena);
#ifndef JEMALLOC_ENABLE_INLINE
arena_chunk_map_t *arena_mapp_get(arena_chunk_t *chunk, size_t pageind);
size_t *arena_mapbitsp_get(arena_chunk_t *chunk, size_t pageind);
+size_t arena_mapbitsp_read(size_t *mapbitsp);
size_t arena_mapbits_get(arena_chunk_t *chunk, size_t pageind);
size_t arena_mapbits_unallocated_size_get(arena_chunk_t *chunk,
size_t pageind);
@@ -451,6 +471,7 @@ size_t arena_mapbits_dirty_get(arena_chunk_t *chunk, size_t pageind);
size_t arena_mapbits_unzeroed_get(arena_chunk_t *chunk, size_t pageind);
size_t arena_mapbits_large_get(arena_chunk_t *chunk, size_t pageind);
size_t arena_mapbits_allocated_get(arena_chunk_t *chunk, size_t pageind);
+void arena_mapbitsp_write(size_t *mapbitsp, size_t mapbits);
void arena_mapbits_unallocated_set(arena_chunk_t *chunk, size_t pageind,
size_t size, size_t flags);
void arena_mapbits_unallocated_size_set(arena_chunk_t *chunk, size_t pageind,
@@ -471,7 +492,7 @@ size_t arena_bin_index(arena_t *arena, arena_bin_t *bin);
unsigned arena_run_regind(arena_run_t *run, arena_bin_info_t *bin_info,
const void *ptr);
prof_ctx_t *arena_prof_ctx_get(const void *ptr);
-void arena_prof_ctx_set(const void *ptr, prof_ctx_t *ctx);
+void arena_prof_ctx_set(const void *ptr, size_t usize, prof_ctx_t *ctx);
void *arena_malloc(arena_t *arena, size_t size, bool zero, bool try_tcache);
size_t arena_salloc(const void *ptr, bool demote);
void arena_dalloc(arena_t *arena, arena_chunk_t *chunk, void *ptr,
@@ -498,10 +519,17 @@ arena_mapbitsp_get(arena_chunk_t *chunk, size_t pageind)
}
JEMALLOC_ALWAYS_INLINE size_t
+arena_mapbitsp_read(size_t *mapbitsp)
+{
+
+ return (*mapbitsp);
+}
+
+JEMALLOC_ALWAYS_INLINE size_t
arena_mapbits_get(arena_chunk_t *chunk, size_t pageind)
{
- return (*arena_mapbitsp_get(chunk, pageind));
+ return (arena_mapbitsp_read(arena_mapbitsp_get(chunk, pageind)));
}
JEMALLOC_ALWAYS_INLINE size_t
@@ -585,82 +613,89 @@ arena_mapbits_allocated_get(arena_chunk_t *chunk, size_t pageind)
}
JEMALLOC_ALWAYS_INLINE void
+arena_mapbitsp_write(size_t *mapbitsp, size_t mapbits)
+{
+
+ *mapbitsp = mapbits;
+}
+
+JEMALLOC_ALWAYS_INLINE void
arena_mapbits_unallocated_set(arena_chunk_t *chunk, size_t pageind, size_t size,
size_t flags)
{
- size_t *mapbitsp;
+ size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind);
- mapbitsp = arena_mapbitsp_get(chunk, pageind);
assert((size & PAGE_MASK) == 0);
assert((flags & ~CHUNK_MAP_FLAGS_MASK) == 0);
assert((flags & (CHUNK_MAP_DIRTY|CHUNK_MAP_UNZEROED)) == flags);
- *mapbitsp = size | CHUNK_MAP_BININD_INVALID | flags;
+ arena_mapbitsp_write(mapbitsp, size | CHUNK_MAP_BININD_INVALID | flags);
}
JEMALLOC_ALWAYS_INLINE void
arena_mapbits_unallocated_size_set(arena_chunk_t *chunk, size_t pageind,
size_t size)
{
- size_t *mapbitsp;
+ size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind);
+ size_t mapbits = arena_mapbitsp_read(mapbitsp);
- mapbitsp = arena_mapbitsp_get(chunk, pageind);
assert((size & PAGE_MASK) == 0);
- assert((*mapbitsp & (CHUNK_MAP_LARGE|CHUNK_MAP_ALLOCATED)) == 0);
- *mapbitsp = size | (*mapbitsp & PAGE_MASK);
+ assert((mapbits & (CHUNK_MAP_LARGE|CHUNK_MAP_ALLOCATED)) == 0);
+ arena_mapbitsp_write(mapbitsp, size | (mapbits & PAGE_MASK));
}
JEMALLOC_ALWAYS_INLINE void
arena_mapbits_large_set(arena_chunk_t *chunk, size_t pageind, size_t size,
size_t flags)
{
- size_t *mapbitsp;
+ size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind);
+ size_t mapbits = arena_mapbitsp_read(mapbitsp);
size_t unzeroed;
- mapbitsp = arena_mapbitsp_get(chunk, pageind);
assert((size & PAGE_MASK) == 0);
assert((flags & CHUNK_MAP_DIRTY) == flags);
- unzeroed = *mapbitsp & CHUNK_MAP_UNZEROED; /* Preserve unzeroed. */
- *mapbitsp = size | CHUNK_MAP_BININD_INVALID | flags | unzeroed |
- CHUNK_MAP_LARGE | CHUNK_MAP_ALLOCATED;
+ unzeroed = mapbits & CHUNK_MAP_UNZEROED; /* Preserve unzeroed. */
+ arena_mapbitsp_write(mapbitsp, size | CHUNK_MAP_BININD_INVALID | flags
+ | unzeroed | CHUNK_MAP_LARGE | CHUNK_MAP_ALLOCATED);
}
JEMALLOC_ALWAYS_INLINE void
arena_mapbits_large_binind_set(arena_chunk_t *chunk, size_t pageind,
size_t binind)
{
- size_t *mapbitsp;
+ size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind);
+ size_t mapbits = arena_mapbitsp_read(mapbitsp);
assert(binind <= BININD_INVALID);
- mapbitsp = arena_mapbitsp_get(chunk, pageind);
assert(arena_mapbits_large_size_get(chunk, pageind) == PAGE);
- *mapbitsp = (*mapbitsp & ~CHUNK_MAP_BININD_MASK) | (binind <<
- CHUNK_MAP_BININD_SHIFT);
+ arena_mapbitsp_write(mapbitsp, (mapbits & ~CHUNK_MAP_BININD_MASK) |
+ (binind << CHUNK_MAP_BININD_SHIFT));
}
JEMALLOC_ALWAYS_INLINE void
arena_mapbits_small_set(arena_chunk_t *chunk, size_t pageind, size_t runind,
size_t binind, size_t flags)
{
- size_t *mapbitsp;
+ size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind);
+ size_t mapbits = arena_mapbitsp_read(mapbitsp);
size_t unzeroed;
assert(binind < BININD_INVALID);
- mapbitsp = arena_mapbitsp_get(chunk, pageind);
assert(pageind - runind >= map_bias);
assert((flags & CHUNK_MAP_DIRTY) == flags);
- unzeroed = *mapbitsp & CHUNK_MAP_UNZEROED; /* Preserve unzeroed. */
- *mapbitsp = (runind << LG_PAGE) | (binind << CHUNK_MAP_BININD_SHIFT) |
- flags | unzeroed | CHUNK_MAP_ALLOCATED;
+ unzeroed = mapbits & CHUNK_MAP_UNZEROED; /* Preserve unzeroed. */
+ arena_mapbitsp_write(mapbitsp, (runind << LG_PAGE) | (binind <<
+ CHUNK_MAP_BININD_SHIFT) | flags | unzeroed | CHUNK_MAP_ALLOCATED);
}
JEMALLOC_ALWAYS_INLINE void
arena_mapbits_unzeroed_set(arena_chunk_t *chunk, size_t pageind,
size_t unzeroed)
{
- size_t *mapbitsp;
+ size_t *mapbitsp = arena_mapbitsp_get(chunk, pageind);
+ size_t mapbits = arena_mapbitsp_read(mapbitsp);
- mapbitsp = arena_mapbitsp_get(chunk, pageind);
- *mapbitsp = (*mapbitsp & ~CHUNK_MAP_UNZEROED) | unzeroed;
+ arena_mapbitsp_write(mapbitsp, (mapbits & ~CHUNK_MAP_UNZEROED) |
+ unzeroed);
}
JEMALLOC_INLINE bool
@@ -869,10 +904,10 @@ arena_prof_ctx_get(const void *ptr)
}
JEMALLOC_INLINE void
-arena_prof_ctx_set(const void *ptr, prof_ctx_t *ctx)
+arena_prof_ctx_set(const void *ptr, size_t usize, prof_ctx_t *ctx)
{
arena_chunk_t *chunk;
- size_t pageind, mapbits;
+ size_t pageind;
cassert(config_prof);
assert(ptr != NULL);
@@ -880,10 +915,17 @@ arena_prof_ctx_set(const void *ptr, prof_ctx_t *ctx)
chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr);
pageind = ((uintptr_t)ptr - (uintptr_t)chunk) >> LG_PAGE;
- mapbits = arena_mapbits_get(chunk, pageind);
- assert((mapbits & CHUNK_MAP_ALLOCATED) != 0);
- if ((mapbits & CHUNK_MAP_LARGE) == 0) {
+ assert(arena_mapbits_allocated_get(chunk, pageind) != 0);
+
+ if (usize > SMALL_MAXCLASS || (prof_promote &&
+ ((uintptr_t)ctx != (uintptr_t)1U || arena_mapbits_large_get(chunk,
+ pageind) != 0))) {
+ assert(arena_mapbits_large_get(chunk, pageind) != 0);
+ arena_mapp_get(chunk, pageind)->prof_ctx = ctx;
+ } else {
+ assert(arena_mapbits_large_get(chunk, pageind) == 0);
if (prof_promote == false) {
+ size_t mapbits = arena_mapbits_get(chunk, pageind);
arena_run_t *run = (arena_run_t *)((uintptr_t)chunk +
(uintptr_t)((pageind - (mapbits >> LG_PAGE)) <<
LG_PAGE));
@@ -895,12 +937,11 @@ arena_prof_ctx_set(const void *ptr, prof_ctx_t *ctx)
bin_info = &arena_bin_info[binind];
regind = arena_run_regind(run, bin_info, ptr);
- *((prof_ctx_t **)((uintptr_t)run + bin_info->ctx0_offset
- + (regind * sizeof(prof_ctx_t *)))) = ctx;
- } else
- assert((uintptr_t)ctx == (uintptr_t)1U);
- } else
- arena_mapp_get(chunk, pageind)->prof_ctx = ctx;
+ *((prof_ctx_t **)((uintptr_t)run +
+ bin_info->ctx0_offset + (regind * sizeof(prof_ctx_t
+ *)))) = ctx;
+ }
+ }
}
JEMALLOC_ALWAYS_INLINE void *
diff --git a/dep/jemalloc/include/jemalloc/internal/chunk_dss.h b/dep/jemalloc/include/jemalloc/internal/chunk_dss.h
index 6585f071bbe..4535ce09c09 100644
--- a/dep/jemalloc/include/jemalloc/internal/chunk_dss.h
+++ b/dep/jemalloc/include/jemalloc/internal/chunk_dss.h
@@ -7,7 +7,7 @@ typedef enum {
dss_prec_secondary = 2,
dss_prec_limit = 3
-} dss_prec_t ;
+} dss_prec_t;
#define DSS_PREC_DEFAULT dss_prec_secondary
#define DSS_DEFAULT "secondary"
diff --git a/dep/jemalloc/include/jemalloc/internal/ckh.h b/dep/jemalloc/include/jemalloc/internal/ckh.h
index 50c39ed9581..58712a6a763 100644
--- a/dep/jemalloc/include/jemalloc/internal/ckh.h
+++ b/dep/jemalloc/include/jemalloc/internal/ckh.h
@@ -17,7 +17,7 @@ typedef bool ckh_keycomp_t (const void *, const void *);
* There are 2^LG_CKH_BUCKET_CELLS cells in each hash table bucket. Try to fit
* one bucket per L1 cache line.
*/
-#define LG_CKH_BUCKET_CELLS (LG_CACHELINE - LG_SIZEOF_PTR - 1)
+#define LG_CKH_BUCKET_CELLS (LG_CACHELINE - LG_SIZEOF_PTR - 1)
#endif /* JEMALLOC_H_TYPES */
/******************************************************************************/
diff --git a/dep/jemalloc/include/jemalloc/internal/hash.h b/dep/jemalloc/include/jemalloc/internal/hash.h
index 56ecc793b36..09b69df515b 100644
--- a/dep/jemalloc/include/jemalloc/internal/hash.h
+++ b/dep/jemalloc/include/jemalloc/internal/hash.h
@@ -19,6 +19,11 @@
#ifdef JEMALLOC_H_INLINES
#ifndef JEMALLOC_ENABLE_INLINE
+uint32_t hash_x86_32(const void *key, int len, uint32_t seed);
+void hash_x86_128(const void *key, const int len, uint32_t seed,
+ uint64_t r_out[2]);
+void hash_x64_128(const void *key, const int len, const uint32_t seed,
+ uint64_t r_out[2]);
void hash(const void *key, size_t len, const uint32_t seed,
size_t r_hash[2]);
#endif
@@ -43,14 +48,14 @@ JEMALLOC_INLINE uint32_t
hash_get_block_32(const uint32_t *p, int i)
{
- return p[i];
+ return (p[i]);
}
JEMALLOC_INLINE uint64_t
hash_get_block_64(const uint64_t *p, int i)
{
- return p[i];
+ return (p[i]);
}
JEMALLOC_INLINE uint32_t
@@ -63,7 +68,7 @@ hash_fmix_32(uint32_t h)
h *= 0xc2b2ae35;
h ^= h >> 16;
- return h;
+ return (h);
}
JEMALLOC_INLINE uint64_t
@@ -76,7 +81,7 @@ hash_fmix_64(uint64_t k)
k *= QU(0xc4ceb9fe1a85ec53LLU);
k ^= k >> 33;
- return k;
+ return (k);
}
JEMALLOC_INLINE uint32_t
@@ -127,12 +132,12 @@ hash_x86_32(const void *key, int len, uint32_t seed)
h1 = hash_fmix_32(h1);
- return h1;
+ return (h1);
}
UNUSED JEMALLOC_INLINE void
hash_x86_128(const void *key, const int len, uint32_t seed,
- uint64_t r_out[2])
+ uint64_t r_out[2])
{
const uint8_t * data = (const uint8_t *) key;
const int nblocks = len / 16;
@@ -234,7 +239,7 @@ hash_x86_128(const void *key, const int len, uint32_t seed,
UNUSED JEMALLOC_INLINE void
hash_x64_128(const void *key, const int len, const uint32_t seed,
- uint64_t r_out[2])
+ uint64_t r_out[2])
{
const uint8_t *data = (const uint8_t *) key;
const int nblocks = len / 16;
@@ -310,7 +315,6 @@ hash_x64_128(const void *key, const int len, const uint32_t seed,
r_out[1] = h2;
}
-
/******************************************************************************/
/* API. */
JEMALLOC_INLINE void
diff --git a/dep/jemalloc/include/jemalloc/internal/huge.h b/dep/jemalloc/include/jemalloc/internal/huge.h
index d987d370767..ddf13138ad7 100644
--- a/dep/jemalloc/include/jemalloc/internal/huge.h
+++ b/dep/jemalloc/include/jemalloc/internal/huge.h
@@ -19,10 +19,14 @@ extern malloc_mutex_t huge_mtx;
void *huge_malloc(size_t size, bool zero);
void *huge_palloc(size_t size, size_t alignment, bool zero);
-void *huge_ralloc_no_move(void *ptr, size_t oldsize, size_t size,
+bool huge_ralloc_no_move(void *ptr, size_t oldsize, size_t size,
size_t extra);
void *huge_ralloc(void *ptr, size_t oldsize, size_t size, size_t extra,
size_t alignment, bool zero, bool try_tcache_dalloc);
+#ifdef JEMALLOC_JET
+typedef void (huge_dalloc_junk_t)(void *, size_t);
+extern huge_dalloc_junk_t *huge_dalloc_junk;
+#endif
void huge_dalloc(void *ptr, bool unmap);
size_t huge_salloc(const void *ptr);
prof_ctx_t *huge_prof_ctx_get(const void *ptr);
diff --git a/dep/jemalloc/include/jemalloc/internal/jemalloc_internal.h b/dep/jemalloc/include/jemalloc/internal/jemalloc_internal.h
index 80045bda4bd..b64cc4bed87 100644
--- a/dep/jemalloc/include/jemalloc/internal/jemalloc_internal.h
+++ b/dep/jemalloc/include/jemalloc/internal/jemalloc_internal.h
@@ -1,5 +1,5 @@
#ifndef JEMALLOC_INTERNAL_H
-#define JEMALLOC_INTERNAL_H
+#define JEMALLOC_INTERNAL_H
#include <math.h>
#ifdef _WIN32
# include <windows.h>
@@ -54,8 +54,7 @@ typedef intptr_t ssize_t;
#endif
#include <fcntl.h>
-#define JEMALLOC_NO_DEMANGLE
-#include "../jemalloc.h"
+#include "jemalloc_defs.h"
#ifdef JEMALLOC_UTRACE
#include <sys/ktrace.h>
@@ -66,6 +65,8 @@ typedef intptr_t ssize_t;
#include <valgrind/memcheck.h>
#endif
+#define JEMALLOC_NO_DEMANGLE
+#include "../jemalloc.h"
#include "jemalloc/internal/private_namespace.h"
#ifdef JEMALLOC_CC_SILENCE
@@ -221,8 +222,13 @@ static const bool config_ivsalloc =
* JEMALLOC_H_INLINES : Inline functions.
*/
/******************************************************************************/
-#define JEMALLOC_H_TYPES
+#define JEMALLOC_H_TYPES
+
+#ifndef JEMALLOC_HAS_RESTRICT
+# define restrict
+#endif
+#define MALLOCX_LG_ALIGN_MASK ((int)0x3f)
#define ALLOCM_LG_ALIGN_MASK ((int)0x3f)
#define ZU(z) ((size_t)z)
@@ -232,20 +238,26 @@ static const bool config_ivsalloc =
# define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var))
#endif
-#ifdef JEMALLOC_DEBUG
+#if defined(JEMALLOC_DEBUG)
/* Disable inlining to make debugging easier. */
# define JEMALLOC_ALWAYS_INLINE
+# define JEMALLOC_ALWAYS_INLINE_C static
# define JEMALLOC_INLINE
+# define JEMALLOC_INLINE_C static
# define inline
#else
# define JEMALLOC_ENABLE_INLINE
# ifdef JEMALLOC_HAVE_ATTR
# define JEMALLOC_ALWAYS_INLINE \
static inline JEMALLOC_ATTR(unused) JEMALLOC_ATTR(always_inline)
+# define JEMALLOC_ALWAYS_INLINE_C \
+ static inline JEMALLOC_ATTR(always_inline)
# else
# define JEMALLOC_ALWAYS_INLINE static inline
+# define JEMALLOC_ALWAYS_INLINE_C static inline
# endif
# define JEMALLOC_INLINE static inline
+# define JEMALLOC_INLINE_C static inline
# ifdef _MSC_VER
# define inline _inline
# endif
@@ -278,6 +290,9 @@ static const bool config_ivsalloc =
# ifdef __arm__
# define LG_QUANTUM 3
# endif
+# ifdef __aarch64__
+# define LG_QUANTUM 4
+# endif
# ifdef __hppa__
# define LG_QUANTUM 4
# endif
@@ -478,7 +493,7 @@ static const bool config_ivsalloc =
#undef JEMALLOC_H_TYPES
/******************************************************************************/
-#define JEMALLOC_H_STRUCTS
+#define JEMALLOC_H_STRUCTS
#include "jemalloc/internal/util.h"
#include "jemalloc/internal/atomic.h"
@@ -507,14 +522,14 @@ typedef struct {
uint64_t deallocated;
} thread_allocated_t;
/*
- * The JEMALLOC_CONCAT() wrapper is necessary to pass {0, 0} via a cpp macro
+ * The JEMALLOC_ARG_CONCAT() wrapper is necessary to pass {0, 0} via a cpp macro
* argument.
*/
-#define THREAD_ALLOCATED_INITIALIZER JEMALLOC_CONCAT({0, 0})
+#define THREAD_ALLOCATED_INITIALIZER JEMALLOC_ARG_CONCAT({0, 0})
#undef JEMALLOC_H_STRUCTS
/******************************************************************************/
-#define JEMALLOC_H_EXTERNS
+#define JEMALLOC_H_EXTERNS
extern bool opt_abort;
extern bool opt_junk;
@@ -574,7 +589,7 @@ void jemalloc_postfork_child(void);
#undef JEMALLOC_H_EXTERNS
/******************************************************************************/
-#define JEMALLOC_H_INLINES
+#define JEMALLOC_H_INLINES
#include "jemalloc/internal/util.h"
#include "jemalloc/internal/atomic.h"
@@ -749,32 +764,36 @@ choose_arena(arena_t *arena)
#include "jemalloc/internal/quarantine.h"
#ifndef JEMALLOC_ENABLE_INLINE
-void *imallocx(size_t size, bool try_tcache, arena_t *arena);
+void *imalloct(size_t size, bool try_tcache, arena_t *arena);
void *imalloc(size_t size);
-void *icallocx(size_t size, bool try_tcache, arena_t *arena);
+void *icalloct(size_t size, bool try_tcache, arena_t *arena);
void *icalloc(size_t size);
-void *ipallocx(size_t usize, size_t alignment, bool zero, bool try_tcache,
+void *ipalloct(size_t usize, size_t alignment, bool zero, bool try_tcache,
arena_t *arena);
void *ipalloc(size_t usize, size_t alignment, bool zero);
size_t isalloc(const void *ptr, bool demote);
size_t ivsalloc(const void *ptr, bool demote);
size_t u2rz(size_t usize);
size_t p2rz(const void *ptr);
-void idallocx(void *ptr, bool try_tcache);
+void idalloct(void *ptr, bool try_tcache);
void idalloc(void *ptr);
-void iqallocx(void *ptr, bool try_tcache);
+void iqalloct(void *ptr, bool try_tcache);
void iqalloc(void *ptr);
-void *irallocx(void *ptr, size_t size, size_t extra, size_t alignment,
- bool zero, bool no_move, bool try_tcache_alloc, bool try_tcache_dalloc,
+void *iralloct_realign(void *ptr, size_t oldsize, size_t size, size_t extra,
+ size_t alignment, bool zero, bool try_tcache_alloc, bool try_tcache_dalloc,
arena_t *arena);
+void *iralloct(void *ptr, size_t size, size_t extra, size_t alignment,
+ bool zero, bool try_tcache_alloc, bool try_tcache_dalloc, arena_t *arena);
void *iralloc(void *ptr, size_t size, size_t extra, size_t alignment,
- bool zero, bool no_move);
+ bool zero);
+bool ixalloc(void *ptr, size_t size, size_t extra, size_t alignment,
+ bool zero);
malloc_tsd_protos(JEMALLOC_ATTR(unused), thread_allocated, thread_allocated_t)
#endif
#if (defined(JEMALLOC_ENABLE_INLINE) || defined(JEMALLOC_C_))
JEMALLOC_ALWAYS_INLINE void *
-imallocx(size_t size, bool try_tcache, arena_t *arena)
+imalloct(size_t size, bool try_tcache, arena_t *arena)
{
assert(size != 0);
@@ -789,11 +808,11 @@ JEMALLOC_ALWAYS_INLINE void *
imalloc(size_t size)
{
- return (imallocx(size, true, NULL));
+ return (imalloct(size, true, NULL));
}
JEMALLOC_ALWAYS_INLINE void *
-icallocx(size_t size, bool try_tcache, arena_t *arena)
+icalloct(size_t size, bool try_tcache, arena_t *arena)
{
if (size <= arena_maxclass)
@@ -806,11 +825,11 @@ JEMALLOC_ALWAYS_INLINE void *
icalloc(size_t size)
{
- return (icallocx(size, true, NULL));
+ return (icalloct(size, true, NULL));
}
JEMALLOC_ALWAYS_INLINE void *
-ipallocx(size_t usize, size_t alignment, bool zero, bool try_tcache,
+ipalloct(size_t usize, size_t alignment, bool zero, bool try_tcache,
arena_t *arena)
{
void *ret;
@@ -838,7 +857,7 @@ JEMALLOC_ALWAYS_INLINE void *
ipalloc(size_t usize, size_t alignment, bool zero)
{
- return (ipallocx(usize, alignment, zero, true, NULL));
+ return (ipalloct(usize, alignment, zero, true, NULL));
}
/*
@@ -870,7 +889,7 @@ ivsalloc(const void *ptr, bool demote)
{
/* Return 0 if ptr is not within a chunk managed by jemalloc. */
- if (rtree_get(chunks_rtree, (uintptr_t)CHUNK_ADDR2BASE(ptr)) == NULL)
+ if (rtree_get(chunks_rtree, (uintptr_t)CHUNK_ADDR2BASE(ptr)) == 0)
return (0);
return (isalloc(ptr, demote));
@@ -899,7 +918,7 @@ p2rz(const void *ptr)
}
JEMALLOC_ALWAYS_INLINE void
-idallocx(void *ptr, bool try_tcache)
+idalloct(void *ptr, bool try_tcache)
{
arena_chunk_t *chunk;
@@ -916,31 +935,63 @@ JEMALLOC_ALWAYS_INLINE void
idalloc(void *ptr)
{
- idallocx(ptr, true);
+ idalloct(ptr, true);
}
JEMALLOC_ALWAYS_INLINE void
-iqallocx(void *ptr, bool try_tcache)
+iqalloct(void *ptr, bool try_tcache)
{
if (config_fill && opt_quarantine)
quarantine(ptr);
else
- idallocx(ptr, try_tcache);
+ idalloct(ptr, try_tcache);
}
JEMALLOC_ALWAYS_INLINE void
iqalloc(void *ptr)
{
- iqallocx(ptr, true);
+ iqalloct(ptr, true);
}
JEMALLOC_ALWAYS_INLINE void *
-irallocx(void *ptr, size_t size, size_t extra, size_t alignment, bool zero,
- bool no_move, bool try_tcache_alloc, bool try_tcache_dalloc, arena_t *arena)
+iralloct_realign(void *ptr, size_t oldsize, size_t size, size_t extra,
+ size_t alignment, bool zero, bool try_tcache_alloc, bool try_tcache_dalloc,
+ arena_t *arena)
+{
+ void *p;
+ size_t usize, copysize;
+
+ usize = sa2u(size + extra, alignment);
+ if (usize == 0)
+ return (NULL);
+ p = ipalloct(usize, alignment, zero, try_tcache_alloc, arena);
+ if (p == NULL) {
+ if (extra == 0)
+ return (NULL);
+ /* Try again, without extra this time. */
+ usize = sa2u(size, alignment);
+ if (usize == 0)
+ return (NULL);
+ p = ipalloct(usize, alignment, zero, try_tcache_alloc, arena);
+ if (p == NULL)
+ return (NULL);
+ }
+ /*
+ * Copy at most size bytes (not size+extra), since the caller has no
+ * expectation that the extra bytes will be reliably preserved.
+ */
+ copysize = (size < oldsize) ? size : oldsize;
+ memcpy(p, ptr, copysize);
+ iqalloct(ptr, try_tcache_dalloc);
+ return (p);
+}
+
+JEMALLOC_ALWAYS_INLINE void *
+iralloct(void *ptr, size_t size, size_t extra, size_t alignment, bool zero,
+ bool try_tcache_alloc, bool try_tcache_dalloc, arena_t *arena)
{
- void *ret;
size_t oldsize;
assert(ptr != NULL);
@@ -950,68 +1001,50 @@ irallocx(void *ptr, size_t size, size_t extra, size_t alignment, bool zero,
if (alignment != 0 && ((uintptr_t)ptr & ((uintptr_t)alignment-1))
!= 0) {
- size_t usize, copysize;
-
/*
* Existing object alignment is inadequate; allocate new space
* and copy.
*/
- if (no_move)
- return (NULL);
- usize = sa2u(size + extra, alignment);
- if (usize == 0)
- return (NULL);
- ret = ipallocx(usize, alignment, zero, try_tcache_alloc, arena);
- if (ret == NULL) {
- if (extra == 0)
- return (NULL);
- /* Try again, without extra this time. */
- usize = sa2u(size, alignment);
- if (usize == 0)
- return (NULL);
- ret = ipallocx(usize, alignment, zero, try_tcache_alloc,
- arena);
- if (ret == NULL)
- return (NULL);
- }
- /*
- * Copy at most size bytes (not size+extra), since the caller
- * has no expectation that the extra bytes will be reliably
- * preserved.
- */
- copysize = (size < oldsize) ? size : oldsize;
- memcpy(ret, ptr, copysize);
- iqallocx(ptr, try_tcache_dalloc);
- return (ret);
+ return (iralloct_realign(ptr, oldsize, size, extra, alignment,
+ zero, try_tcache_alloc, try_tcache_dalloc, arena));
}
- if (no_move) {
- if (size <= arena_maxclass) {
- return (arena_ralloc_no_move(ptr, oldsize, size,
- extra, zero));
- } else {
- return (huge_ralloc_no_move(ptr, oldsize, size,
- extra));
- }
+ if (size + extra <= arena_maxclass) {
+ return (arena_ralloc(arena, ptr, oldsize, size, extra,
+ alignment, zero, try_tcache_alloc,
+ try_tcache_dalloc));
} else {
- if (size + extra <= arena_maxclass) {
- return (arena_ralloc(arena, ptr, oldsize, size, extra,
- alignment, zero, try_tcache_alloc,
- try_tcache_dalloc));
- } else {
- return (huge_ralloc(ptr, oldsize, size, extra,
- alignment, zero, try_tcache_dalloc));
- }
+ return (huge_ralloc(ptr, oldsize, size, extra,
+ alignment, zero, try_tcache_dalloc));
}
}
JEMALLOC_ALWAYS_INLINE void *
-iralloc(void *ptr, size_t size, size_t extra, size_t alignment, bool zero,
- bool no_move)
+iralloc(void *ptr, size_t size, size_t extra, size_t alignment, bool zero)
{
- return (irallocx(ptr, size, extra, alignment, zero, no_move, true, true,
- NULL));
+ return (iralloct(ptr, size, extra, alignment, zero, true, true, NULL));
+}
+
+JEMALLOC_ALWAYS_INLINE bool
+ixalloc(void *ptr, size_t size, size_t extra, size_t alignment, bool zero)
+{
+ size_t oldsize;
+
+ assert(ptr != NULL);
+ assert(size != 0);
+
+ oldsize = isalloc(ptr, config_prof);
+ if (alignment != 0 && ((uintptr_t)ptr & ((uintptr_t)alignment-1))
+ != 0) {
+ /* Existing object alignment is inadequate. */
+ return (true);
+ }
+
+ if (size <= arena_maxclass)
+ return (arena_ralloc_no_move(ptr, oldsize, size, extra, zero));
+ else
+ return (huge_ralloc_no_move(ptr, oldsize, size, extra));
}
malloc_tsd_externs(thread_allocated, thread_allocated_t)
diff --git a/dep/jemalloc/include/jemalloc/internal/private_namespace.h b/dep/jemalloc/include/jemalloc/internal/private_namespace.h
index 65de3163fd3..a99bf7293ac 100644
--- a/dep/jemalloc/include/jemalloc/internal/private_namespace.h
+++ b/dep/jemalloc/include/jemalloc/internal/private_namespace.h
@@ -8,6 +8,7 @@
#define arena_dalloc JEMALLOC_N(arena_dalloc)
#define arena_dalloc_bin JEMALLOC_N(arena_dalloc_bin)
#define arena_dalloc_bin_locked JEMALLOC_N(arena_dalloc_bin_locked)
+#define arena_dalloc_junk_large JEMALLOC_N(arena_dalloc_junk_large)
#define arena_dalloc_junk_small JEMALLOC_N(arena_dalloc_junk_small)
#define arena_dalloc_large JEMALLOC_N(arena_dalloc_large)
#define arena_dalloc_large_locked JEMALLOC_N(arena_dalloc_large_locked)
@@ -33,6 +34,8 @@
#define arena_mapbits_unzeroed_get JEMALLOC_N(arena_mapbits_unzeroed_get)
#define arena_mapbits_unzeroed_set JEMALLOC_N(arena_mapbits_unzeroed_set)
#define arena_mapbitsp_get JEMALLOC_N(arena_mapbitsp_get)
+#define arena_mapbitsp_read JEMALLOC_N(arena_mapbitsp_read)
+#define arena_mapbitsp_write JEMALLOC_N(arena_mapbitsp_write)
#define arena_mapp_get JEMALLOC_N(arena_mapp_get)
#define arena_maxclass JEMALLOC_N(arena_maxclass)
#define arena_new JEMALLOC_N(arena_new)
@@ -48,8 +51,11 @@
#define arena_prof_promoted JEMALLOC_N(arena_prof_promoted)
#define arena_ptr_small_binind_get JEMALLOC_N(arena_ptr_small_binind_get)
#define arena_purge_all JEMALLOC_N(arena_purge_all)
+#define arena_quarantine_junk_small JEMALLOC_N(arena_quarantine_junk_small)
#define arena_ralloc JEMALLOC_N(arena_ralloc)
+#define arena_ralloc_junk_large JEMALLOC_N(arena_ralloc_junk_large)
#define arena_ralloc_no_move JEMALLOC_N(arena_ralloc_no_move)
+#define arena_redzone_corruption JEMALLOC_N(arena_redzone_corruption)
#define arena_run_regind JEMALLOC_N(arena_run_regind)
#define arena_salloc JEMALLOC_N(arena_salloc)
#define arena_stats_merge JEMALLOC_N(arena_stats_merge)
@@ -66,6 +72,7 @@
#define arenas_tsd_cleanup_wrapper JEMALLOC_N(arenas_tsd_cleanup_wrapper)
#define arenas_tsd_get JEMALLOC_N(arenas_tsd_get)
#define arenas_tsd_get_wrapper JEMALLOC_N(arenas_tsd_get_wrapper)
+#define arenas_tsd_init_head JEMALLOC_N(arenas_tsd_init_head)
#define arenas_tsd_set JEMALLOC_N(arenas_tsd_set)
#define atomic_add_u JEMALLOC_N(atomic_add_u)
#define atomic_add_uint32 JEMALLOC_N(atomic_add_uint32)
@@ -189,6 +196,7 @@
#define huge_allocated JEMALLOC_N(huge_allocated)
#define huge_boot JEMALLOC_N(huge_boot)
#define huge_dalloc JEMALLOC_N(huge_dalloc)
+#define huge_dalloc_junk JEMALLOC_N(huge_dalloc_junk)
#define huge_malloc JEMALLOC_N(huge_malloc)
#define huge_mtx JEMALLOC_N(huge_mtx)
#define huge_ndalloc JEMALLOC_N(huge_ndalloc)
@@ -204,20 +212,22 @@
#define huge_salloc JEMALLOC_N(huge_salloc)
#define iallocm JEMALLOC_N(iallocm)
#define icalloc JEMALLOC_N(icalloc)
-#define icallocx JEMALLOC_N(icallocx)
+#define icalloct JEMALLOC_N(icalloct)
#define idalloc JEMALLOC_N(idalloc)
-#define idallocx JEMALLOC_N(idallocx)
+#define idalloct JEMALLOC_N(idalloct)
#define imalloc JEMALLOC_N(imalloc)
-#define imallocx JEMALLOC_N(imallocx)
+#define imalloct JEMALLOC_N(imalloct)
#define ipalloc JEMALLOC_N(ipalloc)
-#define ipallocx JEMALLOC_N(ipallocx)
+#define ipalloct JEMALLOC_N(ipalloct)
#define iqalloc JEMALLOC_N(iqalloc)
-#define iqallocx JEMALLOC_N(iqallocx)
+#define iqalloct JEMALLOC_N(iqalloct)
#define iralloc JEMALLOC_N(iralloc)
-#define irallocx JEMALLOC_N(irallocx)
+#define iralloct JEMALLOC_N(iralloct)
+#define iralloct_realign JEMALLOC_N(iralloct_realign)
#define isalloc JEMALLOC_N(isalloc)
#define isthreaded JEMALLOC_N(isthreaded)
#define ivsalloc JEMALLOC_N(ivsalloc)
+#define ixalloc JEMALLOC_N(ixalloc)
#define jemalloc_postfork_child JEMALLOC_N(jemalloc_postfork_child)
#define jemalloc_postfork_parent JEMALLOC_N(jemalloc_postfork_parent)
#define jemalloc_prefork JEMALLOC_N(jemalloc_prefork)
@@ -248,6 +258,7 @@
#define ncpus JEMALLOC_N(ncpus)
#define nhbins JEMALLOC_N(nhbins)
#define opt_abort JEMALLOC_N(opt_abort)
+#define opt_dss JEMALLOC_N(opt_dss)
#define opt_junk JEMALLOC_N(opt_junk)
#define opt_lg_chunk JEMALLOC_N(opt_lg_chunk)
#define opt_lg_dirty_mult JEMALLOC_N(opt_lg_dirty_mult)
@@ -277,8 +288,10 @@
#define prof_boot0 JEMALLOC_N(prof_boot0)
#define prof_boot1 JEMALLOC_N(prof_boot1)
#define prof_boot2 JEMALLOC_N(prof_boot2)
+#define prof_bt_count JEMALLOC_N(prof_bt_count)
#define prof_ctx_get JEMALLOC_N(prof_ctx_get)
#define prof_ctx_set JEMALLOC_N(prof_ctx_set)
+#define prof_dump_open JEMALLOC_N(prof_dump_open)
#define prof_free JEMALLOC_N(prof_free)
#define prof_gdump JEMALLOC_N(prof_gdump)
#define prof_idump JEMALLOC_N(prof_idump)
@@ -304,6 +317,7 @@
#define prof_tdata_tsd_cleanup_wrapper JEMALLOC_N(prof_tdata_tsd_cleanup_wrapper)
#define prof_tdata_tsd_get JEMALLOC_N(prof_tdata_tsd_get)
#define prof_tdata_tsd_get_wrapper JEMALLOC_N(prof_tdata_tsd_get_wrapper)
+#define prof_tdata_tsd_init_head JEMALLOC_N(prof_tdata_tsd_init_head)
#define prof_tdata_tsd_set JEMALLOC_N(prof_tdata_tsd_set)
#define quarantine JEMALLOC_N(quarantine)
#define quarantine_alloc_hook JEMALLOC_N(quarantine_alloc_hook)
@@ -317,8 +331,10 @@
#define quarantine_tsd_cleanup_wrapper JEMALLOC_N(quarantine_tsd_cleanup_wrapper)
#define quarantine_tsd_get JEMALLOC_N(quarantine_tsd_get)
#define quarantine_tsd_get_wrapper JEMALLOC_N(quarantine_tsd_get_wrapper)
+#define quarantine_tsd_init_head JEMALLOC_N(quarantine_tsd_init_head)
#define quarantine_tsd_set JEMALLOC_N(quarantine_tsd_set)
#define register_zone JEMALLOC_N(register_zone)
+#define rtree_delete JEMALLOC_N(rtree_delete)
#define rtree_get JEMALLOC_N(rtree_get)
#define rtree_get_locked JEMALLOC_N(rtree_get_locked)
#define rtree_new JEMALLOC_N(rtree_new)
@@ -329,6 +345,7 @@
#define s2u JEMALLOC_N(s2u)
#define sa2u JEMALLOC_N(sa2u)
#define set_errno JEMALLOC_N(set_errno)
+#define small_size2bin JEMALLOC_N(small_size2bin)
#define stats_cactive JEMALLOC_N(stats_cactive)
#define stats_cactive_add JEMALLOC_N(stats_cactive_add)
#define stats_cactive_get JEMALLOC_N(stats_cactive_get)
@@ -361,6 +378,7 @@
#define tcache_enabled_tsd_cleanup_wrapper JEMALLOC_N(tcache_enabled_tsd_cleanup_wrapper)
#define tcache_enabled_tsd_get JEMALLOC_N(tcache_enabled_tsd_get)
#define tcache_enabled_tsd_get_wrapper JEMALLOC_N(tcache_enabled_tsd_get_wrapper)
+#define tcache_enabled_tsd_init_head JEMALLOC_N(tcache_enabled_tsd_init_head)
#define tcache_enabled_tsd_set JEMALLOC_N(tcache_enabled_tsd_set)
#define tcache_event JEMALLOC_N(tcache_event)
#define tcache_event_hard JEMALLOC_N(tcache_event_hard)
@@ -377,6 +395,7 @@
#define tcache_tsd_cleanup_wrapper JEMALLOC_N(tcache_tsd_cleanup_wrapper)
#define tcache_tsd_get JEMALLOC_N(tcache_tsd_get)
#define tcache_tsd_get_wrapper JEMALLOC_N(tcache_tsd_get_wrapper)
+#define tcache_tsd_init_head JEMALLOC_N(tcache_tsd_init_head)
#define tcache_tsd_set JEMALLOC_N(tcache_tsd_set)
#define thread_allocated_booted JEMALLOC_N(thread_allocated_booted)
#define thread_allocated_initialized JEMALLOC_N(thread_allocated_initialized)
@@ -386,5 +405,8 @@
#define thread_allocated_tsd_cleanup_wrapper JEMALLOC_N(thread_allocated_tsd_cleanup_wrapper)
#define thread_allocated_tsd_get JEMALLOC_N(thread_allocated_tsd_get)
#define thread_allocated_tsd_get_wrapper JEMALLOC_N(thread_allocated_tsd_get_wrapper)
+#define thread_allocated_tsd_init_head JEMALLOC_N(thread_allocated_tsd_init_head)
#define thread_allocated_tsd_set JEMALLOC_N(thread_allocated_tsd_set)
+#define tsd_init_check_recursion JEMALLOC_N(tsd_init_check_recursion)
+#define tsd_init_finish JEMALLOC_N(tsd_init_finish)
#define u2rz JEMALLOC_N(u2rz)
diff --git a/dep/jemalloc/include/jemalloc/internal/prng.h b/dep/jemalloc/include/jemalloc/internal/prng.h
index 83a5462b4dd..7b2b06512ff 100644
--- a/dep/jemalloc/include/jemalloc/internal/prng.h
+++ b/dep/jemalloc/include/jemalloc/internal/prng.h
@@ -25,7 +25,7 @@
* uint32_t state : Seed value.
* const uint32_t a, c : See above discussion.
*/
-#define prng32(r, lg_range, state, a, c) do { \
+#define prng32(r, lg_range, state, a, c) do { \
assert(lg_range > 0); \
assert(lg_range <= 32); \
\
@@ -35,7 +35,7 @@
} while (false)
/* Same as prng32(), but 64 bits of pseudo-randomness, using uint64_t. */
-#define prng64(r, lg_range, state, a, c) do { \
+#define prng64(r, lg_range, state, a, c) do { \
assert(lg_range > 0); \
assert(lg_range <= 64); \
\
diff --git a/dep/jemalloc/include/jemalloc/internal/prof.h b/dep/jemalloc/include/jemalloc/internal/prof.h
index 119a5b1bcb7..6f162d21e84 100644
--- a/dep/jemalloc/include/jemalloc/internal/prof.h
+++ b/dep/jemalloc/include/jemalloc/internal/prof.h
@@ -8,7 +8,11 @@ typedef struct prof_ctx_s prof_ctx_t;
typedef struct prof_tdata_s prof_tdata_t;
/* Option defaults. */
-#define PROF_PREFIX_DEFAULT "jeprof"
+#ifdef JEMALLOC_PROF
+# define PROF_PREFIX_DEFAULT "jeprof"
+#else
+# define PROF_PREFIX_DEFAULT ""
+#endif
#define LG_PROF_SAMPLE_DEFAULT 19
#define LG_PROF_INTERVAL_DEFAULT -1
@@ -129,6 +133,7 @@ struct prof_ctx_s {
* limbo due to one of:
* - Initializing per thread counters associated with this ctx.
* - Preparing to destroy this ctx.
+ * - Dumping a heap profile that includes this ctx.
* nlimbo must be 1 (single destroyer) in order to safely destroy the
* ctx.
*/
@@ -145,7 +150,11 @@ struct prof_ctx_s {
* this context.
*/
ql_head(prof_thr_cnt_t) cnts_ql;
+
+ /* Linkage for list of contexts to be dumped. */
+ ql_elm(prof_ctx_t) dump_link;
};
+typedef ql_head(prof_ctx_t) prof_ctx_list_t;
struct prof_tdata_s {
/*
@@ -195,7 +204,12 @@ extern bool opt_prof_gdump; /* High-water memory dumping. */
extern bool opt_prof_final; /* Final profile dumping. */
extern bool opt_prof_leak; /* Dump leak summary at exit. */
extern bool opt_prof_accum; /* Report cumulative bytes. */
-extern char opt_prof_prefix[PATH_MAX + 1];
+extern char opt_prof_prefix[
+ /* Minimize memory bloat for non-prof builds. */
+#ifdef JEMALLOC_PROF
+ PATH_MAX +
+#endif
+ 1];
/*
* Profile dump interval, measured in bytes allocated. Each arena triggers a
@@ -215,6 +229,11 @@ extern bool prof_promote;
void bt_init(prof_bt_t *bt, void **vec);
void prof_backtrace(prof_bt_t *bt, unsigned nignore);
prof_thr_cnt_t *prof_lookup(prof_bt_t *bt);
+#ifdef JEMALLOC_JET
+size_t prof_bt_count(void);
+typedef int (prof_dump_open_t)(bool, const char *);
+extern prof_dump_open_t *prof_dump_open;
+#endif
void prof_idump(void);
bool prof_mdump(const char *filename);
void prof_gdump(void);
@@ -289,11 +308,11 @@ malloc_tsd_protos(JEMALLOC_ATTR(unused), prof_tdata, prof_tdata_t *)
prof_tdata_t *prof_tdata_get(bool create);
void prof_sample_threshold_update(prof_tdata_t *prof_tdata);
prof_ctx_t *prof_ctx_get(const void *ptr);
-void prof_ctx_set(const void *ptr, prof_ctx_t *ctx);
+void prof_ctx_set(const void *ptr, size_t usize, prof_ctx_t *ctx);
bool prof_sample_accum_update(size_t size);
-void prof_malloc(const void *ptr, size_t size, prof_thr_cnt_t *cnt);
-void prof_realloc(const void *ptr, size_t size, prof_thr_cnt_t *cnt,
- size_t old_size, prof_ctx_t *old_ctx);
+void prof_malloc(const void *ptr, size_t usize, prof_thr_cnt_t *cnt);
+void prof_realloc(const void *ptr, size_t usize, prof_thr_cnt_t *cnt,
+ size_t old_usize, prof_ctx_t *old_ctx);
void prof_free(const void *ptr, size_t size);
#endif
@@ -320,6 +339,20 @@ prof_tdata_get(bool create)
JEMALLOC_INLINE void
prof_sample_threshold_update(prof_tdata_t *prof_tdata)
{
+ /*
+ * The body of this function is compiled out unless heap profiling is
+ * enabled, so that it is possible to compile jemalloc with floating
+ * point support completely disabled. Avoiding floating point code is
+ * important on memory-constrained systems, but it also enables a
+ * workaround for versions of glibc that don't properly save/restore
+ * floating point registers during dynamic lazy symbol loading (which
+ * internally calls into whatever malloc implementation happens to be
+ * integrated into the application). Note that some compilers (e.g.
+ * gcc 4.8) may use floating point registers for fast memory moves, so
+ * jemalloc must be compiled with such optimizations disabled (e.g.
+ * -mno-sse) in order for the workaround to be complete.
+ */
+#ifdef JEMALLOC_PROF
uint64_t r;
double u;
@@ -341,7 +374,7 @@ prof_sample_threshold_update(prof_tdata_t *prof_tdata)
* Luc Devroye
* Springer-Verlag, New York, 1986
* pp 500
- * (http://cg.scs.carleton.ca/~luc/rnbookindex.html)
+ * (http://luc.devroye.org/rnbookindex.html)
*/
prng64(r, 53, prof_tdata->prng_state,
UINT64_C(6364136223846793005), UINT64_C(1442695040888963407));
@@ -349,6 +382,7 @@ prof_sample_threshold_update(prof_tdata_t *prof_tdata)
prof_tdata->threshold = (uint64_t)(log(u) /
log(1.0 - (1.0 / (double)((uint64_t)1U << opt_lg_prof_sample))))
+ (uint64_t)1U;
+#endif
}
JEMALLOC_INLINE prof_ctx_t *
@@ -371,7 +405,7 @@ prof_ctx_get(const void *ptr)
}
JEMALLOC_INLINE void
-prof_ctx_set(const void *ptr, prof_ctx_t *ctx)
+prof_ctx_set(const void *ptr, size_t usize, prof_ctx_t *ctx)
{
arena_chunk_t *chunk;
@@ -381,7 +415,7 @@ prof_ctx_set(const void *ptr, prof_ctx_t *ctx)
chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr);
if (chunk != ptr) {
/* Region. */
- arena_prof_ctx_set(ptr, ctx);
+ arena_prof_ctx_set(ptr, usize, ctx);
} else
huge_prof_ctx_set(ptr, ctx);
}
@@ -416,20 +450,20 @@ prof_sample_accum_update(size_t size)
}
JEMALLOC_INLINE void
-prof_malloc(const void *ptr, size_t size, prof_thr_cnt_t *cnt)
+prof_malloc(const void *ptr, size_t usize, prof_thr_cnt_t *cnt)
{
cassert(config_prof);
assert(ptr != NULL);
- assert(size == isalloc(ptr, true));
+ assert(usize == isalloc(ptr, true));
if (opt_lg_prof_sample != 0) {
- if (prof_sample_accum_update(size)) {
+ if (prof_sample_accum_update(usize)) {
/*
* Don't sample. For malloc()-like allocation, it is
* always possible to tell in advance how large an
* object's usable size will be, so there should never
- * be a difference between the size passed to
+ * be a difference between the usize passed to
* PROF_ALLOC_PREP() and prof_malloc().
*/
assert((uintptr_t)cnt == (uintptr_t)1U);
@@ -437,17 +471,17 @@ prof_malloc(const void *ptr, size_t size, prof_thr_cnt_t *cnt)
}
if ((uintptr_t)cnt > (uintptr_t)1U) {
- prof_ctx_set(ptr, cnt->ctx);
+ prof_ctx_set(ptr, usize, cnt->ctx);
cnt->epoch++;
/*********/
mb_write();
/*********/
cnt->cnts.curobjs++;
- cnt->cnts.curbytes += size;
+ cnt->cnts.curbytes += usize;
if (opt_prof_accum) {
cnt->cnts.accumobjs++;
- cnt->cnts.accumbytes += size;
+ cnt->cnts.accumbytes += usize;
}
/*********/
mb_write();
@@ -457,12 +491,12 @@ prof_malloc(const void *ptr, size_t size, prof_thr_cnt_t *cnt)
mb_write();
/*********/
} else
- prof_ctx_set(ptr, (prof_ctx_t *)(uintptr_t)1U);
+ prof_ctx_set(ptr, usize, (prof_ctx_t *)(uintptr_t)1U);
}
JEMALLOC_INLINE void
-prof_realloc(const void *ptr, size_t size, prof_thr_cnt_t *cnt,
- size_t old_size, prof_ctx_t *old_ctx)
+prof_realloc(const void *ptr, size_t usize, prof_thr_cnt_t *cnt,
+ size_t old_usize, prof_ctx_t *old_ctx)
{
prof_thr_cnt_t *told_cnt;
@@ -470,15 +504,15 @@ prof_realloc(const void *ptr, size_t size, prof_thr_cnt_t *cnt,
assert(ptr != NULL || (uintptr_t)cnt <= (uintptr_t)1U);
if (ptr != NULL) {
- assert(size == isalloc(ptr, true));
+ assert(usize == isalloc(ptr, true));
if (opt_lg_prof_sample != 0) {
- if (prof_sample_accum_update(size)) {
+ if (prof_sample_accum_update(usize)) {
/*
- * Don't sample. The size passed to
+ * Don't sample. The usize passed to
* PROF_ALLOC_PREP() was larger than what
* actually got allocated, so a backtrace was
* captured for this allocation, even though
- * its actual size was insufficient to cross
+ * its actual usize was insufficient to cross
* the sample threshold.
*/
cnt = (prof_thr_cnt_t *)(uintptr_t)1U;
@@ -495,7 +529,7 @@ prof_realloc(const void *ptr, size_t size, prof_thr_cnt_t *cnt,
*/
malloc_mutex_lock(old_ctx->lock);
old_ctx->cnt_merged.curobjs--;
- old_ctx->cnt_merged.curbytes -= old_size;
+ old_ctx->cnt_merged.curbytes -= old_usize;
malloc_mutex_unlock(old_ctx->lock);
told_cnt = (prof_thr_cnt_t *)(uintptr_t)1U;
}
@@ -505,23 +539,23 @@ prof_realloc(const void *ptr, size_t size, prof_thr_cnt_t *cnt,
if ((uintptr_t)told_cnt > (uintptr_t)1U)
told_cnt->epoch++;
if ((uintptr_t)cnt > (uintptr_t)1U) {
- prof_ctx_set(ptr, cnt->ctx);
+ prof_ctx_set(ptr, usize, cnt->ctx);
cnt->epoch++;
} else if (ptr != NULL)
- prof_ctx_set(ptr, (prof_ctx_t *)(uintptr_t)1U);
+ prof_ctx_set(ptr, usize, (prof_ctx_t *)(uintptr_t)1U);
/*********/
mb_write();
/*********/
if ((uintptr_t)told_cnt > (uintptr_t)1U) {
told_cnt->cnts.curobjs--;
- told_cnt->cnts.curbytes -= old_size;
+ told_cnt->cnts.curbytes -= old_usize;
}
if ((uintptr_t)cnt > (uintptr_t)1U) {
cnt->cnts.curobjs++;
- cnt->cnts.curbytes += size;
+ cnt->cnts.curbytes += usize;
if (opt_prof_accum) {
cnt->cnts.accumobjs++;
- cnt->cnts.accumbytes += size;
+ cnt->cnts.accumbytes += usize;
}
}
/*********/
diff --git a/dep/jemalloc/include/jemalloc/internal/ql.h b/dep/jemalloc/include/jemalloc/internal/ql.h
index a9ed2393f0c..f70c5f6f391 100644
--- a/dep/jemalloc/include/jemalloc/internal/ql.h
+++ b/dep/jemalloc/include/jemalloc/internal/ql.h
@@ -1,61 +1,61 @@
/*
* List definitions.
*/
-#define ql_head(a_type) \
+#define ql_head(a_type) \
struct { \
a_type *qlh_first; \
}
-#define ql_head_initializer(a_head) {NULL}
+#define ql_head_initializer(a_head) {NULL}
-#define ql_elm(a_type) qr(a_type)
+#define ql_elm(a_type) qr(a_type)
/* List functions. */
-#define ql_new(a_head) do { \
+#define ql_new(a_head) do { \
(a_head)->qlh_first = NULL; \
} while (0)
-#define ql_elm_new(a_elm, a_field) qr_new((a_elm), a_field)
+#define ql_elm_new(a_elm, a_field) qr_new((a_elm), a_field)
-#define ql_first(a_head) ((a_head)->qlh_first)
+#define ql_first(a_head) ((a_head)->qlh_first)
-#define ql_last(a_head, a_field) \
+#define ql_last(a_head, a_field) \
((ql_first(a_head) != NULL) \
? qr_prev(ql_first(a_head), a_field) : NULL)
-#define ql_next(a_head, a_elm, a_field) \
+#define ql_next(a_head, a_elm, a_field) \
((ql_last(a_head, a_field) != (a_elm)) \
? qr_next((a_elm), a_field) : NULL)
-#define ql_prev(a_head, a_elm, a_field) \
+#define ql_prev(a_head, a_elm, a_field) \
((ql_first(a_head) != (a_elm)) ? qr_prev((a_elm), a_field) \
: NULL)
-#define ql_before_insert(a_head, a_qlelm, a_elm, a_field) do { \
+#define ql_before_insert(a_head, a_qlelm, a_elm, a_field) do { \
qr_before_insert((a_qlelm), (a_elm), a_field); \
if (ql_first(a_head) == (a_qlelm)) { \
ql_first(a_head) = (a_elm); \
} \
} while (0)
-#define ql_after_insert(a_qlelm, a_elm, a_field) \
+#define ql_after_insert(a_qlelm, a_elm, a_field) \
qr_after_insert((a_qlelm), (a_elm), a_field)
-#define ql_head_insert(a_head, a_elm, a_field) do { \
+#define ql_head_insert(a_head, a_elm, a_field) do { \
if (ql_first(a_head) != NULL) { \
qr_before_insert(ql_first(a_head), (a_elm), a_field); \
} \
ql_first(a_head) = (a_elm); \
} while (0)
-#define ql_tail_insert(a_head, a_elm, a_field) do { \
+#define ql_tail_insert(a_head, a_elm, a_field) do { \
if (ql_first(a_head) != NULL) { \
qr_before_insert(ql_first(a_head), (a_elm), a_field); \
} \
ql_first(a_head) = qr_next((a_elm), a_field); \
} while (0)
-#define ql_remove(a_head, a_elm, a_field) do { \
+#define ql_remove(a_head, a_elm, a_field) do { \
if (ql_first(a_head) == (a_elm)) { \
ql_first(a_head) = qr_next(ql_first(a_head), a_field); \
} \
@@ -66,18 +66,18 @@ struct { \
} \
} while (0)
-#define ql_head_remove(a_head, a_type, a_field) do { \
+#define ql_head_remove(a_head, a_type, a_field) do { \
a_type *t = ql_first(a_head); \
ql_remove((a_head), t, a_field); \
} while (0)
-#define ql_tail_remove(a_head, a_type, a_field) do { \
+#define ql_tail_remove(a_head, a_type, a_field) do { \
a_type *t = ql_last(a_head, a_field); \
ql_remove((a_head), t, a_field); \
} while (0)
-#define ql_foreach(a_var, a_head, a_field) \
+#define ql_foreach(a_var, a_head, a_field) \
qr_foreach((a_var), ql_first(a_head), a_field)
-#define ql_reverse_foreach(a_var, a_head, a_field) \
+#define ql_reverse_foreach(a_var, a_head, a_field) \
qr_reverse_foreach((a_var), ql_first(a_head), a_field)
diff --git a/dep/jemalloc/include/jemalloc/internal/qr.h b/dep/jemalloc/include/jemalloc/internal/qr.h
index fe22352fedd..602944b9b4f 100644
--- a/dep/jemalloc/include/jemalloc/internal/qr.h
+++ b/dep/jemalloc/include/jemalloc/internal/qr.h
@@ -1,28 +1,28 @@
/* Ring definitions. */
-#define qr(a_type) \
+#define qr(a_type) \
struct { \
a_type *qre_next; \
a_type *qre_prev; \
}
/* Ring functions. */
-#define qr_new(a_qr, a_field) do { \
+#define qr_new(a_qr, a_field) do { \
(a_qr)->a_field.qre_next = (a_qr); \
(a_qr)->a_field.qre_prev = (a_qr); \
} while (0)
-#define qr_next(a_qr, a_field) ((a_qr)->a_field.qre_next)
+#define qr_next(a_qr, a_field) ((a_qr)->a_field.qre_next)
-#define qr_prev(a_qr, a_field) ((a_qr)->a_field.qre_prev)
+#define qr_prev(a_qr, a_field) ((a_qr)->a_field.qre_prev)
-#define qr_before_insert(a_qrelm, a_qr, a_field) do { \
+#define qr_before_insert(a_qrelm, a_qr, a_field) do { \
(a_qr)->a_field.qre_prev = (a_qrelm)->a_field.qre_prev; \
(a_qr)->a_field.qre_next = (a_qrelm); \
(a_qr)->a_field.qre_prev->a_field.qre_next = (a_qr); \
(a_qrelm)->a_field.qre_prev = (a_qr); \
} while (0)
-#define qr_after_insert(a_qrelm, a_qr, a_field) \
+#define qr_after_insert(a_qrelm, a_qr, a_field) \
do \
{ \
(a_qr)->a_field.qre_next = (a_qrelm)->a_field.qre_next; \
@@ -31,7 +31,7 @@ struct { \
(a_qrelm)->a_field.qre_next = (a_qr); \
} while (0)
-#define qr_meld(a_qr_a, a_qr_b, a_field) do { \
+#define qr_meld(a_qr_a, a_qr_b, a_field) do { \
void *t; \
(a_qr_a)->a_field.qre_prev->a_field.qre_next = (a_qr_b); \
(a_qr_b)->a_field.qre_prev->a_field.qre_next = (a_qr_a); \
@@ -42,10 +42,10 @@ struct { \
/* qr_meld() and qr_split() are functionally equivalent, so there's no need to
* have two copies of the code. */
-#define qr_split(a_qr_a, a_qr_b, a_field) \
+#define qr_split(a_qr_a, a_qr_b, a_field) \
qr_meld((a_qr_a), (a_qr_b), a_field)
-#define qr_remove(a_qr, a_field) do { \
+#define qr_remove(a_qr, a_field) do { \
(a_qr)->a_field.qre_prev->a_field.qre_next \
= (a_qr)->a_field.qre_next; \
(a_qr)->a_field.qre_next->a_field.qre_prev \
@@ -54,13 +54,13 @@ struct { \
(a_qr)->a_field.qre_prev = (a_qr); \
} while (0)
-#define qr_foreach(var, a_qr, a_field) \
+#define qr_foreach(var, a_qr, a_field) \
for ((var) = (a_qr); \
(var) != NULL; \
(var) = (((var)->a_field.qre_next != (a_qr)) \
? (var)->a_field.qre_next : NULL))
-#define qr_reverse_foreach(var, a_qr, a_field) \
+#define qr_reverse_foreach(var, a_qr, a_field) \
for ((var) = ((a_qr) != NULL) ? qr_prev(a_qr, a_field) : NULL; \
(var) != NULL; \
(var) = (((var) != (a_qr)) \
diff --git a/dep/jemalloc/include/jemalloc/internal/rb.h b/dep/jemalloc/include/jemalloc/internal/rb.h
index 7b675f09051..423802eb2dc 100644
--- a/dep/jemalloc/include/jemalloc/internal/rb.h
+++ b/dep/jemalloc/include/jemalloc/internal/rb.h
@@ -22,10 +22,6 @@
#ifndef RB_H_
#define RB_H_
-#if 0
-__FBSDID("$FreeBSD: head/lib/libc/stdlib/rb.h 204493 2010-02-28 22:57:13Z jasone $");
-#endif
-
#ifdef RB_COMPACT
/* Node structure. */
#define rb_node(a_type) \
diff --git a/dep/jemalloc/include/jemalloc/internal/rtree.h b/dep/jemalloc/include/jemalloc/internal/rtree.h
index 9bd98548cfe..bc74769f50e 100644
--- a/dep/jemalloc/include/jemalloc/internal/rtree.h
+++ b/dep/jemalloc/include/jemalloc/internal/rtree.h
@@ -14,17 +14,18 @@ typedef struct rtree_s rtree_t;
* Size of each radix tree node (must be a power of 2). This impacts tree
* depth.
*/
-#if (LG_SIZEOF_PTR == 2)
-# define RTREE_NODESIZE (1U << 14)
-#else
-# define RTREE_NODESIZE CACHELINE
-#endif
+#define RTREE_NODESIZE (1U << 16)
+
+typedef void *(rtree_alloc_t)(size_t);
+typedef void (rtree_dalloc_t)(void *);
#endif /* JEMALLOC_H_TYPES */
/******************************************************************************/
#ifdef JEMALLOC_H_STRUCTS
struct rtree_s {
+ rtree_alloc_t *alloc;
+ rtree_dalloc_t *dalloc;
malloc_mutex_t mutex;
void **root;
unsigned height;
@@ -35,7 +36,8 @@ struct rtree_s {
/******************************************************************************/
#ifdef JEMALLOC_H_EXTERNS
-rtree_t *rtree_new(unsigned bits);
+rtree_t *rtree_new(unsigned bits, rtree_alloc_t *alloc, rtree_dalloc_t *dalloc);
+void rtree_delete(rtree_t *rtree);
void rtree_prefork(rtree_t *rtree);
void rtree_postfork_parent(rtree_t *rtree);
void rtree_postfork_child(rtree_t *rtree);
@@ -45,20 +47,20 @@ void rtree_postfork_child(rtree_t *rtree);
#ifdef JEMALLOC_H_INLINES
#ifndef JEMALLOC_ENABLE_INLINE
-#ifndef JEMALLOC_DEBUG
-void *rtree_get_locked(rtree_t *rtree, uintptr_t key);
+#ifdef JEMALLOC_DEBUG
+uint8_t rtree_get_locked(rtree_t *rtree, uintptr_t key);
#endif
-void *rtree_get(rtree_t *rtree, uintptr_t key);
-bool rtree_set(rtree_t *rtree, uintptr_t key, void *val);
+uint8_t rtree_get(rtree_t *rtree, uintptr_t key);
+bool rtree_set(rtree_t *rtree, uintptr_t key, uint8_t val);
#endif
#if (defined(JEMALLOC_ENABLE_INLINE) || defined(JEMALLOC_RTREE_C_))
#define RTREE_GET_GENERATE(f) \
/* The least significant bits of the key are ignored. */ \
-JEMALLOC_INLINE void * \
+JEMALLOC_INLINE uint8_t \
f(rtree_t *rtree, uintptr_t key) \
{ \
- void *ret; \
+ uint8_t ret; \
uintptr_t subkey; \
unsigned i, lshift, height, bits; \
void **node, **child; \
@@ -68,12 +70,12 @@ f(rtree_t *rtree, uintptr_t key) \
i < height - 1; \
i++, lshift += bits, node = child) { \
bits = rtree->level2bits[i]; \
- subkey = (key << lshift) >> ((ZU(1) << (LG_SIZEOF_PTR + \
+ subkey = (key << lshift) >> ((ZU(1) << (LG_SIZEOF_PTR + \
3)) - bits); \
child = (void**)node[subkey]; \
if (child == NULL) { \
RTREE_UNLOCK(&rtree->mutex); \
- return (NULL); \
+ return (0); \
} \
} \
\
@@ -84,7 +86,10 @@ f(rtree_t *rtree, uintptr_t key) \
bits = rtree->level2bits[i]; \
subkey = (key << lshift) >> ((ZU(1) << (LG_SIZEOF_PTR+3)) - \
bits); \
- ret = node[subkey]; \
+ { \
+ uint8_t *leaf = (uint8_t *)node; \
+ ret = leaf[subkey]; \
+ } \
RTREE_UNLOCK(&rtree->mutex); \
\
RTREE_GET_VALIDATE \
@@ -123,7 +128,7 @@ RTREE_GET_GENERATE(rtree_get)
#undef RTREE_GET_VALIDATE
JEMALLOC_INLINE bool
-rtree_set(rtree_t *rtree, uintptr_t key, void *val)
+rtree_set(rtree_t *rtree, uintptr_t key, uint8_t val)
{
uintptr_t subkey;
unsigned i, lshift, height, bits;
@@ -138,14 +143,14 @@ rtree_set(rtree_t *rtree, uintptr_t key, void *val)
bits);
child = (void**)node[subkey];
if (child == NULL) {
- child = (void**)base_alloc(sizeof(void *) <<
- rtree->level2bits[i+1]);
+ size_t size = ((i + 1 < height - 1) ? sizeof(void *)
+ : (sizeof(uint8_t))) << rtree->level2bits[i+1];
+ child = (void**)rtree->alloc(size);
if (child == NULL) {
malloc_mutex_unlock(&rtree->mutex);
return (true);
}
- memset(child, 0, sizeof(void *) <<
- rtree->level2bits[i+1]);
+ memset(child, 0, size);
node[subkey] = child;
}
}
@@ -153,7 +158,10 @@ rtree_set(rtree_t *rtree, uintptr_t key, void *val)
/* node is a leaf, so it contains values rather than node pointers. */
bits = rtree->level2bits[i];
subkey = (key << lshift) >> ((ZU(1) << (LG_SIZEOF_PTR+3)) - bits);
- node[subkey] = val;
+ {
+ uint8_t *leaf = (uint8_t *)node;
+ leaf[subkey] = val;
+ }
malloc_mutex_unlock(&rtree->mutex);
return (false);
diff --git a/dep/jemalloc/include/jemalloc/internal/tcache.h b/dep/jemalloc/include/jemalloc/internal/tcache.h
index ba36204ff21..c3d4b58d4dc 100644
--- a/dep/jemalloc/include/jemalloc/internal/tcache.h
+++ b/dep/jemalloc/include/jemalloc/internal/tcache.h
@@ -297,6 +297,7 @@ tcache_alloc_small(tcache_t *tcache, size_t size, bool zero)
binind = SMALL_SIZE2BIN(size);
assert(binind < NBINS);
tbin = &tcache->tbins[binind];
+ size = arena_bin_info[binind].reg_size;
ret = tcache_alloc_easy(tbin);
if (ret == NULL) {
ret = tcache_alloc_small_hard(tcache, tbin, binind);
@@ -313,6 +314,7 @@ tcache_alloc_small(tcache_t *tcache, size_t size, bool zero)
} else if (opt_zero)
memset(ret, 0, size);
}
+ VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
} else {
if (config_fill && opt_junk) {
arena_alloc_junk_small(ret, &arena_bin_info[binind],
@@ -321,7 +323,6 @@ tcache_alloc_small(tcache_t *tcache, size_t size, bool zero)
VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
memset(ret, 0, size);
}
- VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
if (config_stats)
tbin->tstats.nrequests++;
@@ -368,11 +369,11 @@ tcache_alloc_large(tcache_t *tcache, size_t size, bool zero)
else if (opt_zero)
memset(ret, 0, size);
}
+ VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
} else {
VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
memset(ret, 0, size);
}
- VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
if (config_stats)
tbin->tstats.nrequests++;
diff --git a/dep/jemalloc/include/jemalloc/internal/tsd.h b/dep/jemalloc/include/jemalloc/internal/tsd.h
index 0037cf35e70..9fb4a23ec6b 100644
--- a/dep/jemalloc/include/jemalloc/internal/tsd.h
+++ b/dep/jemalloc/include/jemalloc/internal/tsd.h
@@ -6,6 +6,12 @@
typedef bool (*malloc_tsd_cleanup_t)(void);
+#if (!defined(JEMALLOC_MALLOC_THREAD_CLEANUP) && !defined(JEMALLOC_TLS) && \
+ !defined(_WIN32))
+typedef struct tsd_init_block_s tsd_init_block_t;
+typedef struct tsd_init_head_s tsd_init_head_t;
+#endif
+
/*
* TLS/TSD-agnostic macro-based implementation of thread-specific data. There
* are four macros that support (at least) three use cases: file-private,
@@ -75,12 +81,13 @@ extern __thread a_type a_name##_tls; \
extern pthread_key_t a_name##_tsd; \
extern bool a_name##_booted;
#elif (defined(_WIN32))
-#define malloc_tsd_externs(a_name, a_type) \
+#define malloc_tsd_externs(a_name, a_type) \
extern DWORD a_name##_tsd; \
extern bool a_name##_booted;
#else
#define malloc_tsd_externs(a_name, a_type) \
extern pthread_key_t a_name##_tsd; \
+extern tsd_init_head_t a_name##_tsd_init_head; \
extern bool a_name##_booted;
#endif
@@ -105,6 +112,10 @@ a_attr bool a_name##_booted = false;
#else
#define malloc_tsd_data(a_attr, a_name, a_type, a_initializer) \
a_attr pthread_key_t a_name##_tsd; \
+a_attr tsd_init_head_t a_name##_tsd_init_head = { \
+ ql_head_initializer(blocks), \
+ MALLOC_MUTEX_INITIALIZER \
+}; \
a_attr bool a_name##_booted = false;
#endif
@@ -333,8 +344,14 @@ a_name##_tsd_get_wrapper(void) \
pthread_getspecific(a_name##_tsd); \
\
if (wrapper == NULL) { \
+ tsd_init_block_t block; \
+ wrapper = tsd_init_check_recursion( \
+ &a_name##_tsd_init_head, &block); \
+ if (wrapper) \
+ return (wrapper); \
wrapper = (a_name##_tsd_wrapper_t *) \
malloc_tsd_malloc(sizeof(a_name##_tsd_wrapper_t)); \
+ block.data = wrapper; \
if (wrapper == NULL) { \
malloc_write("<jemalloc>: Error allocating" \
" TSD for "#a_name"\n"); \
@@ -350,6 +367,7 @@ a_name##_tsd_get_wrapper(void) \
" TSD for "#a_name"\n"); \
abort(); \
} \
+ tsd_init_finish(&a_name##_tsd_init_head, &block); \
} \
return (wrapper); \
} \
@@ -379,6 +397,19 @@ a_name##_tsd_set(a_type *val) \
/******************************************************************************/
#ifdef JEMALLOC_H_STRUCTS
+#if (!defined(JEMALLOC_MALLOC_THREAD_CLEANUP) && !defined(JEMALLOC_TLS) && \
+ !defined(_WIN32))
+struct tsd_init_block_s {
+ ql_elm(tsd_init_block_t) link;
+ pthread_t thread;
+ void *data;
+};
+struct tsd_init_head_s {
+ ql_head(tsd_init_block_t) blocks;
+ malloc_mutex_t lock;
+};
+#endif
+
#endif /* JEMALLOC_H_STRUCTS */
/******************************************************************************/
#ifdef JEMALLOC_H_EXTERNS
@@ -388,6 +419,12 @@ void malloc_tsd_dalloc(void *wrapper);
void malloc_tsd_no_cleanup(void *);
void malloc_tsd_cleanup_register(bool (*f)(void));
void malloc_tsd_boot(void);
+#if (!defined(JEMALLOC_MALLOC_THREAD_CLEANUP) && !defined(JEMALLOC_TLS) && \
+ !defined(_WIN32))
+void *tsd_init_check_recursion(tsd_init_head_t *head,
+ tsd_init_block_t *block);
+void tsd_init_finish(tsd_init_head_t *head, tsd_init_block_t *block);
+#endif
#endif /* JEMALLOC_H_EXTERNS */
/******************************************************************************/
diff --git a/dep/jemalloc/include/jemalloc/internal/util.h b/dep/jemalloc/include/jemalloc/internal/util.h
index 8479693631a..6b938f74688 100644
--- a/dep/jemalloc/include/jemalloc/internal/util.h
+++ b/dep/jemalloc/include/jemalloc/internal/util.h
@@ -14,7 +14,7 @@
* Wrap a cpp argument that contains commas such that it isn't broken up into
* multiple arguments.
*/
-#define JEMALLOC_CONCAT(...) __VA_ARGS__
+#define JEMALLOC_ARG_CONCAT(...) __VA_ARGS__
/*
* Silence compiler warnings due to uninitialized values. This is used
@@ -42,12 +42,6 @@
} while (0)
#endif
-/* Use to assert a particular configuration, e.g., cassert(config_debug). */
-#define cassert(c) do { \
- if ((c) == false) \
- assert(false); \
-} while (0)
-
#ifndef not_reached
#define not_reached() do { \
if (config_debug) { \
@@ -69,10 +63,18 @@
} while (0)
#endif
+#ifndef assert_not_implemented
#define assert_not_implemented(e) do { \
if (config_debug && !(e)) \
not_implemented(); \
} while (0)
+#endif
+
+/* Use to assert a particular configuration, e.g., cassert(config_debug). */
+#define cassert(c) do { \
+ if ((c) == false) \
+ not_reached(); \
+} while (0)
#endif /* JEMALLOC_H_TYPES */
/******************************************************************************/
@@ -82,8 +84,9 @@
/******************************************************************************/
#ifdef JEMALLOC_H_EXTERNS
-int buferror(char *buf, size_t buflen);
-uintmax_t malloc_strtoumax(const char *nptr, char **endptr, int base);
+int buferror(int err, char *buf, size_t buflen);
+uintmax_t malloc_strtoumax(const char *restrict nptr,
+ char **restrict endptr, int base);
void malloc_write(const char *s);
/*
@@ -107,7 +110,6 @@ void malloc_printf(const char *format, ...)
#ifndef JEMALLOC_ENABLE_INLINE
size_t pow2_ceil(size_t x);
-void malloc_write(const char *s);
void set_errno(int errnum);
int get_errno(void);
#endif
diff --git a/dep/jemalloc/include/jemalloc/jemalloc.h b/dep/jemalloc/include/jemalloc/jemalloc.h
index 946c73b75e5..84e2e7294d1 100644
--- a/dep/jemalloc/include/jemalloc/jemalloc.h
+++ b/dep/jemalloc/include/jemalloc/jemalloc.h
@@ -7,36 +7,45 @@ extern "C" {
#include <limits.h>
#include <strings.h>
-#define JEMALLOC_VERSION "3.3.1-0-g9ef9d9e8c271cdf14f664b871a8f98c827714784"
+#define JEMALLOC_VERSION "3.5.1-0-g7709a64c59daf0b1f938be49472fcc499e1bd136"
#define JEMALLOC_VERSION_MAJOR 3
-#define JEMALLOC_VERSION_MINOR 3
+#define JEMALLOC_VERSION_MINOR 5
#define JEMALLOC_VERSION_BUGFIX 1
#define JEMALLOC_VERSION_NREV 0
-#define JEMALLOC_VERSION_GID "9ef9d9e8c271cdf14f664b871a8f98c827714784"
+#define JEMALLOC_VERSION_GID "7709a64c59daf0b1f938be49472fcc499e1bd136"
-#include "jemalloc_defs.h"
+# define MALLOCX_LG_ALIGN(la) (la)
+# if LG_SIZEOF_PTR == 2
+# define MALLOCX_ALIGN(a) (ffs(a)-1)
+# else
+# define MALLOCX_ALIGN(a) \
+ ((a < (size_t)INT_MAX) ? ffs(a)-1 : ffs(a>>32)+31)
+# endif
+# define MALLOCX_ZERO ((int)0x40)
+/* Bias arena index bits so that 0 encodes "MALLOCX_ARENA() unspecified". */
+# define MALLOCX_ARENA(a) ((int)(((a)+1) << 8))
#ifdef JEMALLOC_EXPERIMENTAL
-#define ALLOCM_LG_ALIGN(la) (la)
-#if LG_SIZEOF_PTR == 2
-#define ALLOCM_ALIGN(a) (ffs(a)-1)
-#else
-#define ALLOCM_ALIGN(a) ((a < (size_t)INT_MAX) ? ffs(a)-1 : ffs(a>>32)+31)
-#endif
-#define ALLOCM_ZERO ((int)0x40)
-#define ALLOCM_NO_MOVE ((int)0x80)
+# define ALLOCM_LG_ALIGN(la) (la)
+# if LG_SIZEOF_PTR == 2
+# define ALLOCM_ALIGN(a) (ffs(a)-1)
+# else
+# define ALLOCM_ALIGN(a) \
+ ((a < (size_t)INT_MAX) ? ffs(a)-1 : ffs(a>>32)+31)
+# endif
+# define ALLOCM_ZERO ((int)0x40)
+# define ALLOCM_NO_MOVE ((int)0x80)
/* Bias arena index bits so that 0 encodes "ALLOCM_ARENA() unspecified". */
-#define ALLOCM_ARENA(a) ((int)(((a)+1) << 8))
-
-#define ALLOCM_SUCCESS 0
-#define ALLOCM_ERR_OOM 1
-#define ALLOCM_ERR_NOT_MOVED 2
+# define ALLOCM_ARENA(a) ((int)(((a)+1) << 8))
+# define ALLOCM_SUCCESS 0
+# define ALLOCM_ERR_OOM 1
+# define ALLOCM_ERR_NOT_MOVED 2
#endif
/*
- * The je_ prefix on the following public symbol declarations is an artifact of
- * namespace management, and should be omitted in application code unless
- * JEMALLOC_NO_DEMANGLE is defined (see below).
+ * The je_ prefix on the following public symbol declarations is an artifact
+ * of namespace management, and should be omitted in application code unless
+ * JEMALLOC_NO_DEMANGLE is defined (see jemalloc_mangle.h).
*/
extern JEMALLOC_EXPORT const char *je_malloc_conf;
extern JEMALLOC_EXPORT void (*je_malloc_message)(void *cbopaque,
@@ -52,6 +61,25 @@ JEMALLOC_EXPORT void *je_aligned_alloc(size_t alignment, size_t size)
JEMALLOC_EXPORT void *je_realloc(void *ptr, size_t size);
JEMALLOC_EXPORT void je_free(void *ptr);
+JEMALLOC_EXPORT void *je_mallocx(size_t size, int flags);
+JEMALLOC_EXPORT void *je_rallocx(void *ptr, size_t size, int flags);
+JEMALLOC_EXPORT size_t je_xallocx(void *ptr, size_t size, size_t extra,
+ int flags);
+JEMALLOC_EXPORT size_t je_sallocx(const void *ptr, int flags);
+JEMALLOC_EXPORT void je_dallocx(void *ptr, int flags);
+JEMALLOC_EXPORT size_t je_nallocx(size_t size, int flags);
+
+JEMALLOC_EXPORT int je_mallctl(const char *name, void *oldp,
+ size_t *oldlenp, void *newp, size_t newlen);
+JEMALLOC_EXPORT int je_mallctlnametomib(const char *name, size_t *mibp,
+ size_t *miblenp);
+JEMALLOC_EXPORT int je_mallctlbymib(const size_t *mib, size_t miblen,
+ void *oldp, size_t *oldlenp, void *newp, size_t newlen);
+JEMALLOC_EXPORT void je_malloc_stats_print(void (*write_cb)(void *,
+ const char *), void *je_cbopaque, const char *opts);
+JEMALLOC_EXPORT size_t je_malloc_usable_size(
+ JEMALLOC_USABLE_SIZE_CONST void *ptr);
+
#ifdef JEMALLOC_OVERRIDE_MEMALIGN
JEMALLOC_EXPORT void * je_memalign(size_t alignment, size_t size)
JEMALLOC_ATTR(malloc);
@@ -61,17 +89,6 @@ JEMALLOC_EXPORT void * je_memalign(size_t alignment, size_t size)
JEMALLOC_EXPORT void * je_valloc(size_t size) JEMALLOC_ATTR(malloc);
#endif
-JEMALLOC_EXPORT size_t je_malloc_usable_size(
- JEMALLOC_USABLE_SIZE_CONST void *ptr);
-JEMALLOC_EXPORT void je_malloc_stats_print(void (*write_cb)(void *,
- const char *), void *je_cbopaque, const char *opts);
-JEMALLOC_EXPORT int je_mallctl(const char *name, void *oldp,
- size_t *oldlenp, void *newp, size_t newlen);
-JEMALLOC_EXPORT int je_mallctlnametomib(const char *name, size_t *mibp,
- size_t *miblenp);
-JEMALLOC_EXPORT int je_mallctlbymib(const size_t *mib, size_t miblen,
- void *oldp, size_t *oldlenp, void *newp, size_t newlen);
-
#ifdef JEMALLOC_EXPERIMENTAL
JEMALLOC_EXPORT int je_allocm(void **ptr, size_t *rsize, size_t size,
int flags) JEMALLOC_ATTR(nonnull(1));
@@ -92,63 +109,71 @@ JEMALLOC_EXPORT int je_nallocm(size_t *rsize, size_t size, int flags);
* --with-mangling and/or --with-jemalloc-prefix configuration settings.
*/
#ifdef JEMALLOC_MANGLE
-#ifndef JEMALLOC_NO_DEMANGLE
-#define JEMALLOC_NO_DEMANGLE
-#endif
-#define malloc_conf je_malloc_conf
-#define malloc_message je_malloc_message
-#define malloc je_malloc
-#define calloc je_calloc
-#define posix_memalign je_posix_memalign
-#define aligned_alloc je_aligned_alloc
-#define realloc je_realloc
-#define free je_free
-#define malloc_usable_size je_malloc_usable_size
-#define malloc_stats_print je_malloc_stats_print
-#define mallctl je_mallctl
-#define mallctlnametomib je_mallctlnametomib
-#define mallctlbymib je_mallctlbymib
-#define memalign je_memalign
-#define valloc je_valloc
-#ifdef JEMALLOC_EXPERIMENTAL
-#define allocm je_allocm
-#define rallocm je_rallocm
-#define sallocm je_sallocm
-#define dallocm je_dallocm
-#define nallocm je_nallocm
-#endif
+# ifndef JEMALLOC_NO_DEMANGLE
+# define JEMALLOC_NO_DEMANGLE
+# endif
+# define malloc_conf je_malloc_conf
+# define malloc_message je_malloc_message
+# define malloc je_malloc
+# define calloc je_calloc
+# define posix_memalign je_posix_memalign
+# define aligned_alloc je_aligned_alloc
+# define realloc je_realloc
+# define free je_free
+# define mallocx je_mallocx
+# define rallocx je_rallocx
+# define xallocx je_xallocx
+# define sallocx je_sallocx
+# define dallocx je_dallocx
+# define nallocx je_nallocx
+# define mallctl je_mallctl
+# define mallctlnametomib je_mallctlnametomib
+# define mallctlbymib je_mallctlbymib
+# define malloc_stats_print je_malloc_stats_print
+# define malloc_usable_size je_malloc_usable_size
+# define memalign je_memalign
+# define valloc je_valloc
+# define allocm je_allocm
+# define dallocm je_dallocm
+# define nallocm je_nallocm
+# define rallocm je_rallocm
+# define sallocm je_sallocm
#endif
/*
- * The je_* macros can be used as stable alternative names for the public
- * jemalloc API if JEMALLOC_NO_DEMANGLE is defined. This is primarily meant
- * for use in jemalloc itself, but it can be used by application code to
+ * The je_* macros can be used as stable alternative names for the
+ * public jemalloc API if JEMALLOC_NO_DEMANGLE is defined. This is primarily
+ * meant for use in jemalloc itself, but it can be used by application code to
* provide isolation from the name mangling specified via --with-mangling
* and/or --with-jemalloc-prefix.
*/
#ifndef JEMALLOC_NO_DEMANGLE
-#undef je_malloc_conf
-#undef je_malloc_message
-#undef je_malloc
-#undef je_calloc
-#undef je_posix_memalign
-#undef je_aligned_alloc
-#undef je_realloc
-#undef je_free
-#undef je_malloc_usable_size
-#undef je_malloc_stats_print
-#undef je_mallctl
-#undef je_mallctlnametomib
-#undef je_mallctlbymib
-#undef je_memalign
-#undef je_valloc
-#ifdef JEMALLOC_EXPERIMENTAL
-#undef je_allocm
-#undef je_rallocm
-#undef je_sallocm
-#undef je_dallocm
-#undef je_nallocm
-#endif
+# undef je_malloc_conf
+# undef je_malloc_message
+# undef je_malloc
+# undef je_calloc
+# undef je_posix_memalign
+# undef je_aligned_alloc
+# undef je_realloc
+# undef je_free
+# undef je_mallocx
+# undef je_rallocx
+# undef je_xallocx
+# undef je_sallocx
+# undef je_dallocx
+# undef je_nallocx
+# undef je_mallctl
+# undef je_mallctlnametomib
+# undef je_mallctlbymib
+# undef je_malloc_stats_print
+# undef je_malloc_usable_size
+# undef je_memalign
+# undef je_valloc
+# undef je_allocm
+# undef je_dallocm
+# undef je_nallocm
+# undef je_rallocm
+# undef je_sallocm
#endif
#ifdef __cplusplus
diff --git a/dep/jemalloc/jemalloc_defs.h.in.cmake b/dep/jemalloc/jemalloc_defs.h.in.cmake
index 9fdf53546e3..89e496f4acb 100644
--- a/dep/jemalloc/jemalloc_defs.h.in.cmake
+++ b/dep/jemalloc/jemalloc_defs.h.in.cmake
@@ -266,3 +266,9 @@
/* sizeof(intmax_t) == 2^LG_SIZEOF_INTMAX_T. */
#define LG_SIZEOF_INTMAX_T 3
+
+/* C99 restrict keyword supported. */
+#define JEMALLOC_HAS_RESTRICT
+
+/* JEMALLOC_CODE_COVERAGE enables test code coverage analysis. */
+#undef JEMALLOC_CODE_COVERAGE
diff --git a/dep/jemalloc/src/arena.c b/dep/jemalloc/src/arena.c
index 05a787f89d9..390ab0f8230 100644
--- a/dep/jemalloc/src/arena.c
+++ b/dep/jemalloc/src/arena.c
@@ -38,52 +38,18 @@ const uint8_t small_size2bin[] = {
};
/******************************************************************************/
-/* Function prototypes for non-inline static functions. */
-
-static void arena_avail_insert(arena_t *arena, arena_chunk_t *chunk,
- size_t pageind, size_t npages, bool maybe_adjac_pred,
- bool maybe_adjac_succ);
-static void arena_avail_remove(arena_t *arena, arena_chunk_t *chunk,
- size_t pageind, size_t npages, bool maybe_adjac_pred,
- bool maybe_adjac_succ);
-static void arena_run_split(arena_t *arena, arena_run_t *run, size_t size,
- bool large, size_t binind, bool zero);
-static arena_chunk_t *arena_chunk_alloc(arena_t *arena);
-static void arena_chunk_dealloc(arena_t *arena, arena_chunk_t *chunk);
-static arena_run_t *arena_run_alloc_helper(arena_t *arena, size_t size,
- bool large, size_t binind, bool zero);
-static arena_run_t *arena_run_alloc(arena_t *arena, size_t size, bool large,
- size_t binind, bool zero);
-static arena_chunk_t *chunks_dirty_iter_cb(arena_chunk_tree_t *tree,
- arena_chunk_t *chunk, void *arg);
+/*
+ * Function prototypes for static functions that are referenced prior to
+ * definition.
+ */
+
static void arena_purge(arena_t *arena, bool all);
static void arena_run_dalloc(arena_t *arena, arena_run_t *run, bool dirty,
bool cleaned);
-static void arena_run_trim_head(arena_t *arena, arena_chunk_t *chunk,
- arena_run_t *run, size_t oldsize, size_t newsize);
-static void arena_run_trim_tail(arena_t *arena, arena_chunk_t *chunk,
- arena_run_t *run, size_t oldsize, size_t newsize, bool dirty);
-static arena_run_t *arena_bin_runs_first(arena_bin_t *bin);
-static void arena_bin_runs_insert(arena_bin_t *bin, arena_run_t *run);
-static void arena_bin_runs_remove(arena_bin_t *bin, arena_run_t *run);
-static arena_run_t *arena_bin_nonfull_run_tryget(arena_bin_t *bin);
-static arena_run_t *arena_bin_nonfull_run_get(arena_t *arena, arena_bin_t *bin);
-static void *arena_bin_malloc_hard(arena_t *arena, arena_bin_t *bin);
-static void arena_dissociate_bin_run(arena_chunk_t *chunk, arena_run_t *run,
- arena_bin_t *bin);
static void arena_dalloc_bin_run(arena_t *arena, arena_chunk_t *chunk,
arena_run_t *run, arena_bin_t *bin);
static void arena_bin_lower_run(arena_t *arena, arena_chunk_t *chunk,
arena_run_t *run, arena_bin_t *bin);
-static void arena_ralloc_large_shrink(arena_t *arena, arena_chunk_t *chunk,
- void *ptr, size_t oldsize, size_t size);
-static bool arena_ralloc_large_grow(arena_t *arena, arena_chunk_t *chunk,
- void *ptr, size_t oldsize, size_t size, size_t extra, bool zero);
-static bool arena_ralloc_large(void *ptr, size_t oldsize, size_t size,
- size_t extra, bool zero);
-static size_t bin_info_run_size_calc(arena_bin_info_t *bin_info,
- size_t min_run_size);
-static void bin_info_init(void);
/******************************************************************************/
@@ -369,62 +335,63 @@ arena_run_zero(arena_chunk_t *chunk, size_t run_ind, size_t npages)
}
static inline void
+arena_run_page_mark_zeroed(arena_chunk_t *chunk, size_t run_ind)
+{
+
+ VALGRIND_MAKE_MEM_DEFINED((void *)((uintptr_t)chunk + (run_ind <<
+ LG_PAGE)), PAGE);
+}
+
+static inline void
arena_run_page_validate_zeroed(arena_chunk_t *chunk, size_t run_ind)
{
size_t i;
UNUSED size_t *p = (size_t *)((uintptr_t)chunk + (run_ind << LG_PAGE));
- VALGRIND_MAKE_MEM_DEFINED((void *)((uintptr_t)chunk + (run_ind <<
- LG_PAGE)), PAGE);
+ arena_run_page_mark_zeroed(chunk, run_ind);
for (i = 0; i < PAGE / sizeof(size_t); i++)
assert(p[i] == 0);
}
static void
-arena_run_split(arena_t *arena, arena_run_t *run, size_t size, bool large,
- size_t binind, bool zero)
+arena_cactive_update(arena_t *arena, size_t add_pages, size_t sub_pages)
{
- arena_chunk_t *chunk;
- size_t run_ind, total_pages, need_pages, rem_pages, i;
- size_t flag_dirty;
- assert((large && binind == BININD_INVALID) || (large == false && binind
- != BININD_INVALID));
+ if (config_stats) {
+ ssize_t cactive_diff = CHUNK_CEILING((arena->nactive +
+ add_pages) << LG_PAGE) - CHUNK_CEILING((arena->nactive -
+ sub_pages) << LG_PAGE);
+ if (cactive_diff != 0)
+ stats_cactive_add(cactive_diff);
+ }
+}
+
+static void
+arena_run_split_remove(arena_t *arena, arena_chunk_t *chunk, size_t run_ind,
+ size_t flag_dirty, size_t need_pages)
+{
+ size_t total_pages, rem_pages;
- chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(run);
- run_ind = (unsigned)(((uintptr_t)run - (uintptr_t)chunk) >> LG_PAGE);
- flag_dirty = arena_mapbits_dirty_get(chunk, run_ind);
total_pages = arena_mapbits_unallocated_size_get(chunk, run_ind) >>
LG_PAGE;
assert(arena_mapbits_dirty_get(chunk, run_ind+total_pages-1) ==
flag_dirty);
- need_pages = (size >> LG_PAGE);
- assert(need_pages > 0);
assert(need_pages <= total_pages);
rem_pages = total_pages - need_pages;
arena_avail_remove(arena, chunk, run_ind, total_pages, true, true);
- if (config_stats) {
- /*
- * Update stats_cactive if nactive is crossing a chunk
- * multiple.
- */
- size_t cactive_diff = CHUNK_CEILING((arena->nactive +
- need_pages) << LG_PAGE) - CHUNK_CEILING(arena->nactive <<
- LG_PAGE);
- if (cactive_diff != 0)
- stats_cactive_add(cactive_diff);
- }
+ arena_cactive_update(arena, need_pages, 0);
arena->nactive += need_pages;
/* Keep track of trailing unused pages for later use. */
if (rem_pages > 0) {
if (flag_dirty != 0) {
- arena_mapbits_unallocated_set(chunk, run_ind+need_pages,
- (rem_pages << LG_PAGE), CHUNK_MAP_DIRTY);
+ arena_mapbits_unallocated_set(chunk,
+ run_ind+need_pages, (rem_pages << LG_PAGE),
+ flag_dirty);
arena_mapbits_unallocated_set(chunk,
run_ind+total_pages-1, (rem_pages << LG_PAGE),
- CHUNK_MAP_DIRTY);
+ flag_dirty);
} else {
arena_mapbits_unallocated_set(chunk, run_ind+need_pages,
(rem_pages << LG_PAGE),
@@ -438,153 +405,217 @@ arena_run_split(arena_t *arena, arena_run_t *run, size_t size, bool large,
arena_avail_insert(arena, chunk, run_ind+need_pages, rem_pages,
false, true);
}
+}
- /*
- * Update the page map separately for large vs. small runs, since it is
- * possible to avoid iteration for large mallocs.
- */
- if (large) {
- if (zero) {
- if (flag_dirty == 0) {
- /*
- * The run is clean, so some pages may be
- * zeroed (i.e. never before touched).
- */
- for (i = 0; i < need_pages; i++) {
- if (arena_mapbits_unzeroed_get(chunk,
- run_ind+i) != 0) {
- arena_run_zero(chunk, run_ind+i,
- 1);
- } else if (config_debug) {
- arena_run_page_validate_zeroed(
- chunk, run_ind+i);
- }
+static void
+arena_run_split_large_helper(arena_t *arena, arena_run_t *run, size_t size,
+ bool remove, bool zero)
+{
+ arena_chunk_t *chunk;
+ size_t flag_dirty, run_ind, need_pages, i;
+
+ chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(run);
+ run_ind = (unsigned)(((uintptr_t)run - (uintptr_t)chunk) >> LG_PAGE);
+ flag_dirty = arena_mapbits_dirty_get(chunk, run_ind);
+ need_pages = (size >> LG_PAGE);
+ assert(need_pages > 0);
+
+ if (remove) {
+ arena_run_split_remove(arena, chunk, run_ind, flag_dirty,
+ need_pages);
+ }
+
+ if (zero) {
+ if (flag_dirty == 0) {
+ /*
+ * The run is clean, so some pages may be zeroed (i.e.
+ * never before touched).
+ */
+ for (i = 0; i < need_pages; i++) {
+ if (arena_mapbits_unzeroed_get(chunk, run_ind+i)
+ != 0)
+ arena_run_zero(chunk, run_ind+i, 1);
+ else if (config_debug) {
+ arena_run_page_validate_zeroed(chunk,
+ run_ind+i);
+ } else {
+ arena_run_page_mark_zeroed(chunk,
+ run_ind+i);
}
- } else {
- /*
- * The run is dirty, so all pages must be
- * zeroed.
- */
- arena_run_zero(chunk, run_ind, need_pages);
}
+ } else {
+ /* The run is dirty, so all pages must be zeroed. */
+ arena_run_zero(chunk, run_ind, need_pages);
}
-
- /*
- * Set the last element first, in case the run only contains one
- * page (i.e. both statements set the same element).
- */
- arena_mapbits_large_set(chunk, run_ind+need_pages-1, 0,
- flag_dirty);
- arena_mapbits_large_set(chunk, run_ind, size, flag_dirty);
} else {
- assert(zero == false);
- /*
- * Propagate the dirty and unzeroed flags to the allocated
- * small run, so that arena_dalloc_bin_run() has the ability to
- * conditionally trim clean pages.
- */
- arena_mapbits_small_set(chunk, run_ind, 0, binind, flag_dirty);
- /*
- * The first page will always be dirtied during small run
- * initialization, so a validation failure here would not
- * actually cause an observable failure.
- */
- if (config_debug && flag_dirty == 0 &&
- arena_mapbits_unzeroed_get(chunk, run_ind) == 0)
- arena_run_page_validate_zeroed(chunk, run_ind);
- for (i = 1; i < need_pages - 1; i++) {
- arena_mapbits_small_set(chunk, run_ind+i, i, binind, 0);
- if (config_debug && flag_dirty == 0 &&
- arena_mapbits_unzeroed_get(chunk, run_ind+i) == 0) {
- arena_run_page_validate_zeroed(chunk,
- run_ind+i);
- }
- }
- arena_mapbits_small_set(chunk, run_ind+need_pages-1,
- need_pages-1, binind, flag_dirty);
- if (config_debug && flag_dirty == 0 &&
- arena_mapbits_unzeroed_get(chunk, run_ind+need_pages-1) ==
- 0) {
- arena_run_page_validate_zeroed(chunk,
- run_ind+need_pages-1);
- }
+ VALGRIND_MAKE_MEM_UNDEFINED((void *)((uintptr_t)chunk +
+ (run_ind << LG_PAGE)), (need_pages << LG_PAGE));
}
- VALGRIND_MAKE_MEM_UNDEFINED((void *)((uintptr_t)chunk + (run_ind <<
- LG_PAGE)), (need_pages << LG_PAGE));
+
+ /*
+ * Set the last element first, in case the run only contains one page
+ * (i.e. both statements set the same element).
+ */
+ arena_mapbits_large_set(chunk, run_ind+need_pages-1, 0, flag_dirty);
+ arena_mapbits_large_set(chunk, run_ind, size, flag_dirty);
+}
+
+static void
+arena_run_split_large(arena_t *arena, arena_run_t *run, size_t size, bool zero)
+{
+
+ arena_run_split_large_helper(arena, run, size, true, zero);
+}
+
+static void
+arena_run_init_large(arena_t *arena, arena_run_t *run, size_t size, bool zero)
+{
+
+ arena_run_split_large_helper(arena, run, size, false, zero);
+}
+
+static void
+arena_run_split_small(arena_t *arena, arena_run_t *run, size_t size,
+ size_t binind)
+{
+ arena_chunk_t *chunk;
+ size_t flag_dirty, run_ind, need_pages, i;
+
+ assert(binind != BININD_INVALID);
+
+ chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(run);
+ run_ind = (unsigned)(((uintptr_t)run - (uintptr_t)chunk) >> LG_PAGE);
+ flag_dirty = arena_mapbits_dirty_get(chunk, run_ind);
+ need_pages = (size >> LG_PAGE);
+ assert(need_pages > 0);
+
+ arena_run_split_remove(arena, chunk, run_ind, flag_dirty, need_pages);
+
+ /*
+ * Propagate the dirty and unzeroed flags to the allocated small run,
+ * so that arena_dalloc_bin_run() has the ability to conditionally trim
+ * clean pages.
+ */
+ arena_mapbits_small_set(chunk, run_ind, 0, binind, flag_dirty);
+ /*
+ * The first page will always be dirtied during small run
+ * initialization, so a validation failure here would not actually
+ * cause an observable failure.
+ */
+ if (config_debug && flag_dirty == 0 && arena_mapbits_unzeroed_get(chunk,
+ run_ind) == 0)
+ arena_run_page_validate_zeroed(chunk, run_ind);
+ for (i = 1; i < need_pages - 1; i++) {
+ arena_mapbits_small_set(chunk, run_ind+i, i, binind, 0);
+ if (config_debug && flag_dirty == 0 &&
+ arena_mapbits_unzeroed_get(chunk, run_ind+i) == 0)
+ arena_run_page_validate_zeroed(chunk, run_ind+i);
+ }
+ arena_mapbits_small_set(chunk, run_ind+need_pages-1, need_pages-1,
+ binind, flag_dirty);
+ if (config_debug && flag_dirty == 0 && arena_mapbits_unzeroed_get(chunk,
+ run_ind+need_pages-1) == 0)
+ arena_run_page_validate_zeroed(chunk, run_ind+need_pages-1);
+ VALGRIND_MAKE_MEM_UNDEFINED((void *)((uintptr_t)chunk +
+ (run_ind << LG_PAGE)), (need_pages << LG_PAGE));
}
static arena_chunk_t *
-arena_chunk_alloc(arena_t *arena)
+arena_chunk_init_spare(arena_t *arena)
{
arena_chunk_t *chunk;
- size_t i;
- if (arena->spare != NULL) {
- chunk = arena->spare;
- arena->spare = NULL;
+ assert(arena->spare != NULL);
- assert(arena_mapbits_allocated_get(chunk, map_bias) == 0);
- assert(arena_mapbits_allocated_get(chunk, chunk_npages-1) == 0);
- assert(arena_mapbits_unallocated_size_get(chunk, map_bias) ==
- arena_maxclass);
- assert(arena_mapbits_unallocated_size_get(chunk,
- chunk_npages-1) == arena_maxclass);
- assert(arena_mapbits_dirty_get(chunk, map_bias) ==
- arena_mapbits_dirty_get(chunk, chunk_npages-1));
- } else {
- bool zero;
- size_t unzeroed;
+ chunk = arena->spare;
+ arena->spare = NULL;
- zero = false;
- malloc_mutex_unlock(&arena->lock);
- chunk = (arena_chunk_t *)chunk_alloc(chunksize, chunksize,
- false, &zero, arena->dss_prec);
- malloc_mutex_lock(&arena->lock);
- if (chunk == NULL)
- return (NULL);
- if (config_stats)
- arena->stats.mapped += chunksize;
+ assert(arena_mapbits_allocated_get(chunk, map_bias) == 0);
+ assert(arena_mapbits_allocated_get(chunk, chunk_npages-1) == 0);
+ assert(arena_mapbits_unallocated_size_get(chunk, map_bias) ==
+ arena_maxclass);
+ assert(arena_mapbits_unallocated_size_get(chunk, chunk_npages-1) ==
+ arena_maxclass);
+ assert(arena_mapbits_dirty_get(chunk, map_bias) ==
+ arena_mapbits_dirty_get(chunk, chunk_npages-1));
- chunk->arena = arena;
+ return (chunk);
+}
- /*
- * Claim that no pages are in use, since the header is merely
- * overhead.
- */
- chunk->ndirty = 0;
+static arena_chunk_t *
+arena_chunk_init_hard(arena_t *arena)
+{
+ arena_chunk_t *chunk;
+ bool zero;
+ size_t unzeroed, i;
- chunk->nruns_avail = 0;
- chunk->nruns_adjac = 0;
+ assert(arena->spare == NULL);
- /*
- * Initialize the map to contain one maximal free untouched run.
- * Mark the pages as zeroed iff chunk_alloc() returned a zeroed
- * chunk.
- */
- unzeroed = zero ? 0 : CHUNK_MAP_UNZEROED;
- arena_mapbits_unallocated_set(chunk, map_bias, arena_maxclass,
- unzeroed);
- /*
- * There is no need to initialize the internal page map entries
- * unless the chunk is not zeroed.
- */
- if (zero == false) {
- for (i = map_bias+1; i < chunk_npages-1; i++)
- arena_mapbits_unzeroed_set(chunk, i, unzeroed);
- } else if (config_debug) {
- VALGRIND_MAKE_MEM_DEFINED(
- (void *)arena_mapp_get(chunk, map_bias+1),
- (void *)((uintptr_t)
- arena_mapp_get(chunk, chunk_npages-1)
- - (uintptr_t)arena_mapp_get(chunk, map_bias+1)));
+ zero = false;
+ malloc_mutex_unlock(&arena->lock);
+ chunk = (arena_chunk_t *)chunk_alloc(chunksize, chunksize, false,
+ &zero, arena->dss_prec);
+ malloc_mutex_lock(&arena->lock);
+ if (chunk == NULL)
+ return (NULL);
+ if (config_stats)
+ arena->stats.mapped += chunksize;
+
+ chunk->arena = arena;
+
+ /*
+ * Claim that no pages are in use, since the header is merely overhead.
+ */
+ chunk->ndirty = 0;
+
+ chunk->nruns_avail = 0;
+ chunk->nruns_adjac = 0;
+
+ /*
+ * Initialize the map to contain one maximal free untouched run. Mark
+ * the pages as zeroed iff chunk_alloc() returned a zeroed chunk.
+ */
+ unzeroed = zero ? 0 : CHUNK_MAP_UNZEROED;
+ arena_mapbits_unallocated_set(chunk, map_bias, arena_maxclass,
+ unzeroed);
+ /*
+ * There is no need to initialize the internal page map entries unless
+ * the chunk is not zeroed.
+ */
+ if (zero == false) {
+ VALGRIND_MAKE_MEM_UNDEFINED((void *)arena_mapp_get(chunk,
+ map_bias+1), (size_t)((uintptr_t) arena_mapp_get(chunk,
+ chunk_npages-1) - (uintptr_t)arena_mapp_get(chunk,
+ map_bias+1)));
+ for (i = map_bias+1; i < chunk_npages-1; i++)
+ arena_mapbits_unzeroed_set(chunk, i, unzeroed);
+ } else {
+ VALGRIND_MAKE_MEM_DEFINED((void *)arena_mapp_get(chunk,
+ map_bias+1), (size_t)((uintptr_t) arena_mapp_get(chunk,
+ chunk_npages-1) - (uintptr_t)arena_mapp_get(chunk,
+ map_bias+1)));
+ if (config_debug) {
for (i = map_bias+1; i < chunk_npages-1; i++) {
assert(arena_mapbits_unzeroed_get(chunk, i) ==
unzeroed);
}
}
- arena_mapbits_unallocated_set(chunk, chunk_npages-1,
- arena_maxclass, unzeroed);
}
+ arena_mapbits_unallocated_set(chunk, chunk_npages-1, arena_maxclass,
+ unzeroed);
+
+ return (chunk);
+}
+
+static arena_chunk_t *
+arena_chunk_alloc(arena_t *arena)
+{
+ arena_chunk_t *chunk;
+
+ if (arena->spare != NULL)
+ chunk = arena_chunk_init_spare(arena);
+ else
+ chunk = arena_chunk_init_hard(arena);
/* Insert the run into the runs_avail tree. */
arena_avail_insert(arena, chunk, map_bias, chunk_npages-map_bias,
@@ -626,8 +657,7 @@ arena_chunk_dealloc(arena_t *arena, arena_chunk_t *chunk)
}
static arena_run_t *
-arena_run_alloc_helper(arena_t *arena, size_t size, bool large, size_t binind,
- bool zero)
+arena_run_alloc_large_helper(arena_t *arena, size_t size, bool zero)
{
arena_run_t *run;
arena_chunk_map_t *mapelm, key;
@@ -642,7 +672,7 @@ arena_run_alloc_helper(arena_t *arena, size_t size, bool large, size_t binind,
run = (arena_run_t *)((uintptr_t)run_chunk + (pageind <<
LG_PAGE));
- arena_run_split(arena, run, size, large, binind, zero);
+ arena_run_split_large(arena, run, size, zero);
return (run);
}
@@ -650,19 +680,72 @@ arena_run_alloc_helper(arena_t *arena, size_t size, bool large, size_t binind,
}
static arena_run_t *
-arena_run_alloc(arena_t *arena, size_t size, bool large, size_t binind,
- bool zero)
+arena_run_alloc_large(arena_t *arena, size_t size, bool zero)
+{
+ arena_chunk_t *chunk;
+ arena_run_t *run;
+
+ assert(size <= arena_maxclass);
+ assert((size & PAGE_MASK) == 0);
+
+ /* Search the arena's chunks for the lowest best fit. */
+ run = arena_run_alloc_large_helper(arena, size, zero);
+ if (run != NULL)
+ return (run);
+
+ /*
+ * No usable runs. Create a new chunk from which to allocate the run.
+ */
+ chunk = arena_chunk_alloc(arena);
+ if (chunk != NULL) {
+ run = (arena_run_t *)((uintptr_t)chunk + (map_bias << LG_PAGE));
+ arena_run_split_large(arena, run, size, zero);
+ return (run);
+ }
+
+ /*
+ * arena_chunk_alloc() failed, but another thread may have made
+ * sufficient memory available while this one dropped arena->lock in
+ * arena_chunk_alloc(), so search one more time.
+ */
+ return (arena_run_alloc_large_helper(arena, size, zero));
+}
+
+static arena_run_t *
+arena_run_alloc_small_helper(arena_t *arena, size_t size, size_t binind)
+{
+ arena_run_t *run;
+ arena_chunk_map_t *mapelm, key;
+
+ key.bits = size | CHUNK_MAP_KEY;
+ mapelm = arena_avail_tree_nsearch(&arena->runs_avail, &key);
+ if (mapelm != NULL) {
+ arena_chunk_t *run_chunk = CHUNK_ADDR2BASE(mapelm);
+ size_t pageind = (((uintptr_t)mapelm -
+ (uintptr_t)run_chunk->map) / sizeof(arena_chunk_map_t))
+ + map_bias;
+
+ run = (arena_run_t *)((uintptr_t)run_chunk + (pageind <<
+ LG_PAGE));
+ arena_run_split_small(arena, run, size, binind);
+ return (run);
+ }
+
+ return (NULL);
+}
+
+static arena_run_t *
+arena_run_alloc_small(arena_t *arena, size_t size, size_t binind)
{
arena_chunk_t *chunk;
arena_run_t *run;
assert(size <= arena_maxclass);
assert((size & PAGE_MASK) == 0);
- assert((large && binind == BININD_INVALID) || (large == false && binind
- != BININD_INVALID));
+ assert(binind != BININD_INVALID);
/* Search the arena's chunks for the lowest best fit. */
- run = arena_run_alloc_helper(arena, size, large, binind, zero);
+ run = arena_run_alloc_small_helper(arena, size, binind);
if (run != NULL)
return (run);
@@ -672,7 +755,7 @@ arena_run_alloc(arena_t *arena, size_t size, bool large, size_t binind,
chunk = arena_chunk_alloc(arena);
if (chunk != NULL) {
run = (arena_run_t *)((uintptr_t)chunk + (map_bias << LG_PAGE));
- arena_run_split(arena, run, size, large, binind, zero);
+ arena_run_split_small(arena, run, size, binind);
return (run);
}
@@ -681,7 +764,7 @@ arena_run_alloc(arena_t *arena, size_t size, bool large, size_t binind,
* sufficient memory available while this one dropped arena->lock in
* arena_chunk_alloc(), so search one more time.
*/
- return (arena_run_alloc_helper(arena, size, large, binind, zero));
+ return (arena_run_alloc_small_helper(arena, size, binind));
}
static inline void
@@ -707,48 +790,42 @@ arena_maybe_purge(arena_t *arena)
arena_purge(arena, false);
}
-static inline size_t
-arena_chunk_purge(arena_t *arena, arena_chunk_t *chunk, bool all)
+static arena_chunk_t *
+chunks_dirty_iter_cb(arena_chunk_tree_t *tree, arena_chunk_t *chunk, void *arg)
{
- size_t npurged;
- ql_head(arena_chunk_map_t) mapelms;
- arena_chunk_map_t *mapelm;
- size_t pageind, npages;
- size_t nmadvise;
+ size_t *ndirty = (size_t *)arg;
- ql_new(&mapelms);
+ assert(chunk->ndirty != 0);
+ *ndirty += chunk->ndirty;
+ return (NULL);
+}
+
+static size_t
+arena_compute_npurgatory(arena_t *arena, bool all)
+{
+ size_t npurgatory, npurgeable;
/*
- * If chunk is the spare, temporarily re-allocate it, 1) so that its
- * run is reinserted into runs_avail, and 2) so that it cannot be
- * completely discarded by another thread while arena->lock is dropped
- * by this thread. Note that the arena_run_dalloc() call will
- * implicitly deallocate the chunk, so no explicit action is required
- * in this function to deallocate the chunk.
- *
- * Note that once a chunk contains dirty pages, it cannot again contain
- * a single run unless 1) it is a dirty run, or 2) this function purges
- * dirty pages and causes the transition to a single clean run. Thus
- * (chunk == arena->spare) is possible, but it is not possible for
- * this function to be called on the spare unless it contains a dirty
- * run.
+ * Compute the minimum number of pages that this thread should try to
+ * purge.
*/
- if (chunk == arena->spare) {
- assert(arena_mapbits_dirty_get(chunk, map_bias) != 0);
- assert(arena_mapbits_dirty_get(chunk, chunk_npages-1) != 0);
+ npurgeable = arena->ndirty - arena->npurgatory;
- arena_chunk_alloc(arena);
- }
+ if (all == false) {
+ size_t threshold = (arena->nactive >> opt_lg_dirty_mult);
- if (config_stats)
- arena->stats.purged += chunk->ndirty;
+ npurgatory = npurgeable - threshold;
+ } else
+ npurgatory = npurgeable;
- /*
- * Operate on all dirty runs if there is no clean/dirty run
- * fragmentation.
- */
- if (chunk->nruns_adjac == 0)
- all = true;
+ return (npurgatory);
+}
+
+static void
+arena_chunk_stash_dirty(arena_t *arena, arena_chunk_t *chunk, bool all,
+ arena_chunk_mapelms_t *mapelms)
+{
+ size_t pageind, npages;
/*
* Temporarily allocate free dirty runs within chunk. If all is false,
@@ -756,7 +833,7 @@ arena_chunk_purge(arena_t *arena, arena_chunk_t *chunk, bool all)
* all dirty runs.
*/
for (pageind = map_bias; pageind < chunk_npages; pageind += npages) {
- mapelm = arena_mapp_get(chunk, pageind);
+ arena_chunk_map_t *mapelm = arena_mapp_get(chunk, pageind);
if (arena_mapbits_allocated_get(chunk, pageind) == 0) {
size_t run_size =
arena_mapbits_unallocated_size_get(chunk, pageind);
@@ -772,11 +849,11 @@ arena_chunk_purge(arena_t *arena, arena_chunk_t *chunk, bool all)
arena_run_t *run = (arena_run_t *)((uintptr_t)
chunk + (uintptr_t)(pageind << LG_PAGE));
- arena_run_split(arena, run, run_size, true,
- BININD_INVALID, false);
+ arena_run_split_large(arena, run, run_size,
+ false);
/* Append to list for later processing. */
ql_elm_new(mapelm, u.ql_link);
- ql_tail_insert(&mapelms, mapelm, u.ql_link);
+ ql_tail_insert(mapelms, mapelm, u.ql_link);
}
} else {
/* Skip run. */
@@ -800,12 +877,20 @@ arena_chunk_purge(arena_t *arena, arena_chunk_t *chunk, bool all)
assert(pageind == chunk_npages);
assert(chunk->ndirty == 0 || all == false);
assert(chunk->nruns_adjac == 0);
+}
+
+static size_t
+arena_chunk_purge_stashed(arena_t *arena, arena_chunk_t *chunk,
+ arena_chunk_mapelms_t *mapelms)
+{
+ size_t npurged, pageind, npages, nmadvise;
+ arena_chunk_map_t *mapelm;
malloc_mutex_unlock(&arena->lock);
if (config_stats)
nmadvise = 0;
npurged = 0;
- ql_foreach(mapelm, &mapelms, u.ql_link) {
+ ql_foreach(mapelm, mapelms, u.ql_link) {
bool unzeroed;
size_t flag_unzeroed, i;
@@ -839,30 +924,75 @@ arena_chunk_purge(arena_t *arena, arena_chunk_t *chunk, bool all)
if (config_stats)
arena->stats.nmadvise += nmadvise;
+ return (npurged);
+}
+
+static void
+arena_chunk_unstash_purged(arena_t *arena, arena_chunk_t *chunk,
+ arena_chunk_mapelms_t *mapelms)
+{
+ arena_chunk_map_t *mapelm;
+ size_t pageind;
+
/* Deallocate runs. */
- for (mapelm = ql_first(&mapelms); mapelm != NULL;
- mapelm = ql_first(&mapelms)) {
+ for (mapelm = ql_first(mapelms); mapelm != NULL;
+ mapelm = ql_first(mapelms)) {
arena_run_t *run;
pageind = (((uintptr_t)mapelm - (uintptr_t)chunk->map) /
sizeof(arena_chunk_map_t)) + map_bias;
run = (arena_run_t *)((uintptr_t)chunk + (uintptr_t)(pageind <<
LG_PAGE));
- ql_remove(&mapelms, mapelm, u.ql_link);
+ ql_remove(mapelms, mapelm, u.ql_link);
arena_run_dalloc(arena, run, false, true);
}
-
- return (npurged);
}
-static arena_chunk_t *
-chunks_dirty_iter_cb(arena_chunk_tree_t *tree, arena_chunk_t *chunk, void *arg)
+static inline size_t
+arena_chunk_purge(arena_t *arena, arena_chunk_t *chunk, bool all)
{
- size_t *ndirty = (size_t *)arg;
+ size_t npurged;
+ arena_chunk_mapelms_t mapelms;
- assert(chunk->ndirty != 0);
- *ndirty += chunk->ndirty;
- return (NULL);
+ ql_new(&mapelms);
+
+ /*
+ * If chunk is the spare, temporarily re-allocate it, 1) so that its
+ * run is reinserted into runs_avail, and 2) so that it cannot be
+ * completely discarded by another thread while arena->lock is dropped
+ * by this thread. Note that the arena_run_dalloc() call will
+ * implicitly deallocate the chunk, so no explicit action is required
+ * in this function to deallocate the chunk.
+ *
+ * Note that once a chunk contains dirty pages, it cannot again contain
+ * a single run unless 1) it is a dirty run, or 2) this function purges
+ * dirty pages and causes the transition to a single clean run. Thus
+ * (chunk == arena->spare) is possible, but it is not possible for
+ * this function to be called on the spare unless it contains a dirty
+ * run.
+ */
+ if (chunk == arena->spare) {
+ assert(arena_mapbits_dirty_get(chunk, map_bias) != 0);
+ assert(arena_mapbits_dirty_get(chunk, chunk_npages-1) != 0);
+
+ arena_chunk_alloc(arena);
+ }
+
+ if (config_stats)
+ arena->stats.purged += chunk->ndirty;
+
+ /*
+ * Operate on all dirty runs if there is no clean/dirty run
+ * fragmentation.
+ */
+ if (chunk->nruns_adjac == 0)
+ all = true;
+
+ arena_chunk_stash_dirty(arena, chunk, all, &mapelms);
+ npurged = arena_chunk_purge_stashed(arena, chunk, &mapelms);
+ arena_chunk_unstash_purged(arena, chunk, &mapelms);
+
+ return (npurged);
}
static void
@@ -885,21 +1015,11 @@ arena_purge(arena_t *arena, bool all)
arena->stats.npurge++;
/*
- * Compute the minimum number of pages that this thread should try to
- * purge, and add the result to arena->npurgatory. This will keep
- * multiple threads from racing to reduce ndirty below the threshold.
+ * Add the minimum number of pages this thread should try to purge to
+ * arena->npurgatory. This will keep multiple threads from racing to
+ * reduce ndirty below the threshold.
*/
- {
- size_t npurgeable = arena->ndirty - arena->npurgatory;
-
- if (all == false) {
- size_t threshold = (arena->nactive >>
- opt_lg_dirty_mult);
-
- npurgatory = npurgeable - threshold;
- } else
- npurgatory = npurgeable;
- }
+ npurgatory = arena_compute_npurgatory(arena, all);
arena->npurgatory += npurgatory;
while (npurgatory > 0) {
@@ -966,61 +1086,12 @@ arena_purge_all(arena_t *arena)
}
static void
-arena_run_dalloc(arena_t *arena, arena_run_t *run, bool dirty, bool cleaned)
+arena_run_coalesce(arena_t *arena, arena_chunk_t *chunk, size_t *p_size,
+ size_t *p_run_ind, size_t *p_run_pages, size_t flag_dirty)
{
- arena_chunk_t *chunk;
- size_t size, run_ind, run_pages, flag_dirty;
-
- chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(run);
- run_ind = (size_t)(((uintptr_t)run - (uintptr_t)chunk) >> LG_PAGE);
- assert(run_ind >= map_bias);
- assert(run_ind < chunk_npages);
- if (arena_mapbits_large_get(chunk, run_ind) != 0) {
- size = arena_mapbits_large_size_get(chunk, run_ind);
- assert(size == PAGE ||
- arena_mapbits_large_size_get(chunk,
- run_ind+(size>>LG_PAGE)-1) == 0);
- } else {
- size_t binind = arena_bin_index(arena, run->bin);
- arena_bin_info_t *bin_info = &arena_bin_info[binind];
- size = bin_info->run_size;
- }
- run_pages = (size >> LG_PAGE);
- if (config_stats) {
- /*
- * Update stats_cactive if nactive is crossing a chunk
- * multiple.
- */
- size_t cactive_diff = CHUNK_CEILING(arena->nactive << LG_PAGE) -
- CHUNK_CEILING((arena->nactive - run_pages) << LG_PAGE);
- if (cactive_diff != 0)
- stats_cactive_sub(cactive_diff);
- }
- arena->nactive -= run_pages;
-
- /*
- * The run is dirty if the caller claims to have dirtied it, as well as
- * if it was already dirty before being allocated and the caller
- * doesn't claim to have cleaned it.
- */
- assert(arena_mapbits_dirty_get(chunk, run_ind) ==
- arena_mapbits_dirty_get(chunk, run_ind+run_pages-1));
- if (cleaned == false && arena_mapbits_dirty_get(chunk, run_ind) != 0)
- dirty = true;
- flag_dirty = dirty ? CHUNK_MAP_DIRTY : 0;
-
- /* Mark pages as unallocated in the chunk map. */
- if (dirty) {
- arena_mapbits_unallocated_set(chunk, run_ind, size,
- CHUNK_MAP_DIRTY);
- arena_mapbits_unallocated_set(chunk, run_ind+run_pages-1, size,
- CHUNK_MAP_DIRTY);
- } else {
- arena_mapbits_unallocated_set(chunk, run_ind, size,
- arena_mapbits_unzeroed_get(chunk, run_ind));
- arena_mapbits_unallocated_set(chunk, run_ind+run_pages-1, size,
- arena_mapbits_unzeroed_get(chunk, run_ind+run_pages-1));
- }
+ size_t size = *p_size;
+ size_t run_ind = *p_run_ind;
+ size_t run_pages = *p_run_pages;
/* Try to coalesce forward. */
if (run_ind + run_pages < chunk_npages &&
@@ -1050,8 +1121,9 @@ arena_run_dalloc(arena_t *arena, arena_run_t *run, bool dirty, bool cleaned)
}
/* Try to coalesce backward. */
- if (run_ind > map_bias && arena_mapbits_allocated_get(chunk, run_ind-1)
- == 0 && arena_mapbits_dirty_get(chunk, run_ind-1) == flag_dirty) {
+ if (run_ind > map_bias && arena_mapbits_allocated_get(chunk,
+ run_ind-1) == 0 && arena_mapbits_dirty_get(chunk, run_ind-1) ==
+ flag_dirty) {
size_t prun_size = arena_mapbits_unallocated_size_get(chunk,
run_ind-1);
size_t prun_pages = prun_size >> LG_PAGE;
@@ -1076,6 +1148,62 @@ arena_run_dalloc(arena_t *arena, arena_run_t *run, bool dirty, bool cleaned)
size);
}
+ *p_size = size;
+ *p_run_ind = run_ind;
+ *p_run_pages = run_pages;
+}
+
+static void
+arena_run_dalloc(arena_t *arena, arena_run_t *run, bool dirty, bool cleaned)
+{
+ arena_chunk_t *chunk;
+ size_t size, run_ind, run_pages, flag_dirty;
+
+ chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(run);
+ run_ind = (size_t)(((uintptr_t)run - (uintptr_t)chunk) >> LG_PAGE);
+ assert(run_ind >= map_bias);
+ assert(run_ind < chunk_npages);
+ if (arena_mapbits_large_get(chunk, run_ind) != 0) {
+ size = arena_mapbits_large_size_get(chunk, run_ind);
+ assert(size == PAGE ||
+ arena_mapbits_large_size_get(chunk,
+ run_ind+(size>>LG_PAGE)-1) == 0);
+ } else {
+ size_t binind = arena_bin_index(arena, run->bin);
+ arena_bin_info_t *bin_info = &arena_bin_info[binind];
+ size = bin_info->run_size;
+ }
+ run_pages = (size >> LG_PAGE);
+ arena_cactive_update(arena, 0, run_pages);
+ arena->nactive -= run_pages;
+
+ /*
+ * The run is dirty if the caller claims to have dirtied it, as well as
+ * if it was already dirty before being allocated and the caller
+ * doesn't claim to have cleaned it.
+ */
+ assert(arena_mapbits_dirty_get(chunk, run_ind) ==
+ arena_mapbits_dirty_get(chunk, run_ind+run_pages-1));
+ if (cleaned == false && arena_mapbits_dirty_get(chunk, run_ind) != 0)
+ dirty = true;
+ flag_dirty = dirty ? CHUNK_MAP_DIRTY : 0;
+
+ /* Mark pages as unallocated in the chunk map. */
+ if (dirty) {
+ arena_mapbits_unallocated_set(chunk, run_ind, size,
+ CHUNK_MAP_DIRTY);
+ arena_mapbits_unallocated_set(chunk, run_ind+run_pages-1, size,
+ CHUNK_MAP_DIRTY);
+ } else {
+ arena_mapbits_unallocated_set(chunk, run_ind, size,
+ arena_mapbits_unzeroed_get(chunk, run_ind));
+ arena_mapbits_unallocated_set(chunk, run_ind+run_pages-1, size,
+ arena_mapbits_unzeroed_get(chunk, run_ind+run_pages-1));
+ }
+
+ arena_run_coalesce(arena, chunk, &size, &run_ind, &run_pages,
+ flag_dirty);
+
/* Insert into runs_avail, now that coalescing is complete. */
assert(arena_mapbits_unallocated_size_get(chunk, run_ind) ==
arena_mapbits_unallocated_size_get(chunk, run_ind+run_pages-1));
@@ -1243,7 +1371,7 @@ arena_bin_nonfull_run_get(arena_t *arena, arena_bin_t *bin)
malloc_mutex_unlock(&bin->lock);
/******************************/
malloc_mutex_lock(&arena->lock);
- run = arena_run_alloc(arena, bin_info->run_size, false, binind, false);
+ run = arena_run_alloc_small(arena, bin_info->run_size, binind);
if (run != NULL) {
bitmap_t *bitmap = (bitmap_t *)((uintptr_t)run +
(uintptr_t)bin_info->bitmap_offset);
@@ -1266,7 +1394,7 @@ arena_bin_nonfull_run_get(arena_t *arena, arena_bin_t *bin)
}
/*
- * arena_run_alloc() failed, but another thread may have made
+ * arena_run_alloc_small() failed, but another thread may have made
* sufficient memory available while this one dropped bin->lock above,
* so search one more time.
*/
@@ -1301,12 +1429,12 @@ arena_bin_malloc_hard(arena_t *arena, arena_bin_t *bin)
arena_chunk_t *chunk;
/*
- * arena_run_alloc() may have allocated run, or it may
- * have pulled run from the bin's run tree. Therefore
- * it is unsafe to make any assumptions about how run
- * has previously been used, and arena_bin_lower_run()
- * must be called, as if a region were just deallocated
- * from the run.
+ * arena_run_alloc_small() may have allocated run, or
+ * it may have pulled run from the bin's run tree.
+ * Therefore it is unsafe to make any assumptions about
+ * how run has previously been used, and
+ * arena_bin_lower_run() must be called, as if a region
+ * were just deallocated from the run.
*/
chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(run);
if (run->nfree == bin_info->nregs)
@@ -1384,8 +1512,28 @@ arena_alloc_junk_small(void *ptr, arena_bin_info_t *bin_info, bool zero)
}
}
-void
-arena_dalloc_junk_small(void *ptr, arena_bin_info_t *bin_info)
+#ifdef JEMALLOC_JET
+#undef arena_redzone_corruption
+#define arena_redzone_corruption JEMALLOC_N(arena_redzone_corruption_impl)
+#endif
+static void
+arena_redzone_corruption(void *ptr, size_t usize, bool after,
+ size_t offset, uint8_t byte)
+{
+
+ malloc_printf("<jemalloc>: Corrupt redzone %zu byte%s %s %p "
+ "(size %zu), byte=%#x\n", offset, (offset == 1) ? "" : "s",
+ after ? "after" : "before", ptr, usize, byte);
+}
+#ifdef JEMALLOC_JET
+#undef arena_redzone_corruption
+#define arena_redzone_corruption JEMALLOC_N(arena_redzone_corruption)
+arena_redzone_corruption_t *arena_redzone_corruption =
+ JEMALLOC_N(arena_redzone_corruption_impl);
+#endif
+
+static void
+arena_redzones_validate(void *ptr, arena_bin_info_t *bin_info, bool reset)
{
size_t size = bin_info->reg_size;
size_t redzone_size = bin_info->redzone_size;
@@ -1393,29 +1541,61 @@ arena_dalloc_junk_small(void *ptr, arena_bin_info_t *bin_info)
bool error = false;
for (i = 1; i <= redzone_size; i++) {
- unsigned byte;
- if ((byte = *(uint8_t *)((uintptr_t)ptr - i)) != 0xa5) {
+ uint8_t *byte = (uint8_t *)((uintptr_t)ptr - i);
+ if (*byte != 0xa5) {
error = true;
- malloc_printf("<jemalloc>: Corrupt redzone "
- "%zu byte%s before %p (size %zu), byte=%#x\n", i,
- (i == 1) ? "" : "s", ptr, size, byte);
+ arena_redzone_corruption(ptr, size, false, i, *byte);
+ if (reset)
+ *byte = 0xa5;
}
}
for (i = 0; i < redzone_size; i++) {
- unsigned byte;
- if ((byte = *(uint8_t *)((uintptr_t)ptr + size + i)) != 0xa5) {
+ uint8_t *byte = (uint8_t *)((uintptr_t)ptr + size + i);
+ if (*byte != 0xa5) {
error = true;
- malloc_printf("<jemalloc>: Corrupt redzone "
- "%zu byte%s after end of %p (size %zu), byte=%#x\n",
- i, (i == 1) ? "" : "s", ptr, size, byte);
+ arena_redzone_corruption(ptr, size, true, i, *byte);
+ if (reset)
+ *byte = 0xa5;
}
}
if (opt_abort && error)
abort();
+}
+#ifdef JEMALLOC_JET
+#undef arena_dalloc_junk_small
+#define arena_dalloc_junk_small JEMALLOC_N(arena_dalloc_junk_small_impl)
+#endif
+void
+arena_dalloc_junk_small(void *ptr, arena_bin_info_t *bin_info)
+{
+ size_t redzone_size = bin_info->redzone_size;
+
+ arena_redzones_validate(ptr, bin_info, false);
memset((void *)((uintptr_t)ptr - redzone_size), 0x5a,
bin_info->reg_interval);
}
+#ifdef JEMALLOC_JET
+#undef arena_dalloc_junk_small
+#define arena_dalloc_junk_small JEMALLOC_N(arena_dalloc_junk_small)
+arena_dalloc_junk_small_t *arena_dalloc_junk_small =
+ JEMALLOC_N(arena_dalloc_junk_small_impl);
+#endif
+
+void
+arena_quarantine_junk_small(void *ptr, size_t usize)
+{
+ size_t binind;
+ arena_bin_info_t *bin_info;
+ cassert(config_fill);
+ assert(opt_junk);
+ assert(opt_quarantine);
+ assert(usize <= SMALL_MAXCLASS);
+
+ binind = SMALL_SIZE2BIN(usize);
+ bin_info = &arena_bin_info[binind];
+ arena_redzones_validate(ptr, bin_info, true);
+}
void *
arena_malloc_small(arena_t *arena, size_t size, bool zero)
@@ -1458,6 +1638,7 @@ arena_malloc_small(arena_t *arena, size_t size, bool zero)
} else if (opt_zero)
memset(ret, 0, size);
}
+ VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
} else {
if (config_fill && opt_junk) {
arena_alloc_junk_small(ret, &arena_bin_info[binind],
@@ -1466,7 +1647,6 @@ arena_malloc_small(arena_t *arena, size_t size, bool zero)
VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
memset(ret, 0, size);
}
- VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
return (ret);
}
@@ -1480,7 +1660,7 @@ arena_malloc_large(arena_t *arena, size_t size, bool zero)
/* Large allocation. */
size = PAGE_CEILING(size);
malloc_mutex_lock(&arena->lock);
- ret = (void *)arena_run_alloc(arena, size, true, BININD_INVALID, zero);
+ ret = (void *)arena_run_alloc_large(arena, size, zero);
if (ret == NULL) {
malloc_mutex_unlock(&arena->lock);
return (NULL);
@@ -1526,7 +1706,7 @@ arena_palloc(arena_t *arena, size_t size, size_t alignment, bool zero)
alloc_size = size + alignment - PAGE;
malloc_mutex_lock(&arena->lock);
- run = arena_run_alloc(arena, alloc_size, true, BININD_INVALID, zero);
+ run = arena_run_alloc_large(arena, alloc_size, false);
if (run == NULL) {
malloc_mutex_unlock(&arena->lock);
return (NULL);
@@ -1546,6 +1726,7 @@ arena_palloc(arena_t *arena, size_t size, size_t alignment, bool zero)
arena_run_trim_tail(arena, chunk, ret, size + trailsize, size,
false);
}
+ arena_run_init_large(arena, (arena_run_t *)ret, size, zero);
if (config_stats) {
arena->stats.nmalloc_large++;
@@ -1749,21 +1930,38 @@ arena_dalloc_small(arena_t *arena, arena_chunk_t *chunk, void *ptr,
arena_dalloc_bin(arena, chunk, ptr, pageind, mapelm);
}
+#ifdef JEMALLOC_JET
+#undef arena_dalloc_junk_large
+#define arena_dalloc_junk_large JEMALLOC_N(arena_dalloc_junk_large_impl)
+#endif
+static void
+arena_dalloc_junk_large(void *ptr, size_t usize)
+{
+
+ if (config_fill && opt_junk)
+ memset(ptr, 0x5a, usize);
+}
+#ifdef JEMALLOC_JET
+#undef arena_dalloc_junk_large
+#define arena_dalloc_junk_large JEMALLOC_N(arena_dalloc_junk_large)
+arena_dalloc_junk_large_t *arena_dalloc_junk_large =
+ JEMALLOC_N(arena_dalloc_junk_large_impl);
+#endif
+
void
arena_dalloc_large_locked(arena_t *arena, arena_chunk_t *chunk, void *ptr)
{
if (config_fill || config_stats) {
size_t pageind = ((uintptr_t)ptr - (uintptr_t)chunk) >> LG_PAGE;
- size_t size = arena_mapbits_large_size_get(chunk, pageind);
+ size_t usize = arena_mapbits_large_size_get(chunk, pageind);
- if (config_fill && config_stats && opt_junk)
- memset(ptr, 0x5a, size);
+ arena_dalloc_junk_large(ptr, usize);
if (config_stats) {
arena->stats.ndalloc_large++;
- arena->stats.allocated_large -= size;
- arena->stats.lstats[(size >> LG_PAGE) - 1].ndalloc++;
- arena->stats.lstats[(size >> LG_PAGE) - 1].curruns--;
+ arena->stats.allocated_large -= usize;
+ arena->stats.lstats[(usize >> LG_PAGE) - 1].ndalloc++;
+ arena->stats.lstats[(usize >> LG_PAGE) - 1].curruns--;
}
}
@@ -1834,9 +2032,8 @@ arena_ralloc_large_grow(arena_t *arena, arena_chunk_t *chunk, void *ptr,
size_t flag_dirty;
size_t splitsize = (oldsize + followsize <= size + extra)
? followsize : size + extra - oldsize;
- arena_run_split(arena, (arena_run_t *)((uintptr_t)chunk +
- ((pageind+npages) << LG_PAGE)), splitsize, true,
- BININD_INVALID, zero);
+ arena_run_split_large(arena, (arena_run_t *)((uintptr_t)chunk +
+ ((pageind+npages) << LG_PAGE)), splitsize, zero);
size = oldsize + splitsize;
npages = size >> LG_PAGE;
@@ -1875,6 +2072,26 @@ arena_ralloc_large_grow(arena_t *arena, arena_chunk_t *chunk, void *ptr,
return (true);
}
+#ifdef JEMALLOC_JET
+#undef arena_ralloc_junk_large
+#define arena_ralloc_junk_large JEMALLOC_N(arena_ralloc_junk_large_impl)
+#endif
+static void
+arena_ralloc_junk_large(void *ptr, size_t old_usize, size_t usize)
+{
+
+ if (config_fill && opt_junk) {
+ memset((void *)((uintptr_t)ptr + usize), 0x5a,
+ old_usize - usize);
+ }
+}
+#ifdef JEMALLOC_JET
+#undef arena_ralloc_junk_large
+#define arena_ralloc_junk_large JEMALLOC_N(arena_ralloc_junk_large)
+arena_ralloc_junk_large_t *arena_ralloc_junk_large =
+ JEMALLOC_N(arena_ralloc_junk_large_impl);
+#endif
+
/*
* Try to resize a large allocation, in order to avoid copying. This will
* always fail if growing an object, and the following run is already in use.
@@ -1888,10 +2105,6 @@ arena_ralloc_large(void *ptr, size_t oldsize, size_t size, size_t extra,
psize = PAGE_CEILING(size + extra);
if (psize == oldsize) {
/* Same size class. */
- if (config_fill && opt_junk && size < oldsize) {
- memset((void *)((uintptr_t)ptr + size), 0x5a, oldsize -
- size);
- }
return (false);
} else {
arena_chunk_t *chunk;
@@ -1902,10 +2115,7 @@ arena_ralloc_large(void *ptr, size_t oldsize, size_t size, size_t extra,
if (psize < oldsize) {
/* Fill before shrinking in order avoid a race. */
- if (config_fill && opt_junk) {
- memset((void *)((uintptr_t)ptr + size), 0x5a,
- oldsize - size);
- }
+ arena_ralloc_junk_large(ptr, oldsize, psize);
arena_ralloc_large_shrink(arena, chunk, ptr, oldsize,
psize);
return (false);
@@ -1913,17 +2123,23 @@ arena_ralloc_large(void *ptr, size_t oldsize, size_t size, size_t extra,
bool ret = arena_ralloc_large_grow(arena, chunk, ptr,
oldsize, PAGE_CEILING(size),
psize - PAGE_CEILING(size), zero);
- if (config_fill && ret == false && zero == false &&
- opt_zero) {
- memset((void *)((uintptr_t)ptr + oldsize), 0,
- size - oldsize);
+ if (config_fill && ret == false && zero == false) {
+ if (opt_junk) {
+ memset((void *)((uintptr_t)ptr +
+ oldsize), 0xa5, isalloc(ptr,
+ config_prof) - oldsize);
+ } else if (opt_zero) {
+ memset((void *)((uintptr_t)ptr +
+ oldsize), 0, isalloc(ptr,
+ config_prof) - oldsize);
+ }
}
return (ret);
}
}
}
-void *
+bool
arena_ralloc_no_move(void *ptr, size_t oldsize, size_t size, size_t extra,
bool zero)
{
@@ -1938,25 +2154,20 @@ arena_ralloc_no_move(void *ptr, size_t oldsize, size_t size, size_t extra,
if ((size + extra <= SMALL_MAXCLASS &&
SMALL_SIZE2BIN(size + extra) ==
SMALL_SIZE2BIN(oldsize)) || (size <= oldsize &&
- size + extra >= oldsize)) {
- if (config_fill && opt_junk && size < oldsize) {
- memset((void *)((uintptr_t)ptr + size),
- 0x5a, oldsize - size);
- }
- return (ptr);
- }
+ size + extra >= oldsize))
+ return (false);
} else {
assert(size <= arena_maxclass);
if (size + extra > SMALL_MAXCLASS) {
if (arena_ralloc_large(ptr, oldsize, size,
extra, zero) == false)
- return (ptr);
+ return (false);
}
}
}
/* Reallocation would require a move. */
- return (NULL);
+ return (true);
}
void *
@@ -1968,9 +2179,8 @@ arena_ralloc(arena_t *arena, void *ptr, size_t oldsize, size_t size,
size_t copysize;
/* Try to avoid moving the allocation. */
- ret = arena_ralloc_no_move(ptr, oldsize, size, extra, zero);
- if (ret != NULL)
- return (ret);
+ if (arena_ralloc_no_move(ptr, oldsize, size, extra, zero) == false)
+ return (ptr);
/*
* size and oldsize are different enough that we need to move the
@@ -1981,7 +2191,7 @@ arena_ralloc(arena_t *arena, void *ptr, size_t oldsize, size_t size,
size_t usize = sa2u(size + extra, alignment);
if (usize == 0)
return (NULL);
- ret = ipallocx(usize, alignment, zero, try_tcache_alloc, arena);
+ ret = ipalloct(usize, alignment, zero, try_tcache_alloc, arena);
} else
ret = arena_malloc(arena, size + extra, zero, try_tcache_alloc);
@@ -1993,7 +2203,7 @@ arena_ralloc(arena_t *arena, void *ptr, size_t oldsize, size_t size,
size_t usize = sa2u(size, alignment);
if (usize == 0)
return (NULL);
- ret = ipallocx(usize, alignment, zero, try_tcache_alloc,
+ ret = ipalloct(usize, alignment, zero, try_tcache_alloc,
arena);
} else
ret = arena_malloc(arena, size, zero, try_tcache_alloc);
@@ -2011,7 +2221,7 @@ arena_ralloc(arena_t *arena, void *ptr, size_t oldsize, size_t size,
copysize = (size < oldsize) ? size : oldsize;
VALGRIND_MAKE_MEM_UNDEFINED(ret, copysize);
memcpy(ret, ptr, copysize);
- iqallocx(ptr, try_tcache_dalloc);
+ iqalloct(ptr, try_tcache_dalloc);
return (ret);
}
@@ -2266,7 +2476,6 @@ bin_info_run_size_calc(arena_bin_info_t *bin_info, size_t min_run_size)
bin_info->reg_interval) - pad_size;
} while (try_hdr_size > try_redzone0_offset);
} while (try_run_size <= arena_maxclass
- && try_run_size <= arena_maxclass
&& RUN_MAX_OVRHD * (bin_info->reg_interval << 3) >
RUN_MAX_OVRHD_RELAX
&& (try_redzone0_offset << RUN_BFP) > RUN_MAX_OVRHD * try_run_size
diff --git a/dep/jemalloc/src/bitmap.c b/dep/jemalloc/src/bitmap.c
index b47e2629093..e2bd907d558 100644
--- a/dep/jemalloc/src/bitmap.c
+++ b/dep/jemalloc/src/bitmap.c
@@ -1,4 +1,4 @@
-#define JEMALLOC_BITMAP_C_
+#define JEMALLOC_BITMAP_C_
#include "jemalloc/internal/jemalloc_internal.h"
/******************************************************************************/
diff --git a/dep/jemalloc/src/chunk.c b/dep/jemalloc/src/chunk.c
index 044f76be96c..90ab116ae5f 100644
--- a/dep/jemalloc/src/chunk.c
+++ b/dep/jemalloc/src/chunk.c
@@ -180,7 +180,7 @@ chunk_alloc(size_t size, size_t alignment, bool base, bool *zero,
label_return:
if (ret != NULL) {
if (config_ivsalloc && base == false) {
- if (rtree_set(chunks_rtree, (uintptr_t)ret, ret)) {
+ if (rtree_set(chunks_rtree, (uintptr_t)ret, 1)) {
chunk_dealloc(ret, size, true);
return (NULL);
}
@@ -214,7 +214,7 @@ chunk_record(extent_tree_t *chunks_szad, extent_tree_t *chunks_ad, void *chunk,
size_t size)
{
bool unzeroed;
- extent_node_t *xnode, *node, *prev, key;
+ extent_node_t *xnode, *node, *prev, *xprev, key;
unzeroed = pages_purge(chunk, size);
VALGRIND_MAKE_MEM_NOACCESS(chunk, size);
@@ -226,6 +226,8 @@ chunk_record(extent_tree_t *chunks_szad, extent_tree_t *chunks_ad, void *chunk,
* held.
*/
xnode = base_node_alloc();
+ /* Use xprev to implement conditional deferred deallocation of prev. */
+ xprev = NULL;
malloc_mutex_lock(&chunks_mtx);
key.addr = (void *)((uintptr_t)chunk + size);
@@ -242,8 +244,6 @@ chunk_record(extent_tree_t *chunks_szad, extent_tree_t *chunks_ad, void *chunk,
node->size += size;
node->zeroed = (node->zeroed && (unzeroed == false));
extent_tree_szad_insert(chunks_szad, node);
- if (xnode != NULL)
- base_node_dealloc(xnode);
} else {
/* Coalescing forward failed, so insert a new node. */
if (xnode == NULL) {
@@ -253,10 +253,10 @@ chunk_record(extent_tree_t *chunks_szad, extent_tree_t *chunks_ad, void *chunk,
* already been purged, so this is only a virtual
* memory leak.
*/
- malloc_mutex_unlock(&chunks_mtx);
- return;
+ goto label_return;
}
node = xnode;
+ xnode = NULL; /* Prevent deallocation below. */
node->addr = chunk;
node->size = size;
node->zeroed = (unzeroed == false);
@@ -282,9 +282,19 @@ chunk_record(extent_tree_t *chunks_szad, extent_tree_t *chunks_ad, void *chunk,
node->zeroed = (node->zeroed && prev->zeroed);
extent_tree_szad_insert(chunks_szad, node);
- base_node_dealloc(prev);
+ xprev = prev;
}
+
+label_return:
malloc_mutex_unlock(&chunks_mtx);
+ /*
+ * Deallocate xnode and/or xprev after unlocking chunks_mtx in order to
+ * avoid potential deadlock.
+ */
+ if (xnode != NULL)
+ base_node_dealloc(xnode);
+ if (xprev != NULL)
+ base_node_dealloc(xprev);
}
void
@@ -311,7 +321,7 @@ chunk_dealloc(void *chunk, size_t size, bool unmap)
assert((size & chunksize_mask) == 0);
if (config_ivsalloc)
- rtree_set(chunks_rtree, (uintptr_t)chunk, NULL);
+ rtree_set(chunks_rtree, (uintptr_t)chunk, 0);
if (config_stats || config_prof) {
malloc_mutex_lock(&chunks_mtx);
assert(stats_chunks.curchunks >= (size / chunksize));
@@ -346,7 +356,7 @@ chunk_boot(void)
extent_tree_ad_new(&chunks_ad_dss);
if (config_ivsalloc) {
chunks_rtree = rtree_new((ZU(1) << (LG_SIZEOF_PTR+3)) -
- opt_lg_chunk);
+ opt_lg_chunk, base_alloc, NULL);
if (chunks_rtree == NULL)
return (true);
}
@@ -358,7 +368,7 @@ void
chunk_prefork(void)
{
- malloc_mutex_lock(&chunks_mtx);
+ malloc_mutex_prefork(&chunks_mtx);
if (config_ivsalloc)
rtree_prefork(chunks_rtree);
chunk_dss_prefork();
diff --git a/dep/jemalloc/src/chunk_dss.c b/dep/jemalloc/src/chunk_dss.c
index 24781cc52dc..510bb8bee85 100644
--- a/dep/jemalloc/src/chunk_dss.c
+++ b/dep/jemalloc/src/chunk_dss.c
@@ -28,16 +28,17 @@ static void *dss_max;
/******************************************************************************/
-#ifndef JEMALLOC_HAVE_SBRK
static void *
-sbrk(intptr_t increment)
+chunk_dss_sbrk(intptr_t increment)
{
+#ifdef JEMALLOC_HAVE_SBRK
+ return (sbrk(increment));
+#else
not_implemented();
-
return (NULL);
-}
#endif
+}
dss_prec_t
chunk_dss_prec_get(void)
@@ -93,7 +94,7 @@ chunk_alloc_dss(size_t size, size_t alignment, bool *zero)
*/
do {
/* Get the current end of the DSS. */
- dss_max = sbrk(0);
+ dss_max = chunk_dss_sbrk(0);
/*
* Calculate how much padding is necessary to
* chunk-align the end of the DSS.
@@ -117,7 +118,7 @@ chunk_alloc_dss(size_t size, size_t alignment, bool *zero)
return (NULL);
}
incr = gap_size + cpad_size + size;
- dss_prev = sbrk(incr);
+ dss_prev = chunk_dss_sbrk(incr);
if (dss_prev == dss_max) {
/* Success. */
dss_max = dss_next;
@@ -163,7 +164,7 @@ chunk_dss_boot(void)
if (malloc_mutex_init(&dss_mtx))
return (true);
- dss_base = sbrk(0);
+ dss_base = chunk_dss_sbrk(0);
dss_prev = dss_base;
dss_max = dss_base;
diff --git a/dep/jemalloc/src/chunk_mmap.c b/dep/jemalloc/src/chunk_mmap.c
index 8a42e75915f..2056d793f05 100644
--- a/dep/jemalloc/src/chunk_mmap.c
+++ b/dep/jemalloc/src/chunk_mmap.c
@@ -43,7 +43,7 @@ pages_map(void *addr, size_t size)
if (munmap(ret, size) == -1) {
char buf[BUFERROR_BUF];
- buferror(buf, sizeof(buf));
+ buferror(get_errno(), buf, sizeof(buf));
malloc_printf("<jemalloc: Error in munmap(): %s\n",
buf);
if (opt_abort)
@@ -69,7 +69,7 @@ pages_unmap(void *addr, size_t size)
{
char buf[BUFERROR_BUF];
- buferror(buf, sizeof(buf));
+ buferror(get_errno(), buf, sizeof(buf));
malloc_printf("<jemalloc>: Error in "
#ifdef _WIN32
"VirtualFree"
diff --git a/dep/jemalloc/src/ckh.c b/dep/jemalloc/src/ckh.c
index 2f38348bb85..04c52966193 100644
--- a/dep/jemalloc/src/ckh.c
+++ b/dep/jemalloc/src/ckh.c
@@ -49,7 +49,7 @@ static void ckh_shrink(ckh_t *ckh);
* Search bucket for key and return the cell number if found; SIZE_T_MAX
* otherwise.
*/
-JEMALLOC_INLINE size_t
+JEMALLOC_INLINE_C size_t
ckh_bucket_search(ckh_t *ckh, size_t bucket, const void *key)
{
ckhc_t *cell;
@@ -67,7 +67,7 @@ ckh_bucket_search(ckh_t *ckh, size_t bucket, const void *key)
/*
* Search table for key and return cell number if found; SIZE_T_MAX otherwise.
*/
-JEMALLOC_INLINE size_t
+JEMALLOC_INLINE_C size_t
ckh_isearch(ckh_t *ckh, const void *key)
{
size_t hashes[2], bucket, cell;
@@ -88,7 +88,7 @@ ckh_isearch(ckh_t *ckh, const void *key)
return (cell);
}
-JEMALLOC_INLINE bool
+JEMALLOC_INLINE_C bool
ckh_try_bucket_insert(ckh_t *ckh, size_t bucket, const void *key,
const void *data)
{
@@ -120,7 +120,7 @@ ckh_try_bucket_insert(ckh_t *ckh, size_t bucket, const void *key,
* eviction/relocation procedure until either success or detection of an
* eviction/relocation bucket cycle.
*/
-JEMALLOC_INLINE bool
+JEMALLOC_INLINE_C bool
ckh_evict_reloc_insert(ckh_t *ckh, size_t argbucket, void const **argkey,
void const **argdata)
{
@@ -190,7 +190,7 @@ ckh_evict_reloc_insert(ckh_t *ckh, size_t argbucket, void const **argkey,
}
}
-JEMALLOC_INLINE bool
+JEMALLOC_INLINE_C bool
ckh_try_insert(ckh_t *ckh, void const**argkey, void const**argdata)
{
size_t hashes[2], bucket;
@@ -219,7 +219,7 @@ ckh_try_insert(ckh_t *ckh, void const**argkey, void const**argdata)
* Try to rebuild the hash table from scratch by inserting all items from the
* old table into the new.
*/
-JEMALLOC_INLINE bool
+JEMALLOC_INLINE_C bool
ckh_rebuild(ckh_t *ckh, ckhc_t *aTab)
{
size_t count, i, nins;
diff --git a/dep/jemalloc/src/ctl.c b/dep/jemalloc/src/ctl.c
index f2ef4e60611..cc2c5aef570 100644
--- a/dep/jemalloc/src/ctl.c
+++ b/dep/jemalloc/src/ctl.c
@@ -546,43 +546,30 @@ ctl_arena_refresh(arena_t *arena, unsigned i)
static bool
ctl_grow(void)
{
- size_t astats_size;
ctl_arena_stats_t *astats;
arena_t **tarenas;
- /* Extend arena stats and arenas arrays. */
- astats_size = (ctl_stats.narenas + 2) * sizeof(ctl_arena_stats_t);
- if (ctl_stats.narenas == narenas_auto) {
- /* ctl_stats.arenas and arenas came from base_alloc(). */
- astats = (ctl_arena_stats_t *)imalloc(astats_size);
- if (astats == NULL)
- return (true);
- memcpy(astats, ctl_stats.arenas, (ctl_stats.narenas + 1) *
- sizeof(ctl_arena_stats_t));
-
- tarenas = (arena_t **)imalloc((ctl_stats.narenas + 1) *
- sizeof(arena_t *));
- if (tarenas == NULL) {
- idalloc(astats);
- return (true);
- }
- memcpy(tarenas, arenas, ctl_stats.narenas * sizeof(arena_t *));
- } else {
- astats = (ctl_arena_stats_t *)iralloc(ctl_stats.arenas,
- astats_size, 0, 0, false, false);
- if (astats == NULL)
- return (true);
-
- tarenas = (arena_t **)iralloc(arenas, (ctl_stats.narenas + 1) *
- sizeof(arena_t *), 0, 0, false, false);
- if (tarenas == NULL)
- return (true);
+ /* Allocate extended arena stats and arenas arrays. */
+ astats = (ctl_arena_stats_t *)imalloc((ctl_stats.narenas + 2) *
+ sizeof(ctl_arena_stats_t));
+ if (astats == NULL)
+ return (true);
+ tarenas = (arena_t **)imalloc((ctl_stats.narenas + 1) *
+ sizeof(arena_t *));
+ if (tarenas == NULL) {
+ idalloc(astats);
+ return (true);
}
- /* Initialize the new astats and arenas elements. */
+
+ /* Initialize the new astats element. */
+ memcpy(astats, ctl_stats.arenas, (ctl_stats.narenas + 1) *
+ sizeof(ctl_arena_stats_t));
memset(&astats[ctl_stats.narenas + 1], 0, sizeof(ctl_arena_stats_t));
- if (ctl_arena_init(&astats[ctl_stats.narenas + 1]))
+ if (ctl_arena_init(&astats[ctl_stats.narenas + 1])) {
+ idalloc(tarenas);
+ idalloc(astats);
return (true);
- tarenas[ctl_stats.narenas] = NULL;
+ }
/* Swap merged stats to their new location. */
{
ctl_arena_stats_t tstats;
@@ -593,13 +580,34 @@ ctl_grow(void)
memcpy(&astats[ctl_stats.narenas + 1], &tstats,
sizeof(ctl_arena_stats_t));
}
+ /* Initialize the new arenas element. */
+ tarenas[ctl_stats.narenas] = NULL;
+ {
+ arena_t **arenas_old = arenas;
+ /*
+ * Swap extended arenas array into place. Although ctl_mtx
+ * protects this function from other threads extending the
+ * array, it does not protect from other threads mutating it
+ * (i.e. initializing arenas and setting array elements to
+ * point to them). Therefore, array copying must happen under
+ * the protection of arenas_lock.
+ */
+ malloc_mutex_lock(&arenas_lock);
+ arenas = tarenas;
+ memcpy(arenas, arenas_old, ctl_stats.narenas *
+ sizeof(arena_t *));
+ narenas_total++;
+ arenas_extend(narenas_total - 1);
+ malloc_mutex_unlock(&arenas_lock);
+ /*
+ * Deallocate arenas_old only if it came from imalloc() (not
+ * base_alloc()).
+ */
+ if (ctl_stats.narenas != narenas_auto)
+ idalloc(arenas_old);
+ }
ctl_stats.arenas = astats;
ctl_stats.narenas++;
- malloc_mutex_lock(&arenas_lock);
- arenas = tarenas;
- narenas_total++;
- arenas_extend(narenas_total - 1);
- malloc_mutex_unlock(&arenas_lock);
return (false);
}
@@ -921,7 +929,7 @@ void
ctl_prefork(void)
{
- malloc_mutex_lock(&ctl_mtx);
+ malloc_mutex_prefork(&ctl_mtx);
}
void
@@ -1102,6 +1110,8 @@ label_return: \
return (ret); \
}
+/******************************************************************************/
+
CTL_RO_NL_GEN(version, JEMALLOC_VERSION, const char *)
static int
@@ -1109,7 +1119,7 @@ epoch_ctl(const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp,
void *newp, size_t newlen)
{
int ret;
- uint64_t newval;
+ UNUSED uint64_t newval;
malloc_mutex_lock(&ctl_mtx);
WRITE(newval, uint64_t);
@@ -1123,49 +1133,52 @@ label_return:
return (ret);
}
-static int
-thread_tcache_enabled_ctl(const size_t *mib, size_t miblen, void *oldp,
- size_t *oldlenp, void *newp, size_t newlen)
-{
- int ret;
- bool oldval;
-
- if (config_tcache == false)
- return (ENOENT);
-
- oldval = tcache_enabled_get();
- if (newp != NULL) {
- if (newlen != sizeof(bool)) {
- ret = EINVAL;
- goto label_return;
- }
- tcache_enabled_set(*(bool *)newp);
- }
- READ(oldval, bool);
-
- ret = 0;
-label_return:
- return (ret);
-}
-
-static int
-thread_tcache_flush_ctl(const size_t *mib, size_t miblen, void *oldp,
- size_t *oldlenp, void *newp, size_t newlen)
-{
- int ret;
+/******************************************************************************/
- if (config_tcache == false)
- return (ENOENT);
+CTL_RO_BOOL_CONFIG_GEN(config_debug)
+CTL_RO_BOOL_CONFIG_GEN(config_dss)
+CTL_RO_BOOL_CONFIG_GEN(config_fill)
+CTL_RO_BOOL_CONFIG_GEN(config_lazy_lock)
+CTL_RO_BOOL_CONFIG_GEN(config_mremap)
+CTL_RO_BOOL_CONFIG_GEN(config_munmap)
+CTL_RO_BOOL_CONFIG_GEN(config_prof)
+CTL_RO_BOOL_CONFIG_GEN(config_prof_libgcc)
+CTL_RO_BOOL_CONFIG_GEN(config_prof_libunwind)
+CTL_RO_BOOL_CONFIG_GEN(config_stats)
+CTL_RO_BOOL_CONFIG_GEN(config_tcache)
+CTL_RO_BOOL_CONFIG_GEN(config_tls)
+CTL_RO_BOOL_CONFIG_GEN(config_utrace)
+CTL_RO_BOOL_CONFIG_GEN(config_valgrind)
+CTL_RO_BOOL_CONFIG_GEN(config_xmalloc)
- READONLY();
- WRITEONLY();
+/******************************************************************************/
- tcache_flush();
+CTL_RO_NL_GEN(opt_abort, opt_abort, bool)
+CTL_RO_NL_GEN(opt_dss, opt_dss, const char *)
+CTL_RO_NL_GEN(opt_lg_chunk, opt_lg_chunk, size_t)
+CTL_RO_NL_GEN(opt_narenas, opt_narenas, size_t)
+CTL_RO_NL_GEN(opt_lg_dirty_mult, opt_lg_dirty_mult, ssize_t)
+CTL_RO_NL_GEN(opt_stats_print, opt_stats_print, bool)
+CTL_RO_NL_CGEN(config_fill, opt_junk, opt_junk, bool)
+CTL_RO_NL_CGEN(config_fill, opt_quarantine, opt_quarantine, size_t)
+CTL_RO_NL_CGEN(config_fill, opt_redzone, opt_redzone, bool)
+CTL_RO_NL_CGEN(config_fill, opt_zero, opt_zero, bool)
+CTL_RO_NL_CGEN(config_utrace, opt_utrace, opt_utrace, bool)
+CTL_RO_NL_CGEN(config_valgrind, opt_valgrind, opt_valgrind, bool)
+CTL_RO_NL_CGEN(config_xmalloc, opt_xmalloc, opt_xmalloc, bool)
+CTL_RO_NL_CGEN(config_tcache, opt_tcache, opt_tcache, bool)
+CTL_RO_NL_CGEN(config_tcache, opt_lg_tcache_max, opt_lg_tcache_max, ssize_t)
+CTL_RO_NL_CGEN(config_prof, opt_prof, opt_prof, bool)
+CTL_RO_NL_CGEN(config_prof, opt_prof_prefix, opt_prof_prefix, const char *)
+CTL_RO_CGEN(config_prof, opt_prof_active, opt_prof_active, bool) /* Mutable. */
+CTL_RO_NL_CGEN(config_prof, opt_lg_prof_sample, opt_lg_prof_sample, size_t)
+CTL_RO_NL_CGEN(config_prof, opt_prof_accum, opt_prof_accum, bool)
+CTL_RO_NL_CGEN(config_prof, opt_lg_prof_interval, opt_lg_prof_interval, ssize_t)
+CTL_RO_NL_CGEN(config_prof, opt_prof_gdump, opt_prof_gdump, bool)
+CTL_RO_NL_CGEN(config_prof, opt_prof_final, opt_prof_final, bool)
+CTL_RO_NL_CGEN(config_prof, opt_prof_leak, opt_prof_leak, bool)
- ret = 0;
-label_return:
- return (ret);
-}
+/******************************************************************************/
static int
thread_arena_ctl(const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp,
@@ -1227,50 +1240,49 @@ CTL_RO_NL_CGEN(config_stats, thread_deallocated,
CTL_RO_NL_CGEN(config_stats, thread_deallocatedp,
&thread_allocated_tsd_get()->deallocated, uint64_t *)
-/******************************************************************************/
+static int
+thread_tcache_enabled_ctl(const size_t *mib, size_t miblen, void *oldp,
+ size_t *oldlenp, void *newp, size_t newlen)
+{
+ int ret;
+ bool oldval;
-CTL_RO_BOOL_CONFIG_GEN(config_debug)
-CTL_RO_BOOL_CONFIG_GEN(config_dss)
-CTL_RO_BOOL_CONFIG_GEN(config_fill)
-CTL_RO_BOOL_CONFIG_GEN(config_lazy_lock)
-CTL_RO_BOOL_CONFIG_GEN(config_mremap)
-CTL_RO_BOOL_CONFIG_GEN(config_munmap)
-CTL_RO_BOOL_CONFIG_GEN(config_prof)
-CTL_RO_BOOL_CONFIG_GEN(config_prof_libgcc)
-CTL_RO_BOOL_CONFIG_GEN(config_prof_libunwind)
-CTL_RO_BOOL_CONFIG_GEN(config_stats)
-CTL_RO_BOOL_CONFIG_GEN(config_tcache)
-CTL_RO_BOOL_CONFIG_GEN(config_tls)
-CTL_RO_BOOL_CONFIG_GEN(config_utrace)
-CTL_RO_BOOL_CONFIG_GEN(config_valgrind)
-CTL_RO_BOOL_CONFIG_GEN(config_xmalloc)
+ if (config_tcache == false)
+ return (ENOENT);
-/******************************************************************************/
+ oldval = tcache_enabled_get();
+ if (newp != NULL) {
+ if (newlen != sizeof(bool)) {
+ ret = EINVAL;
+ goto label_return;
+ }
+ tcache_enabled_set(*(bool *)newp);
+ }
+ READ(oldval, bool);
-CTL_RO_NL_GEN(opt_abort, opt_abort, bool)
-CTL_RO_NL_GEN(opt_dss, opt_dss, const char *)
-CTL_RO_NL_GEN(opt_lg_chunk, opt_lg_chunk, size_t)
-CTL_RO_NL_GEN(opt_narenas, opt_narenas, size_t)
-CTL_RO_NL_GEN(opt_lg_dirty_mult, opt_lg_dirty_mult, ssize_t)
-CTL_RO_NL_GEN(opt_stats_print, opt_stats_print, bool)
-CTL_RO_NL_CGEN(config_fill, opt_junk, opt_junk, bool)
-CTL_RO_NL_CGEN(config_fill, opt_zero, opt_zero, bool)
-CTL_RO_NL_CGEN(config_fill, opt_quarantine, opt_quarantine, size_t)
-CTL_RO_NL_CGEN(config_fill, opt_redzone, opt_redzone, bool)
-CTL_RO_NL_CGEN(config_utrace, opt_utrace, opt_utrace, bool)
-CTL_RO_NL_CGEN(config_valgrind, opt_valgrind, opt_valgrind, bool)
-CTL_RO_NL_CGEN(config_xmalloc, opt_xmalloc, opt_xmalloc, bool)
-CTL_RO_NL_CGEN(config_tcache, opt_tcache, opt_tcache, bool)
-CTL_RO_NL_CGEN(config_tcache, opt_lg_tcache_max, opt_lg_tcache_max, ssize_t)
-CTL_RO_NL_CGEN(config_prof, opt_prof, opt_prof, bool)
-CTL_RO_NL_CGEN(config_prof, opt_prof_prefix, opt_prof_prefix, const char *)
-CTL_RO_CGEN(config_prof, opt_prof_active, opt_prof_active, bool) /* Mutable. */
-CTL_RO_NL_CGEN(config_prof, opt_lg_prof_sample, opt_lg_prof_sample, size_t)
-CTL_RO_NL_CGEN(config_prof, opt_lg_prof_interval, opt_lg_prof_interval, ssize_t)
-CTL_RO_NL_CGEN(config_prof, opt_prof_gdump, opt_prof_gdump, bool)
-CTL_RO_NL_CGEN(config_prof, opt_prof_final, opt_prof_final, bool)
-CTL_RO_NL_CGEN(config_prof, opt_prof_leak, opt_prof_leak, bool)
-CTL_RO_NL_CGEN(config_prof, opt_prof_accum, opt_prof_accum, bool)
+ ret = 0;
+label_return:
+ return (ret);
+}
+
+static int
+thread_tcache_flush_ctl(const size_t *mib, size_t miblen, void *oldp,
+ size_t *oldlenp, void *newp, size_t newlen)
+{
+ int ret;
+
+ if (config_tcache == false)
+ return (ENOENT);
+
+ READONLY();
+ WRITEONLY();
+
+ tcache_flush();
+
+ ret = 0;
+label_return:
+ return (ret);
+}
/******************************************************************************/
@@ -1382,31 +1394,8 @@ label_return:
return (ret);
}
-
/******************************************************************************/
-CTL_RO_NL_GEN(arenas_bin_i_size, arena_bin_info[mib[2]].reg_size, size_t)
-CTL_RO_NL_GEN(arenas_bin_i_nregs, arena_bin_info[mib[2]].nregs, uint32_t)
-CTL_RO_NL_GEN(arenas_bin_i_run_size, arena_bin_info[mib[2]].run_size, size_t)
-static const ctl_named_node_t *
-arenas_bin_i_index(const size_t *mib, size_t miblen, size_t i)
-{
-
- if (i > NBINS)
- return (NULL);
- return (super_arenas_bin_i_node);
-}
-
-CTL_RO_NL_GEN(arenas_lrun_i_size, ((mib[2]+1) << LG_PAGE), size_t)
-static const ctl_named_node_t *
-arenas_lrun_i_index(const size_t *mib, size_t miblen, size_t i)
-{
-
- if (i > nlclasses)
- return (NULL);
- return (super_arenas_lrun_i_node);
-}
-
static int
arenas_narenas_ctl(const size_t *mib, size_t miblen, void *oldp,
size_t *oldlenp, void *newp, size_t newlen)
@@ -1460,7 +1449,28 @@ CTL_RO_NL_GEN(arenas_page, PAGE, size_t)
CTL_RO_NL_CGEN(config_tcache, arenas_tcache_max, tcache_maxclass, size_t)
CTL_RO_NL_GEN(arenas_nbins, NBINS, unsigned)
CTL_RO_NL_CGEN(config_tcache, arenas_nhbins, nhbins, unsigned)
+CTL_RO_NL_GEN(arenas_bin_i_size, arena_bin_info[mib[2]].reg_size, size_t)
+CTL_RO_NL_GEN(arenas_bin_i_nregs, arena_bin_info[mib[2]].nregs, uint32_t)
+CTL_RO_NL_GEN(arenas_bin_i_run_size, arena_bin_info[mib[2]].run_size, size_t)
+static const ctl_named_node_t *
+arenas_bin_i_index(const size_t *mib, size_t miblen, size_t i)
+{
+
+ if (i > NBINS)
+ return (NULL);
+ return (super_arenas_bin_i_node);
+}
+
CTL_RO_NL_GEN(arenas_nlruns, nlclasses, size_t)
+CTL_RO_NL_GEN(arenas_lrun_i_size, ((mib[2]+1) << LG_PAGE), size_t)
+static const ctl_named_node_t *
+arenas_lrun_i_index(const size_t *mib, size_t miblen, size_t i)
+{
+
+ if (i > nlclasses)
+ return (NULL);
+ return (super_arenas_lrun_i_node);
+}
static int
arenas_purge_ctl(const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp,
@@ -1567,6 +1577,11 @@ CTL_RO_NL_CGEN(config_prof, prof_interval, prof_interval, uint64_t)
/******************************************************************************/
+CTL_RO_CGEN(config_stats, stats_cactive, &stats_cactive, size_t *)
+CTL_RO_CGEN(config_stats, stats_allocated, ctl_stats.allocated, size_t)
+CTL_RO_CGEN(config_stats, stats_active, ctl_stats.active, size_t)
+CTL_RO_CGEN(config_stats, stats_mapped, ctl_stats.mapped, size_t)
+
CTL_RO_CGEN(config_stats, stats_chunks_current, ctl_stats.chunks.current,
size_t)
CTL_RO_CGEN(config_stats, stats_chunks_total, ctl_stats.chunks.total, uint64_t)
@@ -1574,6 +1589,20 @@ CTL_RO_CGEN(config_stats, stats_chunks_high, ctl_stats.chunks.high, size_t)
CTL_RO_CGEN(config_stats, stats_huge_allocated, huge_allocated, size_t)
CTL_RO_CGEN(config_stats, stats_huge_nmalloc, huge_nmalloc, uint64_t)
CTL_RO_CGEN(config_stats, stats_huge_ndalloc, huge_ndalloc, uint64_t)
+
+CTL_RO_GEN(stats_arenas_i_dss, ctl_stats.arenas[mib[2]].dss, const char *)
+CTL_RO_GEN(stats_arenas_i_nthreads, ctl_stats.arenas[mib[2]].nthreads, unsigned)
+CTL_RO_GEN(stats_arenas_i_pactive, ctl_stats.arenas[mib[2]].pactive, size_t)
+CTL_RO_GEN(stats_arenas_i_pdirty, ctl_stats.arenas[mib[2]].pdirty, size_t)
+CTL_RO_CGEN(config_stats, stats_arenas_i_mapped,
+ ctl_stats.arenas[mib[2]].astats.mapped, size_t)
+CTL_RO_CGEN(config_stats, stats_arenas_i_npurge,
+ ctl_stats.arenas[mib[2]].astats.npurge, uint64_t)
+CTL_RO_CGEN(config_stats, stats_arenas_i_nmadvise,
+ ctl_stats.arenas[mib[2]].astats.nmadvise, uint64_t)
+CTL_RO_CGEN(config_stats, stats_arenas_i_purged,
+ ctl_stats.arenas[mib[2]].astats.purged, uint64_t)
+
CTL_RO_CGEN(config_stats, stats_arenas_i_small_allocated,
ctl_stats.arenas[mib[2]].allocated_small, size_t)
CTL_RO_CGEN(config_stats, stats_arenas_i_small_nmalloc,
@@ -1637,19 +1666,6 @@ stats_arenas_i_lruns_j_index(const size_t *mib, size_t miblen, size_t j)
return (super_stats_arenas_i_lruns_j_node);
}
-CTL_RO_GEN(stats_arenas_i_nthreads, ctl_stats.arenas[mib[2]].nthreads, unsigned)
-CTL_RO_GEN(stats_arenas_i_dss, ctl_stats.arenas[mib[2]].dss, const char *)
-CTL_RO_GEN(stats_arenas_i_pactive, ctl_stats.arenas[mib[2]].pactive, size_t)
-CTL_RO_GEN(stats_arenas_i_pdirty, ctl_stats.arenas[mib[2]].pdirty, size_t)
-CTL_RO_CGEN(config_stats, stats_arenas_i_mapped,
- ctl_stats.arenas[mib[2]].astats.mapped, size_t)
-CTL_RO_CGEN(config_stats, stats_arenas_i_npurge,
- ctl_stats.arenas[mib[2]].astats.npurge, uint64_t)
-CTL_RO_CGEN(config_stats, stats_arenas_i_nmadvise,
- ctl_stats.arenas[mib[2]].astats.nmadvise, uint64_t)
-CTL_RO_CGEN(config_stats, stats_arenas_i_purged,
- ctl_stats.arenas[mib[2]].astats.purged, uint64_t)
-
static const ctl_named_node_t *
stats_arenas_i_index(const size_t *mib, size_t miblen, size_t i)
{
@@ -1666,8 +1682,3 @@ label_return:
malloc_mutex_unlock(&ctl_mtx);
return (ret);
}
-
-CTL_RO_CGEN(config_stats, stats_cactive, &stats_cactive, size_t *)
-CTL_RO_CGEN(config_stats, stats_allocated, ctl_stats.allocated, size_t)
-CTL_RO_CGEN(config_stats, stats_active, ctl_stats.active, size_t)
-CTL_RO_CGEN(config_stats, stats_mapped, ctl_stats.mapped, size_t)
diff --git a/dep/jemalloc/src/huge.c b/dep/jemalloc/src/huge.c
index aa08d43d362..6d86aed881b 100644
--- a/dep/jemalloc/src/huge.c
+++ b/dep/jemalloc/src/huge.c
@@ -78,7 +78,7 @@ huge_palloc(size_t size, size_t alignment, bool zero)
return (ret);
}
-void *
+bool
huge_ralloc_no_move(void *ptr, size_t oldsize, size_t size, size_t extra)
{
@@ -89,15 +89,11 @@ huge_ralloc_no_move(void *ptr, size_t oldsize, size_t size, size_t extra)
&& CHUNK_CEILING(oldsize) >= CHUNK_CEILING(size)
&& CHUNK_CEILING(oldsize) <= CHUNK_CEILING(size+extra)) {
assert(CHUNK_CEILING(oldsize) == oldsize);
- if (config_fill && opt_junk && size < oldsize) {
- memset((void *)((uintptr_t)ptr + size), 0x5a,
- oldsize - size);
- }
- return (ptr);
+ return (false);
}
/* Reallocation would require a move. */
- return (NULL);
+ return (true);
}
void *
@@ -108,9 +104,8 @@ huge_ralloc(void *ptr, size_t oldsize, size_t size, size_t extra,
size_t copysize;
/* Try to avoid moving the allocation. */
- ret = huge_ralloc_no_move(ptr, oldsize, size, extra);
- if (ret != NULL)
- return (ret);
+ if (huge_ralloc_no_move(ptr, oldsize, size, extra) == false)
+ return (ptr);
/*
* size and oldsize are different enough that we need to use a
@@ -169,23 +164,56 @@ huge_ralloc(void *ptr, size_t oldsize, size_t size, size_t extra,
*/
char buf[BUFERROR_BUF];
- buferror(buf, sizeof(buf));
+ buferror(get_errno(), buf, sizeof(buf));
malloc_printf("<jemalloc>: Error in mremap(): %s\n",
buf);
if (opt_abort)
abort();
memcpy(ret, ptr, copysize);
chunk_dealloc_mmap(ptr, oldsize);
+ } else if (config_fill && zero == false && opt_junk && oldsize
+ < newsize) {
+ /*
+ * mremap(2) clobbers the original mapping, so
+ * junk/zero filling is not preserved. There is no
+ * need to zero fill here, since any trailing
+ * uninititialized memory is demand-zeroed by the
+ * kernel, but junk filling must be redone.
+ */
+ memset(ret + oldsize, 0xa5, newsize - oldsize);
}
} else
#endif
{
memcpy(ret, ptr, copysize);
- iqallocx(ptr, try_tcache_dalloc);
+ iqalloct(ptr, try_tcache_dalloc);
}
return (ret);
}
+#ifdef JEMALLOC_JET
+#undef huge_dalloc_junk
+#define huge_dalloc_junk JEMALLOC_N(huge_dalloc_junk_impl)
+#endif
+static void
+huge_dalloc_junk(void *ptr, size_t usize)
+{
+
+ if (config_fill && config_dss && opt_junk) {
+ /*
+ * Only bother junk filling if the chunk isn't about to be
+ * unmapped.
+ */
+ if (config_munmap == false || (config_dss && chunk_in_dss(ptr)))
+ memset(ptr, 0x5a, usize);
+ }
+}
+#ifdef JEMALLOC_JET
+#undef huge_dalloc_junk
+#define huge_dalloc_junk JEMALLOC_N(huge_dalloc_junk)
+huge_dalloc_junk_t *huge_dalloc_junk = JEMALLOC_N(huge_dalloc_junk_impl);
+#endif
+
void
huge_dalloc(void *ptr, bool unmap)
{
@@ -208,8 +236,8 @@ huge_dalloc(void *ptr, bool unmap)
malloc_mutex_unlock(&huge_mtx);
- if (unmap && config_fill && config_dss && opt_junk)
- memset(node->addr, 0x5a, node->size);
+ if (unmap)
+ huge_dalloc_junk(node->addr, node->size);
chunk_dealloc(node->addr, node->size, unmap);
diff --git a/dep/jemalloc/src/jemalloc.c b/dep/jemalloc/src/jemalloc.c
index bc350ed953b..563d99f8816 100644
--- a/dep/jemalloc/src/jemalloc.c
+++ b/dep/jemalloc/src/jemalloc.c
@@ -100,18 +100,12 @@ typedef struct {
#endif
/******************************************************************************/
-/* Function prototypes for non-inline static functions. */
-
-static void stats_print_atexit(void);
-static unsigned malloc_ncpus(void);
-static bool malloc_conf_next(char const **opts_p, char const **k_p,
- size_t *klen_p, char const **v_p, size_t *vlen_p);
-static void malloc_conf_error(const char *msg, const char *k, size_t klen,
- const char *v, size_t vlen);
-static void malloc_conf_init(void);
+/*
+ * Function prototypes for static functions that are referenced prior to
+ * definition.
+ */
+
static bool malloc_init_hard(void);
-static int imemalign(void **memptr, size_t alignment, size_t size,
- size_t min_alignment);
/******************************************************************************/
/*
@@ -252,7 +246,6 @@ stats_print_atexit(void)
static unsigned
malloc_ncpus(void)
{
- unsigned ret;
long result;
#ifdef _WIN32
@@ -262,14 +255,7 @@ malloc_ncpus(void)
#else
result = sysconf(_SC_NPROCESSORS_ONLN);
#endif
- if (result == -1) {
- /* Error. */
- ret = 1;
- } else {
- ret = (unsigned)result;
- }
-
- return (ret);
+ return ((result == -1) ? 1 : (unsigned)result);
}
void
@@ -282,7 +268,7 @@ arenas_cleanup(void *arg)
malloc_mutex_unlock(&arenas_lock);
}
-static JEMALLOC_ATTR(always_inline) void
+JEMALLOC_ALWAYS_INLINE_C void
malloc_thread_init(void)
{
@@ -299,7 +285,7 @@ malloc_thread_init(void)
quarantine_alloc_hook();
}
-static JEMALLOC_ATTR(always_inline) bool
+JEMALLOC_ALWAYS_INLINE_C bool
malloc_init(void)
{
@@ -436,8 +422,9 @@ malloc_conf_init(void)
}
break;
case 1: {
+ int linklen = 0;
#ifndef _WIN32
- int linklen;
+ int saved_errno = errno;
const char *linkname =
# ifdef JEMALLOC_PREFIX
"/etc/"JEMALLOC_PREFIX"malloc.conf"
@@ -446,21 +433,20 @@ malloc_conf_init(void)
# endif
;
- if ((linklen = readlink(linkname, buf,
- sizeof(buf) - 1)) != -1) {
- /*
- * Use the contents of the "/etc/malloc.conf"
- * symbolic link's name.
- */
- buf[linklen] = '\0';
- opts = buf;
- } else
-#endif
- {
+ /*
+ * Try to use the contents of the "/etc/malloc.conf"
+ * symbolic link's name.
+ */
+ linklen = readlink(linkname, buf, sizeof(buf) - 1);
+ if (linklen == -1) {
/* No configuration specified. */
- buf[0] = '\0';
- opts = buf;
+ linklen = 0;
+ /* restore errno */
+ set_errno(saved_errno);
}
+#endif
+ buf[linklen] = '\0';
+ opts = buf;
break;
} case 2: {
const char *envname =
@@ -484,8 +470,7 @@ malloc_conf_init(void)
}
break;
} default:
- /* NOTREACHED */
- assert(false);
+ not_reached();
buf[0] = '\0';
opts = buf;
}
@@ -522,14 +507,15 @@ malloc_conf_init(void)
"Invalid conf value", \
k, klen, v, vlen); \
} else if (clip) { \
- if (um < min) \
+ if (min != 0 && um < min) \
o = min; \
else if (um > max) \
o = max; \
else \
o = um; \
} else { \
- if (um < min || um > max) { \
+ if ((min != 0 && um < min) || \
+ um > max) { \
malloc_conf_error( \
"Out-of-range " \
"conf value", \
@@ -695,17 +681,6 @@ malloc_init_hard(void)
malloc_conf_init();
-#if (!defined(JEMALLOC_MUTEX_INIT_CB) && !defined(JEMALLOC_ZONE) \
- && !defined(_WIN32))
- /* Register fork handlers. */
- if (pthread_atfork(jemalloc_prefork, jemalloc_postfork_parent,
- jemalloc_postfork_child) != 0) {
- malloc_write("<jemalloc>: Error in pthread_atfork()\n");
- if (opt_abort)
- abort();
- }
-#endif
-
if (opt_stats_print) {
/* Print statistics at exit. */
if (atexit(stats_print_atexit) != 0) {
@@ -745,8 +720,10 @@ malloc_init_hard(void)
return (true);
}
- if (malloc_mutex_init(&arenas_lock))
+ if (malloc_mutex_init(&arenas_lock)) {
+ malloc_mutex_unlock(&init_lock);
return (true);
+ }
/*
* Create enough scaffolding to allow recursive allocation in
@@ -792,9 +769,25 @@ malloc_init_hard(void)
return (true);
}
- /* Get number of CPUs. */
malloc_mutex_unlock(&init_lock);
+ /**********************************************************************/
+ /* Recursive allocation may follow. */
+
ncpus = malloc_ncpus();
+
+#if (!defined(JEMALLOC_MUTEX_INIT_CB) && !defined(JEMALLOC_ZONE) \
+ && !defined(_WIN32))
+ /* LinuxThreads's pthread_atfork() allocates. */
+ if (pthread_atfork(jemalloc_prefork, jemalloc_postfork_parent,
+ jemalloc_postfork_child) != 0) {
+ malloc_write("<jemalloc>: Error in pthread_atfork()\n");
+ if (opt_abort)
+ abort();
+ }
+#endif
+
+ /* Done recursively allocating. */
+ /**********************************************************************/
malloc_mutex_lock(&init_lock);
if (mutex_boot()) {
@@ -841,6 +834,7 @@ malloc_init_hard(void)
malloc_initialized = true;
malloc_mutex_unlock(&init_lock);
+
return (false);
}
@@ -852,42 +846,88 @@ malloc_init_hard(void)
* Begin malloc(3)-compatible functions.
*/
+static void *
+imalloc_prof_sample(size_t usize, prof_thr_cnt_t *cnt)
+{
+ void *p;
+
+ if (cnt == NULL)
+ return (NULL);
+ if (prof_promote && usize <= SMALL_MAXCLASS) {
+ p = imalloc(SMALL_MAXCLASS+1);
+ if (p == NULL)
+ return (NULL);
+ arena_prof_promoted(p, usize);
+ } else
+ p = imalloc(usize);
+
+ return (p);
+}
+
+JEMALLOC_ALWAYS_INLINE_C void *
+imalloc_prof(size_t usize, prof_thr_cnt_t *cnt)
+{
+ void *p;
+
+ if ((uintptr_t)cnt != (uintptr_t)1U)
+ p = imalloc_prof_sample(usize, cnt);
+ else
+ p = imalloc(usize);
+ if (p == NULL)
+ return (NULL);
+ prof_malloc(p, usize, cnt);
+
+ return (p);
+}
+
+/*
+ * MALLOC_BODY() is a macro rather than a function because its contents are in
+ * the fast path, but inlining would cause reliability issues when determining
+ * how many frames to discard from heap profiling backtraces.
+ */
+#define MALLOC_BODY(ret, size, usize) do { \
+ if (malloc_init()) \
+ ret = NULL; \
+ else { \
+ if (config_prof && opt_prof) { \
+ prof_thr_cnt_t *cnt; \
+ \
+ usize = s2u(size); \
+ /* \
+ * Call PROF_ALLOC_PREP() here rather than in \
+ * imalloc_prof() so that imalloc_prof() can be \
+ * inlined without introducing uncertainty \
+ * about the number of backtrace frames to \
+ * ignore. imalloc_prof() is in the fast path \
+ * when heap profiling is enabled, so inlining \
+ * is critical to performance. (For \
+ * consistency all callers of PROF_ALLOC_PREP() \
+ * are structured similarly, even though e.g. \
+ * realloc() isn't called enough for inlining \
+ * to be critical.) \
+ */ \
+ PROF_ALLOC_PREP(1, usize, cnt); \
+ ret = imalloc_prof(usize, cnt); \
+ } else { \
+ if (config_stats || (config_valgrind && \
+ opt_valgrind)) \
+ usize = s2u(size); \
+ ret = imalloc(size); \
+ } \
+ } \
+} while (0)
+
void *
je_malloc(size_t size)
{
void *ret;
size_t usize JEMALLOC_CC_SILENCE_INIT(0);
- prof_thr_cnt_t *cnt JEMALLOC_CC_SILENCE_INIT(NULL);
-
- if (malloc_init()) {
- ret = NULL;
- goto label_oom;
- }
if (size == 0)
size = 1;
- if (config_prof && opt_prof) {
- usize = s2u(size);
- PROF_ALLOC_PREP(1, usize, cnt);
- if (cnt == NULL) {
- ret = NULL;
- goto label_oom;
- }
- if (prof_promote && (uintptr_t)cnt != (uintptr_t)1U && usize <=
- SMALL_MAXCLASS) {
- ret = imalloc(SMALL_MAXCLASS+1);
- if (ret != NULL)
- arena_prof_promoted(ret, usize);
- } else
- ret = imalloc(size);
- } else {
- if (config_stats || (config_valgrind && opt_valgrind))
- usize = s2u(size);
- ret = imalloc(size);
- }
+ MALLOC_BODY(ret, size, usize);
-label_oom:
if (ret == NULL) {
if (config_xmalloc && opt_xmalloc) {
malloc_write("<jemalloc>: Error in malloc(): "
@@ -896,8 +936,6 @@ label_oom:
}
set_errno(ENOMEM);
}
- if (config_prof && opt_prof && ret != NULL)
- prof_malloc(ret, usize, cnt);
if (config_stats && ret != NULL) {
assert(usize == isalloc(ret, config_prof));
thread_allocated_tsd_get()->allocated += usize;
@@ -907,6 +945,42 @@ label_oom:
return (ret);
}
+static void *
+imemalign_prof_sample(size_t alignment, size_t usize, prof_thr_cnt_t *cnt)
+{
+ void *p;
+
+ if (cnt == NULL)
+ return (NULL);
+ if (prof_promote && usize <= SMALL_MAXCLASS) {
+ assert(sa2u(SMALL_MAXCLASS+1, alignment) != 0);
+ p = ipalloc(sa2u(SMALL_MAXCLASS+1, alignment), alignment,
+ false);
+ if (p == NULL)
+ return (NULL);
+ arena_prof_promoted(p, usize);
+ } else
+ p = ipalloc(usize, alignment, false);
+
+ return (p);
+}
+
+JEMALLOC_ALWAYS_INLINE_C void *
+imemalign_prof(size_t alignment, size_t usize, prof_thr_cnt_t *cnt)
+{
+ void *p;
+
+ if ((uintptr_t)cnt != (uintptr_t)1U)
+ p = imemalign_prof_sample(alignment, usize, cnt);
+ else
+ p = ipalloc(usize, alignment, false);
+ if (p == NULL)
+ return (NULL);
+ prof_malloc(p, usize, cnt);
+
+ return (p);
+}
+
JEMALLOC_ATTR(nonnull(1))
#ifdef JEMALLOC_PROF
/*
@@ -916,19 +990,18 @@ JEMALLOC_ATTR(nonnull(1))
JEMALLOC_NOINLINE
#endif
static int
-imemalign(void **memptr, size_t alignment, size_t size,
- size_t min_alignment)
+imemalign(void **memptr, size_t alignment, size_t size, size_t min_alignment)
{
int ret;
size_t usize;
void *result;
- prof_thr_cnt_t *cnt JEMALLOC_CC_SILENCE_INIT(NULL);
assert(min_alignment != 0);
- if (malloc_init())
+ if (malloc_init()) {
result = NULL;
- else {
+ goto label_oom;
+ } else {
if (size == 0)
size = 1;
@@ -948,57 +1021,38 @@ imemalign(void **memptr, size_t alignment, size_t size,
usize = sa2u(size, alignment);
if (usize == 0) {
result = NULL;
- ret = ENOMEM;
- goto label_return;
+ goto label_oom;
}
if (config_prof && opt_prof) {
+ prof_thr_cnt_t *cnt;
+
PROF_ALLOC_PREP(2, usize, cnt);
- if (cnt == NULL) {
- result = NULL;
- ret = EINVAL;
- } else {
- if (prof_promote && (uintptr_t)cnt !=
- (uintptr_t)1U && usize <= SMALL_MAXCLASS) {
- assert(sa2u(SMALL_MAXCLASS+1,
- alignment) != 0);
- result = ipalloc(sa2u(SMALL_MAXCLASS+1,
- alignment), alignment, false);
- if (result != NULL) {
- arena_prof_promoted(result,
- usize);
- }
- } else {
- result = ipalloc(usize, alignment,
- false);
- }
- }
+ result = imemalign_prof(alignment, usize, cnt);
} else
result = ipalloc(usize, alignment, false);
- }
-
- if (result == NULL) {
- if (config_xmalloc && opt_xmalloc) {
- malloc_write("<jemalloc>: Error allocating aligned "
- "memory: out of memory\n");
- abort();
- }
- ret = ENOMEM;
- goto label_return;
+ if (result == NULL)
+ goto label_oom;
}
*memptr = result;
ret = 0;
-
label_return:
if (config_stats && result != NULL) {
assert(usize == isalloc(result, config_prof));
thread_allocated_tsd_get()->allocated += usize;
}
- if (config_prof && opt_prof && result != NULL)
- prof_malloc(result, usize, cnt);
UTRACE(0, size, result);
return (ret);
+label_oom:
+ assert(result == NULL);
+ if (config_xmalloc && opt_xmalloc) {
+ malloc_write("<jemalloc>: Error allocating aligned memory: "
+ "out of memory\n");
+ abort();
+ }
+ ret = ENOMEM;
+ goto label_return;
}
int
@@ -1025,13 +1079,46 @@ je_aligned_alloc(size_t alignment, size_t size)
return (ret);
}
+static void *
+icalloc_prof_sample(size_t usize, prof_thr_cnt_t *cnt)
+{
+ void *p;
+
+ if (cnt == NULL)
+ return (NULL);
+ if (prof_promote && usize <= SMALL_MAXCLASS) {
+ p = icalloc(SMALL_MAXCLASS+1);
+ if (p == NULL)
+ return (NULL);
+ arena_prof_promoted(p, usize);
+ } else
+ p = icalloc(usize);
+
+ return (p);
+}
+
+JEMALLOC_ALWAYS_INLINE_C void *
+icalloc_prof(size_t usize, prof_thr_cnt_t *cnt)
+{
+ void *p;
+
+ if ((uintptr_t)cnt != (uintptr_t)1U)
+ p = icalloc_prof_sample(usize, cnt);
+ else
+ p = icalloc(usize);
+ if (p == NULL)
+ return (NULL);
+ prof_malloc(p, usize, cnt);
+
+ return (p);
+}
+
void *
je_calloc(size_t num, size_t size)
{
void *ret;
size_t num_size;
size_t usize JEMALLOC_CC_SILENCE_INIT(0);
- prof_thr_cnt_t *cnt JEMALLOC_CC_SILENCE_INIT(NULL);
if (malloc_init()) {
num_size = 0;
@@ -1060,19 +1147,11 @@ je_calloc(size_t num, size_t size)
}
if (config_prof && opt_prof) {
+ prof_thr_cnt_t *cnt;
+
usize = s2u(num_size);
PROF_ALLOC_PREP(1, usize, cnt);
- if (cnt == NULL) {
- ret = NULL;
- goto label_return;
- }
- if (prof_promote && (uintptr_t)cnt != (uintptr_t)1U && usize
- <= SMALL_MAXCLASS) {
- ret = icalloc(SMALL_MAXCLASS+1);
- if (ret != NULL)
- arena_prof_promoted(ret, usize);
- } else
- ret = icalloc(num_size);
+ ret = icalloc_prof(usize, cnt);
} else {
if (config_stats || (config_valgrind && opt_valgrind))
usize = s2u(num_size);
@@ -1088,9 +1167,6 @@ label_return:
}
set_errno(ENOMEM);
}
-
- if (config_prof && opt_prof && ret != NULL)
- prof_malloc(ret, usize, cnt);
if (config_stats && ret != NULL) {
assert(usize == isalloc(ret, config_prof));
thread_allocated_tsd_get()->allocated += usize;
@@ -1100,152 +1176,126 @@ label_return:
return (ret);
}
+static void *
+irealloc_prof_sample(void *oldptr, size_t usize, prof_thr_cnt_t *cnt)
+{
+ void *p;
+
+ if (cnt == NULL)
+ return (NULL);
+ if (prof_promote && usize <= SMALL_MAXCLASS) {
+ p = iralloc(oldptr, SMALL_MAXCLASS+1, 0, 0, false);
+ if (p == NULL)
+ return (NULL);
+ arena_prof_promoted(p, usize);
+ } else
+ p = iralloc(oldptr, usize, 0, 0, false);
+
+ return (p);
+}
+
+JEMALLOC_ALWAYS_INLINE_C void *
+irealloc_prof(void *oldptr, size_t old_usize, size_t usize, prof_thr_cnt_t *cnt)
+{
+ void *p;
+ prof_ctx_t *old_ctx;
+
+ old_ctx = prof_ctx_get(oldptr);
+ if ((uintptr_t)cnt != (uintptr_t)1U)
+ p = irealloc_prof_sample(oldptr, usize, cnt);
+ else
+ p = iralloc(oldptr, usize, 0, 0, false);
+ if (p == NULL)
+ return (NULL);
+ prof_realloc(p, usize, cnt, old_usize, old_ctx);
+
+ return (p);
+}
+
+JEMALLOC_INLINE_C void
+ifree(void *ptr)
+{
+ size_t usize;
+ UNUSED size_t rzsize JEMALLOC_CC_SILENCE_INIT(0);
+
+ assert(ptr != NULL);
+ assert(malloc_initialized || IS_INITIALIZER);
+
+ if (config_prof && opt_prof) {
+ usize = isalloc(ptr, config_prof);
+ prof_free(ptr, usize);
+ } else if (config_stats || config_valgrind)
+ usize = isalloc(ptr, config_prof);
+ if (config_stats)
+ thread_allocated_tsd_get()->deallocated += usize;
+ if (config_valgrind && opt_valgrind)
+ rzsize = p2rz(ptr);
+ iqalloc(ptr);
+ JEMALLOC_VALGRIND_FREE(ptr, rzsize);
+}
+
void *
je_realloc(void *ptr, size_t size)
{
void *ret;
size_t usize JEMALLOC_CC_SILENCE_INIT(0);
- size_t old_size = 0;
- size_t old_rzsize JEMALLOC_CC_SILENCE_INIT(0);
- prof_thr_cnt_t *cnt JEMALLOC_CC_SILENCE_INIT(NULL);
- prof_ctx_t *old_ctx JEMALLOC_CC_SILENCE_INIT(NULL);
+ size_t old_usize = 0;
+ UNUSED size_t old_rzsize JEMALLOC_CC_SILENCE_INIT(0);
if (size == 0) {
if (ptr != NULL) {
- /* realloc(ptr, 0) is equivalent to free(p). */
- assert(malloc_initialized || IS_INITIALIZER);
- if (config_prof) {
- old_size = isalloc(ptr, true);
- if (config_valgrind && opt_valgrind)
- old_rzsize = p2rz(ptr);
- } else if (config_stats) {
- old_size = isalloc(ptr, false);
- if (config_valgrind && opt_valgrind)
- old_rzsize = u2rz(old_size);
- } else if (config_valgrind && opt_valgrind) {
- old_size = isalloc(ptr, false);
- old_rzsize = u2rz(old_size);
- }
- if (config_prof && opt_prof) {
- old_ctx = prof_ctx_get(ptr);
- cnt = NULL;
- }
- iqalloc(ptr);
- ret = NULL;
- goto label_return;
- } else
- size = 1;
+ /* realloc(ptr, 0) is equivalent to free(ptr). */
+ UTRACE(ptr, 0, 0);
+ ifree(ptr);
+ return (NULL);
+ }
+ size = 1;
}
if (ptr != NULL) {
assert(malloc_initialized || IS_INITIALIZER);
malloc_thread_init();
- if (config_prof) {
- old_size = isalloc(ptr, true);
- if (config_valgrind && opt_valgrind)
- old_rzsize = p2rz(ptr);
- } else if (config_stats) {
- old_size = isalloc(ptr, false);
- if (config_valgrind && opt_valgrind)
- old_rzsize = u2rz(old_size);
- } else if (config_valgrind && opt_valgrind) {
- old_size = isalloc(ptr, false);
- old_rzsize = u2rz(old_size);
- }
+ if ((config_prof && opt_prof) || config_stats ||
+ (config_valgrind && opt_valgrind))
+ old_usize = isalloc(ptr, config_prof);
+ if (config_valgrind && opt_valgrind)
+ old_rzsize = config_prof ? p2rz(ptr) : u2rz(old_usize);
+
if (config_prof && opt_prof) {
+ prof_thr_cnt_t *cnt;
+
usize = s2u(size);
- old_ctx = prof_ctx_get(ptr);
PROF_ALLOC_PREP(1, usize, cnt);
- if (cnt == NULL) {
- old_ctx = NULL;
- ret = NULL;
- goto label_oom;
- }
- if (prof_promote && (uintptr_t)cnt != (uintptr_t)1U &&
- usize <= SMALL_MAXCLASS) {
- ret = iralloc(ptr, SMALL_MAXCLASS+1, 0, 0,
- false, false);
- if (ret != NULL)
- arena_prof_promoted(ret, usize);
- else
- old_ctx = NULL;
- } else {
- ret = iralloc(ptr, size, 0, 0, false, false);
- if (ret == NULL)
- old_ctx = NULL;
- }
+ ret = irealloc_prof(ptr, old_usize, usize, cnt);
} else {
if (config_stats || (config_valgrind && opt_valgrind))
usize = s2u(size);
- ret = iralloc(ptr, size, 0, 0, false, false);
- }
-
-label_oom:
- if (ret == NULL) {
- if (config_xmalloc && opt_xmalloc) {
- malloc_write("<jemalloc>: Error in realloc(): "
- "out of memory\n");
- abort();
- }
- set_errno(ENOMEM);
+ ret = iralloc(ptr, size, 0, 0, false);
}
} else {
/* realloc(NULL, size) is equivalent to malloc(size). */
- if (config_prof && opt_prof)
- old_ctx = NULL;
- if (malloc_init()) {
- if (config_prof && opt_prof)
- cnt = NULL;
- ret = NULL;
- } else {
- if (config_prof && opt_prof) {
- usize = s2u(size);
- PROF_ALLOC_PREP(1, usize, cnt);
- if (cnt == NULL)
- ret = NULL;
- else {
- if (prof_promote && (uintptr_t)cnt !=
- (uintptr_t)1U && usize <=
- SMALL_MAXCLASS) {
- ret = imalloc(SMALL_MAXCLASS+1);
- if (ret != NULL) {
- arena_prof_promoted(ret,
- usize);
- }
- } else
- ret = imalloc(size);
- }
- } else {
- if (config_stats || (config_valgrind &&
- opt_valgrind))
- usize = s2u(size);
- ret = imalloc(size);
- }
- }
+ MALLOC_BODY(ret, size, usize);
+ }
- if (ret == NULL) {
- if (config_xmalloc && opt_xmalloc) {
- malloc_write("<jemalloc>: Error in realloc(): "
- "out of memory\n");
- abort();
- }
- set_errno(ENOMEM);
+ if (ret == NULL) {
+ if (config_xmalloc && opt_xmalloc) {
+ malloc_write("<jemalloc>: Error in realloc(): "
+ "out of memory\n");
+ abort();
}
+ set_errno(ENOMEM);
}
-
-label_return:
- if (config_prof && opt_prof)
- prof_realloc(ret, usize, cnt, old_size, old_ctx);
if (config_stats && ret != NULL) {
thread_allocated_t *ta;
assert(usize == isalloc(ret, config_prof));
ta = thread_allocated_tsd_get();
ta->allocated += usize;
- ta->deallocated += old_size;
+ ta->deallocated += old_usize;
}
UTRACE(ptr, size, ret);
- JEMALLOC_VALGRIND_REALLOC(ret, usize, ptr, old_size, old_rzsize, false);
+ JEMALLOC_VALGRIND_REALLOC(ret, usize, ptr, old_usize, old_rzsize,
+ false);
return (ret);
}
@@ -1254,24 +1304,8 @@ je_free(void *ptr)
{
UTRACE(ptr, 0, 0);
- if (ptr != NULL) {
- size_t usize;
- size_t rzsize JEMALLOC_CC_SILENCE_INIT(0);
-
- assert(malloc_initialized || IS_INITIALIZER);
-
- if (config_prof && opt_prof) {
- usize = isalloc(ptr, config_prof);
- prof_free(ptr, usize);
- } else if (config_stats || config_valgrind)
- usize = isalloc(ptr, config_prof);
- if (config_stats)
- thread_allocated_tsd_get()->deallocated += usize;
- if (config_valgrind && opt_valgrind)
- rzsize = p2rz(ptr);
- iqalloc(ptr);
- JEMALLOC_VALGRIND_FREE(ptr, rzsize);
- }
+ if (ptr != NULL)
+ ifree(ptr);
}
/*
@@ -1337,208 +1371,344 @@ JEMALLOC_EXPORT void *(* __memalign_hook)(size_t alignment, size_t size) =
* Begin non-standard functions.
*/
-size_t
-je_malloc_usable_size(JEMALLOC_USABLE_SIZE_CONST void *ptr)
+JEMALLOC_ALWAYS_INLINE_C void *
+imallocx(size_t usize, size_t alignment, bool zero, bool try_tcache,
+ arena_t *arena)
{
- size_t ret;
- assert(malloc_initialized || IS_INITIALIZER);
- malloc_thread_init();
+ assert(usize == ((alignment == 0) ? s2u(usize) : sa2u(usize,
+ alignment)));
- if (config_ivsalloc)
- ret = ivsalloc(ptr, config_prof);
+ if (alignment != 0)
+ return (ipalloct(usize, alignment, zero, try_tcache, arena));
+ else if (zero)
+ return (icalloct(usize, try_tcache, arena));
else
- ret = (ptr != NULL) ? isalloc(ptr, config_prof) : 0;
-
- return (ret);
+ return (imalloct(usize, try_tcache, arena));
}
-void
-je_malloc_stats_print(void (*write_cb)(void *, const char *), void *cbopaque,
- const char *opts)
+static void *
+imallocx_prof_sample(size_t usize, size_t alignment, bool zero, bool try_tcache,
+ arena_t *arena, prof_thr_cnt_t *cnt)
{
+ void *p;
- stats_print(write_cb, cbopaque, opts);
+ if (cnt == NULL)
+ return (NULL);
+ if (prof_promote && usize <= SMALL_MAXCLASS) {
+ size_t usize_promoted = (alignment == 0) ?
+ s2u(SMALL_MAXCLASS+1) : sa2u(SMALL_MAXCLASS+1, alignment);
+ assert(usize_promoted != 0);
+ p = imallocx(usize_promoted, alignment, zero, try_tcache,
+ arena);
+ if (p == NULL)
+ return (NULL);
+ arena_prof_promoted(p, usize);
+ } else
+ p = imallocx(usize, alignment, zero, try_tcache, arena);
+
+ return (p);
}
-int
-je_mallctl(const char *name, void *oldp, size_t *oldlenp, void *newp,
- size_t newlen)
+JEMALLOC_ALWAYS_INLINE_C void *
+imallocx_prof(size_t usize, size_t alignment, bool zero, bool try_tcache,
+ arena_t *arena, prof_thr_cnt_t *cnt)
{
+ void *p;
- if (malloc_init())
- return (EAGAIN);
+ if ((uintptr_t)cnt != (uintptr_t)1U) {
+ p = imallocx_prof_sample(usize, alignment, zero, try_tcache,
+ arena, cnt);
+ } else
+ p = imallocx(usize, alignment, zero, try_tcache, arena);
+ if (p == NULL)
+ return (NULL);
+ prof_malloc(p, usize, cnt);
- return (ctl_byname(name, oldp, oldlenp, newp, newlen));
+ return (p);
}
-int
-je_mallctlnametomib(const char *name, size_t *mibp, size_t *miblenp)
+void *
+je_mallocx(size_t size, int flags)
{
+ void *p;
+ size_t usize;
+ size_t alignment = (ZU(1) << (flags & MALLOCX_LG_ALIGN_MASK)
+ & (SIZE_T_MAX-1));
+ bool zero = flags & MALLOCX_ZERO;
+ unsigned arena_ind = ((unsigned)(flags >> 8)) - 1;
+ arena_t *arena;
+ bool try_tcache;
+
+ assert(size != 0);
if (malloc_init())
- return (EAGAIN);
+ goto label_oom;
- return (ctl_nametomib(name, mibp, miblenp));
+ if (arena_ind != UINT_MAX) {
+ arena = arenas[arena_ind];
+ try_tcache = false;
+ } else {
+ arena = NULL;
+ try_tcache = true;
+ }
+
+ usize = (alignment == 0) ? s2u(size) : sa2u(size, alignment);
+ assert(usize != 0);
+
+ if (config_prof && opt_prof) {
+ prof_thr_cnt_t *cnt;
+
+ PROF_ALLOC_PREP(1, usize, cnt);
+ p = imallocx_prof(usize, alignment, zero, try_tcache, arena,
+ cnt);
+ } else
+ p = imallocx(usize, alignment, zero, try_tcache, arena);
+ if (p == NULL)
+ goto label_oom;
+
+ if (config_stats) {
+ assert(usize == isalloc(p, config_prof));
+ thread_allocated_tsd_get()->allocated += usize;
+ }
+ UTRACE(0, size, p);
+ JEMALLOC_VALGRIND_MALLOC(true, p, usize, zero);
+ return (p);
+label_oom:
+ if (config_xmalloc && opt_xmalloc) {
+ malloc_write("<jemalloc>: Error in mallocx(): out of memory\n");
+ abort();
+ }
+ UTRACE(0, size, 0);
+ return (NULL);
}
-int
-je_mallctlbymib(const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp,
- void *newp, size_t newlen)
+static void *
+irallocx_prof_sample(void *oldptr, size_t size, size_t alignment, size_t usize,
+ bool zero, bool try_tcache_alloc, bool try_tcache_dalloc, arena_t *arena,
+ prof_thr_cnt_t *cnt)
{
+ void *p;
- if (malloc_init())
- return (EAGAIN);
+ if (cnt == NULL)
+ return (NULL);
+ if (prof_promote && usize <= SMALL_MAXCLASS) {
+ p = iralloct(oldptr, SMALL_MAXCLASS+1, (SMALL_MAXCLASS+1 >=
+ size) ? 0 : size - (SMALL_MAXCLASS+1), alignment, zero,
+ try_tcache_alloc, try_tcache_dalloc, arena);
+ if (p == NULL)
+ return (NULL);
+ arena_prof_promoted(p, usize);
+ } else {
+ p = iralloct(oldptr, size, 0, alignment, zero,
+ try_tcache_alloc, try_tcache_dalloc, arena);
+ }
- return (ctl_bymib(mib, miblen, oldp, oldlenp, newp, newlen));
+ return (p);
}
-/*
- * End non-standard functions.
- */
-/******************************************************************************/
-/*
- * Begin experimental functions.
- */
-#ifdef JEMALLOC_EXPERIMENTAL
-
-static JEMALLOC_ATTR(always_inline) void *
-iallocm(size_t usize, size_t alignment, bool zero, bool try_tcache,
- arena_t *arena)
+JEMALLOC_ALWAYS_INLINE_C void *
+irallocx_prof(void *oldptr, size_t old_usize, size_t size, size_t alignment,
+ size_t *usize, bool zero, bool try_tcache_alloc, bool try_tcache_dalloc,
+ arena_t *arena, prof_thr_cnt_t *cnt)
{
+ void *p;
+ prof_ctx_t *old_ctx;
- assert(usize == ((alignment == 0) ? s2u(usize) : sa2u(usize,
- alignment)));
+ old_ctx = prof_ctx_get(oldptr);
+ if ((uintptr_t)cnt != (uintptr_t)1U)
+ p = irallocx_prof_sample(oldptr, size, alignment, *usize, zero,
+ try_tcache_alloc, try_tcache_dalloc, arena, cnt);
+ else {
+ p = iralloct(oldptr, size, 0, alignment, zero,
+ try_tcache_alloc, try_tcache_dalloc, arena);
+ }
+ if (p == NULL)
+ return (NULL);
- if (alignment != 0)
- return (ipallocx(usize, alignment, zero, try_tcache, arena));
- else if (zero)
- return (icallocx(usize, try_tcache, arena));
- else
- return (imallocx(usize, try_tcache, arena));
+ if (p == oldptr && alignment != 0) {
+ /*
+ * The allocation did not move, so it is possible that the size
+ * class is smaller than would guarantee the requested
+ * alignment, and that the alignment constraint was
+ * serendipitously satisfied. Additionally, old_usize may not
+ * be the same as the current usize because of in-place large
+ * reallocation. Therefore, query the actual value of usize.
+ */
+ *usize = isalloc(p, config_prof);
+ }
+ prof_realloc(p, *usize, cnt, old_usize, old_ctx);
+
+ return (p);
}
-int
-je_allocm(void **ptr, size_t *rsize, size_t size, int flags)
+void *
+je_rallocx(void *ptr, size_t size, int flags)
{
void *p;
- size_t usize;
- size_t alignment = (ZU(1) << (flags & ALLOCM_LG_ALIGN_MASK)
+ size_t usize, old_usize;
+ UNUSED size_t old_rzsize JEMALLOC_CC_SILENCE_INIT(0);
+ size_t alignment = (ZU(1) << (flags & MALLOCX_LG_ALIGN_MASK)
& (SIZE_T_MAX-1));
- bool zero = flags & ALLOCM_ZERO;
+ bool zero = flags & MALLOCX_ZERO;
unsigned arena_ind = ((unsigned)(flags >> 8)) - 1;
+ bool try_tcache_alloc, try_tcache_dalloc;
arena_t *arena;
- bool try_tcache;
assert(ptr != NULL);
assert(size != 0);
-
- if (malloc_init())
- goto label_oom;
+ assert(malloc_initialized || IS_INITIALIZER);
+ malloc_thread_init();
if (arena_ind != UINT_MAX) {
+ arena_chunk_t *chunk;
+ try_tcache_alloc = false;
+ chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr);
+ try_tcache_dalloc = (chunk == ptr || chunk->arena !=
+ arenas[arena_ind]);
arena = arenas[arena_ind];
- try_tcache = false;
} else {
+ try_tcache_alloc = true;
+ try_tcache_dalloc = true;
arena = NULL;
- try_tcache = true;
}
- usize = (alignment == 0) ? s2u(size) : sa2u(size, alignment);
- if (usize == 0)
- goto label_oom;
+ if ((config_prof && opt_prof) || config_stats ||
+ (config_valgrind && opt_valgrind))
+ old_usize = isalloc(ptr, config_prof);
+ if (config_valgrind && opt_valgrind)
+ old_rzsize = u2rz(old_usize);
if (config_prof && opt_prof) {
prof_thr_cnt_t *cnt;
+ usize = (alignment == 0) ? s2u(size) : sa2u(size, alignment);
+ assert(usize != 0);
PROF_ALLOC_PREP(1, usize, cnt);
- if (cnt == NULL)
+ p = irallocx_prof(ptr, old_usize, size, alignment, &usize, zero,
+ try_tcache_alloc, try_tcache_dalloc, arena, cnt);
+ if (p == NULL)
goto label_oom;
- if (prof_promote && (uintptr_t)cnt != (uintptr_t)1U && usize <=
- SMALL_MAXCLASS) {
- size_t usize_promoted = (alignment == 0) ?
- s2u(SMALL_MAXCLASS+1) : sa2u(SMALL_MAXCLASS+1,
- alignment);
- assert(usize_promoted != 0);
- p = iallocm(usize_promoted, alignment, zero,
- try_tcache, arena);
- if (p == NULL)
- goto label_oom;
- arena_prof_promoted(p, usize);
- } else {
- p = iallocm(usize, alignment, zero, try_tcache, arena);
- if (p == NULL)
- goto label_oom;
- }
- prof_malloc(p, usize, cnt);
} else {
- p = iallocm(usize, alignment, zero, try_tcache, arena);
+ p = iralloct(ptr, size, 0, alignment, zero, try_tcache_alloc,
+ try_tcache_dalloc, arena);
if (p == NULL)
goto label_oom;
+ if (config_stats || (config_valgrind && opt_valgrind))
+ usize = isalloc(p, config_prof);
}
- if (rsize != NULL)
- *rsize = usize;
- *ptr = p;
if (config_stats) {
- assert(usize == isalloc(p, config_prof));
- thread_allocated_tsd_get()->allocated += usize;
+ thread_allocated_t *ta;
+ ta = thread_allocated_tsd_get();
+ ta->allocated += usize;
+ ta->deallocated += old_usize;
}
- UTRACE(0, size, p);
- JEMALLOC_VALGRIND_MALLOC(true, p, usize, zero);
- return (ALLOCM_SUCCESS);
+ UTRACE(ptr, size, p);
+ JEMALLOC_VALGRIND_REALLOC(p, usize, ptr, old_usize, old_rzsize, zero);
+ return (p);
label_oom:
if (config_xmalloc && opt_xmalloc) {
- malloc_write("<jemalloc>: Error in allocm(): "
- "out of memory\n");
+ malloc_write("<jemalloc>: Error in rallocx(): out of memory\n");
abort();
}
- *ptr = NULL;
- UTRACE(0, size, 0);
- return (ALLOCM_ERR_OOM);
+ UTRACE(ptr, size, 0);
+ return (NULL);
}
-int
-je_rallocm(void **ptr, size_t *rsize, size_t size, size_t extra, int flags)
+JEMALLOC_ALWAYS_INLINE_C size_t
+ixallocx_helper(void *ptr, size_t old_usize, size_t size, size_t extra,
+ size_t alignment, bool zero, arena_t *arena)
+{
+ size_t usize;
+
+ if (ixalloc(ptr, size, extra, alignment, zero))
+ return (old_usize);
+ usize = isalloc(ptr, config_prof);
+
+ return (usize);
+}
+
+static size_t
+ixallocx_prof_sample(void *ptr, size_t old_usize, size_t size, size_t extra,
+ size_t alignment, size_t max_usize, bool zero, arena_t *arena,
+ prof_thr_cnt_t *cnt)
{
- void *p, *q;
size_t usize;
- size_t old_size;
- size_t old_rzsize JEMALLOC_CC_SILENCE_INIT(0);
- size_t alignment = (ZU(1) << (flags & ALLOCM_LG_ALIGN_MASK)
+
+ if (cnt == NULL)
+ return (old_usize);
+ /* Use minimum usize to determine whether promotion may happen. */
+ if (prof_promote && ((alignment == 0) ? s2u(size) : sa2u(size,
+ alignment)) <= SMALL_MAXCLASS) {
+ if (ixalloc(ptr, SMALL_MAXCLASS+1, (SMALL_MAXCLASS+1 >=
+ size+extra) ? 0 : size+extra - (SMALL_MAXCLASS+1),
+ alignment, zero))
+ return (old_usize);
+ usize = isalloc(ptr, config_prof);
+ if (max_usize < PAGE)
+ arena_prof_promoted(ptr, usize);
+ } else {
+ usize = ixallocx_helper(ptr, old_usize, size, extra, alignment,
+ zero, arena);
+ }
+
+ return (usize);
+}
+
+JEMALLOC_ALWAYS_INLINE_C size_t
+ixallocx_prof(void *ptr, size_t old_usize, size_t size, size_t extra,
+ size_t alignment, size_t max_usize, bool zero, arena_t *arena,
+ prof_thr_cnt_t *cnt)
+{
+ size_t usize;
+ prof_ctx_t *old_ctx;
+
+ old_ctx = prof_ctx_get(ptr);
+ if ((uintptr_t)cnt != (uintptr_t)1U) {
+ usize = ixallocx_prof_sample(ptr, old_usize, size, extra,
+ alignment, zero, max_usize, arena, cnt);
+ } else {
+ usize = ixallocx_helper(ptr, old_usize, size, extra, alignment,
+ zero, arena);
+ }
+ if (usize == old_usize)
+ return (usize);
+ prof_realloc(ptr, usize, cnt, old_usize, old_ctx);
+
+ return (usize);
+}
+
+size_t
+je_xallocx(void *ptr, size_t size, size_t extra, int flags)
+{
+ size_t usize, old_usize;
+ UNUSED size_t old_rzsize JEMALLOC_CC_SILENCE_INIT(0);
+ size_t alignment = (ZU(1) << (flags & MALLOCX_LG_ALIGN_MASK)
& (SIZE_T_MAX-1));
- bool zero = flags & ALLOCM_ZERO;
- bool no_move = flags & ALLOCM_NO_MOVE;
+ bool zero = flags & MALLOCX_ZERO;
unsigned arena_ind = ((unsigned)(flags >> 8)) - 1;
- bool try_tcache_alloc, try_tcache_dalloc;
arena_t *arena;
assert(ptr != NULL);
- assert(*ptr != NULL);
assert(size != 0);
assert(SIZE_T_MAX - size >= extra);
assert(malloc_initialized || IS_INITIALIZER);
malloc_thread_init();
- if (arena_ind != UINT_MAX) {
- arena_chunk_t *chunk;
- try_tcache_alloc = true;
- chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(*ptr);
- try_tcache_dalloc = (chunk == *ptr || chunk->arena !=
- arenas[arena_ind]);
+ if (arena_ind != UINT_MAX)
arena = arenas[arena_ind];
- } else {
- try_tcache_alloc = true;
- try_tcache_dalloc = true;
+ else
arena = NULL;
- }
- p = *ptr;
+ old_usize = isalloc(ptr, config_prof);
+ if (config_valgrind && opt_valgrind)
+ old_rzsize = u2rz(old_usize);
+
if (config_prof && opt_prof) {
prof_thr_cnt_t *cnt;
-
/*
- * usize isn't knowable before iralloc() returns when extra is
+ * usize isn't knowable before ixalloc() returns when extra is
* non-zero. Therefore, compute its maximum possible value and
* use that in PROF_ALLOC_PREP() to decide whether to capture a
* backtrace. prof_realloc() will use the actual usize to
@@ -1546,112 +1716,51 @@ je_rallocm(void **ptr, size_t *rsize, size_t size, size_t extra, int flags)
*/
size_t max_usize = (alignment == 0) ? s2u(size+extra) :
sa2u(size+extra, alignment);
- prof_ctx_t *old_ctx = prof_ctx_get(p);
- old_size = isalloc(p, true);
- if (config_valgrind && opt_valgrind)
- old_rzsize = p2rz(p);
PROF_ALLOC_PREP(1, max_usize, cnt);
- if (cnt == NULL)
- goto label_oom;
- /*
- * Use minimum usize to determine whether promotion may happen.
- */
- if (prof_promote && (uintptr_t)cnt != (uintptr_t)1U
- && ((alignment == 0) ? s2u(size) : sa2u(size, alignment))
- <= SMALL_MAXCLASS) {
- q = irallocx(p, SMALL_MAXCLASS+1, (SMALL_MAXCLASS+1 >=
- size+extra) ? 0 : size+extra - (SMALL_MAXCLASS+1),
- alignment, zero, no_move, try_tcache_alloc,
- try_tcache_dalloc, arena);
- if (q == NULL)
- goto label_err;
- if (max_usize < PAGE) {
- usize = max_usize;
- arena_prof_promoted(q, usize);
- } else
- usize = isalloc(q, config_prof);
- } else {
- q = irallocx(p, size, extra, alignment, zero, no_move,
- try_tcache_alloc, try_tcache_dalloc, arena);
- if (q == NULL)
- goto label_err;
- usize = isalloc(q, config_prof);
- }
- prof_realloc(q, usize, cnt, old_size, old_ctx);
- if (rsize != NULL)
- *rsize = usize;
+ usize = ixallocx_prof(ptr, old_usize, size, extra, alignment,
+ max_usize, zero, arena, cnt);
} else {
- if (config_stats) {
- old_size = isalloc(p, false);
- if (config_valgrind && opt_valgrind)
- old_rzsize = u2rz(old_size);
- } else if (config_valgrind && opt_valgrind) {
- old_size = isalloc(p, false);
- old_rzsize = u2rz(old_size);
- }
- q = irallocx(p, size, extra, alignment, zero, no_move,
- try_tcache_alloc, try_tcache_dalloc, arena);
- if (q == NULL)
- goto label_err;
- if (config_stats)
- usize = isalloc(q, config_prof);
- if (rsize != NULL) {
- if (config_stats == false)
- usize = isalloc(q, config_prof);
- *rsize = usize;
- }
+ usize = ixallocx_helper(ptr, old_usize, size, extra, alignment,
+ zero, arena);
}
+ if (usize == old_usize)
+ goto label_not_resized;
- *ptr = q;
if (config_stats) {
thread_allocated_t *ta;
ta = thread_allocated_tsd_get();
ta->allocated += usize;
- ta->deallocated += old_size;
+ ta->deallocated += old_usize;
}
- UTRACE(p, size, q);
- JEMALLOC_VALGRIND_REALLOC(q, usize, p, old_size, old_rzsize, zero);
- return (ALLOCM_SUCCESS);
-label_err:
- if (no_move) {
- UTRACE(p, size, q);
- return (ALLOCM_ERR_NOT_MOVED);
- }
-label_oom:
- if (config_xmalloc && opt_xmalloc) {
- malloc_write("<jemalloc>: Error in rallocm(): "
- "out of memory\n");
- abort();
- }
- UTRACE(p, size, 0);
- return (ALLOCM_ERR_OOM);
+ JEMALLOC_VALGRIND_REALLOC(ptr, usize, ptr, old_usize, old_rzsize, zero);
+label_not_resized:
+ UTRACE(ptr, size, ptr);
+ return (usize);
}
-int
-je_sallocm(const void *ptr, size_t *rsize, int flags)
+size_t
+je_sallocx(const void *ptr, int flags)
{
- size_t sz;
+ size_t usize;
assert(malloc_initialized || IS_INITIALIZER);
malloc_thread_init();
if (config_ivsalloc)
- sz = ivsalloc(ptr, config_prof);
+ usize = ivsalloc(ptr, config_prof);
else {
assert(ptr != NULL);
- sz = isalloc(ptr, config_prof);
+ usize = isalloc(ptr, config_prof);
}
- assert(rsize != NULL);
- *rsize = sz;
- return (ALLOCM_SUCCESS);
+ return (usize);
}
-int
-je_dallocm(void *ptr, int flags)
+void
+je_dallocx(void *ptr, int flags)
{
size_t usize;
- size_t rzsize JEMALLOC_CC_SILENCE_INIT(0);
+ UNUSED size_t rzsize JEMALLOC_CC_SILENCE_INIT(0);
unsigned arena_ind = ((unsigned)(flags >> 8)) - 1;
bool try_tcache;
@@ -1677,28 +1786,162 @@ je_dallocm(void *ptr, int flags)
thread_allocated_tsd_get()->deallocated += usize;
if (config_valgrind && opt_valgrind)
rzsize = p2rz(ptr);
- iqallocx(ptr, try_tcache);
+ iqalloct(ptr, try_tcache);
JEMALLOC_VALGRIND_FREE(ptr, rzsize);
-
- return (ALLOCM_SUCCESS);
}
-int
-je_nallocm(size_t *rsize, size_t size, int flags)
+size_t
+je_nallocx(size_t size, int flags)
{
size_t usize;
- size_t alignment = (ZU(1) << (flags & ALLOCM_LG_ALIGN_MASK)
+ size_t alignment = (ZU(1) << (flags & MALLOCX_LG_ALIGN_MASK)
& (SIZE_T_MAX-1));
assert(size != 0);
if (malloc_init())
- return (ALLOCM_ERR_OOM);
+ return (0);
usize = (alignment == 0) ? s2u(size) : sa2u(size, alignment);
- if (usize == 0)
+ assert(usize != 0);
+ return (usize);
+}
+
+int
+je_mallctl(const char *name, void *oldp, size_t *oldlenp, void *newp,
+ size_t newlen)
+{
+
+ if (malloc_init())
+ return (EAGAIN);
+
+ return (ctl_byname(name, oldp, oldlenp, newp, newlen));
+}
+
+int
+je_mallctlnametomib(const char *name, size_t *mibp, size_t *miblenp)
+{
+
+ if (malloc_init())
+ return (EAGAIN);
+
+ return (ctl_nametomib(name, mibp, miblenp));
+}
+
+int
+je_mallctlbymib(const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp,
+ void *newp, size_t newlen)
+{
+
+ if (malloc_init())
+ return (EAGAIN);
+
+ return (ctl_bymib(mib, miblen, oldp, oldlenp, newp, newlen));
+}
+
+void
+je_malloc_stats_print(void (*write_cb)(void *, const char *), void *cbopaque,
+ const char *opts)
+{
+
+ stats_print(write_cb, cbopaque, opts);
+}
+
+size_t
+je_malloc_usable_size(JEMALLOC_USABLE_SIZE_CONST void *ptr)
+{
+ size_t ret;
+
+ assert(malloc_initialized || IS_INITIALIZER);
+ malloc_thread_init();
+
+ if (config_ivsalloc)
+ ret = ivsalloc(ptr, config_prof);
+ else
+ ret = (ptr != NULL) ? isalloc(ptr, config_prof) : 0;
+
+ return (ret);
+}
+
+/*
+ * End non-standard functions.
+ */
+/******************************************************************************/
+/*
+ * Begin experimental functions.
+ */
+#ifdef JEMALLOC_EXPERIMENTAL
+
+int
+je_allocm(void **ptr, size_t *rsize, size_t size, int flags)
+{
+ void *p;
+
+ assert(ptr != NULL);
+
+ p = je_mallocx(size, flags);
+ if (p == NULL)
return (ALLOCM_ERR_OOM);
+ if (rsize != NULL)
+ *rsize = isalloc(p, config_prof);
+ *ptr = p;
+ return (ALLOCM_SUCCESS);
+}
+int
+je_rallocm(void **ptr, size_t *rsize, size_t size, size_t extra, int flags)
+{
+ int ret;
+ bool no_move = flags & ALLOCM_NO_MOVE;
+
+ assert(ptr != NULL);
+ assert(*ptr != NULL);
+ assert(size != 0);
+ assert(SIZE_T_MAX - size >= extra);
+
+ if (no_move) {
+ size_t usize = je_xallocx(*ptr, size, extra, flags);
+ ret = (usize >= size) ? ALLOCM_SUCCESS : ALLOCM_ERR_NOT_MOVED;
+ if (rsize != NULL)
+ *rsize = usize;
+ } else {
+ void *p = je_rallocx(*ptr, size+extra, flags);
+ if (p != NULL) {
+ *ptr = p;
+ ret = ALLOCM_SUCCESS;
+ } else
+ ret = ALLOCM_ERR_OOM;
+ if (rsize != NULL)
+ *rsize = isalloc(*ptr, config_prof);
+ }
+ return (ret);
+}
+
+int
+je_sallocm(const void *ptr, size_t *rsize, int flags)
+{
+
+ assert(rsize != NULL);
+ *rsize = je_sallocx(ptr, flags);
+ return (ALLOCM_SUCCESS);
+}
+
+int
+je_dallocm(void *ptr, int flags)
+{
+
+ je_dallocx(ptr, flags);
+ return (ALLOCM_SUCCESS);
+}
+
+int
+je_nallocm(size_t *rsize, size_t size, int flags)
+{
+ size_t usize;
+
+ usize = je_nallocx(size, flags);
+ if (usize == 0)
+ return (ALLOCM_ERR_OOM);
if (rsize != NULL)
*rsize = usize;
return (ALLOCM_SUCCESS);
diff --git a/dep/jemalloc/src/mutex.c b/dep/jemalloc/src/mutex.c
index 55e18c23713..788eca38703 100644
--- a/dep/jemalloc/src/mutex.c
+++ b/dep/jemalloc/src/mutex.c
@@ -6,7 +6,7 @@
#endif
#ifndef _CRT_SPINCOUNT
-#define _CRT_SPINCOUNT 4000
+#define _CRT_SPINCOUNT 4000
#endif
/******************************************************************************/
diff --git a/dep/jemalloc/src/prof.c b/dep/jemalloc/src/prof.c
index c133b95c2c6..1d8ccbd60ae 100644
--- a/dep/jemalloc/src/prof.c
+++ b/dep/jemalloc/src/prof.c
@@ -24,7 +24,12 @@ bool opt_prof_gdump = false;
bool opt_prof_final = true;
bool opt_prof_leak = false;
bool opt_prof_accum = false;
-char opt_prof_prefix[PATH_MAX + 1];
+char opt_prof_prefix[
+ /* Minimize memory bloat for non-prof builds. */
+#ifdef JEMALLOC_PROF
+ PATH_MAX +
+#endif
+ 1];
uint64_t prof_interval = 0;
bool prof_promote;
@@ -54,10 +59,17 @@ static uint64_t prof_dump_useq;
/*
* This buffer is rather large for stack allocation, so use a single buffer for
- * all profile dumps. The buffer is implicitly protected by bt2ctx_mtx, since
- * it must be locked anyway during dumping.
+ * all profile dumps.
*/
-static char prof_dump_buf[PROF_DUMP_BUFSIZE];
+static malloc_mutex_t prof_dump_mtx;
+static char prof_dump_buf[
+ /* Minimize memory bloat for non-prof builds. */
+#ifdef JEMALLOC_PROF
+ PROF_DUMP_BUFSIZE
+#else
+ 1
+#endif
+];
static unsigned prof_dump_buf_end;
static int prof_dump_fd;
@@ -65,36 +77,6 @@ static int prof_dump_fd;
static bool prof_booted = false;
/******************************************************************************/
-/* Function prototypes for non-inline static functions. */
-
-static prof_bt_t *bt_dup(prof_bt_t *bt);
-static void bt_destroy(prof_bt_t *bt);
-#ifdef JEMALLOC_PROF_LIBGCC
-static _Unwind_Reason_Code prof_unwind_init_callback(
- struct _Unwind_Context *context, void *arg);
-static _Unwind_Reason_Code prof_unwind_callback(
- struct _Unwind_Context *context, void *arg);
-#endif
-static bool prof_flush(bool propagate_err);
-static bool prof_write(bool propagate_err, const char *s);
-static bool prof_printf(bool propagate_err, const char *format, ...)
- JEMALLOC_ATTR(format(printf, 2, 3));
-static void prof_ctx_sum(prof_ctx_t *ctx, prof_cnt_t *cnt_all,
- size_t *leak_nctx);
-static void prof_ctx_destroy(prof_ctx_t *ctx);
-static void prof_ctx_merge(prof_ctx_t *ctx, prof_thr_cnt_t *cnt);
-static bool prof_dump_ctx(bool propagate_err, prof_ctx_t *ctx,
- prof_bt_t *bt);
-static bool prof_dump_maps(bool propagate_err);
-static bool prof_dump(bool propagate_err, const char *filename,
- bool leakcheck);
-static void prof_dump_filename(char *filename, char v, int64_t vseq);
-static void prof_fdump(void);
-static void prof_bt_hash(const void *key, size_t r_hash[2]);
-static bool prof_bt_keycomp(const void *k1, const void *k2);
-static malloc_mutex_t *prof_ctx_mutex_choose(void);
-
-/******************************************************************************/
void
bt_init(prof_bt_t *bt, void **vec)
@@ -423,10 +405,169 @@ prof_backtrace(prof_bt_t *bt, unsigned nignore)
{
cassert(config_prof);
- assert(false);
+ not_reached();
}
#endif
+static malloc_mutex_t *
+prof_ctx_mutex_choose(void)
+{
+ unsigned nctxs = atomic_add_u(&cum_ctxs, 1);
+
+ return (&ctx_locks[(nctxs - 1) % PROF_NCTX_LOCKS]);
+}
+
+static void
+prof_ctx_init(prof_ctx_t *ctx, prof_bt_t *bt)
+{
+
+ ctx->bt = bt;
+ ctx->lock = prof_ctx_mutex_choose();
+ /*
+ * Set nlimbo to 1, in order to avoid a race condition with
+ * prof_ctx_merge()/prof_ctx_destroy().
+ */
+ ctx->nlimbo = 1;
+ ql_elm_new(ctx, dump_link);
+ memset(&ctx->cnt_merged, 0, sizeof(prof_cnt_t));
+ ql_new(&ctx->cnts_ql);
+}
+
+static void
+prof_ctx_destroy(prof_ctx_t *ctx)
+{
+ prof_tdata_t *prof_tdata;
+
+ cassert(config_prof);
+
+ /*
+ * Check that ctx is still unused by any thread cache before destroying
+ * it. prof_lookup() increments ctx->nlimbo in order to avoid a race
+ * condition with this function, as does prof_ctx_merge() in order to
+ * avoid a race between the main body of prof_ctx_merge() and entry
+ * into this function.
+ */
+ prof_tdata = prof_tdata_get(false);
+ assert((uintptr_t)prof_tdata > (uintptr_t)PROF_TDATA_STATE_MAX);
+ prof_enter(prof_tdata);
+ malloc_mutex_lock(ctx->lock);
+ if (ql_first(&ctx->cnts_ql) == NULL && ctx->cnt_merged.curobjs == 0 &&
+ ctx->nlimbo == 1) {
+ assert(ctx->cnt_merged.curbytes == 0);
+ assert(ctx->cnt_merged.accumobjs == 0);
+ assert(ctx->cnt_merged.accumbytes == 0);
+ /* Remove ctx from bt2ctx. */
+ if (ckh_remove(&bt2ctx, ctx->bt, NULL, NULL))
+ not_reached();
+ prof_leave(prof_tdata);
+ /* Destroy ctx. */
+ malloc_mutex_unlock(ctx->lock);
+ bt_destroy(ctx->bt);
+ idalloc(ctx);
+ } else {
+ /*
+ * Compensate for increment in prof_ctx_merge() or
+ * prof_lookup().
+ */
+ ctx->nlimbo--;
+ malloc_mutex_unlock(ctx->lock);
+ prof_leave(prof_tdata);
+ }
+}
+
+static void
+prof_ctx_merge(prof_ctx_t *ctx, prof_thr_cnt_t *cnt)
+{
+ bool destroy;
+
+ cassert(config_prof);
+
+ /* Merge cnt stats and detach from ctx. */
+ malloc_mutex_lock(ctx->lock);
+ ctx->cnt_merged.curobjs += cnt->cnts.curobjs;
+ ctx->cnt_merged.curbytes += cnt->cnts.curbytes;
+ ctx->cnt_merged.accumobjs += cnt->cnts.accumobjs;
+ ctx->cnt_merged.accumbytes += cnt->cnts.accumbytes;
+ ql_remove(&ctx->cnts_ql, cnt, cnts_link);
+ if (opt_prof_accum == false && ql_first(&ctx->cnts_ql) == NULL &&
+ ctx->cnt_merged.curobjs == 0 && ctx->nlimbo == 0) {
+ /*
+ * Increment ctx->nlimbo in order to keep another thread from
+ * winning the race to destroy ctx while this one has ctx->lock
+ * dropped. Without this, it would be possible for another
+ * thread to:
+ *
+ * 1) Sample an allocation associated with ctx.
+ * 2) Deallocate the sampled object.
+ * 3) Successfully prof_ctx_destroy(ctx).
+ *
+ * The result would be that ctx no longer exists by the time
+ * this thread accesses it in prof_ctx_destroy().
+ */
+ ctx->nlimbo++;
+ destroy = true;
+ } else
+ destroy = false;
+ malloc_mutex_unlock(ctx->lock);
+ if (destroy)
+ prof_ctx_destroy(ctx);
+}
+
+static bool
+prof_lookup_global(prof_bt_t *bt, prof_tdata_t *prof_tdata, void **p_btkey,
+ prof_ctx_t **p_ctx, bool *p_new_ctx)
+{
+ union {
+ prof_ctx_t *p;
+ void *v;
+ } ctx;
+ union {
+ prof_bt_t *p;
+ void *v;
+ } btkey;
+ bool new_ctx;
+
+ prof_enter(prof_tdata);
+ if (ckh_search(&bt2ctx, bt, &btkey.v, &ctx.v)) {
+ /* bt has never been seen before. Insert it. */
+ ctx.v = imalloc(sizeof(prof_ctx_t));
+ if (ctx.v == NULL) {
+ prof_leave(prof_tdata);
+ return (true);
+ }
+ btkey.p = bt_dup(bt);
+ if (btkey.v == NULL) {
+ prof_leave(prof_tdata);
+ idalloc(ctx.v);
+ return (true);
+ }
+ prof_ctx_init(ctx.p, btkey.p);
+ if (ckh_insert(&bt2ctx, btkey.v, ctx.v)) {
+ /* OOM. */
+ prof_leave(prof_tdata);
+ idalloc(btkey.v);
+ idalloc(ctx.v);
+ return (true);
+ }
+ new_ctx = true;
+ } else {
+ /*
+ * Increment nlimbo, in order to avoid a race condition with
+ * prof_ctx_merge()/prof_ctx_destroy().
+ */
+ malloc_mutex_lock(ctx.p->lock);
+ ctx.p->nlimbo++;
+ malloc_mutex_unlock(ctx.p->lock);
+ new_ctx = false;
+ }
+ prof_leave(prof_tdata);
+
+ *p_btkey = btkey.v;
+ *p_ctx = ctx.p;
+ *p_new_ctx = new_ctx;
+ return (false);
+}
+
prof_thr_cnt_t *
prof_lookup(prof_bt_t *bt)
{
@@ -443,62 +584,16 @@ prof_lookup(prof_bt_t *bt)
return (NULL);
if (ckh_search(&prof_tdata->bt2cnt, bt, NULL, &ret.v)) {
- union {
- prof_bt_t *p;
- void *v;
- } btkey;
- union {
- prof_ctx_t *p;
- void *v;
- } ctx;
+ void *btkey;
+ prof_ctx_t *ctx;
bool new_ctx;
/*
* This thread's cache lacks bt. Look for it in the global
* cache.
*/
- prof_enter(prof_tdata);
- if (ckh_search(&bt2ctx, bt, &btkey.v, &ctx.v)) {
- /* bt has never been seen before. Insert it. */
- ctx.v = imalloc(sizeof(prof_ctx_t));
- if (ctx.v == NULL) {
- prof_leave(prof_tdata);
- return (NULL);
- }
- btkey.p = bt_dup(bt);
- if (btkey.v == NULL) {
- prof_leave(prof_tdata);
- idalloc(ctx.v);
- return (NULL);
- }
- ctx.p->bt = btkey.p;
- ctx.p->lock = prof_ctx_mutex_choose();
- /*
- * Set nlimbo to 1, in order to avoid a race condition
- * with prof_ctx_merge()/prof_ctx_destroy().
- */
- ctx.p->nlimbo = 1;
- memset(&ctx.p->cnt_merged, 0, sizeof(prof_cnt_t));
- ql_new(&ctx.p->cnts_ql);
- if (ckh_insert(&bt2ctx, btkey.v, ctx.v)) {
- /* OOM. */
- prof_leave(prof_tdata);
- idalloc(btkey.v);
- idalloc(ctx.v);
- return (NULL);
- }
- new_ctx = true;
- } else {
- /*
- * Increment nlimbo, in order to avoid a race condition
- * with prof_ctx_merge()/prof_ctx_destroy().
- */
- malloc_mutex_lock(ctx.p->lock);
- ctx.p->nlimbo++;
- malloc_mutex_unlock(ctx.p->lock);
- new_ctx = false;
- }
- prof_leave(prof_tdata);
+ if (prof_lookup_global(bt, prof_tdata, &btkey, &ctx, &new_ctx))
+ return (NULL);
/* Link a prof_thd_cnt_t into ctx for this thread. */
if (ckh_count(&prof_tdata->bt2cnt) == PROF_TCMAX) {
@@ -511,7 +606,7 @@ prof_lookup(prof_bt_t *bt)
assert(ret.v != NULL);
if (ckh_remove(&prof_tdata->bt2cnt, ret.p->ctx->bt,
NULL, NULL))
- assert(false);
+ not_reached();
ql_remove(&prof_tdata->lru_ql, ret.p, lru_link);
prof_ctx_merge(ret.p->ctx, ret.p);
/* ret can now be re-used. */
@@ -521,27 +616,27 @@ prof_lookup(prof_bt_t *bt)
ret.v = imalloc(sizeof(prof_thr_cnt_t));
if (ret.p == NULL) {
if (new_ctx)
- prof_ctx_destroy(ctx.p);
+ prof_ctx_destroy(ctx);
return (NULL);
}
ql_elm_new(ret.p, cnts_link);
ql_elm_new(ret.p, lru_link);
}
/* Finish initializing ret. */
- ret.p->ctx = ctx.p;
+ ret.p->ctx = ctx;
ret.p->epoch = 0;
memset(&ret.p->cnts, 0, sizeof(prof_cnt_t));
- if (ckh_insert(&prof_tdata->bt2cnt, btkey.v, ret.v)) {
+ if (ckh_insert(&prof_tdata->bt2cnt, btkey, ret.v)) {
if (new_ctx)
- prof_ctx_destroy(ctx.p);
+ prof_ctx_destroy(ctx);
idalloc(ret.v);
return (NULL);
}
ql_head_insert(&prof_tdata->lru_ql, ret.p, lru_link);
- malloc_mutex_lock(ctx.p->lock);
- ql_tail_insert(&ctx.p->cnts_ql, ret.p, cnts_link);
- ctx.p->nlimbo--;
- malloc_mutex_unlock(ctx.p->lock);
+ malloc_mutex_lock(ctx->lock);
+ ql_tail_insert(&ctx->cnts_ql, ret.p, cnts_link);
+ ctx->nlimbo--;
+ malloc_mutex_unlock(ctx->lock);
} else {
/* Move ret to the front of the LRU. */
ql_remove(&prof_tdata->lru_ql, ret.p, lru_link);
@@ -551,8 +646,52 @@ prof_lookup(prof_bt_t *bt)
return (ret.p);
}
+#ifdef JEMALLOC_JET
+size_t
+prof_bt_count(void)
+{
+ size_t bt_count;
+ prof_tdata_t *prof_tdata;
+
+ prof_tdata = prof_tdata_get(false);
+ if ((uintptr_t)prof_tdata <= (uintptr_t)PROF_TDATA_STATE_MAX)
+ return (0);
+
+ prof_enter(prof_tdata);
+ bt_count = ckh_count(&bt2ctx);
+ prof_leave(prof_tdata);
+
+ return (bt_count);
+}
+#endif
+
+#ifdef JEMALLOC_JET
+#undef prof_dump_open
+#define prof_dump_open JEMALLOC_N(prof_dump_open_impl)
+#endif
+static int
+prof_dump_open(bool propagate_err, const char *filename)
+{
+ int fd;
+
+ fd = creat(filename, 0644);
+ if (fd == -1 && propagate_err == false) {
+ malloc_printf("<jemalloc>: creat(\"%s\"), 0644) failed\n",
+ filename);
+ if (opt_abort)
+ abort();
+ }
+
+ return (fd);
+}
+#ifdef JEMALLOC_JET
+#undef prof_dump_open
+#define prof_dump_open JEMALLOC_N(prof_dump_open)
+prof_dump_open_t *prof_dump_open = JEMALLOC_N(prof_dump_open_impl);
+#endif
+
static bool
-prof_flush(bool propagate_err)
+prof_dump_flush(bool propagate_err)
{
bool ret = false;
ssize_t err;
@@ -575,7 +714,20 @@ prof_flush(bool propagate_err)
}
static bool
-prof_write(bool propagate_err, const char *s)
+prof_dump_close(bool propagate_err)
+{
+ bool ret;
+
+ assert(prof_dump_fd != -1);
+ ret = prof_dump_flush(propagate_err);
+ close(prof_dump_fd);
+ prof_dump_fd = -1;
+
+ return (ret);
+}
+
+static bool
+prof_dump_write(bool propagate_err, const char *s)
{
unsigned i, slen, n;
@@ -586,7 +738,7 @@ prof_write(bool propagate_err, const char *s)
while (i < slen) {
/* Flush the buffer if it is full. */
if (prof_dump_buf_end == PROF_DUMP_BUFSIZE)
- if (prof_flush(propagate_err) && propagate_err)
+ if (prof_dump_flush(propagate_err) && propagate_err)
return (true);
if (prof_dump_buf_end + slen <= PROF_DUMP_BUFSIZE) {
@@ -606,7 +758,7 @@ prof_write(bool propagate_err, const char *s)
JEMALLOC_ATTR(format(printf, 2, 3))
static bool
-prof_printf(bool propagate_err, const char *format, ...)
+prof_dump_printf(bool propagate_err, const char *format, ...)
{
bool ret;
va_list ap;
@@ -615,13 +767,14 @@ prof_printf(bool propagate_err, const char *format, ...)
va_start(ap, format);
malloc_vsnprintf(buf, sizeof(buf), format, ap);
va_end(ap);
- ret = prof_write(propagate_err, buf);
+ ret = prof_dump_write(propagate_err, buf);
return (ret);
}
static void
-prof_ctx_sum(prof_ctx_t *ctx, prof_cnt_t *cnt_all, size_t *leak_nctx)
+prof_dump_ctx_prep(prof_ctx_t *ctx, prof_cnt_t *cnt_all, size_t *leak_nctx,
+ prof_ctx_list_t *ctx_ql)
{
prof_thr_cnt_t *thr_cnt;
prof_cnt_t tcnt;
@@ -630,6 +783,14 @@ prof_ctx_sum(prof_ctx_t *ctx, prof_cnt_t *cnt_all, size_t *leak_nctx)
malloc_mutex_lock(ctx->lock);
+ /*
+ * Increment nlimbo so that ctx won't go away before dump.
+ * Additionally, link ctx into the dump list so that it is included in
+ * prof_dump()'s second pass.
+ */
+ ctx->nlimbo++;
+ ql_tail_insert(ctx_ql, ctx, dump_link);
+
memcpy(&ctx->cnt_summed, &ctx->cnt_merged, sizeof(prof_cnt_t));
ql_foreach(thr_cnt, &ctx->cnts_ql, cnts_link) {
volatile unsigned *epoch = &thr_cnt->epoch;
@@ -670,89 +831,52 @@ prof_ctx_sum(prof_ctx_t *ctx, prof_cnt_t *cnt_all, size_t *leak_nctx)
malloc_mutex_unlock(ctx->lock);
}
-static void
-prof_ctx_destroy(prof_ctx_t *ctx)
+static bool
+prof_dump_header(bool propagate_err, const prof_cnt_t *cnt_all)
{
- prof_tdata_t *prof_tdata;
- cassert(config_prof);
-
- /*
- * Check that ctx is still unused by any thread cache before destroying
- * it. prof_lookup() increments ctx->nlimbo in order to avoid a race
- * condition with this function, as does prof_ctx_merge() in order to
- * avoid a race between the main body of prof_ctx_merge() and entry
- * into this function.
- */
- prof_tdata = prof_tdata_get(false);
- assert((uintptr_t)prof_tdata > (uintptr_t)PROF_TDATA_STATE_MAX);
- prof_enter(prof_tdata);
- malloc_mutex_lock(ctx->lock);
- if (ql_first(&ctx->cnts_ql) == NULL && ctx->cnt_merged.curobjs == 0 &&
- ctx->nlimbo == 1) {
- assert(ctx->cnt_merged.curbytes == 0);
- assert(ctx->cnt_merged.accumobjs == 0);
- assert(ctx->cnt_merged.accumbytes == 0);
- /* Remove ctx from bt2ctx. */
- if (ckh_remove(&bt2ctx, ctx->bt, NULL, NULL))
- assert(false);
- prof_leave(prof_tdata);
- /* Destroy ctx. */
- malloc_mutex_unlock(ctx->lock);
- bt_destroy(ctx->bt);
- idalloc(ctx);
+ if (opt_lg_prof_sample == 0) {
+ if (prof_dump_printf(propagate_err,
+ "heap profile: %"PRId64": %"PRId64
+ " [%"PRIu64": %"PRIu64"] @ heapprofile\n",
+ cnt_all->curobjs, cnt_all->curbytes,
+ cnt_all->accumobjs, cnt_all->accumbytes))
+ return (true);
} else {
- /*
- * Compensate for increment in prof_ctx_merge() or
- * prof_lookup().
- */
- ctx->nlimbo--;
- malloc_mutex_unlock(ctx->lock);
- prof_leave(prof_tdata);
+ if (prof_dump_printf(propagate_err,
+ "heap profile: %"PRId64": %"PRId64
+ " [%"PRIu64": %"PRIu64"] @ heap_v2/%"PRIu64"\n",
+ cnt_all->curobjs, cnt_all->curbytes,
+ cnt_all->accumobjs, cnt_all->accumbytes,
+ ((uint64_t)1U << opt_lg_prof_sample)))
+ return (true);
}
+
+ return (false);
}
static void
-prof_ctx_merge(prof_ctx_t *ctx, prof_thr_cnt_t *cnt)
+prof_dump_ctx_cleanup_locked(prof_ctx_t *ctx, prof_ctx_list_t *ctx_ql)
{
- bool destroy;
- cassert(config_prof);
+ ctx->nlimbo--;
+ ql_remove(ctx_ql, ctx, dump_link);
+}
+
+static void
+prof_dump_ctx_cleanup(prof_ctx_t *ctx, prof_ctx_list_t *ctx_ql)
+{
- /* Merge cnt stats and detach from ctx. */
malloc_mutex_lock(ctx->lock);
- ctx->cnt_merged.curobjs += cnt->cnts.curobjs;
- ctx->cnt_merged.curbytes += cnt->cnts.curbytes;
- ctx->cnt_merged.accumobjs += cnt->cnts.accumobjs;
- ctx->cnt_merged.accumbytes += cnt->cnts.accumbytes;
- ql_remove(&ctx->cnts_ql, cnt, cnts_link);
- if (opt_prof_accum == false && ql_first(&ctx->cnts_ql) == NULL &&
- ctx->cnt_merged.curobjs == 0 && ctx->nlimbo == 0) {
- /*
- * Increment ctx->nlimbo in order to keep another thread from
- * winning the race to destroy ctx while this one has ctx->lock
- * dropped. Without this, it would be possible for another
- * thread to:
- *
- * 1) Sample an allocation associated with ctx.
- * 2) Deallocate the sampled object.
- * 3) Successfully prof_ctx_destroy(ctx).
- *
- * The result would be that ctx no longer exists by the time
- * this thread accesses it in prof_ctx_destroy().
- */
- ctx->nlimbo++;
- destroy = true;
- } else
- destroy = false;
+ prof_dump_ctx_cleanup_locked(ctx, ctx_ql);
malloc_mutex_unlock(ctx->lock);
- if (destroy)
- prof_ctx_destroy(ctx);
}
static bool
-prof_dump_ctx(bool propagate_err, prof_ctx_t *ctx, prof_bt_t *bt)
+prof_dump_ctx(bool propagate_err, prof_ctx_t *ctx, const prof_bt_t *bt,
+ prof_ctx_list_t *ctx_ql)
{
+ bool ret;
unsigned i;
cassert(config_prof);
@@ -764,36 +888,49 @@ prof_dump_ctx(bool propagate_err, prof_ctx_t *ctx, prof_bt_t *bt)
* filled in. Avoid dumping any ctx that is an artifact of either
* implementation detail.
*/
+ malloc_mutex_lock(ctx->lock);
if ((opt_prof_accum == false && ctx->cnt_summed.curobjs == 0) ||
(opt_prof_accum && ctx->cnt_summed.accumobjs == 0)) {
assert(ctx->cnt_summed.curobjs == 0);
assert(ctx->cnt_summed.curbytes == 0);
assert(ctx->cnt_summed.accumobjs == 0);
assert(ctx->cnt_summed.accumbytes == 0);
- return (false);
+ ret = false;
+ goto label_return;
}
- if (prof_printf(propagate_err, "%"PRId64": %"PRId64
+ if (prof_dump_printf(propagate_err, "%"PRId64": %"PRId64
" [%"PRIu64": %"PRIu64"] @",
ctx->cnt_summed.curobjs, ctx->cnt_summed.curbytes,
- ctx->cnt_summed.accumobjs, ctx->cnt_summed.accumbytes))
- return (true);
+ ctx->cnt_summed.accumobjs, ctx->cnt_summed.accumbytes)) {
+ ret = true;
+ goto label_return;
+ }
for (i = 0; i < bt->len; i++) {
- if (prof_printf(propagate_err, " %#"PRIxPTR,
- (uintptr_t)bt->vec[i]))
- return (true);
+ if (prof_dump_printf(propagate_err, " %#"PRIxPTR,
+ (uintptr_t)bt->vec[i])) {
+ ret = true;
+ goto label_return;
+ }
}
- if (prof_write(propagate_err, "\n"))
- return (true);
+ if (prof_dump_write(propagate_err, "\n")) {
+ ret = true;
+ goto label_return;
+ }
- return (false);
+ ret = false;
+label_return:
+ prof_dump_ctx_cleanup_locked(ctx, ctx_ql);
+ malloc_mutex_unlock(ctx->lock);
+ return (ret);
}
static bool
prof_dump_maps(bool propagate_err)
{
+ bool ret;
int mfd;
char filename[PATH_MAX + 1];
@@ -805,25 +942,52 @@ prof_dump_maps(bool propagate_err)
if (mfd != -1) {
ssize_t nread;
- if (prof_write(propagate_err, "\nMAPPED_LIBRARIES:\n") &&
- propagate_err)
- return (true);
+ if (prof_dump_write(propagate_err, "\nMAPPED_LIBRARIES:\n") &&
+ propagate_err) {
+ ret = true;
+ goto label_return;
+ }
nread = 0;
do {
prof_dump_buf_end += nread;
if (prof_dump_buf_end == PROF_DUMP_BUFSIZE) {
/* Make space in prof_dump_buf before read(). */
- if (prof_flush(propagate_err) && propagate_err)
- return (true);
+ if (prof_dump_flush(propagate_err) &&
+ propagate_err) {
+ ret = true;
+ goto label_return;
+ }
}
nread = read(mfd, &prof_dump_buf[prof_dump_buf_end],
PROF_DUMP_BUFSIZE - prof_dump_buf_end);
} while (nread > 0);
+ } else {
+ ret = true;
+ goto label_return;
+ }
+
+ ret = false;
+label_return:
+ if (mfd != -1)
close(mfd);
- } else
- return (true);
+ return (ret);
+}
- return (false);
+static void
+prof_leakcheck(const prof_cnt_t *cnt_all, size_t leak_nctx,
+ const char *filename)
+{
+
+ if (cnt_all->curbytes != 0) {
+ malloc_printf("<jemalloc>: Leak summary: %"PRId64" byte%s, %"
+ PRId64" object%s, %zu context%s\n",
+ cnt_all->curbytes, (cnt_all->curbytes != 1) ? "s" : "",
+ cnt_all->curobjs, (cnt_all->curobjs != 1) ? "s" : "",
+ leak_nctx, (leak_nctx != 1) ? "s" : "");
+ malloc_printf(
+ "<jemalloc>: Run pprof on \"%s\" for leak detail\n",
+ filename);
+ }
}
static bool
@@ -833,98 +997,74 @@ prof_dump(bool propagate_err, const char *filename, bool leakcheck)
prof_cnt_t cnt_all;
size_t tabind;
union {
- prof_bt_t *p;
- void *v;
- } bt;
- union {
prof_ctx_t *p;
void *v;
} ctx;
size_t leak_nctx;
+ prof_ctx_list_t ctx_ql;
cassert(config_prof);
prof_tdata = prof_tdata_get(false);
if ((uintptr_t)prof_tdata <= (uintptr_t)PROF_TDATA_STATE_MAX)
return (true);
- prof_enter(prof_tdata);
- prof_dump_fd = creat(filename, 0644);
- if (prof_dump_fd == -1) {
- if (propagate_err == false) {
- malloc_printf(
- "<jemalloc>: creat(\"%s\"), 0644) failed\n",
- filename);
- if (opt_abort)
- abort();
- }
- goto label_error;
- }
+
+ malloc_mutex_lock(&prof_dump_mtx);
/* Merge per thread profile stats, and sum them in cnt_all. */
memset(&cnt_all, 0, sizeof(prof_cnt_t));
leak_nctx = 0;
+ ql_new(&ctx_ql);
+ prof_enter(prof_tdata);
for (tabind = 0; ckh_iter(&bt2ctx, &tabind, NULL, &ctx.v) == false;)
- prof_ctx_sum(ctx.p, &cnt_all, &leak_nctx);
+ prof_dump_ctx_prep(ctx.p, &cnt_all, &leak_nctx, &ctx_ql);
+ prof_leave(prof_tdata);
+
+ /* Create dump file. */
+ if ((prof_dump_fd = prof_dump_open(propagate_err, filename)) == -1)
+ goto label_open_close_error;
/* Dump profile header. */
- if (opt_lg_prof_sample == 0) {
- if (prof_printf(propagate_err,
- "heap profile: %"PRId64": %"PRId64
- " [%"PRIu64": %"PRIu64"] @ heapprofile\n",
- cnt_all.curobjs, cnt_all.curbytes,
- cnt_all.accumobjs, cnt_all.accumbytes))
- goto label_error;
- } else {
- if (prof_printf(propagate_err,
- "heap profile: %"PRId64": %"PRId64
- " [%"PRIu64": %"PRIu64"] @ heap_v2/%"PRIu64"\n",
- cnt_all.curobjs, cnt_all.curbytes,
- cnt_all.accumobjs, cnt_all.accumbytes,
- ((uint64_t)1U << opt_lg_prof_sample)))
- goto label_error;
- }
+ if (prof_dump_header(propagate_err, &cnt_all))
+ goto label_write_error;
- /* Dump per ctx profile stats. */
- for (tabind = 0; ckh_iter(&bt2ctx, &tabind, &bt.v, &ctx.v)
- == false;) {
- if (prof_dump_ctx(propagate_err, ctx.p, bt.p))
- goto label_error;
+ /* Dump per ctx profile stats. */
+ while ((ctx.p = ql_first(&ctx_ql)) != NULL) {
+ if (prof_dump_ctx(propagate_err, ctx.p, ctx.p->bt, &ctx_ql))
+ goto label_write_error;
}
/* Dump /proc/<pid>/maps if possible. */
if (prof_dump_maps(propagate_err))
- goto label_error;
+ goto label_write_error;
- if (prof_flush(propagate_err))
- goto label_error;
- close(prof_dump_fd);
- prof_leave(prof_tdata);
+ if (prof_dump_close(propagate_err))
+ goto label_open_close_error;
- if (leakcheck && cnt_all.curbytes != 0) {
- malloc_printf("<jemalloc>: Leak summary: %"PRId64" byte%s, %"
- PRId64" object%s, %zu context%s\n",
- cnt_all.curbytes, (cnt_all.curbytes != 1) ? "s" : "",
- cnt_all.curobjs, (cnt_all.curobjs != 1) ? "s" : "",
- leak_nctx, (leak_nctx != 1) ? "s" : "");
- malloc_printf(
- "<jemalloc>: Run pprof on \"%s\" for leak detail\n",
- filename);
- }
+ malloc_mutex_unlock(&prof_dump_mtx);
+
+ if (leakcheck)
+ prof_leakcheck(&cnt_all, leak_nctx, filename);
return (false);
-label_error:
- prof_leave(prof_tdata);
+label_write_error:
+ prof_dump_close(propagate_err);
+label_open_close_error:
+ while ((ctx.p = ql_first(&ctx_ql)) != NULL)
+ prof_dump_ctx_cleanup(ctx.p, &ctx_ql);
+ malloc_mutex_unlock(&prof_dump_mtx);
return (true);
}
#define DUMP_FILENAME_BUFSIZE (PATH_MAX + 1)
+#define VSEQ_INVALID UINT64_C(0xffffffffffffffff)
static void
prof_dump_filename(char *filename, char v, int64_t vseq)
{
cassert(config_prof);
- if (vseq != UINT64_C(0xffffffffffffffff)) {
+ if (vseq != VSEQ_INVALID) {
/* "<prefix>.<pid>.<seq>.v<vseq>.heap" */
malloc_snprintf(filename, DUMP_FILENAME_BUFSIZE,
"%s.%d.%"PRIu64".%c%"PRId64".heap",
@@ -950,7 +1090,7 @@ prof_fdump(void)
if (opt_prof_final && opt_prof_prefix[0] != '\0') {
malloc_mutex_lock(&prof_dump_seq_mtx);
- prof_dump_filename(filename, 'f', UINT64_C(0xffffffffffffffff));
+ prof_dump_filename(filename, 'f', VSEQ_INVALID);
malloc_mutex_unlock(&prof_dump_seq_mtx);
prof_dump(false, filename, opt_prof_leak);
}
@@ -1056,14 +1196,6 @@ prof_bt_keycomp(const void *k1, const void *k2)
return (memcmp(bt1->vec, bt2->vec, bt1->len * sizeof(void *)) == 0);
}
-static malloc_mutex_t *
-prof_ctx_mutex_choose(void)
-{
- unsigned nctxs = atomic_add_u(&cum_ctxs, 1);
-
- return (&ctx_locks[(nctxs - 1) % PROF_NCTX_LOCKS]);
-}
-
prof_tdata_t *
prof_tdata_init(void)
{
@@ -1208,6 +1340,8 @@ prof_boot2(void)
if (malloc_mutex_init(&prof_dump_seq_mtx))
return (true);
+ if (malloc_mutex_init(&prof_dump_mtx))
+ return (true);
if (atexit(prof_fdump) != 0) {
malloc_write("<jemalloc>: Error in atexit()\n");
@@ -1245,10 +1379,10 @@ prof_prefork(void)
if (opt_prof) {
unsigned i;
- malloc_mutex_lock(&bt2ctx_mtx);
- malloc_mutex_lock(&prof_dump_seq_mtx);
+ malloc_mutex_prefork(&bt2ctx_mtx);
+ malloc_mutex_prefork(&prof_dump_seq_mtx);
for (i = 0; i < PROF_NCTX_LOCKS; i++)
- malloc_mutex_lock(&ctx_locks[i]);
+ malloc_mutex_prefork(&ctx_locks[i]);
}
}
diff --git a/dep/jemalloc/src/quarantine.c b/dep/jemalloc/src/quarantine.c
index f96a948d5c7..5431511640a 100644
--- a/dep/jemalloc/src/quarantine.c
+++ b/dep/jemalloc/src/quarantine.c
@@ -141,8 +141,17 @@ quarantine(void *ptr)
obj->usize = usize;
quarantine->curbytes += usize;
quarantine->curobjs++;
- if (opt_junk)
- memset(ptr, 0x5a, usize);
+ if (config_fill && opt_junk) {
+ /*
+ * Only do redzone validation if Valgrind isn't in
+ * operation.
+ */
+ if ((config_valgrind == false || opt_valgrind == false)
+ && usize <= SMALL_MAXCLASS)
+ arena_quarantine_junk_small(ptr, usize);
+ else
+ memset(ptr, 0x5a, usize);
+ }
} else {
assert(quarantine->curbytes == 0);
idalloc(ptr);
diff --git a/dep/jemalloc/src/rtree.c b/dep/jemalloc/src/rtree.c
index 90c6935a0ed..205957ac4e1 100644
--- a/dep/jemalloc/src/rtree.c
+++ b/dep/jemalloc/src/rtree.c
@@ -2,42 +2,55 @@
#include "jemalloc/internal/jemalloc_internal.h"
rtree_t *
-rtree_new(unsigned bits)
+rtree_new(unsigned bits, rtree_alloc_t *alloc, rtree_dalloc_t *dalloc)
{
rtree_t *ret;
- unsigned bits_per_level, height, i;
+ unsigned bits_per_level, bits_in_leaf, height, i;
+
+ assert(bits > 0 && bits <= (sizeof(uintptr_t) << 3));
bits_per_level = ffs(pow2_ceil((RTREE_NODESIZE / sizeof(void *)))) - 1;
- height = bits / bits_per_level;
- if (height * bits_per_level != bits)
- height++;
- assert(height * bits_per_level >= bits);
+ bits_in_leaf = ffs(pow2_ceil((RTREE_NODESIZE / sizeof(uint8_t)))) - 1;
+ if (bits > bits_in_leaf) {
+ height = 1 + (bits - bits_in_leaf) / bits_per_level;
+ if ((height-1) * bits_per_level + bits_in_leaf != bits)
+ height++;
+ } else {
+ height = 1;
+ }
+ assert((height-1) * bits_per_level + bits_in_leaf >= bits);
- ret = (rtree_t*)base_alloc(offsetof(rtree_t, level2bits) +
+ ret = (rtree_t*)alloc(offsetof(rtree_t, level2bits) +
(sizeof(unsigned) * height));
if (ret == NULL)
return (NULL);
memset(ret, 0, offsetof(rtree_t, level2bits) + (sizeof(unsigned) *
height));
+ ret->alloc = alloc;
+ ret->dalloc = dalloc;
if (malloc_mutex_init(&ret->mutex)) {
- /* Leak the rtree. */
+ if (dalloc != NULL)
+ dalloc(ret);
return (NULL);
}
ret->height = height;
- if (bits_per_level * height > bits)
- ret->level2bits[0] = bits % bits_per_level;
- else
- ret->level2bits[0] = bits_per_level;
- for (i = 1; i < height; i++)
- ret->level2bits[i] = bits_per_level;
-
- ret->root = (void**)base_alloc(sizeof(void *) << ret->level2bits[0]);
+ if (height > 1) {
+ if ((height-1) * bits_per_level + bits_in_leaf > bits) {
+ ret->level2bits[0] = (bits - bits_in_leaf) %
+ bits_per_level;
+ } else
+ ret->level2bits[0] = bits_per_level;
+ for (i = 1; i < height-1; i++)
+ ret->level2bits[i] = bits_per_level;
+ ret->level2bits[height-1] = bits_in_leaf;
+ } else
+ ret->level2bits[0] = bits;
+
+ ret->root = (void**)alloc(sizeof(void *) << ret->level2bits[0]);
if (ret->root == NULL) {
- /*
- * We leak the rtree here, since there's no generic base
- * deallocation.
- */
+ if (dalloc != NULL)
+ dalloc(ret);
return (NULL);
}
memset(ret->root, 0, sizeof(void *) << ret->level2bits[0]);
@@ -45,6 +58,31 @@ rtree_new(unsigned bits)
return (ret);
}
+static void
+rtree_delete_subtree(rtree_t *rtree, void **node, unsigned level)
+{
+
+ if (level < rtree->height - 1) {
+ size_t nchildren, i;
+
+ nchildren = ZU(1) << rtree->level2bits[level];
+ for (i = 0; i < nchildren; i++) {
+ void **child = (void **)node[i];
+ if (child != NULL)
+ rtree_delete_subtree(rtree, child, level + 1);
+ }
+ }
+ rtree->dalloc(node);
+}
+
+void
+rtree_delete(rtree_t *rtree)
+{
+
+ rtree_delete_subtree(rtree, rtree->root, 0);
+ rtree->dalloc(rtree);
+}
+
void
rtree_prefork(rtree_t *rtree)
{
diff --git a/dep/jemalloc/src/stats.c b/dep/jemalloc/src/stats.c
index 43f87af6700..bef2ab33cd4 100644
--- a/dep/jemalloc/src/stats.c
+++ b/dep/jemalloc/src/stats.c
@@ -345,25 +345,25 @@ stats_print(void (*write_cb)(void *, const char *), void *cbopaque,
malloc_cprintf(write_cb, cbopaque, "Assertions %s\n",
bv ? "enabled" : "disabled");
-#define OPT_WRITE_BOOL(n) \
+#define OPT_WRITE_BOOL(n) \
if ((err = je_mallctl("opt."#n, &bv, &bsz, NULL, 0)) \
== 0) { \
malloc_cprintf(write_cb, cbopaque, \
" opt."#n": %s\n", bv ? "true" : "false"); \
}
-#define OPT_WRITE_SIZE_T(n) \
+#define OPT_WRITE_SIZE_T(n) \
if ((err = je_mallctl("opt."#n, &sv, &ssz, NULL, 0)) \
== 0) { \
malloc_cprintf(write_cb, cbopaque, \
" opt."#n": %zu\n", sv); \
}
-#define OPT_WRITE_SSIZE_T(n) \
+#define OPT_WRITE_SSIZE_T(n) \
if ((err = je_mallctl("opt."#n, &ssv, &sssz, NULL, 0)) \
== 0) { \
malloc_cprintf(write_cb, cbopaque, \
" opt."#n": %zd\n", ssv); \
}
-#define OPT_WRITE_CHAR_P(n) \
+#define OPT_WRITE_CHAR_P(n) \
if ((err = je_mallctl("opt."#n, &cpv, &cpsz, NULL, 0)) \
== 0) { \
malloc_cprintf(write_cb, cbopaque, \
diff --git a/dep/jemalloc/src/tcache.c b/dep/jemalloc/src/tcache.c
index 98ed19edd52..6de92960b2d 100644
--- a/dep/jemalloc/src/tcache.c
+++ b/dep/jemalloc/src/tcache.c
@@ -260,8 +260,8 @@ tcache_arena_dissociate(tcache_t *tcache)
/* Unlink from list of extant tcaches. */
malloc_mutex_lock(&tcache->arena->lock);
ql_remove(&tcache->arena->tcache_ql, tcache, link);
- malloc_mutex_unlock(&tcache->arena->lock);
tcache_stats_merge(tcache, tcache->arena);
+ malloc_mutex_unlock(&tcache->arena->lock);
}
}
@@ -292,7 +292,7 @@ tcache_create(arena_t *arena)
else if (size <= tcache_maxclass)
tcache = (tcache_t *)arena_malloc_large(arena, size, true);
else
- tcache = (tcache_t *)icallocx(size, false, arena);
+ tcache = (tcache_t *)icalloct(size, false, arena);
if (tcache == NULL)
return (NULL);
@@ -366,7 +366,7 @@ tcache_destroy(tcache_t *tcache)
arena_dalloc_large(arena, chunk, tcache);
} else
- idallocx(tcache, false);
+ idalloct(tcache, false);
}
void
@@ -399,11 +399,14 @@ tcache_thread_cleanup(void *arg)
}
}
+/* Caller must own arena->lock. */
void
tcache_stats_merge(tcache_t *tcache, arena_t *arena)
{
unsigned i;
+ cassert(config_stats);
+
/* Merge and reset tcache stats. */
for (i = 0; i < NBINS; i++) {
arena_bin_t *bin = &arena->bins[i];
diff --git a/dep/jemalloc/src/tsd.c b/dep/jemalloc/src/tsd.c
index 961a546329c..700caabfe47 100644
--- a/dep/jemalloc/src/tsd.c
+++ b/dep/jemalloc/src/tsd.c
@@ -21,7 +21,7 @@ void
malloc_tsd_dalloc(void *wrapper)
{
- idalloc(wrapper);
+ idalloct(wrapper, false);
}
void
@@ -105,3 +105,37 @@ JEMALLOC_SECTION(".CRT$XLY") JEMALLOC_ATTR(used)
static const BOOL (WINAPI *tls_callback)(HINSTANCE hinstDLL,
DWORD fdwReason, LPVOID lpvReserved) = _tls_callback;
#endif
+
+#if (!defined(JEMALLOC_MALLOC_THREAD_CLEANUP) && !defined(JEMALLOC_TLS) && \
+ !defined(_WIN32))
+void *
+tsd_init_check_recursion(tsd_init_head_t *head, tsd_init_block_t *block)
+{
+ pthread_t self = pthread_self();
+ tsd_init_block_t *iter;
+
+ /* Check whether this thread has already inserted into the list. */
+ malloc_mutex_lock(&head->lock);
+ ql_foreach(iter, &head->blocks, link) {
+ if (iter->thread == self) {
+ malloc_mutex_unlock(&head->lock);
+ return (iter->data);
+ }
+ }
+ /* Insert block into list. */
+ ql_elm_new(block, link);
+ block->thread = self;
+ ql_tail_insert(&head->blocks, block, link);
+ malloc_mutex_unlock(&head->lock);
+ return (NULL);
+}
+
+void
+tsd_init_finish(tsd_init_head_t *head, tsd_init_block_t *block)
+{
+
+ malloc_mutex_lock(&head->lock);
+ ql_remove(&head->blocks, block, link);
+ malloc_mutex_unlock(&head->lock);
+}
+#endif
diff --git a/dep/jemalloc/src/util.c b/dep/jemalloc/src/util.c
index b3a01143698..93a19fd16f7 100644
--- a/dep/jemalloc/src/util.c
+++ b/dep/jemalloc/src/util.c
@@ -77,7 +77,7 @@ malloc_write(const char *s)
* provide a wrapper.
*/
int
-buferror(char *buf, size_t buflen)
+buferror(int err, char *buf, size_t buflen)
{
#ifdef _WIN32
@@ -85,34 +85,36 @@ buferror(char *buf, size_t buflen)
(LPSTR)buf, buflen, NULL);
return (0);
#elif defined(_GNU_SOURCE)
- char *b = strerror_r(errno, buf, buflen);
+ char *b = strerror_r(err, buf, buflen);
if (b != buf) {
strncpy(buf, b, buflen);
buf[buflen-1] = '\0';
}
return (0);
#else
- return (strerror_r(errno, buf, buflen));
+ return (strerror_r(err, buf, buflen));
#endif
}
uintmax_t
-malloc_strtoumax(const char *nptr, char **endptr, int base)
+malloc_strtoumax(const char *restrict nptr, char **restrict endptr, int base)
{
uintmax_t ret, digit;
int b;
bool neg;
const char *p, *ns;
+ p = nptr;
if (base < 0 || base == 1 || base > 36) {
+ ns = p;
set_errno(EINVAL);
- return (UINTMAX_MAX);
+ ret = UINTMAX_MAX;
+ goto label_return;
}
b = base;
/* Swallow leading whitespace and get sign, if any. */
neg = false;
- p = nptr;
while (true) {
switch (*p) {
case '\t': case '\n': case '\v': case '\f': case '\r': case ' ':
@@ -146,7 +148,7 @@ malloc_strtoumax(const char *nptr, char **endptr, int base)
if (b == 8)
p++;
break;
- case 'x':
+ case 'X': case 'x':
switch (p[2]) {
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
@@ -164,7 +166,9 @@ malloc_strtoumax(const char *nptr, char **endptr, int base)
}
break;
default:
- break;
+ p++;
+ ret = 0;
+ goto label_return;
}
}
if (b == 0)
@@ -181,13 +185,22 @@ malloc_strtoumax(const char *nptr, char **endptr, int base)
if (ret < pret) {
/* Overflow. */
set_errno(ERANGE);
- return (UINTMAX_MAX);
+ ret = UINTMAX_MAX;
+ goto label_return;
}
p++;
}
if (neg)
ret = -ret;
+ if (p == ns) {
+ /* No conversion performed. */
+ set_errno(EINVAL);
+ ret = UINTMAX_MAX;
+ goto label_return;
+ }
+
+label_return:
if (endptr != NULL) {
if (p == ns) {
/* No characters were converted. */
@@ -195,7 +208,6 @@ malloc_strtoumax(const char *nptr, char **endptr, int base)
} else
*endptr = (char *)p;
}
-
return (ret);
}
@@ -331,7 +343,7 @@ malloc_vsnprintf(char *str, size_t size, const char *format, va_list ap)
APPEND_C(' '); \
} \
} while (0)
-#define GET_ARG_NUMERIC(val, len) do { \
+#define GET_ARG_NUMERIC(val, len) do { \
switch (len) { \
case '?': \
val = va_arg(ap, int); \
@@ -354,6 +366,9 @@ malloc_vsnprintf(char *str, size_t size, const char *format, va_list ap)
case 'j': \
val = va_arg(ap, intmax_t); \
break; \
+ case 'j' | 0x80: \
+ val = va_arg(ap, uintmax_t); \
+ break; \
case 't': \
val = va_arg(ap, ptrdiff_t); \
break; \
@@ -385,11 +400,6 @@ malloc_vsnprintf(char *str, size_t size, const char *format, va_list ap)
unsigned char len = '?';
f++;
- if (*f == '%') {
- /* %% */
- APPEND_C(*f);
- break;
- }
/* Flags. */
while (true) {
switch (*f) {
@@ -419,6 +429,10 @@ malloc_vsnprintf(char *str, size_t size, const char *format, va_list ap)
case '*':
width = va_arg(ap, int);
f++;
+ if (width < 0) {
+ left_justify = true;
+ width = -width;
+ }
break;
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9': {
@@ -428,19 +442,16 @@ malloc_vsnprintf(char *str, size_t size, const char *format, va_list ap)
assert(uwidth != UINTMAX_MAX || get_errno() !=
ERANGE);
width = (int)uwidth;
- if (*f == '.') {
- f++;
- goto label_precision;
- } else
- goto label_length;
break;
- } case '.':
- f++;
- goto label_precision;
- default: goto label_length;
+ } default:
+ break;
}
+ /* Width/precision separator. */
+ if (*f == '.')
+ f++;
+ else
+ goto label_length;
/* Precision. */
- label_precision:
switch (*f) {
case '*':
prec = va_arg(ap, int);
@@ -469,16 +480,8 @@ malloc_vsnprintf(char *str, size_t size, const char *format, va_list ap)
} else
len = 'l';
break;
- case 'j':
- len = 'j';
- f++;
- break;
- case 't':
- len = 't';
- f++;
- break;
- case 'z':
- len = 'z';
+ case 'q': case 'j': case 't': case 'z':
+ len = *f;
f++;
break;
default: break;
@@ -487,6 +490,11 @@ malloc_vsnprintf(char *str, size_t size, const char *format, va_list ap)
switch (*f) {
char *s;
size_t slen;
+ case '%':
+ /* %% */
+ APPEND_C(*f);
+ f++;
+ break;
case 'd': case 'i': {
intmax_t val JEMALLOC_CC_SILENCE_INIT(0);
char buf[D2S_BUFSIZE];
@@ -540,7 +548,7 @@ malloc_vsnprintf(char *str, size_t size, const char *format, va_list ap)
assert(len == '?' || len == 'l');
assert_not_implemented(len != 'l');
s = va_arg(ap, char *);
- slen = (prec == -1) ? strlen(s) : prec;
+ slen = (prec < 0) ? strlen(s) : prec;
APPEND_PADDED_S(s, slen, width, left_justify);
f++;
break;
@@ -553,8 +561,7 @@ malloc_vsnprintf(char *str, size_t size, const char *format, va_list ap)
APPEND_PADDED_S(s, slen, width, left_justify);
f++;
break;
- }
- default: not_implemented();
+ } default: not_reached();
}
break;
} default: {
diff --git a/dep/jemalloc/src/zone.c b/dep/jemalloc/src/zone.c
index c62c183f65e..e0302ef4edc 100644
--- a/dep/jemalloc/src/zone.c
+++ b/dep/jemalloc/src/zone.c
@@ -137,7 +137,7 @@ zone_destroy(malloc_zone_t *zone)
{
/* This function should never be called. */
- assert(false);
+ not_reached();
return (NULL);
}
diff --git a/sql/updates/auth/2013_08_25_00_auth.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_08_25_00_auth.sql
index d1abc9eb958..d1abc9eb958 100644
--- a/sql/updates/auth/2013_08_25_00_auth.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_08_25_00_auth.sql
diff --git a/sql/updates/auth/2013_08_30_00_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_08_30_00_auth_misc.sql
index d433c479c63..d433c479c63 100644
--- a/sql/updates/auth/2013_08_30_00_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_08_30_00_auth_misc.sql
diff --git a/sql/updates/auth/2013_08_30_01_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_08_30_01_auth_misc.sql
index 096588ba2ab..096588ba2ab 100644
--- a/sql/updates/auth/2013_08_30_01_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_08_30_01_auth_misc.sql
diff --git a/sql/updates/auth/2013_08_30_02_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_08_30_02_auth_misc.sql
index da5f187627b..da5f187627b 100644
--- a/sql/updates/auth/2013_08_30_02_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_08_30_02_auth_misc.sql
diff --git a/sql/updates/auth/2013_08_30_03_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_08_30_03_auth_misc.sql
index a6495a2de6e..a6495a2de6e 100644
--- a/sql/updates/auth/2013_08_30_03_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_08_30_03_auth_misc.sql
diff --git a/sql/updates/auth/2013_08_30_04_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_08_30_04_auth_misc.sql
index 422f0f38c50..422f0f38c50 100644
--- a/sql/updates/auth/2013_08_30_04_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_08_30_04_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_01_00_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_01_00_auth_misc.sql
index 5a48a4233ba..5a48a4233ba 100644
--- a/sql/updates/auth/2013_09_01_00_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_01_00_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_01_01_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_01_01_auth_misc.sql
index 14c219deaf4..14c219deaf4 100644
--- a/sql/updates/auth/2013_09_01_01_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_01_01_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_02_00_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_00_auth_misc.sql
index 46a8054e086..46a8054e086 100644
--- a/sql/updates/auth/2013_09_02_00_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_00_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_02_01_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_01_auth_misc.sql
index 7d13404d087..7d13404d087 100644
--- a/sql/updates/auth/2013_09_02_01_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_01_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_02_02_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_02_auth_misc.sql
index 29ab2abf80d..29ab2abf80d 100644
--- a/sql/updates/auth/2013_09_02_02_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_02_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_02_03_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_03_auth_misc.sql
index cf1f1837af4..cf1f1837af4 100644
--- a/sql/updates/auth/2013_09_02_03_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_03_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_02_04_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_04_auth_misc.sql
index 4734aa6bbd4..4734aa6bbd4 100644
--- a/sql/updates/auth/2013_09_02_04_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_04_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_02_05_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_05_auth_misc.sql
index 8d71ab530dd..8d71ab530dd 100644
--- a/sql/updates/auth/2013_09_02_05_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_05_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_02_06_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_06_auth_misc.sql
index e66e4d30db1..e66e4d30db1 100644
--- a/sql/updates/auth/2013_09_02_06_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_06_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_02_07_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_07_auth_misc.sql
index 3fb2b343b9b..3fb2b343b9b 100644
--- a/sql/updates/auth/2013_09_02_07_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_07_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_02_08_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_08_auth_misc.sql
index b6bf442aeb5..b6bf442aeb5 100644
--- a/sql/updates/auth/2013_09_02_08_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_08_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_02_09_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_09_auth_misc.sql
index 3b16d9181d5..3b16d9181d5 100644
--- a/sql/updates/auth/2013_09_02_09_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_09_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_02_10_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_10_auth_misc.sql
index a69174d6ca3..a69174d6ca3 100644
--- a/sql/updates/auth/2013_09_02_10_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_10_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_02_11_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_11_auth_misc.sql
index 04c9b4fb6b4..04c9b4fb6b4 100644
--- a/sql/updates/auth/2013_09_02_11_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_11_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_02_12_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_12_auth_misc.sql
index 640f54b03f8..640f54b03f8 100644
--- a/sql/updates/auth/2013_09_02_12_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_12_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_02_13_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_13_auth_misc.sql
index d370b3f959d..d370b3f959d 100644
--- a/sql/updates/auth/2013_09_02_13_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_13_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_02_14_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_14_auth_misc.sql
index c580639da80..c580639da80 100644
--- a/sql/updates/auth/2013_09_02_14_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_14_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_02_15_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_15_auth_misc.sql
index 6e5db6e1384..6e5db6e1384 100644
--- a/sql/updates/auth/2013_09_02_15_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_15_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_02_16_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_16_auth_misc.sql
index 5d3a7754e86..5d3a7754e86 100644
--- a/sql/updates/auth/2013_09_02_16_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_16_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_02_17_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_17_auth_misc.sql
index 54087e64c22..54087e64c22 100644
--- a/sql/updates/auth/2013_09_02_17_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_02_17_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_10_00_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_00_auth_misc.sql
index f62ecd83cab..f62ecd83cab 100644
--- a/sql/updates/auth/2013_09_10_00_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_00_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_10_01_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_01_auth_misc.sql
index 2dbfbcaaf46..2dbfbcaaf46 100644
--- a/sql/updates/auth/2013_09_10_01_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_01_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_10_02_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_02_auth_misc.sql
index 2049cda2ffc..2049cda2ffc 100644
--- a/sql/updates/auth/2013_09_10_02_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_02_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_10_03_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_03_auth_misc.sql
index 553830f6ecb..553830f6ecb 100644
--- a/sql/updates/auth/2013_09_10_03_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_03_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_10_04_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_04_auth_misc.sql
index 9b1f48f2914..9b1f48f2914 100644
--- a/sql/updates/auth/2013_09_10_04_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_04_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_10_05_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_05_auth_misc.sql
index 607821854d3..607821854d3 100644
--- a/sql/updates/auth/2013_09_10_05_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_05_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_10_06_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_06_auth_misc.sql
index e83e5e3cdf4..e83e5e3cdf4 100644
--- a/sql/updates/auth/2013_09_10_06_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_06_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_10_07_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_07_auth_misc.sql
index 9988220d878..9988220d878 100644
--- a/sql/updates/auth/2013_09_10_07_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_07_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_10_08_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_08_auth_misc.sql
index c735009b7da..c735009b7da 100644
--- a/sql/updates/auth/2013_09_10_08_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_08_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_10_09_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_09_auth_misc.sql
index 8e0e340bfec..8e0e340bfec 100644
--- a/sql/updates/auth/2013_09_10_09_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_09_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_10_10_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_10_auth_misc.sql
index a0587f75bf4..a0587f75bf4 100644
--- a/sql/updates/auth/2013_09_10_10_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_10_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_10_11_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_11_auth_misc.sql
index e92c1cb3fae..e92c1cb3fae 100644
--- a/sql/updates/auth/2013_09_10_11_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_11_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_10_12_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_12_auth_misc.sql
index fbf78e175c6..fbf78e175c6 100644
--- a/sql/updates/auth/2013_09_10_12_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_12_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_10_13_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_13_auth_misc.sql
index becedad564d..becedad564d 100644
--- a/sql/updates/auth/2013_09_10_13_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_13_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_10_14_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_14_auth_misc.sql
index 0f24f96ca99..0f24f96ca99 100644
--- a/sql/updates/auth/2013_09_10_14_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_14_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_10_15_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_15_auth_misc.sql
index 8280024f74c..8280024f74c 100644
--- a/sql/updates/auth/2013_09_10_15_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_10_15_auth_misc.sql
diff --git a/sql/updates/auth/2013_09_29_00_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_29_00_auth_misc.sql
index e0591c5c827..e0591c5c827 100644
--- a/sql/updates/auth/2013_09_29_00_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_09_29_00_auth_misc.sql
diff --git a/sql/updates/auth/2013_10_16_00_auth_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_10_16_00_auth_misc.sql
index 7b51d7a125f..7b51d7a125f 100644
--- a/sql/updates/auth/2013_10_16_00_auth_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_10_16_00_auth_misc.sql
diff --git a/sql/updates/auth/2013_11_11_00_auth_logs.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_11_11_00_auth_logs.sql
index dddda0d6743..dddda0d6743 100644
--- a/sql/updates/auth/2013_11_11_00_auth_logs.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_11_11_00_auth_logs.sql
diff --git a/sql/updates/auth/2013_12_01_00_auth_rbac_permissions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_12_01_00_auth_rbac_permissions.sql
index c18e9d62d74..c18e9d62d74 100644
--- a/sql/updates/auth/2013_12_01_00_auth_rbac_permissions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_12_01_00_auth_rbac_permissions.sql
diff --git a/sql/updates/auth/2013_12_01_01_auth_rbac_permissions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_12_01_01_auth_rbac_permissions.sql
index b07b8a6d6b1..b07b8a6d6b1 100644
--- a/sql/updates/auth/2013_12_01_01_auth_rbac_permissions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2013_12_01_01_auth_rbac_permissions.sql
diff --git a/sql/updates/auth/2014_01_19_00_auth_rbac_permissions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2014_01_19_00_auth_rbac_permissions.sql
index 266f8ab15bb..266f8ab15bb 100644
--- a/sql/updates/auth/2014_01_19_00_auth_rbac_permissions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2014_01_19_00_auth_rbac_permissions.sql
diff --git a/sql/updates/auth/2014_01_19_01_auth_rbac_permissions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2014_01_19_01_auth_rbac_permissions.sql
index 7866de3d766..7866de3d766 100644
--- a/sql/updates/auth/2014_01_19_01_auth_rbac_permissions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/auth/2014_01_19_01_auth_rbac_permissions.sql
diff --git a/sql/updates/characters/2013_07_19_00_characters_corpse.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/characters/2013_07_19_00_characters_corpse.sql
index da52c91e875..da52c91e875 100644
--- a/sql/updates/characters/2013_07_19_00_characters_corpse.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/characters/2013_07_19_00_characters_corpse.sql
diff --git a/sql/updates/characters/2014_01_12_00_characters_guild.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/characters/2014_01_12_00_characters_guild.sql
index 23a2cada153..23a2cada153 100644
--- a/sql/updates/characters/2014_01_12_00_characters_guild.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/characters/2014_01_12_00_characters_guild.sql
diff --git a/sql/updates/world/2013_07_17_00_world_version.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_17_00_world_version.sql
index a780826ad48..a780826ad48 100644
--- a/sql/updates/world/2013_07_17_00_world_version.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_17_00_world_version.sql
diff --git a/sql/updates/world/2013_07_17_01_world_conditions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_17_01_world_conditions.sql
index 4528d39943c..4528d39943c 100644
--- a/sql/updates/world/2013_07_17_01_world_conditions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_17_01_world_conditions.sql
diff --git a/sql/updates/world/2013_07_17_02_world_gossip.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_17_02_world_gossip.sql
index 0ec238efb05..0ec238efb05 100644
--- a/sql/updates/world/2013_07_17_02_world_gossip.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_17_02_world_gossip.sql
diff --git a/sql/updates/world/2013_07_17_03_world_gossip.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_17_03_world_gossip.sql
index f3c79890fde..f3c79890fde 100644
--- a/sql/updates/world/2013_07_17_03_world_gossip.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_17_03_world_gossip.sql
diff --git a/sql/updates/world/2013_07_17_04_world_spell_script_names.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_17_04_world_spell_script_names.sql
index acec312eb92..acec312eb92 100644
--- a/sql/updates/world/2013_07_17_04_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_17_04_world_spell_script_names.sql
diff --git a/sql/updates/world/2013_07_18_00_world_conditions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_18_00_world_conditions.sql
index 90a16d32fb3..90a16d32fb3 100644
--- a/sql/updates/world/2013_07_18_00_world_conditions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_18_00_world_conditions.sql
diff --git a/sql/updates/world/2013_07_18_01_world_koralon.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_18_01_world_koralon.sql
index a67df5222ca..a67df5222ca 100644
--- a/sql/updates/world/2013_07_18_01_world_koralon.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_18_01_world_koralon.sql
diff --git a/sql/updates/world/2013_07_18_02_world_spell_script_names.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_18_02_world_spell_script_names.sql
index 89463a861aa..89463a861aa 100644
--- a/sql/updates/world/2013_07_18_02_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_18_02_world_spell_script_names.sql
diff --git a/sql/updates/world/2013_07_18_02_world_the_flesh_giant_slayer.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_18_02_world_the_flesh_giant_slayer.sql
index c8d7773c461..c8d7773c461 100644
--- a/sql/updates/world/2013_07_18_02_world_the_flesh_giant_slayer.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_18_02_world_the_flesh_giant_slayer.sql
diff --git a/sql/updates/world/2013_07_18_03_world_equipment.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_18_03_world_equipment.sql
index 4097327637b..4097327637b 100644
--- a/sql/updates/world/2013_07_18_03_world_equipment.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_18_03_world_equipment.sql
diff --git a/sql/updates/world/2013_07_19_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_19_00_world_misc.sql
index b5f08a058e6..b5f08a058e6 100644
--- a/sql/updates/world/2013_07_19_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_19_00_world_misc.sql
diff --git a/sql/updates/world/2013_07_20_00_world_gameobject.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_20_00_world_gameobject.sql
index 7262b76ffef..7262b76ffef 100644
--- a/sql/updates/world/2013_07_20_00_world_gameobject.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_20_00_world_gameobject.sql
diff --git a/sql/updates/world/2013_07_20_01_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_20_01_world_misc.sql
index 273d9070930..273d9070930 100644
--- a/sql/updates/world/2013_07_20_01_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_20_01_world_misc.sql
diff --git a/sql/updates/world/2013_07_23_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_23_00_world_misc.sql
index 8e69c7bb785..8e69c7bb785 100644
--- a/sql/updates/world/2013_07_23_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_23_00_world_misc.sql
diff --git a/sql/updates/world/2013_07_23_02_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_23_02_world_creature_template.sql
index b55999040f1..b55999040f1 100644
--- a/sql/updates/world/2013_07_23_02_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_23_02_world_creature_template.sql
diff --git a/sql/updates/world/2013_07_24_00_world_spell_script_names.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_24_00_world_spell_script_names.sql
index 8c156fb2e57..8c156fb2e57 100644
--- a/sql/updates/world/2013_07_24_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_24_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2013_07_24_01_world_spell_ranks_335.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_24_01_world_spell_ranks_335.sql
index db1d9803596..db1d9803596 100644
--- a/sql/updates/world/2013_07_24_01_world_spell_ranks_335.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_24_01_world_spell_ranks_335.sql
diff --git a/sql/updates/world/2013_07_24_02_world_trinity_strings.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_24_02_world_trinity_strings.sql
index b14e60c2c9d..b14e60c2c9d 100644
--- a/sql/updates/world/2013_07_24_02_world_trinity_strings.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_24_02_world_trinity_strings.sql
diff --git a/sql/updates/world/2013_07_24_03_world_spell_proc_event_335.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_24_03_world_spell_proc_event_335.sql
index 0e179e54ec8..0e179e54ec8 100644
--- a/sql/updates/world/2013_07_24_03_world_spell_proc_event_335.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_24_03_world_spell_proc_event_335.sql
diff --git a/sql/updates/world/2013_07_25_00_world_spell_script_names.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_25_00_world_spell_script_names.sql
index 14e6d16df44..14e6d16df44 100644
--- a/sql/updates/world/2013_07_25_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_25_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2013_07_25_01_world_conditions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_25_01_world_conditions.sql
index 1990fe3094b..1990fe3094b 100644
--- a/sql/updates/world/2013_07_25_01_world_conditions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_25_01_world_conditions.sql
diff --git a/sql/updates/world/2013_07_27_00_world_spell_script_names.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_27_00_world_spell_script_names.sql
index a3f49d9e4f9..a3f49d9e4f9 100644
--- a/sql/updates/world/2013_07_27_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_27_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2013_07_28_00_world_gameobjects.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_28_00_world_gameobjects.sql
index cb352339bd5..cb352339bd5 100644
--- a/sql/updates/world/2013_07_28_00_world_gameobjects.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_28_00_world_gameobjects.sql
diff --git a/sql/updates/world/2013_07_28_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_28_01_world_sai.sql
index 067200e9c51..067200e9c51 100644
--- a/sql/updates/world/2013_07_28_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_28_01_world_sai.sql
diff --git a/sql/updates/world/2013_07_29_00_world_drak_tharon_keep.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_29_00_world_drak_tharon_keep.sql
index bfcc29c1080..bfcc29c1080 100644
--- a/sql/updates/world/2013_07_29_00_world_drak_tharon_keep.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_29_00_world_drak_tharon_keep.sql
diff --git a/sql/updates/world/2013_07_29_01_world_spelldifficulty_dbc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_29_01_world_spelldifficulty_dbc.sql
index 56764385765..56764385765 100644
--- a/sql/updates/world/2013_07_29_01_world_spelldifficulty_dbc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_29_01_world_spelldifficulty_dbc.sql
diff --git a/sql/updates/world/2013_07_31_00_world_spell_script_names.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_31_00_world_spell_script_names.sql
index 27779d0da45..27779d0da45 100644
--- a/sql/updates/world/2013_07_31_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_31_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2013_08_03_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_03_00_world_misc.sql
index e6690c13033..e6690c13033 100644
--- a/sql/updates/world/2013_08_03_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_03_00_world_misc.sql
diff --git a/sql/updates/world/2013_08_04_00_world_quests.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_04_00_world_quests.sql
index 00f71824236..00f71824236 100644
--- a/sql/updates/world/2013_08_04_00_world_quests.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_04_00_world_quests.sql
diff --git a/sql/updates/world/2013_08_04_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_04_01_world_sai.sql
index b327d567024..b327d567024 100644
--- a/sql/updates/world/2013_08_04_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_04_01_world_sai.sql
diff --git a/sql/updates/world/2013_08_04_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_04_02_world_sai.sql
index 3cf828456c0..3cf828456c0 100644
--- a/sql/updates/world/2013_08_04_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_04_02_world_sai.sql
diff --git a/sql/updates/world/2013_08_04_03_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_04_03_world_sai.sql
index bd82b937ed7..bd82b937ed7 100644
--- a/sql/updates/world/2013_08_04_03_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_04_03_world_sai.sql
diff --git a/sql/updates/world/2013_08_04_04_world_trinity_string.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_04_04_world_trinity_string.sql
index cab49ba73f3..cab49ba73f3 100644
--- a/sql/updates/world/2013_08_04_04_world_trinity_string.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_04_04_world_trinity_string.sql
diff --git a/sql/updates/world/2013_08_05_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_05_00_world_sai.sql
index 05a675394c2..05a675394c2 100644
--- a/sql/updates/world/2013_08_05_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_05_00_world_sai.sql
diff --git a/sql/updates/world/2013_08_05_01_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_05_01_world_misc.sql
index a1e9aee50e7..a1e9aee50e7 100644
--- a/sql/updates/world/2013_08_05_01_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_05_01_world_misc.sql
diff --git a/sql/updates/world/2013_08_05_01_world_trinity_string.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_05_01_world_trinity_string.sql
index 7e9a465d49a..7e9a465d49a 100644
--- a/sql/updates/world/2013_08_05_01_world_trinity_string.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_05_01_world_trinity_string.sql
diff --git a/sql/updates/world/2013_08_05_02_world_quest_relation_tables.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_05_02_world_quest_relation_tables.sql
index a7d2af1725a..a7d2af1725a 100644
--- a/sql/updates/world/2013_08_05_02_world_quest_relation_tables.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_05_02_world_quest_relation_tables.sql
diff --git a/sql/updates/world/2013_08_06_00_world_item_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_06_00_world_item_template.sql
index 15cc7ddfa5a..15cc7ddfa5a 100644
--- a/sql/updates/world/2013_08_06_00_world_item_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_06_00_world_item_template.sql
diff --git a/sql/updates/world/2013_08_06_01_world_hor.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_06_01_world_hor.sql
index c9b8ccf8266..c9b8ccf8266 100644
--- a/sql/updates/world/2013_08_06_01_world_hor.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_06_01_world_hor.sql
diff --git a/sql/updates/world/2013_08_06_02_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_06_02_world_command.sql
index 2787cf079cf..2787cf079cf 100644
--- a/sql/updates/world/2013_08_06_02_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_06_02_world_command.sql
diff --git a/sql/updates/world/2013_08_06_03_world_area_4522.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_06_03_world_area_4522.sql
index 63ac8c4aeac..63ac8c4aeac 100644
--- a/sql/updates/world/2013_08_06_03_world_area_4522.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_06_03_world_area_4522.sql
diff --git a/sql/updates/world/2013_08_06_04_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_06_04_world_sai.sql
index 54124c1ea41..54124c1ea41 100644
--- a/sql/updates/world/2013_08_06_04_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_06_04_world_sai.sql
diff --git a/sql/updates/world/2013_08_06_05_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_06_05_world_misc.sql
index 505cb81e882..505cb81e882 100644
--- a/sql/updates/world/2013_08_06_05_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_06_05_world_misc.sql
diff --git a/sql/updates/world/2013_08_07_00_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_00_world_creature_template.sql
index 21372e0180b..21372e0180b 100644
--- a/sql/updates/world/2013_08_07_00_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_00_world_creature_template.sql
diff --git a/sql/updates/world/2013_08_07_01_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_01_world_misc.sql
index 557b71742a6..557b71742a6 100644
--- a/sql/updates/world/2013_08_07_01_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_01_world_misc.sql
diff --git a/sql/updates/world/2013_08_07_02_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_02_world_misc.sql
index fd5f9893522..fd5f9893522 100644
--- a/sql/updates/world/2013_08_07_02_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_02_world_misc.sql
diff --git a/sql/updates/world/2013_08_07_03_world_drak_tharon_keep.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_03_world_drak_tharon_keep.sql
index 80f3a08a0e7..80f3a08a0e7 100644
--- a/sql/updates/world/2013_08_07_03_world_drak_tharon_keep.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_03_world_drak_tharon_keep.sql
diff --git a/sql/updates/world/2013_08_07_04_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_04_world_misc.sql
index ef29b786ee5..ef29b786ee5 100644
--- a/sql/updates/world/2013_08_07_04_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_04_world_misc.sql
diff --git a/sql/updates/world/2013_08_07_05_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_05_world_misc.sql
index 0bb1bc5c560..0bb1bc5c560 100644
--- a/sql/updates/world/2013_08_07_05_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_05_world_misc.sql
diff --git a/sql/updates/world/2013_08_07_06_world_drak_tharon_keep.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_06_world_drak_tharon_keep.sql
index d35fcc9565c..d35fcc9565c 100644
--- a/sql/updates/world/2013_08_07_06_world_drak_tharon_keep.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_06_world_drak_tharon_keep.sql
diff --git a/sql/updates/world/2013_08_07_06_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_06_world_sai.sql
index 32eb2cfbc5d..32eb2cfbc5d 100644
--- a/sql/updates/world/2013_08_07_06_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_06_world_sai.sql
diff --git a/sql/updates/world/2013_08_07_07_world_pathing.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_07_world_pathing.sql
index 55bdf5e752c..55bdf5e752c 100644
--- a/sql/updates/world/2013_08_07_07_world_pathing.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_07_world_pathing.sql
diff --git a/sql/updates/world/2013_08_07_08_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_08_world_sai.sql
index 7da2f89d09c..7da2f89d09c 100644
--- a/sql/updates/world/2013_08_07_08_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_08_world_sai.sql
diff --git a/sql/updates/world/2013_08_07_09_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_09_world_sai.sql
index 2f5cf9b026e..2f5cf9b026e 100644
--- a/sql/updates/world/2013_08_07_09_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_09_world_sai.sql
diff --git a/sql/updates/world/2013_08_07_10_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_10_world_sai.sql
index c43fd76aaf2..c43fd76aaf2 100644
--- a/sql/updates/world/2013_08_07_10_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_10_world_sai.sql
diff --git a/sql/updates/world/2013_08_07_11_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_11_world_sai.sql
index c97659b3359..c97659b3359 100644
--- a/sql/updates/world/2013_08_07_11_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_11_world_sai.sql
diff --git a/sql/updates/world/2013_08_07_12_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_12_world_sai.sql
index 61c96994eb7..61c96994eb7 100644
--- a/sql/updates/world/2013_08_07_12_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_12_world_sai.sql
diff --git a/sql/updates/world/2013_08_07_13_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_13_world_creature_template.sql
index 390d43220f1..390d43220f1 100644
--- a/sql/updates/world/2013_08_07_13_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_13_world_creature_template.sql
diff --git a/sql/updates/world/2013_08_07_14_world_sai_335.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_14_world_sai_335.sql
index fa7c5e149f9..fa7c5e149f9 100644
--- a/sql/updates/world/2013_08_07_14_world_sai_335.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_07_14_world_sai_335.sql
diff --git a/sql/updates/world/2013_08_08_00_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_08_00_world_creature_template.sql
index 63e00e9881e..63e00e9881e 100644
--- a/sql/updates/world/2013_08_08_00_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_08_00_world_creature_template.sql
diff --git a/sql/updates/world/2013_08_08_01_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_08_01_world_creature_template.sql
index e64befe6269..e64befe6269 100644
--- a/sql/updates/world/2013_08_08_01_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_08_01_world_creature_template.sql
diff --git a/sql/updates/world/2013_08_08_02_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_08_02_world_creature_template.sql
index 2baeddd0cd1..2baeddd0cd1 100644
--- a/sql/updates/world/2013_08_08_02_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_08_02_world_creature_template.sql
diff --git a/sql/updates/world/2013_08_09_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_00_world_sai.sql
index 8fcdfc6d49e..8fcdfc6d49e 100644
--- a/sql/updates/world/2013_08_09_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_00_world_sai.sql
diff --git a/sql/updates/world/2013_08_09_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_01_world_sai.sql
index 2f4a1d914da..2f4a1d914da 100644
--- a/sql/updates/world/2013_08_09_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_01_world_sai.sql
diff --git a/sql/updates/world/2013_08_09_02_world_cond_335.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_02_world_cond_335.sql
index ba4ce6d5a8f..ba4ce6d5a8f 100644
--- a/sql/updates/world/2013_08_09_02_world_cond_335.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_02_world_cond_335.sql
diff --git a/sql/updates/world/2013_08_09_03_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_03_world_sai.sql
index 71b44ff8966..71b44ff8966 100644
--- a/sql/updates/world/2013_08_09_03_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_03_world_sai.sql
diff --git a/sql/updates/world/2013_08_09_04_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_04_world_sai.sql
index 57312d76910..57312d76910 100644
--- a/sql/updates/world/2013_08_09_04_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_04_world_sai.sql
diff --git a/sql/updates/world/2013_08_09_05_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_05_world_sai.sql
index 889a0351181..889a0351181 100644
--- a/sql/updates/world/2013_08_09_05_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_05_world_sai.sql
diff --git a/sql/updates/world/2013_08_09_06_world_ainame.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_06_world_ainame.sql
index fd25f912bd7..fd25f912bd7 100644
--- a/sql/updates/world/2013_08_09_06_world_ainame.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_06_world_ainame.sql
diff --git a/sql/updates/world/2013_08_09_07_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_07_world_sai.sql
index 60699267c4f..60699267c4f 100644
--- a/sql/updates/world/2013_08_09_07_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_07_world_sai.sql
diff --git a/sql/updates/world/2013_08_09_08_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_08_world_creature_template.sql
index ab3b4fc2837..ab3b4fc2837 100644
--- a/sql/updates/world/2013_08_09_08_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_08_world_creature_template.sql
diff --git a/sql/updates/world/2013_08_09_08_world_go_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_08_world_go_template.sql
index 958d0125994..958d0125994 100644
--- a/sql/updates/world/2013_08_09_08_world_go_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_08_world_go_template.sql
diff --git a/sql/updates/world/2013_08_09_09_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_09_world_sai.sql
index 1ba2e7a5b15..1ba2e7a5b15 100644
--- a/sql/updates/world/2013_08_09_09_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_09_world_sai.sql
diff --git a/sql/updates/world/2013_08_09_10_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_10_world_sai.sql
index db48e519dbd..db48e519dbd 100644
--- a/sql/updates/world/2013_08_09_10_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_10_world_sai.sql
diff --git a/sql/updates/world/2013_08_09_11_world_disables.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_11_world_disables.sql
index 81411aa00a2..81411aa00a2 100644
--- a/sql/updates/world/2013_08_09_11_world_disables.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_09_11_world_disables.sql
diff --git a/sql/updates/world/2013_08_10_00_world_eai_335.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_10_00_world_eai_335.sql
index 445e86712bc..445e86712bc 100644
--- a/sql/updates/world/2013_08_10_00_world_eai_335.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_10_00_world_eai_335.sql
diff --git a/sql/updates/world/2013_08_10_01_world_creature.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_10_01_world_creature.sql
index ca12b55b00a..ca12b55b00a 100644
--- a/sql/updates/world/2013_08_10_01_world_creature.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_10_01_world_creature.sql
diff --git a/sql/updates/world/2013_08_10_02_world_spell_target_position.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_10_02_world_spell_target_position.sql
index e576a424f05..e576a424f05 100644
--- a/sql/updates/world/2013_08_10_02_world_spell_target_position.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_10_02_world_spell_target_position.sql
diff --git a/sql/updates/world/2013_08_10_03_world_creature_text.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_10_03_world_creature_text.sql
index 5c799a946fe..5c799a946fe 100644
--- a/sql/updates/world/2013_08_10_03_world_creature_text.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_10_03_world_creature_text.sql
diff --git a/sql/updates/world/2013_08_11_00_world_spell_script_names.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_11_00_world_spell_script_names.sql
index 00aee104022..00aee104022 100644
--- a/sql/updates/world/2013_08_11_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_11_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2013_08_11_01_world_eai_335.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_11_01_world_eai_335.sql
index 94b5324e50e..94b5324e50e 100644
--- a/sql/updates/world/2013_08_11_01_world_eai_335.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_11_01_world_eai_335.sql
diff --git a/sql/updates/world/2013_08_11_02_world_spell_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_11_02_world_spell_misc.sql
index 126ce114c9d..126ce114c9d 100644
--- a/sql/updates/world/2013_08_11_02_world_spell_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_11_02_world_spell_misc.sql
diff --git a/sql/updates/world/2013_08_11_03_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_11_03_world_misc.sql
index 6936f444d74..6936f444d74 100644
--- a/sql/updates/world/2013_08_11_03_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_11_03_world_misc.sql
diff --git a/sql/updates/world/2013_08_11_04_world_spell_proc_event.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_11_04_world_spell_proc_event.sql
index 1cae63b5c44..1cae63b5c44 100644
--- a/sql/updates/world/2013_08_11_04_world_spell_proc_event.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_11_04_world_spell_proc_event.sql
diff --git a/sql/updates/world/2013_08_14_00_world_gameobject_loot_template_335.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_14_00_world_gameobject_loot_template_335.sql
index a2a4ad1e98d..a2a4ad1e98d 100644
--- a/sql/updates/world/2013_08_14_00_world_gameobject_loot_template_335.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_14_00_world_gameobject_loot_template_335.sql
diff --git a/sql/updates/world/2013_08_14_01_world_gameobject.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_14_01_world_gameobject.sql
index b0c832edb9e..b0c832edb9e 100644
--- a/sql/updates/world/2013_08_14_01_world_gameobject.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_14_01_world_gameobject.sql
diff --git a/sql/updates/world/2013_08_14_01_world_gameobject_loot_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_14_01_world_gameobject_loot_template.sql
index c04849be454..c04849be454 100644
--- a/sql/updates/world/2013_08_14_01_world_gameobject_loot_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_14_01_world_gameobject_loot_template.sql
diff --git a/sql/updates/world/2013_08_15_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_15_00_world_sai.sql
index 36ee8fb12cf..36ee8fb12cf 100644
--- a/sql/updates/world/2013_08_15_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_15_00_world_sai.sql
diff --git a/sql/updates/world/2013_08_15_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_15_01_world_sai.sql
index 5110993f1de..5110993f1de 100644
--- a/sql/updates/world/2013_08_15_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_15_01_world_sai.sql
diff --git a/sql/updates/world/2013_08_15_02_world_spell_proc_event.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_15_02_world_spell_proc_event.sql
index 4e2b04faea4..4e2b04faea4 100644
--- a/sql/updates/world/2013_08_15_02_world_spell_proc_event.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_15_02_world_spell_proc_event.sql
diff --git a/sql/updates/world/2013_08_16_00_world_drak_tharon_keep.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_16_00_world_drak_tharon_keep.sql
index f05e14c1ca3..f05e14c1ca3 100644
--- a/sql/updates/world/2013_08_16_00_world_drak_tharon_keep.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_16_00_world_drak_tharon_keep.sql
diff --git a/sql/updates/world/2013_08_16_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_16_02_world_sai.sql
index 43cfcb6f02c..43cfcb6f02c 100644
--- a/sql/updates/world/2013_08_16_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_16_02_world_sai.sql
diff --git a/sql/updates/world/2013_08_16_03_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_16_03_world_misc.sql
index 9e49d79be4d..9e49d79be4d 100644
--- a/sql/updates/world/2013_08_16_03_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_16_03_world_misc.sql
diff --git a/sql/updates/world/2013_08_16_04_world_SAI.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_16_04_world_SAI.sql
index 359f46e3d60..359f46e3d60 100644
--- a/sql/updates/world/2013_08_16_04_world_SAI.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_16_04_world_SAI.sql
diff --git a/sql/updates/world/2013_08_17_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_17_00_world_misc.sql
index b16f1bb4eb3..b16f1bb4eb3 100644
--- a/sql/updates/world/2013_08_17_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_17_00_world_misc.sql
diff --git a/sql/updates/world/2013_08_17_01_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_17_01_world_misc.sql
index 42555f591bf..42555f591bf 100644
--- a/sql/updates/world/2013_08_17_01_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_17_01_world_misc.sql
diff --git a/sql/updates/world/2013_08_17_02_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_17_02_world_misc.sql
index 2bfcba9de44..2bfcba9de44 100644
--- a/sql/updates/world/2013_08_17_02_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_17_02_world_misc.sql
diff --git a/sql/updates/world/2013_08_17_03_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_17_03_world_misc.sql
index 31bc3d9dd34..31bc3d9dd34 100644
--- a/sql/updates/world/2013_08_17_03_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_17_03_world_misc.sql
diff --git a/sql/updates/world/2013_08_17_04_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_17_04_world_misc.sql
index 0ecc2ada335..0ecc2ada335 100644
--- a/sql/updates/world/2013_08_17_04_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_17_04_world_misc.sql
diff --git a/sql/updates/world/2013_08_17_05_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_17_05_world_misc.sql
index 8c0283e7616..8c0283e7616 100644
--- a/sql/updates/world/2013_08_17_05_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_17_05_world_misc.sql
diff --git a/sql/updates/world/2013_08_18_00_world_spell_script_names_335.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_18_00_world_spell_script_names_335.sql
index cadf3fb221f..cadf3fb221f 100644
--- a/sql/updates/world/2013_08_18_00_world_spell_script_names_335.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_18_00_world_spell_script_names_335.sql
diff --git a/sql/updates/world/2013_08_19_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_19_00_world_sai.sql
index b91610d2eab..b91610d2eab 100644
--- a/sql/updates/world/2013_08_19_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_19_00_world_sai.sql
diff --git a/sql/updates/world/2013_08_19_01_world_creature_text.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_19_01_world_creature_text.sql
index 06813adeb3f..06813adeb3f 100644
--- a/sql/updates/world/2013_08_19_01_world_creature_text.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_19_01_world_creature_text.sql
diff --git a/sql/updates/world/2013_08_19_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_19_02_world_sai.sql
index 0d5a6245ddd..0d5a6245ddd 100644
--- a/sql/updates/world/2013_08_19_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_19_02_world_sai.sql
diff --git a/sql/updates/world/2013_08_22_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_22_00_world_sai.sql
index 4689091f345..4689091f345 100644
--- a/sql/updates/world/2013_08_22_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_22_00_world_sai.sql
diff --git a/sql/updates/world/2013_08_22_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_22_01_world_sai.sql
index 2ef2ecfa305..2ef2ecfa305 100644
--- a/sql/updates/world/2013_08_22_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_22_01_world_sai.sql
diff --git a/sql/updates/world/2013_08_23_00_world_db_errors.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_23_00_world_db_errors.sql
index f0c393065af..f0c393065af 100644
--- a/sql/updates/world/2013_08_23_00_world_db_errors.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_23_00_world_db_errors.sql
diff --git a/sql/updates/world/2013_08_23_01_world_db_errors.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_23_01_world_db_errors.sql
index 9eb808fec1f..9eb808fec1f 100644
--- a/sql/updates/world/2013_08_23_01_world_db_errors.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_23_01_world_db_errors.sql
diff --git a/sql/updates/world/2013_08_24_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_24_00_world_sai.sql
index ecaf80c9ca2..ecaf80c9ca2 100644
--- a/sql/updates/world/2013_08_24_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_24_00_world_sai.sql
diff --git a/sql/updates/world/2013_08_24_01_world_conditions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_24_01_world_conditions.sql
index da32567e51a..da32567e51a 100644
--- a/sql/updates/world/2013_08_24_01_world_conditions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_24_01_world_conditions.sql
diff --git a/sql/updates/world/2013_08_24_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_24_02_world_sai.sql
index d74e148773f..d74e148773f 100644
--- a/sql/updates/world/2013_08_24_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_24_02_world_sai.sql
diff --git a/sql/updates/world/2013_08_24_03_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_24_03_world_sai.sql
index c02d31a49df..c02d31a49df 100644
--- a/sql/updates/world/2013_08_24_03_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_24_03_world_sai.sql
diff --git a/sql/updates/world/2013_08_25_00_world_creature.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_25_00_world_creature.sql
index 4670240d797..4670240d797 100644
--- a/sql/updates/world/2013_08_25_00_world_creature.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_25_00_world_creature.sql
diff --git a/sql/updates/world/2013_08_25_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_25_01_world_sai.sql
index 4a95a804d05..4a95a804d05 100644
--- a/sql/updates/world/2013_08_25_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_25_01_world_sai.sql
diff --git a/sql/updates/world/2013_08_26_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_00_world_sai.sql
index c4029aace79..c4029aace79 100644
--- a/sql/updates/world/2013_08_26_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_00_world_sai.sql
diff --git a/sql/updates/world/2013_08_26_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_01_world_sai.sql
index 965f48ce7d3..965f48ce7d3 100644
--- a/sql/updates/world/2013_08_26_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_01_world_sai.sql
diff --git a/sql/updates/world/2013_08_26_02_world_db_errors.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_02_world_db_errors.sql
index 17c1d54d5a6..17c1d54d5a6 100644
--- a/sql/updates/world/2013_08_26_02_world_db_errors.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_02_world_db_errors.sql
diff --git a/sql/updates/world/2013_08_26_03_world_auchindoun.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_03_world_auchindoun.sql
index cf726fa41c5..cf726fa41c5 100644
--- a/sql/updates/world/2013_08_26_03_world_auchindoun.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_03_world_auchindoun.sql
diff --git a/sql/updates/world/2013_08_26_04_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_04_world_sai.sql
index ead2cb8099a..ead2cb8099a 100644
--- a/sql/updates/world/2013_08_26_04_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_04_world_sai.sql
diff --git a/sql/updates/world/2013_08_26_05_world_comments.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_05_world_comments.sql
index 21836922062..21836922062 100644
--- a/sql/updates/world/2013_08_26_05_world_comments.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_05_world_comments.sql
diff --git a/sql/updates/world/2013_08_26_06_world_loot.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_06_world_loot.sql
index bb4fdb4f41a..bb4fdb4f41a 100644
--- a/sql/updates/world/2013_08_26_06_world_loot.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_06_world_loot.sql
diff --git a/sql/updates/world/2013_08_26_07_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_07_world_sai.sql
index 5ea76436405..5ea76436405 100644
--- a/sql/updates/world/2013_08_26_07_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_26_07_world_sai.sql
diff --git a/sql/updates/world/2013_08_27_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_27_00_world_sai.sql
index 4b0d78c6885..4b0d78c6885 100644
--- a/sql/updates/world/2013_08_27_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_27_00_world_sai.sql
diff --git a/sql/updates/world/2013_08_27_01_world_instance_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_27_01_world_instance_template.sql
index 75000549464..75000549464 100644
--- a/sql/updates/world/2013_08_27_01_world_instance_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_27_01_world_instance_template.sql
diff --git a/sql/updates/world/2013_08_27_02_world_reputation_reward_rate.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_27_02_world_reputation_reward_rate.sql
index 57776c61e82..57776c61e82 100644
--- a/sql/updates/world/2013_08_27_02_world_reputation_reward_rate.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_27_02_world_reputation_reward_rate.sql
diff --git a/sql/updates/world/2013_08_27_03_world_reputation_reward_rate.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_27_03_world_reputation_reward_rate.sql
index e3398568b7b..e3398568b7b 100644
--- a/sql/updates/world/2013_08_27_03_world_reputation_reward_rate.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_27_03_world_reputation_reward_rate.sql
diff --git a/sql/updates/world/2013_08_27_04_world_reputation_reward_rate.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_27_04_world_reputation_reward_rate.sql
index a260cf61c25..a260cf61c25 100644
--- a/sql/updates/world/2013_08_27_04_world_reputation_reward_rate.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_27_04_world_reputation_reward_rate.sql
diff --git a/sql/updates/world/2013_08_28_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_00_world_misc.sql
index bd414f4d623..bd414f4d623 100644
--- a/sql/updates/world/2013_08_28_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_00_world_misc.sql
diff --git a/sql/updates/world/2013_08_28_01_world_creature.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_01_world_creature.sql
index 2adf9c127a6..2adf9c127a6 100644
--- a/sql/updates/world/2013_08_28_01_world_creature.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_01_world_creature.sql
diff --git a/sql/updates/world/2013_08_28_02_world_quest_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_02_world_quest_template.sql
index f7dfc831f48..f7dfc831f48 100644
--- a/sql/updates/world/2013_08_28_02_world_quest_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_02_world_quest_template.sql
diff --git a/sql/updates/world/2013_08_28_03_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_03_world_sai.sql
index a583e5afba6..a583e5afba6 100644
--- a/sql/updates/world/2013_08_28_03_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_03_world_sai.sql
diff --git a/sql/updates/world/2013_08_28_04_world_conditions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_04_world_conditions.sql
index b164b4f0dd1..b164b4f0dd1 100644
--- a/sql/updates/world/2013_08_28_04_world_conditions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_04_world_conditions.sql
diff --git a/sql/updates/world/2013_08_28_05_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_05_world_misc.sql
index 066a2dbfc73..066a2dbfc73 100644
--- a/sql/updates/world/2013_08_28_05_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_05_world_misc.sql
diff --git a/sql/updates/world/2013_08_28_06_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_06_world_sai.sql
index 7cb970fa485..7cb970fa485 100644
--- a/sql/updates/world/2013_08_28_06_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_06_world_sai.sql
diff --git a/sql/updates/world/2013_08_28_07_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_07_world_sai.sql
index 73a123c22e2..73a123c22e2 100644
--- a/sql/updates/world/2013_08_28_07_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_07_world_sai.sql
diff --git a/sql/updates/world/2013_08_28_08_world_update.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_08_world_update.sql
index e929583ae76..e929583ae76 100644
--- a/sql/updates/world/2013_08_28_08_world_update.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_28_08_world_update.sql
diff --git a/sql/updates/world/2013_08_29_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_29_00_world_sai.sql
index bf2d983d967..bf2d983d967 100644
--- a/sql/updates/world/2013_08_29_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_29_00_world_sai.sql
diff --git a/sql/updates/world/2013_08_29_01_world_update.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_29_01_world_update.sql
index 4017c4a0454..4017c4a0454 100644
--- a/sql/updates/world/2013_08_29_01_world_update.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_29_01_world_update.sql
diff --git a/sql/updates/world/2013_08_29_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_29_02_world_sai.sql
index b44264bc6e6..b44264bc6e6 100644
--- a/sql/updates/world/2013_08_29_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_29_02_world_sai.sql
diff --git a/sql/updates/world/2013_08_29_03_world_quest_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_29_03_world_quest_template.sql
index a93e111b590..a93e111b590 100644
--- a/sql/updates/world/2013_08_29_03_world_quest_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_29_03_world_quest_template.sql
diff --git a/sql/updates/world/2013_08_29_04_world_db_errors.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_29_04_world_db_errors.sql
index 4fd7d03acb9..4fd7d03acb9 100644
--- a/sql/updates/world/2013_08_29_04_world_db_errors.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_29_04_world_db_errors.sql
diff --git a/sql/updates/world/2013_08_30_00_world_gameobject_loot_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_00_world_gameobject_loot_template.sql
index 69223384be1..69223384be1 100644
--- a/sql/updates/world/2013_08_30_00_world_gameobject_loot_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_00_world_gameobject_loot_template.sql
diff --git a/sql/updates/world/2013_08_30_01_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_01_world_command.sql
index e786c85a118..e786c85a118 100644
--- a/sql/updates/world/2013_08_30_01_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_01_world_command.sql
diff --git a/sql/updates/world/2013_08_30_02_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_02_world_command.sql
index b6d859d5b45..b6d859d5b45 100644
--- a/sql/updates/world/2013_08_30_02_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_02_world_command.sql
diff --git a/sql/updates/world/2013_08_30_03_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_03_world_command.sql
index d7e11b45aed..d7e11b45aed 100644
--- a/sql/updates/world/2013_08_30_03_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_03_world_command.sql
diff --git a/sql/updates/world/2013_08_30_04_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_04_world_command.sql
index c77f651f9e5..c77f651f9e5 100644
--- a/sql/updates/world/2013_08_30_04_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_04_world_command.sql
diff --git a/sql/updates/world/2013_08_30_05_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_05_world_command.sql
index 017ab4fa03e..017ab4fa03e 100644
--- a/sql/updates/world/2013_08_30_05_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_05_world_command.sql
diff --git a/sql/updates/world/2013_08_30_06_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_06_world_command.sql
index 777319613ce..777319613ce 100644
--- a/sql/updates/world/2013_08_30_06_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_06_world_command.sql
diff --git a/sql/updates/world/2013_08_30_07_world_eai_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_07_world_eai_sai.sql
index f0f16330486..f0f16330486 100644
--- a/sql/updates/world/2013_08_30_07_world_eai_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_07_world_eai_sai.sql
diff --git a/sql/updates/world/2013_08_30_08_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_08_world_sai.sql
index 1c29787edb7..1c29787edb7 100644
--- a/sql/updates/world/2013_08_30_08_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_08_world_sai.sql
diff --git a/sql/updates/world/2013_08_30_09_world_spell_script_names.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_09_world_spell_script_names.sql
index d9857b0e789..d9857b0e789 100644
--- a/sql/updates/world/2013_08_30_09_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_30_09_world_spell_script_names.sql
diff --git a/sql/updates/world/2013_08_31_00_world_reputation_reward_rate.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_00_world_reputation_reward_rate.sql
index 62ac6ae1461..62ac6ae1461 100644
--- a/sql/updates/world/2013_08_31_00_world_reputation_reward_rate.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_00_world_reputation_reward_rate.sql
diff --git a/sql/updates/world/2013_08_31_01_world_gameobject_loot_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_01_world_gameobject_loot_template.sql
index 85f033443bf..85f033443bf 100644
--- a/sql/updates/world/2013_08_31_01_world_gameobject_loot_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_01_world_gameobject_loot_template.sql
diff --git a/sql/updates/world/2013_08_31_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_02_world_sai.sql
index 9a34b6fcf99..9a34b6fcf99 100644
--- a/sql/updates/world/2013_08_31_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_02_world_sai.sql
diff --git a/sql/updates/world/2013_08_31_03_world_creature_text.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_03_world_creature_text.sql
index ca8133784d1..ca8133784d1 100644
--- a/sql/updates/world/2013_08_31_03_world_creature_text.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_03_world_creature_text.sql
diff --git a/sql/updates/world/2013_08_31_04_world_spell_script_names.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_04_world_spell_script_names.sql
index a1f71f3c870..a1f71f3c870 100644
--- a/sql/updates/world/2013_08_31_04_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_04_world_spell_script_names.sql
diff --git a/sql/updates/world/2013_08_31_05_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_05_world_creature_template.sql
index 8bd02b1de1a..8bd02b1de1a 100644
--- a/sql/updates/world/2013_08_31_05_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_05_world_creature_template.sql
diff --git a/sql/updates/world/2013_08_31_06_world_smart_scripts.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_06_world_smart_scripts.sql
index 9376bb62951..9376bb62951 100644
--- a/sql/updates/world/2013_08_31_06_world_smart_scripts.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_06_world_smart_scripts.sql
diff --git a/sql/updates/world/2013_08_31_07_world_creature.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_07_world_creature.sql
index 04f844d68c0..04f844d68c0 100644
--- a/sql/updates/world/2013_08_31_07_world_creature.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_07_world_creature.sql
diff --git a/sql/updates/world/2013_08_31_08_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_08_world_command.sql
index c48180f36b5..c48180f36b5 100644
--- a/sql/updates/world/2013_08_31_08_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_08_31_08_world_command.sql
diff --git a/sql/updates/world/2013_09_01_00_world_spell_script_names.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_00_world_spell_script_names.sql
index 7d8dda4dba9..7d8dda4dba9 100644
--- a/sql/updates/world/2013_09_01_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2013_09_01_01_world_trinity_string.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_01_world_trinity_string.sql
index 541a2674f96..541a2674f96 100644
--- a/sql/updates/world/2013_09_01_01_world_trinity_string.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_01_world_trinity_string.sql
diff --git a/sql/updates/world/2013_09_01_02_world_smart_scripts.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_02_world_smart_scripts.sql
index ef165c6f96e..ef165c6f96e 100644
--- a/sql/updates/world/2013_09_01_02_world_smart_scripts.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_02_world_smart_scripts.sql
diff --git a/sql/updates/world/2013_09_01_03_world_smart_scripts.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_03_world_smart_scripts.sql
index 3e99f43aa33..3e99f43aa33 100644
--- a/sql/updates/world/2013_09_01_03_world_smart_scripts.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_03_world_smart_scripts.sql
diff --git a/sql/updates/world/2013_09_01_04_world_smart_scripts.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_04_world_smart_scripts.sql
index 9966f9d7812..9966f9d7812 100644
--- a/sql/updates/world/2013_09_01_04_world_smart_scripts.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_04_world_smart_scripts.sql
diff --git a/sql/updates/world/2013_09_01_05_world_skinning_loot_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_05_world_skinning_loot_template.sql
index b9d4810bedb..b9d4810bedb 100644
--- a/sql/updates/world/2013_09_01_05_world_skinning_loot_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_05_world_skinning_loot_template.sql
diff --git a/sql/updates/world/2013_09_01_06_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_06_world_misc.sql
index 3d7516ca573..3d7516ca573 100644
--- a/sql/updates/world/2013_09_01_06_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_06_world_misc.sql
diff --git a/sql/updates/world/2013_09_01_07_world_trinity_strings.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_07_world_trinity_strings.sql
index 6c69a0a44ff..6c69a0a44ff 100644
--- a/sql/updates/world/2013_09_01_07_world_trinity_strings.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_01_07_world_trinity_strings.sql
diff --git a/sql/updates/world/2013_09_02_00_world_smart_scripts.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_00_world_smart_scripts.sql
index 2c443f19d88..2c443f19d88 100644
--- a/sql/updates/world/2013_09_02_00_world_smart_scripts.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_00_world_smart_scripts.sql
diff --git a/sql/updates/world/2013_09_02_01_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_01_world_command.sql
index aab76efa562..aab76efa562 100644
--- a/sql/updates/world/2013_09_02_01_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_01_world_command.sql
diff --git a/sql/updates/world/2013_09_02_02_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_02_world_command.sql
index af7b68a87da..af7b68a87da 100644
--- a/sql/updates/world/2013_09_02_02_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_02_world_command.sql
diff --git a/sql/updates/world/2013_09_02_03_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_03_world_command.sql
index 3ba92cc30e7..3ba92cc30e7 100644
--- a/sql/updates/world/2013_09_02_03_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_03_world_command.sql
diff --git a/sql/updates/world/2013_09_02_04_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_04_world_command.sql
index 4fd1e0db8e2..4fd1e0db8e2 100644
--- a/sql/updates/world/2013_09_02_04_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_04_world_command.sql
diff --git a/sql/updates/world/2013_09_02_05_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_05_world_command.sql
index db279dd6f60..db279dd6f60 100644
--- a/sql/updates/world/2013_09_02_05_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_05_world_command.sql
diff --git a/sql/updates/world/2013_09_02_06_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_06_world_command.sql
index fe033e544ea..fe033e544ea 100644
--- a/sql/updates/world/2013_09_02_06_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_06_world_command.sql
diff --git a/sql/updates/world/2013_09_02_07_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_07_world_command.sql
index 4f73ee4e439..4f73ee4e439 100644
--- a/sql/updates/world/2013_09_02_07_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_07_world_command.sql
diff --git a/sql/updates/world/2013_09_02_08_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_08_world_command.sql
index 5190a8f8a61..5190a8f8a61 100644
--- a/sql/updates/world/2013_09_02_08_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_08_world_command.sql
diff --git a/sql/updates/world/2013_09_02_09_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_09_world_command.sql
index e40ec5a355a..e40ec5a355a 100644
--- a/sql/updates/world/2013_09_02_09_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_09_world_command.sql
diff --git a/sql/updates/world/2013_09_02_10_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_10_world_command.sql
index f038adf1b30..f038adf1b30 100644
--- a/sql/updates/world/2013_09_02_10_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_10_world_command.sql
diff --git a/sql/updates/world/2013_09_02_11_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_11_world_command.sql
index c134fb703e6..c134fb703e6 100644
--- a/sql/updates/world/2013_09_02_11_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_11_world_command.sql
diff --git a/sql/updates/world/2013_09_02_12_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_12_world_command.sql
index 7320b87f823..7320b87f823 100644
--- a/sql/updates/world/2013_09_02_12_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_12_world_command.sql
diff --git a/sql/updates/world/2013_09_02_13_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_13_world_command.sql
index 6ecc3b8374f..6ecc3b8374f 100644
--- a/sql/updates/world/2013_09_02_13_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_13_world_command.sql
diff --git a/sql/updates/world/2013_09_02_14_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_14_world_command.sql
index 4d0b5d35d6f..4d0b5d35d6f 100644
--- a/sql/updates/world/2013_09_02_14_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_14_world_command.sql
diff --git a/sql/updates/world/2013_09_02_15_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_15_world_command.sql
index 0ec5002b61c..0ec5002b61c 100644
--- a/sql/updates/world/2013_09_02_15_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_15_world_command.sql
diff --git a/sql/updates/world/2013_09_02_16_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_16_world_command.sql
index f9930afd213..f9930afd213 100644
--- a/sql/updates/world/2013_09_02_16_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_16_world_command.sql
diff --git a/sql/updates/world/2013_09_02_17_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_17_world_command.sql
index 1bbb062626d..1bbb062626d 100644
--- a/sql/updates/world/2013_09_02_17_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_17_world_command.sql
diff --git a/sql/updates/world/2013_09_02_18_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_18_world_command.sql
index f9923e7d755..f9923e7d755 100644
--- a/sql/updates/world/2013_09_02_18_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_18_world_command.sql
diff --git a/sql/updates/world/2013_09_02_19_world_spelldifficulty_dbc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_19_world_spelldifficulty_dbc.sql
index 5c8f810da55..5c8f810da55 100644
--- a/sql/updates/world/2013_09_02_19_world_spelldifficulty_dbc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_19_world_spelldifficulty_dbc.sql
diff --git a/sql/updates/world/2013_09_02_20_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_20_world_sai.sql
index 2ccccad1366..2ccccad1366 100644
--- a/sql/updates/world/2013_09_02_20_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_02_20_world_sai.sql
diff --git a/sql/updates/world/2013_09_03_00_world_smart_scripts.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_03_00_world_smart_scripts.sql
index 3e37287c1f7..3e37287c1f7 100644
--- a/sql/updates/world/2013_09_03_00_world_smart_scripts.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_03_00_world_smart_scripts.sql
diff --git a/sql/updates/world/2013_09_03_01_world_creature.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_03_01_world_creature.sql
index 258a05e5617..258a05e5617 100644
--- a/sql/updates/world/2013_09_03_01_world_creature.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_03_01_world_creature.sql
diff --git a/sql/updates/world/2013_09_03_02_world_update.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_03_02_world_update.sql
index d510ff8e558..d510ff8e558 100644
--- a/sql/updates/world/2013_09_03_02_world_update.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_03_02_world_update.sql
diff --git a/sql/updates/world/2013_09_03_03_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_03_03_world_sai.sql
index 52675b08cac..52675b08cac 100644
--- a/sql/updates/world/2013_09_03_03_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_03_03_world_sai.sql
diff --git a/sql/updates/world/2013_09_03_04_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_03_04_world_sai.sql
index 7c39802caae..7c39802caae 100644
--- a/sql/updates/world/2013_09_03_04_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_03_04_world_sai.sql
diff --git a/sql/updates/world/2013_09_04_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_04_00_world_sai.sql
index a4614deca75..a4614deca75 100644
--- a/sql/updates/world/2013_09_04_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_04_00_world_sai.sql
diff --git a/sql/updates/world/2013_09_04_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_04_01_world_sai.sql
index 9d9412b87e7..9d9412b87e7 100644
--- a/sql/updates/world/2013_09_04_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_04_01_world_sai.sql
diff --git a/sql/updates/world/2013_09_04_02_world_spawns_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_04_02_world_spawns_sai.sql
index 40e238d04a2..40e238d04a2 100644
--- a/sql/updates/world/2013_09_04_02_world_spawns_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_04_02_world_spawns_sai.sql
diff --git a/sql/updates/world/2013_09_04_03_world_isle_of_conquest.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_04_03_world_isle_of_conquest.sql
index 471ee3adefb..471ee3adefb 100644
--- a/sql/updates/world/2013_09_04_03_world_isle_of_conquest.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_04_03_world_isle_of_conquest.sql
diff --git a/sql/updates/world/2013_09_06_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_06_00_world_misc.sql
index 872dc840a8b..872dc840a8b 100644
--- a/sql/updates/world/2013_09_06_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_06_00_world_misc.sql
diff --git a/sql/updates/world/2013_09_06_01_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_06_01_world_misc.sql
index 10533e8354c..10533e8354c 100644
--- a/sql/updates/world/2013_09_06_01_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_06_01_world_misc.sql
diff --git a/sql/updates/world/2013_09_06_02_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_06_02_world_misc.sql
index 47ac870f977..47ac870f977 100644
--- a/sql/updates/world/2013_09_06_02_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_06_02_world_misc.sql
diff --git a/sql/updates/world/2013_09_07_00_world_updates.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_07_00_world_updates.sql
index 93999e6202a..93999e6202a 100644
--- a/sql/updates/world/2013_09_07_00_world_updates.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_07_00_world_updates.sql
diff --git a/sql/updates/world/2013_09_07_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_07_01_world_sai.sql
index 6afbe15f7b2..6afbe15f7b2 100644
--- a/sql/updates/world/2013_09_07_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_07_01_world_sai.sql
diff --git a/sql/updates/world/2013_09_08_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_08_00_world_sai.sql
index 9a65ea92910..9a65ea92910 100644
--- a/sql/updates/world/2013_09_08_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_08_00_world_sai.sql
diff --git a/sql/updates/world/2013_09_08_01_world_update.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_08_01_world_update.sql
index e2046f0267d..e2046f0267d 100644
--- a/sql/updates/world/2013_09_08_01_world_update.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_08_01_world_update.sql
diff --git a/sql/updates/world/2013_09_09_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_09_00_world_sai.sql
index b2491651bbf..b2491651bbf 100644
--- a/sql/updates/world/2013_09_09_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_09_00_world_sai.sql
diff --git a/sql/updates/world/2013_09_10_00_world_conditions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_00_world_conditions.sql
index b18a660563a..b18a660563a 100644
--- a/sql/updates/world/2013_09_10_00_world_conditions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_00_world_conditions.sql
diff --git a/sql/updates/world/2013_09_10_01_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_01_world_command.sql
index 3c287422cac..3c287422cac 100644
--- a/sql/updates/world/2013_09_10_01_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_01_world_command.sql
diff --git a/sql/updates/world/2013_09_10_02_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_02_world_command.sql
index b3eaff43691..b3eaff43691 100644
--- a/sql/updates/world/2013_09_10_02_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_02_world_command.sql
diff --git a/sql/updates/world/2013_09_10_03_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_03_world_sai.sql
index 26816b6f72f..26816b6f72f 100644
--- a/sql/updates/world/2013_09_10_03_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_03_world_sai.sql
diff --git a/sql/updates/world/2013_09_10_04_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_04_world_command.sql
index a49c65fe9e5..a49c65fe9e5 100644
--- a/sql/updates/world/2013_09_10_04_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_04_world_command.sql
diff --git a/sql/updates/world/2013_09_10_05_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_05_world_command.sql
index 3cb64e7c02d..3cb64e7c02d 100644
--- a/sql/updates/world/2013_09_10_05_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_05_world_command.sql
diff --git a/sql/updates/world/2013_09_10_06_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_06_world_command.sql
index 57aba9eadaa..57aba9eadaa 100644
--- a/sql/updates/world/2013_09_10_06_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_06_world_command.sql
diff --git a/sql/updates/world/2013_09_10_07_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_07_world_command.sql
index b07da9730d1..b07da9730d1 100644
--- a/sql/updates/world/2013_09_10_07_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_07_world_command.sql
diff --git a/sql/updates/world/2013_09_10_08_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_08_world_command.sql
index 5567a5fd248..5567a5fd248 100644
--- a/sql/updates/world/2013_09_10_08_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_08_world_command.sql
diff --git a/sql/updates/world/2013_09_10_09_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_09_world_command.sql
index 6f4070ed588..6f4070ed588 100644
--- a/sql/updates/world/2013_09_10_09_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_09_world_command.sql
diff --git a/sql/updates/world/2013_09_10_10_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_10_world_command.sql
index f7c74f01537..f7c74f01537 100644
--- a/sql/updates/world/2013_09_10_10_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_10_world_command.sql
diff --git a/sql/updates/world/2013_09_10_11_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_11_world_command.sql
index 3a0dc18e804..3a0dc18e804 100644
--- a/sql/updates/world/2013_09_10_11_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_11_world_command.sql
diff --git a/sql/updates/world/2013_09_10_12_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_12_world_command.sql
index 58542e5a10b..58542e5a10b 100644
--- a/sql/updates/world/2013_09_10_12_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_12_world_command.sql
diff --git a/sql/updates/world/2013_09_10_13_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_13_world_command.sql
index a81b90f21bb..a81b90f21bb 100644
--- a/sql/updates/world/2013_09_10_13_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_13_world_command.sql
diff --git a/sql/updates/world/2013_09_10_14_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_14_world_command.sql
index 36723992ed0..36723992ed0 100644
--- a/sql/updates/world/2013_09_10_14_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_14_world_command.sql
diff --git a/sql/updates/world/2013_09_10_15_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_15_world_command.sql
index 1f90dfdf2a4..1f90dfdf2a4 100644
--- a/sql/updates/world/2013_09_10_15_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_15_world_command.sql
diff --git a/sql/updates/world/2013_09_10_16_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_16_world_command.sql
index 3a3baf206b8..3a3baf206b8 100644
--- a/sql/updates/world/2013_09_10_16_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_16_world_command.sql
diff --git a/sql/updates/world/2013_09_10_17_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_17_world_command.sql
index b6d859d5b45..b6d859d5b45 100644
--- a/sql/updates/world/2013_09_10_17_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_17_world_command.sql
diff --git a/sql/updates/world/2013_09_10_18_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_18_world_command.sql
index 8fa30cc3851..8fa30cc3851 100644
--- a/sql/updates/world/2013_09_10_18_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_18_world_command.sql
diff --git a/sql/updates/world/2013_09_10_19_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_19_world_command.sql
index 8efdbd3353f..8efdbd3353f 100644
--- a/sql/updates/world/2013_09_10_19_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_19_world_command.sql
diff --git a/sql/updates/world/2013_09_10_20_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_20_world_creature_template.sql
index e4f1cc77e09..e4f1cc77e09 100644
--- a/sql/updates/world/2013_09_10_20_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_20_world_creature_template.sql
diff --git a/sql/updates/world/2013_09_10_21_world_updates.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_21_world_updates.sql
index 1ee4261624c..1ee4261624c 100644
--- a/sql/updates/world/2013_09_10_21_world_updates.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_10_21_world_updates.sql
diff --git a/sql/updates/world/2013_09_11_00_world_cond.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_11_00_world_cond.sql
index 4b0f307ef44..4b0f307ef44 100644
--- a/sql/updates/world/2013_09_11_00_world_cond.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_11_00_world_cond.sql
diff --git a/sql/updates/world/2013_09_11_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_11_01_world_sai.sql
index cb65806b29e..cb65806b29e 100644
--- a/sql/updates/world/2013_09_11_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_11_01_world_sai.sql
diff --git a/sql/updates/world/2013_09_12_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_12_00_world_sai.sql
index 449eebbc258..449eebbc258 100644
--- a/sql/updates/world/2013_09_12_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_12_00_world_sai.sql
diff --git a/sql/updates/world/2013_09_13_00_world_conditions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_13_00_world_conditions.sql
index 8f8dc774e54..8f8dc774e54 100644
--- a/sql/updates/world/2013_09_13_00_world_conditions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_13_00_world_conditions.sql
diff --git a/sql/updates/world/2013_09_14_00_world_update.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_14_00_world_update.sql
index 03a7515e6b3..03a7515e6b3 100644
--- a/sql/updates/world/2013_09_14_00_world_update.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_14_00_world_update.sql
diff --git a/sql/updates/world/2013_09_14_01_world_gobject.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_14_01_world_gobject.sql
index b2b59b0d794..b2b59b0d794 100644
--- a/sql/updates/world/2013_09_14_01_world_gobject.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_14_01_world_gobject.sql
diff --git a/sql/updates/world/2013_09_16_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_16_00_world_sai.sql
index a254f55e691..a254f55e691 100644
--- a/sql/updates/world/2013_09_16_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_16_00_world_sai.sql
diff --git a/sql/updates/world/2013_09_16_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_16_01_world_sai.sql
index c9f8024c2f3..c9f8024c2f3 100644
--- a/sql/updates/world/2013_09_16_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_16_01_world_sai.sql
diff --git a/sql/updates/world/2013_09_16_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_16_02_world_sai.sql
index 859f85f26e0..859f85f26e0 100644
--- a/sql/updates/world/2013_09_16_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_16_02_world_sai.sql
diff --git a/sql/updates/world/2013_09_17_00_world_error.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_17_00_world_error.sql
index 7b859a99745..7b859a99745 100644
--- a/sql/updates/world/2013_09_17_00_world_error.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_17_00_world_error.sql
diff --git a/sql/updates/world/2013_09_17_01_world_sai_comp.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_17_01_world_sai_comp.sql
index e08e9caa74a..e08e9caa74a 100644
--- a/sql/updates/world/2013_09_17_01_world_sai_comp.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_17_01_world_sai_comp.sql
diff --git a/sql/updates/world/2013_09_18_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_18_00_world_sai.sql
index 5485e4ed506..5485e4ed506 100644
--- a/sql/updates/world/2013_09_18_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_18_00_world_sai.sql
diff --git a/sql/updates/world/2013_09_18_01_world_achievement_criteria_data.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_18_01_world_achievement_criteria_data.sql
index ffb99be70f7..ffb99be70f7 100644
--- a/sql/updates/world/2013_09_18_01_world_achievement_criteria_data.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_18_01_world_achievement_criteria_data.sql
diff --git a/sql/updates/world/2013_09_19_00_world_db_errors.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_19_00_world_db_errors.sql
index cdf189c38fe..cdf189c38fe 100644
--- a/sql/updates/world/2013_09_19_00_world_db_errors.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_19_00_world_db_errors.sql
diff --git a/sql/updates/world/2013_09_19_01_world_db_errors.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_19_01_world_db_errors.sql
index ed6040a9558..ed6040a9558 100644
--- a/sql/updates/world/2013_09_19_01_world_db_errors.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_19_01_world_db_errors.sql
diff --git a/sql/updates/world/2013_09_20_00_world_gameobject_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_20_00_world_gameobject_template.sql
index 7e1f1672f0c..7e1f1672f0c 100644
--- a/sql/updates/world/2013_09_20_00_world_gameobject_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_20_00_world_gameobject_template.sql
diff --git a/sql/updates/world/2013_09_20_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_20_01_world_sai.sql
index d6a0524cf00..d6a0524cf00 100644
--- a/sql/updates/world/2013_09_20_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_20_01_world_sai.sql
diff --git a/sql/updates/world/2013_09_21_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_21_00_world_sai.sql
index f5827fbd78c..f5827fbd78c 100644
--- a/sql/updates/world/2013_09_21_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_21_00_world_sai.sql
diff --git a/sql/updates/world/2013_09_22_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_22_00_world_sai.sql
index e7c5753bfc4..e7c5753bfc4 100644
--- a/sql/updates/world/2013_09_22_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_22_00_world_sai.sql
diff --git a/sql/updates/world/2013_09_24_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_24_00_world_sai.sql
index a4f38d208a9..a4f38d208a9 100644
--- a/sql/updates/world/2013_09_24_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_24_00_world_sai.sql
diff --git a/sql/updates/world/2013_09_26_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_26_00_world_sai.sql
index 7f634fd2f5a..7f634fd2f5a 100644
--- a/sql/updates/world/2013_09_26_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_26_00_world_sai.sql
diff --git a/sql/updates/world/2013_09_26_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_26_01_world_sai.sql
index 5b264de1dde..5b264de1dde 100644
--- a/sql/updates/world/2013_09_26_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_26_01_world_sai.sql
diff --git a/sql/updates/world/2013_09_27_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_27_00_world_sai.sql
index 44157856c49..44157856c49 100644
--- a/sql/updates/world/2013_09_27_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_27_00_world_sai.sql
diff --git a/sql/updates/world/2013_09_28_00_world_update.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_28_00_world_update.sql
index 7d58291cd66..7d58291cd66 100644
--- a/sql/updates/world/2013_09_28_00_world_update.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_28_00_world_update.sql
diff --git a/sql/updates/world/2013_09_28_01_world_update.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_28_01_world_update.sql
index 43720dbab22..43720dbab22 100644
--- a/sql/updates/world/2013_09_28_01_world_update.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_28_01_world_update.sql
diff --git a/sql/updates/world/2013_09_29_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_00_world_misc.sql
index b8b01a37d37..b8b01a37d37 100644
--- a/sql/updates/world/2013_09_29_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_00_world_misc.sql
diff --git a/sql/updates/world/2013_09_29_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_01_world_sai.sql
index 33a8a4d7c68..33a8a4d7c68 100644
--- a/sql/updates/world/2013_09_29_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_01_world_sai.sql
diff --git a/sql/updates/world/2013_09_29_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_02_world_sai.sql
index fac5a69cec8..fac5a69cec8 100644
--- a/sql/updates/world/2013_09_29_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_02_world_sai.sql
diff --git a/sql/updates/world/2013_09_29_03_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_03_world_sai.sql
index 6f38a558dbe..6f38a558dbe 100644
--- a/sql/updates/world/2013_09_29_03_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_03_world_sai.sql
diff --git a/sql/updates/world/2013_09_29_04_world_updatesi.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_04_world_updatesi.sql
index 9170cfdbaac..9170cfdbaac 100644
--- a/sql/updates/world/2013_09_29_04_world_updatesi.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_04_world_updatesi.sql
diff --git a/sql/updates/world/2013_09_29_05_world_updates.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_05_world_updates.sql
index 7d66be10629..7d66be10629 100644
--- a/sql/updates/world/2013_09_29_05_world_updates.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_05_world_updates.sql
diff --git a/sql/updates/world/2013_09_29_06_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_06_world_sai.sql
index 4197a4eed02..4197a4eed02 100644
--- a/sql/updates/world/2013_09_29_06_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_06_world_sai.sql
diff --git a/sql/updates/world/2013_09_29_07_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_07_world_sai.sql
index 95e30ebf511..95e30ebf511 100644
--- a/sql/updates/world/2013_09_29_07_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_29_07_world_sai.sql
diff --git a/sql/updates/world/2013_09_30_00_world_item_loot_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_30_00_world_item_loot_template.sql
index 354155999ce..354155999ce 100644
--- a/sql/updates/world/2013_09_30_00_world_item_loot_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_30_00_world_item_loot_template.sql
diff --git a/sql/updates/world/2013_09_30_01_world_item_loot_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_30_01_world_item_loot_template.sql
index 9c60a618139..9c60a618139 100644
--- a/sql/updates/world/2013_09_30_01_world_item_loot_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_30_01_world_item_loot_template.sql
diff --git a/sql/updates/world/2013_09_30_02_world_sai_335.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_30_02_world_sai_335.sql
index 909f0d42b42..909f0d42b42 100644
--- a/sql/updates/world/2013_09_30_02_world_sai_335.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_30_02_world_sai_335.sql
diff --git a/sql/updates/world/2013_09_30_03_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_30_03_world_misc.sql
index 579958f111a..579958f111a 100644
--- a/sql/updates/world/2013_09_30_03_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_30_03_world_misc.sql
diff --git a/sql/updates/world/2013_09_30_04_world_update.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_30_04_world_update.sql
index a96cad21e64..a96cad21e64 100644
--- a/sql/updates/world/2013_09_30_04_world_update.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_09_30_04_world_update.sql
diff --git a/sql/updates/world/2013_10_01_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_01_00_world_misc.sql
index b6283dbd820..b6283dbd820 100644
--- a/sql/updates/world/2013_10_01_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_01_00_world_misc.sql
diff --git a/sql/updates/world/2013_10_01_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_01_00_world_sai.sql
index 13f4e825e81..13f4e825e81 100644
--- a/sql/updates/world/2013_10_01_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_01_00_world_sai.sql
diff --git a/sql/updates/world/2013_10_05_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_05_00_world_sai.sql
index c76916ee053..c76916ee053 100644
--- a/sql/updates/world/2013_10_05_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_05_00_world_sai.sql
diff --git a/sql/updates/world/2013_10_06_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_06_00_world_sai.sql
index 7891f9741e6..7891f9741e6 100644
--- a/sql/updates/world/2013_10_06_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_06_00_world_sai.sql
diff --git a/sql/updates/world/2013_10_07_00_world_cond.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_07_00_world_cond.sql
index 3d84c4e8496..3d84c4e8496 100644
--- a/sql/updates/world/2013_10_07_00_world_cond.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_07_00_world_cond.sql
diff --git a/sql/updates/world/2013_10_07_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_07_01_world_sai.sql
index 3037ad434ce..3037ad434ce 100644
--- a/sql/updates/world/2013_10_07_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_07_01_world_sai.sql
diff --git a/sql/updates/world/2013_10_08_00_world_conditions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_08_00_world_conditions.sql
index c167921b58c..c167921b58c 100644
--- a/sql/updates/world/2013_10_08_00_world_conditions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_08_00_world_conditions.sql
diff --git a/sql/updates/world/2013_10_09_00_world_update.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_09_00_world_update.sql
index c92c84df7fb..c92c84df7fb 100644
--- a/sql/updates/world/2013_10_09_00_world_update.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_09_00_world_update.sql
diff --git a/sql/updates/world/2013_10_10_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_10_00_world_misc.sql
index 9dcae219b16..9dcae219b16 100644
--- a/sql/updates/world/2013_10_10_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_10_00_world_misc.sql
diff --git a/sql/updates/world/2013_10_10_01_world_update.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_10_01_world_update.sql
index e6aaa90f07f..e6aaa90f07f 100644
--- a/sql/updates/world/2013_10_10_01_world_update.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_10_01_world_update.sql
diff --git a/sql/updates/world/2013_10_11_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_11_00_world_sai.sql
index ff3e9ccc9f3..ff3e9ccc9f3 100644
--- a/sql/updates/world/2013_10_11_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_11_00_world_sai.sql
diff --git a/sql/updates/world/2013_10_12_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_12_00_world_sai.sql
index 914fbba5f50..914fbba5f50 100644
--- a/sql/updates/world/2013_10_12_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_12_00_world_sai.sql
diff --git a/sql/updates/world/2013_10_13_00_world_disable.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_13_00_world_disable.sql
index 1c062837397..1c062837397 100644
--- a/sql/updates/world/2013_10_13_00_world_disable.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_13_00_world_disable.sql
diff --git a/sql/updates/world/2013_10_13_01_world_spelldifficulty_dbc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_13_01_world_spelldifficulty_dbc.sql
index 4ebdf253422..4ebdf253422 100644
--- a/sql/updates/world/2013_10_13_01_world_spelldifficulty_dbc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_13_01_world_spelldifficulty_dbc.sql
diff --git a/sql/updates/world/2013_10_16_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_16_00_world_misc.sql
index ee2e7795f98..ee2e7795f98 100644
--- a/sql/updates/world/2013_10_16_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_16_00_world_misc.sql
diff --git a/sql/updates/world/2013_10_16_00_world_trinity_string.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_16_00_world_trinity_string.sql
index be77dd1b01c..be77dd1b01c 100644
--- a/sql/updates/world/2013_10_16_00_world_trinity_string.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_16_00_world_trinity_string.sql
diff --git a/sql/updates/world/2013_10_16_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_16_01_world_sai.sql
index b387a428088..b387a428088 100644
--- a/sql/updates/world/2013_10_16_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_16_01_world_sai.sql
diff --git a/sql/updates/world/2013_10_16_02_world_game_graveyard_zone.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_16_02_world_game_graveyard_zone.sql
index 882a8e68697..882a8e68697 100644
--- a/sql/updates/world/2013_10_16_02_world_game_graveyard_zone.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_16_02_world_game_graveyard_zone.sql
diff --git a/sql/updates/world/2013_10_17_00_world_creature_model_info.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_17_00_world_creature_model_info.sql
index 43906e24135..43906e24135 100644
--- a/sql/updates/world/2013_10_17_00_world_creature_model_info.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_17_00_world_creature_model_info.sql
diff --git a/sql/updates/world/2013_10_19_00_world_gossip.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_19_00_world_gossip.sql
index 00559b3b9bb..00559b3b9bb 100644
--- a/sql/updates/world/2013_10_19_00_world_gossip.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_19_00_world_gossip.sql
diff --git a/sql/updates/world/2013_10_19_01_world_gameobject_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_19_01_world_gameobject_template.sql
index bb0f518701b..bb0f518701b 100644
--- a/sql/updates/world/2013_10_19_01_world_gameobject_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_19_01_world_gameobject_template.sql
diff --git a/sql/updates/world/2013_10_20_00_world_conditions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_20_00_world_conditions.sql
index cac106ade39..cac106ade39 100644
--- a/sql/updates/world/2013_10_20_00_world_conditions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_20_00_world_conditions.sql
diff --git a/sql/updates/world/2013_10_20_01_world_spell_proc_event.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_20_01_world_spell_proc_event.sql
index 90bf4619de4..90bf4619de4 100644
--- a/sql/updates/world/2013_10_20_01_world_spell_proc_event.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_20_01_world_spell_proc_event.sql
diff --git a/sql/updates/world/2013_10_20_02_world_gossip.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_20_02_world_gossip.sql
index 934334800d5..934334800d5 100644
--- a/sql/updates/world/2013_10_20_02_world_gossip.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_20_02_world_gossip.sql
diff --git a/sql/updates/world/2013_10_21_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_21_00_world_sai.sql
index acd070675f1..acd070675f1 100644
--- a/sql/updates/world/2013_10_21_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_21_00_world_sai.sql
diff --git a/sql/updates/world/2013_10_22_00_world_disables.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_22_00_world_disables.sql
index 7173deeb271..7173deeb271 100644
--- a/sql/updates/world/2013_10_22_00_world_disables.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_22_00_world_disables.sql
diff --git a/sql/updates/world/2013_10_23_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_23_00_world_sai.sql
index 51f5e357a22..51f5e357a22 100644
--- a/sql/updates/world/2013_10_23_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_23_00_world_sai.sql
diff --git a/sql/updates/world/2013_10_23_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_23_01_world_sai.sql
index 5b9ce9c4e21..5b9ce9c4e21 100644
--- a/sql/updates/world/2013_10_23_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_23_01_world_sai.sql
diff --git a/sql/updates/world/2013_10_24_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_24_00_world_sai.sql
index afeedcb800d..afeedcb800d 100644
--- a/sql/updates/world/2013_10_24_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_24_00_world_sai.sql
diff --git a/sql/updates/world/2013_10_24_01_world_errors.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_24_01_world_errors.sql
index f246efda806..f246efda806 100644
--- a/sql/updates/world/2013_10_24_01_world_errors.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_24_01_world_errors.sql
diff --git a/sql/updates/world/2013_10_24_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_24_02_world_sai.sql
index 758bc8de13c..758bc8de13c 100644
--- a/sql/updates/world/2013_10_24_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_24_02_world_sai.sql
diff --git a/sql/updates/world/2013_10_24_03_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_24_03_world_sai.sql
index b21f45e1e84..b21f45e1e84 100644
--- a/sql/updates/world/2013_10_24_03_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_24_03_world_sai.sql
diff --git a/sql/updates/world/2013_10_25_00_world_update.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_25_00_world_update.sql
index 6d1b11c5111..6d1b11c5111 100644
--- a/sql/updates/world/2013_10_25_00_world_update.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_25_00_world_update.sql
diff --git a/sql/updates/world/2013_10_27_00_world_conditions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_27_00_world_conditions.sql
index 401053b80c7..401053b80c7 100644
--- a/sql/updates/world/2013_10_27_00_world_conditions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_27_00_world_conditions.sql
diff --git a/sql/updates/world/2013_10_28_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_28_00_world_sai.sql
index 42eea3dfefa..42eea3dfefa 100644
--- a/sql/updates/world/2013_10_28_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_10_28_00_world_sai.sql
diff --git a/sql/updates/world/2013_11_02_00_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_00_world_creature_template.sql
index 7f647e5c046..7f647e5c046 100644
--- a/sql/updates/world/2013_11_02_00_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_00_world_creature_template.sql
diff --git a/sql/updates/world/2013_11_02_01_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_01_world_misc.sql
index 80e13dac3ac..80e13dac3ac 100644
--- a/sql/updates/world/2013_11_02_01_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_01_world_misc.sql
diff --git a/sql/updates/world/2013_11_02_02_world_creature_loot_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_02_world_creature_loot_template.sql
index abbe650b451..abbe650b451 100644
--- a/sql/updates/world/2013_11_02_02_world_creature_loot_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_02_world_creature_loot_template.sql
diff --git a/sql/updates/world/2013_11_02_03_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_03_world_sai.sql
index 1a7b4d5b511..1a7b4d5b511 100644
--- a/sql/updates/world/2013_11_02_03_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_03_world_sai.sql
diff --git a/sql/updates/world/2013_11_02_04_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_04_world_sai.sql
index 71c8dd5fd98..71c8dd5fd98 100644
--- a/sql/updates/world/2013_11_02_04_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_04_world_sai.sql
diff --git a/sql/updates/world/2013_11_02_05_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_05_world_creature_template.sql
index 2d44f63cbdd..2d44f63cbdd 100644
--- a/sql/updates/world/2013_11_02_05_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_05_world_creature_template.sql
diff --git a/sql/updates/world/2013_11_02_06_world_loot.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_06_world_loot.sql
index 8448c9763b8..8448c9763b8 100644
--- a/sql/updates/world/2013_11_02_06_world_loot.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_06_world_loot.sql
diff --git a/sql/updates/world/2013_11_02_07_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_07_world_misc.sql
index 6fc65d20802..6fc65d20802 100644
--- a/sql/updates/world/2013_11_02_07_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_02_07_world_misc.sql
diff --git a/sql/updates/world/2013_11_03_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_00_world_sai.sql
index 3d7de4856eb..3d7de4856eb 100644
--- a/sql/updates/world/2013_11_03_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_00_world_sai.sql
diff --git a/sql/updates/world/2013_11_03_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_01_world_sai.sql
index 61c95db4e62..61c95db4e62 100644
--- a/sql/updates/world/2013_11_03_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_01_world_sai.sql
diff --git a/sql/updates/world/2013_11_03_02_world_gameobject_335.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_02_world_gameobject_335.sql
index d25f702ce73..d25f702ce73 100644
--- a/sql/updates/world/2013_11_03_02_world_gameobject_335.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_02_world_gameobject_335.sql
diff --git a/sql/updates/world/2013_11_03_03_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_03_world_creature_template.sql
index cab7574ed7f..cab7574ed7f 100644
--- a/sql/updates/world/2013_11_03_03_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_03_world_creature_template.sql
diff --git a/sql/updates/world/2013_11_03_04_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_04_world_creature_template.sql
index 9dfe9bfbe98..9dfe9bfbe98 100644
--- a/sql/updates/world/2013_11_03_04_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_04_world_creature_template.sql
diff --git a/sql/updates/world/2013_11_03_05_world_gameobject.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_05_world_gameobject.sql
index 6c2aa246b98..6c2aa246b98 100644
--- a/sql/updates/world/2013_11_03_05_world_gameobject.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_05_world_gameobject.sql
diff --git a/sql/updates/world/2013_11_03_06_world_conditions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_06_world_conditions.sql
index 0be141bf2e8..0be141bf2e8 100644
--- a/sql/updates/world/2013_11_03_06_world_conditions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_06_world_conditions.sql
diff --git a/sql/updates/world/2013_11_03_07_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_07_world_sai.sql
index 13812b190d5..13812b190d5 100644
--- a/sql/updates/world/2013_11_03_07_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_07_world_sai.sql
diff --git a/sql/updates/world/2013_11_03_08_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_08_world_creature_template.sql
index 87cd001dc1a..87cd001dc1a 100644
--- a/sql/updates/world/2013_11_03_08_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_08_world_creature_template.sql
diff --git a/sql/updates/world/2013_11_03_09_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_09_world_sai.sql
index a2c31c41c03..a2c31c41c03 100644
--- a/sql/updates/world/2013_11_03_09_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_09_world_sai.sql
diff --git a/sql/updates/world/2013_11_03_10_world_quest_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_10_world_quest_template.sql
index 6f200a9c47b..6f200a9c47b 100644
--- a/sql/updates/world/2013_11_03_10_world_quest_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_10_world_quest_template.sql
diff --git a/sql/updates/world/2013_11_03_11_world_creature_text.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_11_world_creature_text.sql
index d7a237d3a72..d7a237d3a72 100644
--- a/sql/updates/world/2013_11_03_11_world_creature_text.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_11_world_creature_text.sql
diff --git a/sql/updates/world/2013_11_03_12_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_12_world_sai.sql
index 780ad3d0886..780ad3d0886 100644
--- a/sql/updates/world/2013_11_03_12_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_12_world_sai.sql
diff --git a/sql/updates/world/2013_11_03_13_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_13_world_sai.sql
index 9f6bb7289bc..9f6bb7289bc 100644
--- a/sql/updates/world/2013_11_03_13_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_13_world_sai.sql
diff --git a/sql/updates/world/2013_11_03_14_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_14_world_sai.sql
index 7b137662274..7b137662274 100644
--- a/sql/updates/world/2013_11_03_14_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_14_world_sai.sql
diff --git a/sql/updates/world/2013_11_03_15_world_quest_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_15_world_quest_template.sql
index f9a7819f3c1..f9a7819f3c1 100644
--- a/sql/updates/world/2013_11_03_15_world_quest_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_15_world_quest_template.sql
diff --git a/sql/updates/world/2013_11_03_16_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_16_world_sai.sql
index ea5ac909a40..ea5ac909a40 100644
--- a/sql/updates/world/2013_11_03_16_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_16_world_sai.sql
diff --git a/sql/updates/world/2013_11_03_17_world_gameobject.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_17_world_gameobject.sql
index a762e0c461f..a762e0c461f 100644
--- a/sql/updates/world/2013_11_03_17_world_gameobject.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_17_world_gameobject.sql
diff --git a/sql/updates/world/2013_11_03_18_world_disables.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_18_world_disables.sql
index 910a7527441..910a7527441 100644
--- a/sql/updates/world/2013_11_03_18_world_disables.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_18_world_disables.sql
diff --git a/sql/updates/world/2013_11_03_19_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_19_world_misc.sql
index 7a5e4f9d7d5..7a5e4f9d7d5 100644
--- a/sql/updates/world/2013_11_03_19_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_19_world_misc.sql
diff --git a/sql/updates/world/2013_11_03_20_world_disables.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_20_world_disables.sql
index 68f28f1741d..68f28f1741d 100644
--- a/sql/updates/world/2013_11_03_20_world_disables.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_20_world_disables.sql
diff --git a/sql/updates/world/2013_11_03_20_world_spell_area.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_20_world_spell_area.sql
index e633c7d8a38..e633c7d8a38 100644
--- a/sql/updates/world/2013_11_03_20_world_spell_area.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_20_world_spell_area.sql
diff --git a/sql/updates/world/2013_11_03_22_world_creature_questender.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_22_world_creature_questender.sql
index 4db3e910070..4db3e910070 100644
--- a/sql/updates/world/2013_11_03_22_world_creature_questender.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_22_world_creature_questender.sql
diff --git a/sql/updates/world/2013_11_03_23_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_23_world_creature_template.sql
index 2bb892c1801..2bb892c1801 100644
--- a/sql/updates/world/2013_11_03_23_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_23_world_creature_template.sql
diff --git a/sql/updates/world/2013_11_03_24_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_24_world_misc.sql
index 12859a2578d..12859a2578d 100644
--- a/sql/updates/world/2013_11_03_24_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_24_world_misc.sql
diff --git a/sql/updates/world/2013_11_03_25_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_25_world_misc.sql
index c5996949257..c5996949257 100644
--- a/sql/updates/world/2013_11_03_25_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_25_world_misc.sql
diff --git a/sql/updates/world/2013_11_03_26_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_26_world_misc.sql
index e9b7cd504b3..e9b7cd504b3 100644
--- a/sql/updates/world/2013_11_03_26_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_26_world_misc.sql
diff --git a/sql/updates/world/2013_11_03_27_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_27_world_misc.sql
index 9edb78ca26a..9edb78ca26a 100644
--- a/sql/updates/world/2013_11_03_27_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_27_world_misc.sql
diff --git a/sql/updates/world/2013_11_03_28_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_28_world_misc.sql
index 2648f013d59..2648f013d59 100644
--- a/sql/updates/world/2013_11_03_28_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_28_world_misc.sql
diff --git a/sql/updates/world/2013_11_03_29_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_29_world_misc.sql
index d05918439f6..d05918439f6 100644
--- a/sql/updates/world/2013_11_03_29_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_29_world_misc.sql
diff --git a/sql/updates/world/2013_11_03_30_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_30_world_misc.sql
index 5131b5e83d4..5131b5e83d4 100644
--- a/sql/updates/world/2013_11_03_30_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_30_world_misc.sql
diff --git a/sql/updates/world/2013_11_03_31_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_31_world_misc.sql
index 46e35047681..46e35047681 100644
--- a/sql/updates/world/2013_11_03_31_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_31_world_misc.sql
diff --git a/sql/updates/world/2013_11_03_32_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_32_world_misc.sql
index 538979bedf3..538979bedf3 100644
--- a/sql/updates/world/2013_11_03_32_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_32_world_misc.sql
diff --git a/sql/updates/world/2013_11_03_33_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_33_world_misc.sql
index 8b5a70704cb..8b5a70704cb 100644
--- a/sql/updates/world/2013_11_03_33_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_33_world_misc.sql
diff --git a/sql/updates/world/2013_11_03_34_world_quest_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_34_world_quest_template.sql
index 0814b94048b..0814b94048b 100644
--- a/sql/updates/world/2013_11_03_34_world_quest_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_34_world_quest_template.sql
diff --git a/sql/updates/world/2013_11_03_35_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_35_world_misc.sql
index a204ea7c3dd..a204ea7c3dd 100644
--- a/sql/updates/world/2013_11_03_35_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_35_world_misc.sql
diff --git a/sql/updates/world/2013_11_03_36_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_36_world_misc.sql
index 5bf656b3d68..5bf656b3d68 100644
--- a/sql/updates/world/2013_11_03_36_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_36_world_misc.sql
diff --git a/sql/updates/world/2013_11_03_37_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_37_world_misc.sql
index 6f6723141aa..6f6723141aa 100644
--- a/sql/updates/world/2013_11_03_37_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_37_world_misc.sql
diff --git a/sql/updates/world/2013_11_03_38_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_38_world_misc.sql
index 3a21a350853..3a21a350853 100644
--- a/sql/updates/world/2013_11_03_38_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_38_world_misc.sql
diff --git a/sql/updates/world/2013_11_03_39_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_39_world_misc.sql
index c5af862bd14..c5af862bd14 100644
--- a/sql/updates/world/2013_11_03_39_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_39_world_misc.sql
diff --git a/sql/updates/world/2013_11_03_40_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_40_world_misc.sql
index ec127db3910..ec127db3910 100644
--- a/sql/updates/world/2013_11_03_40_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_40_world_misc.sql
diff --git a/sql/updates/world/2013_11_03_41_world_npc_vendor.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_41_world_npc_vendor.sql
index db7619bee1f..db7619bee1f 100644
--- a/sql/updates/world/2013_11_03_41_world_npc_vendor.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_41_world_npc_vendor.sql
diff --git a/sql/updates/world/2013_11_03_42_world_creature.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_42_world_creature.sql
index 20ac761eed0..20ac761eed0 100644
--- a/sql/updates/world/2013_11_03_42_world_creature.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_42_world_creature.sql
diff --git a/sql/updates/world/2013_11_03_43_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_43_world_misc.sql
index eb8468f40a3..eb8468f40a3 100644
--- a/sql/updates/world/2013_11_03_43_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_43_world_misc.sql
diff --git a/sql/updates/world/2013_11_03_44_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_44_world_misc.sql
index e10583a7fe5..e10583a7fe5 100644
--- a/sql/updates/world/2013_11_03_44_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_03_44_world_misc.sql
diff --git a/sql/updates/world/2013_11_04_00_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_00_world_creature_template.sql
index 4eeb702bb73..4eeb702bb73 100644
--- a/sql/updates/world/2013_11_04_00_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_00_world_creature_template.sql
diff --git a/sql/updates/world/2013_11_04_01_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_01_world_misc.sql
index fa961b0416d..fa961b0416d 100644
--- a/sql/updates/world/2013_11_04_01_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_01_world_misc.sql
diff --git a/sql/updates/world/2013_11_04_02_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_02_world_misc.sql
index ccf522427e5..ccf522427e5 100644
--- a/sql/updates/world/2013_11_04_02_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_02_world_misc.sql
diff --git a/sql/updates/world/2013_11_04_03_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_03_world_misc.sql
index 3d75b951eae..3d75b951eae 100644
--- a/sql/updates/world/2013_11_04_03_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_03_world_misc.sql
diff --git a/sql/updates/world/2013_11_04_04_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_04_world_misc.sql
index 1d07791d928..1d07791d928 100644
--- a/sql/updates/world/2013_11_04_04_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_04_world_misc.sql
diff --git a/sql/updates/world/2013_11_04_05_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_05_world_misc.sql
index cad4739c8f0..cad4739c8f0 100644
--- a/sql/updates/world/2013_11_04_05_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_05_world_misc.sql
diff --git a/sql/updates/world/2013_11_04_06_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_06_world_misc.sql
index 982cd82a91f..982cd82a91f 100644
--- a/sql/updates/world/2013_11_04_06_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_06_world_misc.sql
diff --git a/sql/updates/world/2013_11_04_07_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_07_world_sai.sql
index b0434eccf5b..b0434eccf5b 100644
--- a/sql/updates/world/2013_11_04_07_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_07_world_sai.sql
diff --git a/sql/updates/world/2013_11_04_08_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_08_world_sai.sql
index 2feb5db3803..2feb5db3803 100644
--- a/sql/updates/world/2013_11_04_08_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_04_08_world_sai.sql
diff --git a/sql/updates/world/2013_11_05_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_05_00_world_sai.sql
index 972ac09bc94..972ac09bc94 100644
--- a/sql/updates/world/2013_11_05_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_05_00_world_sai.sql
diff --git a/sql/updates/world/2013_11_06_00_world_creature_formations.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_06_00_world_creature_formations.sql
index 2e4795fcc90..2e4795fcc90 100644
--- a/sql/updates/world/2013_11_06_00_world_creature_formations.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_06_00_world_creature_formations.sql
diff --git a/sql/updates/world/2013_11_06_01_world_creature_formations.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_06_01_world_creature_formations.sql
index b52421bc22d..b52421bc22d 100644
--- a/sql/updates/world/2013_11_06_01_world_creature_formations.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_06_01_world_creature_formations.sql
diff --git a/sql/updates/world/2013_11_07_00_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_07_00_world_creature_template.sql
index 93ad79e0ad9..93ad79e0ad9 100644
--- a/sql/updates/world/2013_11_07_00_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_07_00_world_creature_template.sql
diff --git a/sql/updates/world/2013_11_07_01_world_smart_scripts.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_07_01_world_smart_scripts.sql
index f8cbba56598..f8cbba56598 100644
--- a/sql/updates/world/2013_11_07_01_world_smart_scripts.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_07_01_world_smart_scripts.sql
diff --git a/sql/updates/world/2013_11_07_02_world_creature_text.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_07_02_world_creature_text.sql
index f1ad3ab4b56..f1ad3ab4b56 100644
--- a/sql/updates/world/2013_11_07_02_world_creature_text.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_07_02_world_creature_text.sql
diff --git a/sql/updates/world/2013_11_07_03_world_creature_text.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_07_03_world_creature_text.sql
index 2218f77a274..2218f77a274 100644
--- a/sql/updates/world/2013_11_07_03_world_creature_text.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_07_03_world_creature_text.sql
diff --git a/sql/updates/world/2013_11_07_04_world_creature_text.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_07_04_world_creature_text.sql
index f75f42f6a7a..f75f42f6a7a 100644
--- a/sql/updates/world/2013_11_07_04_world_creature_text.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_07_04_world_creature_text.sql
diff --git a/sql/updates/world/2013_11_07_05_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_07_05_world_misc.sql
index 5467468192f..5467468192f 100644
--- a/sql/updates/world/2013_11_07_05_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_07_05_world_misc.sql
diff --git a/sql/updates/world/2013_11_08_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_08_00_world_misc.sql
index 9f06418b328..9f06418b328 100644
--- a/sql/updates/world/2013_11_08_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_08_00_world_misc.sql
diff --git a/sql/updates/world/2013_11_10_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_00_world_misc.sql
index 3898206978d..3898206978d 100644
--- a/sql/updates/world/2013_11_10_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_00_world_misc.sql
diff --git a/sql/updates/world/2013_11_10_01_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_01_world_misc.sql
index 72881a96924..72881a96924 100644
--- a/sql/updates/world/2013_11_10_01_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_01_world_misc.sql
diff --git a/sql/updates/world/2013_11_10_02_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_02_world_misc.sql
index 6049724f6d3..6049724f6d3 100644
--- a/sql/updates/world/2013_11_10_02_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_02_world_misc.sql
diff --git a/sql/updates/world/2013_11_10_03_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_03_world_sai.sql
index 50dd527efaa..50dd527efaa 100644
--- a/sql/updates/world/2013_11_10_03_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_03_world_sai.sql
diff --git a/sql/updates/world/2013_11_10_04_world_waypoints.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_04_world_waypoints.sql
index c854c01ebdf..c854c01ebdf 100644
--- a/sql/updates/world/2013_11_10_04_world_waypoints.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_04_world_waypoints.sql
diff --git a/sql/updates/world/2013_11_10_05_world_creature_addon.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_05_world_creature_addon.sql
index 38f2521f9bf..38f2521f9bf 100644
--- a/sql/updates/world/2013_11_10_05_world_creature_addon.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_05_world_creature_addon.sql
diff --git a/sql/updates/world/2013_11_10_06_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_06_world_misc.sql
index 9dfca5da9d2..9dfca5da9d2 100644
--- a/sql/updates/world/2013_11_10_06_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_06_world_misc.sql
diff --git a/sql/updates/world/2013_11_10_07_world_conditions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_07_world_conditions.sql
index 93ab61414b6..93ab61414b6 100644
--- a/sql/updates/world/2013_11_10_07_world_conditions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_10_07_world_conditions.sql
diff --git a/sql/updates/world/2013_11_13_00_world_eai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_00_world_eai.sql
index fa2e608c91b..fa2e608c91b 100644
--- a/sql/updates/world/2013_11_13_00_world_eai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_00_world_eai.sql
diff --git a/sql/updates/world/2013_11_13_01_world_creature_ai_text.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_01_world_creature_ai_text.sql
index 20ef4ace633..20ef4ace633 100644
--- a/sql/updates/world/2013_11_13_01_world_creature_ai_text.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_01_world_creature_ai_text.sql
diff --git a/sql/updates/world/2013_11_13_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_02_world_sai.sql
index 34b5782f5f1..34b5782f5f1 100644
--- a/sql/updates/world/2013_11_13_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_02_world_sai.sql
diff --git a/sql/updates/world/2013_11_13_03_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_03_world_sai.sql
index 6f83dbebcf0..6f83dbebcf0 100644
--- a/sql/updates/world/2013_11_13_03_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_03_world_sai.sql
diff --git a/sql/updates/world/2013_11_13_04_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_04_world_sai.sql
index 92052024a63..92052024a63 100644
--- a/sql/updates/world/2013_11_13_04_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_04_world_sai.sql
diff --git a/sql/updates/world/2013_11_13_05_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_05_world_sai.sql
index 9d914fda4da..9d914fda4da 100644
--- a/sql/updates/world/2013_11_13_05_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_05_world_sai.sql
diff --git a/sql/updates/world/2013_11_13_06_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_06_world_sai.sql
index 1db8c485152..1db8c485152 100644
--- a/sql/updates/world/2013_11_13_06_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_06_world_sai.sql
diff --git a/sql/updates/world/2013_11_13_07_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_07_world_sai.sql
index 87f856721b7..87f856721b7 100644
--- a/sql/updates/world/2013_11_13_07_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_07_world_sai.sql
diff --git a/sql/updates/world/2013_11_13_08_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_08_world_sai.sql
index 94fb8c267f4..94fb8c267f4 100644
--- a/sql/updates/world/2013_11_13_08_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_13_08_world_sai.sql
diff --git a/sql/updates/world/2013_11_15_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_00_world_misc.sql
index 3b991a96def..3b991a96def 100644
--- a/sql/updates/world/2013_11_15_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_00_world_misc.sql
diff --git a/sql/updates/world/2013_11_15_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_01_world_sai.sql
index 49ff675d8cc..49ff675d8cc 100644
--- a/sql/updates/world/2013_11_15_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_01_world_sai.sql
diff --git a/sql/updates/world/2013_11_15_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_02_world_sai.sql
index 8aed9a45fa7..8aed9a45fa7 100644
--- a/sql/updates/world/2013_11_15_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_02_world_sai.sql
diff --git a/sql/updates/world/2013_11_15_03_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_03_world_sai.sql
index 41fae43db25..41fae43db25 100644
--- a/sql/updates/world/2013_11_15_03_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_03_world_sai.sql
diff --git a/sql/updates/world/2013_11_15_04_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_04_world_sai.sql
index b9a9da45df6..b9a9da45df6 100644
--- a/sql/updates/world/2013_11_15_04_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_04_world_sai.sql
diff --git a/sql/updates/world/2013_11_15_05_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_05_world_sai.sql
index 54dd2293205..54dd2293205 100644
--- a/sql/updates/world/2013_11_15_05_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_05_world_sai.sql
diff --git a/sql/updates/world/2013_11_15_06_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_06_world_sai.sql
index 5e418eac822..5e418eac822 100644
--- a/sql/updates/world/2013_11_15_06_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_06_world_sai.sql
diff --git a/sql/updates/world/2013_11_15_07_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_07_world_sai.sql
index 0b9ecc154b1..0b9ecc154b1 100644
--- a/sql/updates/world/2013_11_15_07_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_07_world_sai.sql
diff --git a/sql/updates/world/2013_11_15_08_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_08_world_sai.sql
index e9650ffc67a..e9650ffc67a 100644
--- a/sql/updates/world/2013_11_15_08_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_08_world_sai.sql
diff --git a/sql/updates/world/2013_11_15_09_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_09_world_sai.sql
index 364ed139b18..364ed139b18 100644
--- a/sql/updates/world/2013_11_15_09_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_09_world_sai.sql
diff --git a/sql/updates/world/2013_11_15_10_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_10_world_sai.sql
index 22008da4fea..22008da4fea 100644
--- a/sql/updates/world/2013_11_15_10_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_15_10_world_sai.sql
diff --git a/sql/updates/world/2013_11_16_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_16_00_world_sai.sql
index e953030f396..e953030f396 100644
--- a/sql/updates/world/2013_11_16_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_16_00_world_sai.sql
diff --git a/sql/updates/world/2013_11_16_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_16_01_world_sai.sql
index 33a7550565a..33a7550565a 100644
--- a/sql/updates/world/2013_11_16_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_16_01_world_sai.sql
diff --git a/sql/updates/world/2013_11_16_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_16_02_world_sai.sql
index 7bd096f1a36..7bd096f1a36 100644
--- a/sql/updates/world/2013_11_16_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_16_02_world_sai.sql
diff --git a/sql/updates/world/2013_11_17_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_17_00_world_sai.sql
index 2e36825001f..2e36825001f 100644
--- a/sql/updates/world/2013_11_17_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_17_00_world_sai.sql
diff --git a/sql/updates/world/2013_11_23_00_world_creature_text.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_23_00_world_creature_text.sql
index cceca50bb3d..cceca50bb3d 100644
--- a/sql/updates/world/2013_11_23_00_world_creature_text.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_23_00_world_creature_text.sql
diff --git a/sql/updates/world/2013_11_23_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_23_01_world_sai.sql
index 97889ce38ad..97889ce38ad 100644
--- a/sql/updates/world/2013_11_23_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_23_01_world_sai.sql
diff --git a/sql/updates/world/2013_11_23_02_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_23_02_world_misc.sql
index 7193fc68d1a..7193fc68d1a 100644
--- a/sql/updates/world/2013_11_23_02_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_23_02_world_misc.sql
diff --git a/sql/updates/world/2013_11_24_00_world_spell_script_names.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_24_00_world_spell_script_names.sql
index bd72015535e..bd72015535e 100644
--- a/sql/updates/world/2013_11_24_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_24_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2013_11_24_01_world_oculus.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_24_01_world_oculus.sql
index a8b6a912365..a8b6a912365 100644
--- a/sql/updates/world/2013_11_24_01_world_oculus.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_24_01_world_oculus.sql
diff --git a/sql/updates/world/2013_11_24_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_24_02_world_sai.sql
index 07cef709111..07cef709111 100644
--- a/sql/updates/world/2013_11_24_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_24_02_world_sai.sql
diff --git a/sql/updates/world/2013_11_25_00_world_item_loot_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_25_00_world_item_loot_template.sql
index d691be48707..d691be48707 100644
--- a/sql/updates/world/2013_11_25_00_world_item_loot_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_25_00_world_item_loot_template.sql
diff --git a/sql/updates/world/2013_11_27_00_world_areatrigger_tavern.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_00_world_areatrigger_tavern.sql
index e31c2c3f4db..e31c2c3f4db 100644
--- a/sql/updates/world/2013_11_27_00_world_areatrigger_tavern.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_00_world_areatrigger_tavern.sql
diff --git a/sql/updates/world/2013_11_27_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_01_world_sai.sql
index e2b6774d62a..e2b6774d62a 100644
--- a/sql/updates/world/2013_11_27_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_01_world_sai.sql
diff --git a/sql/updates/world/2013_11_27_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_02_world_sai.sql
index 183bc37ce5a..183bc37ce5a 100644
--- a/sql/updates/world/2013_11_27_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_02_world_sai.sql
diff --git a/sql/updates/world/2013_11_27_03_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_03_world_sai.sql
index ca560cf8132..ca560cf8132 100644
--- a/sql/updates/world/2013_11_27_03_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_03_world_sai.sql
diff --git a/sql/updates/world/2013_11_27_04_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_04_world_sai.sql
index 9d8e6c19fd3..9d8e6c19fd3 100644
--- a/sql/updates/world/2013_11_27_04_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_04_world_sai.sql
diff --git a/sql/updates/world/2013_11_27_05_world_creature.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_05_world_creature.sql
index b9f64e2ed30..b9f64e2ed30 100644
--- a/sql/updates/world/2013_11_27_05_world_creature.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_05_world_creature.sql
diff --git a/sql/updates/world/2013_11_27_06_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_06_world_sai.sql
index 6f9fd65bfd7..6f9fd65bfd7 100644
--- a/sql/updates/world/2013_11_27_06_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_06_world_sai.sql
diff --git a/sql/updates/world/2013_11_27_07_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_07_world_sai.sql
index 1073423e444..1073423e444 100644
--- a/sql/updates/world/2013_11_27_07_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_07_world_sai.sql
diff --git a/sql/updates/world/2013_11_27_08_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_08_world_sai.sql
index e5011ddc895..e5011ddc895 100644
--- a/sql/updates/world/2013_11_27_08_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_08_world_sai.sql
diff --git a/sql/updates/world/2013_11_27_09_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_09_world_sai.sql
index c029b8df26f..c029b8df26f 100644
--- a/sql/updates/world/2013_11_27_09_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_27_09_world_sai.sql
diff --git a/sql/updates/world/2013_11_28_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_28_00_world_misc.sql
index ea949e598e5..ea949e598e5 100644
--- a/sql/updates/world/2013_11_28_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_28_00_world_misc.sql
diff --git a/sql/updates/world/2013_11_28_01_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_28_01_world_creature_template.sql
index a272e30d49f..a272e30d49f 100644
--- a/sql/updates/world/2013_11_28_01_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_28_01_world_creature_template.sql
diff --git a/sql/updates/world/2013_11_28_02_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_28_02_world_misc.sql
index 0e0431d4040..0e0431d4040 100644
--- a/sql/updates/world/2013_11_28_02_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_28_02_world_misc.sql
diff --git a/sql/updates/world/2013_11_29_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_29_00_world_sai.sql
index 3a434f77a0e..3a434f77a0e 100644
--- a/sql/updates/world/2013_11_29_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_29_00_world_sai.sql
diff --git a/sql/updates/world/2013_11_29_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_29_01_world_sai.sql
index 144b7dbad5a..144b7dbad5a 100644
--- a/sql/updates/world/2013_11_29_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_29_01_world_sai.sql
diff --git a/sql/updates/world/2013_11_29_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_29_02_world_sai.sql
index 6afa93b3905..6afa93b3905 100644
--- a/sql/updates/world/2013_11_29_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_29_02_world_sai.sql
diff --git a/sql/updates/world/2013_11_29_03_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_29_03_world_sai.sql
index 1ba727ca930..1ba727ca930 100644
--- a/sql/updates/world/2013_11_29_03_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_29_03_world_sai.sql
diff --git a/sql/updates/world/2013_11_29_04_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_29_04_world_sai.sql
index 5f98b7989d8..5f98b7989d8 100644
--- a/sql/updates/world/2013_11_29_04_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_29_04_world_sai.sql
diff --git a/sql/updates/world/2013_11_29_05_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_29_05_world_sai.sql
index 7d9ce9f6880..7d9ce9f6880 100644
--- a/sql/updates/world/2013_11_29_05_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_29_05_world_sai.sql
diff --git a/sql/updates/world/2013_11_29_06_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_29_06_world_sai.sql
index 5189b117598..5189b117598 100644
--- a/sql/updates/world/2013_11_29_06_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_29_06_world_sai.sql
diff --git a/sql/updates/world/2013_11_30_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_30_00_world_sai.sql
index 1db8146179d..1db8146179d 100644
--- a/sql/updates/world/2013_11_30_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_30_00_world_sai.sql
diff --git a/sql/updates/world/2013_11_30_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_30_01_world_sai.sql
index 630dd7183fb..630dd7183fb 100644
--- a/sql/updates/world/2013_11_30_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_30_01_world_sai.sql
diff --git a/sql/updates/world/2013_11_30_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_30_02_world_sai.sql
index fd835ef5d8b..fd835ef5d8b 100644
--- a/sql/updates/world/2013_11_30_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_30_02_world_sai.sql
diff --git a/sql/updates/world/2013_11_30_03_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_30_03_world_sai.sql
index a13515fb926..a13515fb926 100644
--- a/sql/updates/world/2013_11_30_03_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_11_30_03_world_sai.sql
diff --git a/sql/updates/world/2013_12_01_00_world_creature_ai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_00_world_creature_ai.sql
index e10c64a59fe..e10c64a59fe 100644
--- a/sql/updates/world/2013_12_01_00_world_creature_ai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_00_world_creature_ai.sql
diff --git a/sql/updates/world/2013_12_01_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_01_world_sai.sql
index f59bae00809..f59bae00809 100644
--- a/sql/updates/world/2013_12_01_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_01_world_sai.sql
diff --git a/sql/updates/world/2013_12_01_02_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_02_world_command.sql
index e47c583a94a..e47c583a94a 100644
--- a/sql/updates/world/2013_12_01_02_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_02_world_command.sql
diff --git a/sql/updates/world/2013_12_01_03_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_03_world_sai.sql
index ac04f14bc0e..ac04f14bc0e 100644
--- a/sql/updates/world/2013_12_01_03_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_03_world_sai.sql
diff --git a/sql/updates/world/2013_12_01_04_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_04_world_sai.sql
index 5d1236d9f9f..5d1236d9f9f 100644
--- a/sql/updates/world/2013_12_01_04_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_04_world_sai.sql
diff --git a/sql/updates/world/2013_12_01_05_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_05_world_misc.sql
index 7c0fbe48985..7c0fbe48985 100644
--- a/sql/updates/world/2013_12_01_05_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_05_world_misc.sql
diff --git a/sql/updates/world/2013_12_01_06_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_06_world_misc.sql
index 77654de6300..77654de6300 100644
--- a/sql/updates/world/2013_12_01_06_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_06_world_misc.sql
diff --git a/sql/updates/world/2013_12_01_07_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_07_world_sai.sql
index 9e2dce60a75..9e2dce60a75 100644
--- a/sql/updates/world/2013_12_01_07_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_01_07_world_sai.sql
diff --git a/sql/updates/world/2013_12_02_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_02_00_world_sai.sql
index 8bb7e8d9591..8bb7e8d9591 100644
--- a/sql/updates/world/2013_12_02_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_02_00_world_sai.sql
diff --git a/sql/updates/world/2013_12_02_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_02_01_world_sai.sql
index 0a121c85f30..0a121c85f30 100644
--- a/sql/updates/world/2013_12_02_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_02_01_world_sai.sql
diff --git a/sql/updates/world/2013_12_02_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_02_02_world_sai.sql
index 159a5235fc7..159a5235fc7 100644
--- a/sql/updates/world/2013_12_02_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_02_02_world_sai.sql
diff --git a/sql/updates/world/2013_12_04_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_04_00_world_sai.sql
index 29c011670ab..29c011670ab 100644
--- a/sql/updates/world/2013_12_04_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_04_00_world_sai.sql
diff --git a/sql/updates/world/2013_12_04_01_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_04_01_world_misc.sql
index 15cd150f942..15cd150f942 100644
--- a/sql/updates/world/2013_12_04_01_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_04_01_world_misc.sql
diff --git a/sql/updates/world/2013_12_04_02_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_04_02_world_misc.sql
index 2704719cba3..2704719cba3 100644
--- a/sql/updates/world/2013_12_04_02_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_04_02_world_misc.sql
diff --git a/sql/updates/world/2013_12_04_03_world_spells.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_04_03_world_spells.sql
index 422b8cccb7f..422b8cccb7f 100644
--- a/sql/updates/world/2013_12_04_03_world_spells.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_04_03_world_spells.sql
diff --git a/sql/updates/world/2013_12_04_04_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_04_04_world_sai.sql
index a42f7bf1e1b..a42f7bf1e1b 100644
--- a/sql/updates/world/2013_12_04_04_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_04_04_world_sai.sql
diff --git a/sql/updates/world/2013_12_04_05_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_04_05_world_sai.sql
index f08c4afb700..f08c4afb700 100644
--- a/sql/updates/world/2013_12_04_05_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_04_05_world_sai.sql
diff --git a/sql/updates/world/2013_12_04_06_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_04_06_world_sai.sql
index 7f2b9c773cb..7f2b9c773cb 100644
--- a/sql/updates/world/2013_12_04_06_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_04_06_world_sai.sql
diff --git a/sql/updates/world/2013_12_05_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_05_00_world_misc.sql
index 51150d8aacc..51150d8aacc 100644
--- a/sql/updates/world/2013_12_05_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_05_00_world_misc.sql
diff --git a/sql/updates/world/2013_12_05_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_05_01_world_sai.sql
index 29c011670ab..29c011670ab 100644
--- a/sql/updates/world/2013_12_05_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_05_01_world_sai.sql
diff --git a/sql/updates/world/2013_12_05_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_05_02_world_sai.sql
index 364ecdd1078..364ecdd1078 100644
--- a/sql/updates/world/2013_12_05_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_05_02_world_sai.sql
diff --git a/sql/updates/world/2013_12_07_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_07_00_world_misc.sql
index a8981ed22c5..a8981ed22c5 100644
--- a/sql/updates/world/2013_12_07_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_07_00_world_misc.sql
diff --git a/sql/updates/world/2013_12_07_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_07_01_world_sai.sql
index 2bce2208938..2bce2208938 100644
--- a/sql/updates/world/2013_12_07_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_07_01_world_sai.sql
diff --git a/sql/updates/world/2013_12_07_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_07_02_world_sai.sql
index 765cc18abc2..765cc18abc2 100644
--- a/sql/updates/world/2013_12_07_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_07_02_world_sai.sql
diff --git a/sql/updates/world/2013_12_08_00_world_creature_text.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_08_00_world_creature_text.sql
index 4dfc579047b..4dfc579047b 100644
--- a/sql/updates/world/2013_12_08_00_world_creature_text.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_08_00_world_creature_text.sql
diff --git a/sql/updates/world/2013_12_08_01_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_08_01_world_misc.sql
index 586b8d2c739..586b8d2c739 100644
--- a/sql/updates/world/2013_12_08_01_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_08_01_world_misc.sql
diff --git a/sql/updates/world/2013_12_08_02_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_08_02_world_misc.sql
index 34f7a0b07f7..34f7a0b07f7 100644
--- a/sql/updates/world/2013_12_08_02_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_08_02_world_misc.sql
diff --git a/sql/updates/world/2013_12_09_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_09_00_world_misc.sql
index 7c4e64f3601..7c4e64f3601 100644
--- a/sql/updates/world/2013_12_09_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_09_00_world_misc.sql
diff --git a/sql/updates/world/2013_12_09_01_world_waypoints.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_09_01_world_waypoints.sql
index 9196aad3f97..9196aad3f97 100644
--- a/sql/updates/world/2013_12_09_01_world_waypoints.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_09_01_world_waypoints.sql
diff --git a/sql/updates/world/2013_12_09_02_world_waypoints.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_09_02_world_waypoints.sql
index d65222b3053..d65222b3053 100644
--- a/sql/updates/world/2013_12_09_02_world_waypoints.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_09_02_world_waypoints.sql
diff --git a/sql/updates/world/2013_12_09_03_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_09_03_world_misc.sql
index 4ff283fd1b8..4ff283fd1b8 100644
--- a/sql/updates/world/2013_12_09_03_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_09_03_world_misc.sql
diff --git a/sql/updates/world/2013_12_09_04_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_09_04_world_creature_template.sql
index d33d360d043..d33d360d043 100644
--- a/sql/updates/world/2013_12_09_04_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_09_04_world_creature_template.sql
diff --git a/sql/updates/world/2013_12_11_00_world_waypoints.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_11_00_world_waypoints.sql
index 3ba7020b017..3ba7020b017 100644
--- a/sql/updates/world/2013_12_11_00_world_waypoints.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_11_00_world_waypoints.sql
diff --git a/sql/updates/world/2013_12_11_01_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_11_01_world_misc.sql
index 70371d158cf..70371d158cf 100644
--- a/sql/updates/world/2013_12_11_01_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_11_01_world_misc.sql
diff --git a/sql/updates/world/2013_12_11_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_11_02_world_sai.sql
index 8543a9d65c3..8543a9d65c3 100644
--- a/sql/updates/world/2013_12_11_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_11_02_world_sai.sql
diff --git a/sql/updates/world/2013_12_14_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_14_00_world_sai.sql
index 6c5e03d1709..6c5e03d1709 100644
--- a/sql/updates/world/2013_12_14_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_14_00_world_sai.sql
diff --git a/sql/updates/world/2013_12_14_01_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_14_01_world_misc.sql
index 284a2b46946..284a2b46946 100644
--- a/sql/updates/world/2013_12_14_01_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_14_01_world_misc.sql
diff --git a/sql/updates/world/2013_12_15_00_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_15_00_world_creature_template.sql
index a7b1c9ea6eb..a7b1c9ea6eb 100644
--- a/sql/updates/world/2013_12_15_00_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_15_00_world_creature_template.sql
diff --git a/sql/updates/world/2013_12_15_01_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_15_01_world_creature_template.sql
index c7961d6f5ca..c7961d6f5ca 100644
--- a/sql/updates/world/2013_12_15_01_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_15_01_world_creature_template.sql
diff --git a/sql/updates/world/2013_12_16_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_16_00_world_sai.sql
index 028f91fce6d..028f91fce6d 100644
--- a/sql/updates/world/2013_12_16_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_16_00_world_sai.sql
diff --git a/sql/updates/world/2013_12_17_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_17_00_world_sai.sql
index 3ebe6e95618..8de17f2311d 100644
--- a/sql/updates/world/2013_12_17_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_17_00_world_sai.sql
@@ -1 +1 @@
-UPDATE `smart_scripts` SET `action_type`=69 WHERE `entryorguid`=137300 AND `id` IN (19,20);
+UPDATE `smart_scripts` SET `action_type`=69 WHERE `entryorguid`=137300 AND `id` IN (19,20);
diff --git a/sql/updates/world/2013_12_18_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_18_00_world_misc.sql
index 1ea7b8550eb..1ea7b8550eb 100644
--- a/sql/updates/world/2013_12_18_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_18_00_world_misc.sql
diff --git a/sql/updates/world/2013_12_18_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_18_01_world_sai.sql
index 5c494ce9251..5c494ce9251 100644
--- a/sql/updates/world/2013_12_18_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_18_01_world_sai.sql
diff --git a/sql/updates/world/2013_12_18_02_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_18_02_world_misc.sql
index ea7276481d7..ea7276481d7 100644
--- a/sql/updates/world/2013_12_18_02_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_18_02_world_misc.sql
diff --git a/sql/updates/world/2013_12_19_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_19_00_world_misc.sql
index a3d83ad2a3a..a3d83ad2a3a 100644
--- a/sql/updates/world/2013_12_19_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_19_00_world_misc.sql
diff --git a/sql/updates/world/2013_12_19_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_19_01_world_sai.sql
index a8e5396f9f0..a8e5396f9f0 100644
--- a/sql/updates/world/2013_12_19_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_19_01_world_sai.sql
diff --git a/sql/updates/world/2013_12_19_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_19_02_world_sai.sql
index 49e676bca06..49e676bca06 100644
--- a/sql/updates/world/2013_12_19_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_19_02_world_sai.sql
diff --git a/sql/updates/world/2013_12_19_03_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_19_03_world_misc.sql
index a5fea989969..a5fea989969 100644
--- a/sql/updates/world/2013_12_19_03_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_19_03_world_misc.sql
diff --git a/sql/updates/world/2013_12_19_04_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_19_04_world_misc.sql
index 4c395accd53..4c395accd53 100644
--- a/sql/updates/world/2013_12_19_04_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_19_04_world_misc.sql
diff --git a/sql/updates/world/2013_12_20_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_20_00_world_misc.sql
index ccbbcb42966..ccbbcb42966 100644
--- a/sql/updates/world/2013_12_20_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_20_00_world_misc.sql
diff --git a/sql/updates/world/2013_12_20_01_world_conditions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_20_01_world_conditions.sql
index e703d697e57..e703d697e57 100644
--- a/sql/updates/world/2013_12_20_01_world_conditions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_20_01_world_conditions.sql
diff --git a/sql/updates/world/2013_12_20_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_20_02_world_sai.sql
index 953efcc7c9c..953efcc7c9c 100644
--- a/sql/updates/world/2013_12_20_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_20_02_world_sai.sql
diff --git a/sql/updates/world/2013_12_21_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_21_00_world_sai.sql
index 7a3d2f46c0d..7a3d2f46c0d 100644
--- a/sql/updates/world/2013_12_21_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_21_00_world_sai.sql
diff --git a/sql/updates/world/2013_12_22_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_00_world_sai.sql
index 4a4d0f7edb1..4a4d0f7edb1 100644
--- a/sql/updates/world/2013_12_22_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_00_world_sai.sql
diff --git a/sql/updates/world/2013_12_22_01_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_01_world_misc.sql
index 2acc4754157..2acc4754157 100644
--- a/sql/updates/world/2013_12_22_01_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_01_world_misc.sql
diff --git a/sql/updates/world/2013_12_22_02_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_02_world_misc.sql
index e025832ba6b..e025832ba6b 100644
--- a/sql/updates/world/2013_12_22_02_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_02_world_misc.sql
diff --git a/sql/updates/world/2013_12_22_03_world_quest_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_03_world_quest_template.sql
index c6d4b2d5c09..c6d4b2d5c09 100644
--- a/sql/updates/world/2013_12_22_03_world_quest_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_03_world_quest_template.sql
diff --git a/sql/updates/world/2013_12_22_04_world_creature.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_04_world_creature.sql
index 404911643cd..404911643cd 100644
--- a/sql/updates/world/2013_12_22_04_world_creature.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_04_world_creature.sql
diff --git a/sql/updates/world/2013_12_22_05_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_05_world_misc.sql
index cf0734f0d6d..cf0734f0d6d 100644
--- a/sql/updates/world/2013_12_22_05_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_05_world_misc.sql
diff --git a/sql/updates/world/2013_12_22_06_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_06_world_misc.sql
index 800669bca26..800669bca26 100644
--- a/sql/updates/world/2013_12_22_06_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_06_world_misc.sql
diff --git a/sql/updates/world/2013_12_22_07_world_creature_text.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_07_world_creature_text.sql
index 83e273b3a16..83e273b3a16 100644
--- a/sql/updates/world/2013_12_22_07_world_creature_text.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_07_world_creature_text.sql
diff --git a/sql/updates/world/2013_12_22_08_world_creature_text.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_08_world_creature_text.sql
index dabf26f8e5f..dabf26f8e5f 100644
--- a/sql/updates/world/2013_12_22_08_world_creature_text.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_08_world_creature_text.sql
diff --git a/sql/updates/world/2013_12_22_09_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_09_world_sai.sql
index 0a90197cc47..0a90197cc47 100644
--- a/sql/updates/world/2013_12_22_09_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_22_09_world_sai.sql
diff --git a/sql/updates/world/2013_12_23_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_00_world_misc.sql
index 7b6207eb791..7b6207eb791 100644
--- a/sql/updates/world/2013_12_23_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_00_world_misc.sql
diff --git a/sql/updates/world/2013_12_23_01_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_01_world_misc.sql
index e586667fb84..e586667fb84 100644
--- a/sql/updates/world/2013_12_23_01_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_01_world_misc.sql
diff --git a/sql/updates/world/2013_12_23_02_world_gossip.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_02_world_gossip.sql
index 63995655888..63995655888 100644
--- a/sql/updates/world/2013_12_23_02_world_gossip.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_02_world_gossip.sql
diff --git a/sql/updates/world/2013_12_23_03_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_03_world_misc.sql
index 6b5fe812c3c..6b5fe812c3c 100644
--- a/sql/updates/world/2013_12_23_03_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_03_world_misc.sql
diff --git a/sql/updates/world/2013_12_23_04_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_04_world_misc.sql
index 725fe0239f0..725fe0239f0 100644
--- a/sql/updates/world/2013_12_23_04_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_04_world_misc.sql
diff --git a/sql/updates/world/2013_12_23_05_world_condition.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_05_world_condition.sql
index d810cb662b7..d810cb662b7 100644
--- a/sql/updates/world/2013_12_23_05_world_condition.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_05_world_condition.sql
diff --git a/sql/updates/world/2013_12_23_06_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_06_world_sai.sql
index 784fe743e06..784fe743e06 100644
--- a/sql/updates/world/2013_12_23_06_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_06_world_sai.sql
diff --git a/sql/updates/world/2013_12_23_07_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_07_world_creature_template.sql
index 2532dcc8701..2532dcc8701 100644
--- a/sql/updates/world/2013_12_23_07_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_07_world_creature_template.sql
diff --git a/sql/updates/world/2013_12_23_08_world_creature_text.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_08_world_creature_text.sql
index 3ea746f24ee..3ea746f24ee 100644
--- a/sql/updates/world/2013_12_23_08_world_creature_text.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_23_08_world_creature_text.sql
diff --git a/sql/updates/world/2013_12_24_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_24_00_world_misc.sql
index 8415acffa7b..8415acffa7b 100644
--- a/sql/updates/world/2013_12_24_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_24_00_world_misc.sql
diff --git a/sql/updates/world/2013_12_24_01_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_24_01_world_misc.sql
index 65abb308f95..65abb308f95 100644
--- a/sql/updates/world/2013_12_24_01_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_24_01_world_misc.sql
diff --git a/sql/updates/world/2013_12_24_02_world_gameobject_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_24_02_world_gameobject_template.sql
index 4fe5d4d3c59..4fe5d4d3c59 100644
--- a/sql/updates/world/2013_12_24_02_world_gameobject_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_24_02_world_gameobject_template.sql
diff --git a/sql/updates/world/2013_12_24_03_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_24_03_world_creature_template.sql
index e12a8f66be4..e12a8f66be4 100644
--- a/sql/updates/world/2013_12_24_03_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_24_03_world_creature_template.sql
diff --git a/sql/updates/world/2013_12_25_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_25_00_world_misc.sql
index ce8b3d57645..ce8b3d57645 100644
--- a/sql/updates/world/2013_12_25_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_25_00_world_misc.sql
diff --git a/sql/updates/world/2013_12_25_01_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_25_01_world_misc.sql
index d95283ebf55..d95283ebf55 100644
--- a/sql/updates/world/2013_12_25_01_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_25_01_world_misc.sql
diff --git a/sql/updates/world/2013_12_25_02_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_25_02_world_misc.sql
index 691a2d66102..691a2d66102 100644
--- a/sql/updates/world/2013_12_25_02_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_25_02_world_misc.sql
diff --git a/sql/updates/world/2013_12_25_03_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_25_03_world_misc.sql
index 8976384619a..8976384619a 100644
--- a/sql/updates/world/2013_12_25_03_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_25_03_world_misc.sql
diff --git a/sql/updates/world/2013_12_27_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_27_00_world_sai.sql
index 76f90dad32a..76f90dad32a 100644
--- a/sql/updates/world/2013_12_27_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_27_00_world_sai.sql
diff --git a/sql/updates/world/2013_12_27_01_world_creature_formations.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_27_01_world_creature_formations.sql
index 08b22a544b9..08b22a544b9 100644
--- a/sql/updates/world/2013_12_27_01_world_creature_formations.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_27_01_world_creature_formations.sql
diff --git a/sql/updates/world/2013_12_28_00_world_creature_classlevelstats.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_28_00_world_creature_classlevelstats.sql
index 0ca50efa68b..0ca50efa68b 100644
--- a/sql/updates/world/2013_12_28_00_world_creature_classlevelstats.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_28_00_world_creature_classlevelstats.sql
diff --git a/sql/updates/world/2013_12_28_01_world_creature_classlevelstats.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_28_01_world_creature_classlevelstats.sql
index 9a1b051155b..9a1b051155b 100644
--- a/sql/updates/world/2013_12_28_01_world_creature_classlevelstats.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_28_01_world_creature_classlevelstats.sql
diff --git a/sql/updates/world/2013_12_28_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_28_02_world_sai.sql
index 66e1e00f334..66e1e00f334 100644
--- a/sql/updates/world/2013_12_28_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_28_02_world_sai.sql
diff --git a/sql/updates/world/2013_12_28_03_world_creature_classlevelstats.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_28_03_world_creature_classlevelstats.sql
index 69d4365b9af..69d4365b9af 100644
--- a/sql/updates/world/2013_12_28_03_world_creature_classlevelstats.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_28_03_world_creature_classlevelstats.sql
diff --git a/sql/updates/world/2013_12_29_00_world_creature_classlevelstats.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_29_00_world_creature_classlevelstats.sql
index 778e76a4e04..778e76a4e04 100644
--- a/sql/updates/world/2013_12_29_00_world_creature_classlevelstats.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_29_00_world_creature_classlevelstats.sql
diff --git a/sql/updates/world/2013_12_29_01_world_creature_classlevelstats.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_29_01_world_creature_classlevelstats.sql
index 7d989f80072..7d989f80072 100644
--- a/sql/updates/world/2013_12_29_01_world_creature_classlevelstats.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_29_01_world_creature_classlevelstats.sql
diff --git a/sql/updates/world/2013_12_30_00_world_creature_classlevelstats.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_30_00_world_creature_classlevelstats.sql
index 8974bcc025d..8974bcc025d 100644
--- a/sql/updates/world/2013_12_30_00_world_creature_classlevelstats.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_30_00_world_creature_classlevelstats.sql
diff --git a/sql/updates/world/2013_12_30_01_world_creature_classlevelstats.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_30_01_world_creature_classlevelstats.sql
index 330545abf10..330545abf10 100644
--- a/sql/updates/world/2013_12_30_01_world_creature_classlevelstats.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_30_01_world_creature_classlevelstats.sql
diff --git a/sql/updates/world/2013_12_30_02_world_creature_classlevelstats.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_30_02_world_creature_classlevelstats.sql
index fe86d53ad04..fe86d53ad04 100644
--- a/sql/updates/world/2013_12_30_02_world_creature_classlevelstats.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_30_02_world_creature_classlevelstats.sql
diff --git a/sql/updates/world/2013_12_30_03_world_creature_classlevelstats.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_30_03_world_creature_classlevelstats.sql
index 19e34107e32..19e34107e32 100644
--- a/sql/updates/world/2013_12_30_03_world_creature_classlevelstats.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_30_03_world_creature_classlevelstats.sql
diff --git a/sql/updates/world/2013_12_31_00_world_creature_classlevelstats.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_31_00_world_creature_classlevelstats.sql
index 8039fcd441e..8039fcd441e 100644
--- a/sql/updates/world/2013_12_31_00_world_creature_classlevelstats.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_12_31_00_world_creature_classlevelstats.sql
diff --git a/sql/updates/world/2014_01_04_00_world_creature_classlevelstats.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_04_00_world_creature_classlevelstats.sql
index d55561bbe0e..d55561bbe0e 100644
--- a/sql/updates/world/2014_01_04_00_world_creature_classlevelstats.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_04_00_world_creature_classlevelstats.sql
diff --git a/sql/updates/world/2014_01_04_01_world_spelldifficulty_dbc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_04_01_world_spelldifficulty_dbc.sql
index b32a5bce948..b32a5bce948 100644
--- a/sql/updates/world/2014_01_04_01_world_spelldifficulty_dbc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_04_01_world_spelldifficulty_dbc.sql
diff --git a/sql/updates/world/2014_01_04_02_world_spelldifficulty_dbc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_04_02_world_spelldifficulty_dbc.sql
index 047d5cb937d..047d5cb937d 100644
--- a/sql/updates/world/2014_01_04_02_world_spelldifficulty_dbc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_04_02_world_spelldifficulty_dbc.sql
diff --git a/sql/updates/world/2014_01_07_00_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_07_00_world_creature_template.sql
index 2b4bce350d9..2b4bce350d9 100644
--- a/sql/updates/world/2014_01_07_00_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_07_00_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_08_00_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_08_00_world_creature_template.sql
index 2d0e1c72976..2d0e1c72976 100644
--- a/sql/updates/world/2014_01_08_00_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_08_00_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_09_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_09_00_world_misc.sql
index 0710932c589..0710932c589 100644
--- a/sql/updates/world/2014_01_09_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_09_00_world_misc.sql
diff --git a/sql/updates/world/2014_01_09_01_world_creature.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_09_01_world_creature.sql
index d41ee34fe24..d41ee34fe24 100644
--- a/sql/updates/world/2014_01_09_01_world_creature.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_09_01_world_creature.sql
diff --git a/sql/updates/world/2014_01_12_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_12_00_world_sai.sql
index 0d408155660..0d408155660 100644
--- a/sql/updates/world/2014_01_12_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_12_00_world_sai.sql
diff --git a/sql/updates/world/2014_01_15_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_15_00_world_misc.sql
index b7c22edc3d9..b7c22edc3d9 100644
--- a/sql/updates/world/2014_01_15_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_15_00_world_misc.sql
diff --git a/sql/updates/world/2014_01_17_00_world_trinity_string.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_17_00_world_trinity_string.sql
index 698af0f56cb..698af0f56cb 100644
--- a/sql/updates/world/2014_01_17_00_world_trinity_string.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_17_00_world_trinity_string.sql
diff --git a/sql/updates/world/2014_01_19_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_19_00_world_misc.sql
index 7771527a5a2..7771527a5a2 100644
--- a/sql/updates/world/2014_01_19_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_19_00_world_misc.sql
diff --git a/sql/updates/world/2014_01_19_01_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_19_01_world_command.sql
index a11c6b09787..a11c6b09787 100644
--- a/sql/updates/world/2014_01_19_01_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_19_01_world_command.sql
diff --git a/sql/updates/world/2014_01_19_02_world_command.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_19_02_world_command.sql
index 09509488c85..09509488c85 100644
--- a/sql/updates/world/2014_01_19_02_world_command.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_19_02_world_command.sql
diff --git a/sql/updates/world/2014_01_21_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_21_00_world_sai.sql
index 6ea92fc1aef..6ea92fc1aef 100644
--- a/sql/updates/world/2014_01_21_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_21_00_world_sai.sql
diff --git a/sql/updates/world/2014_01_22_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_22_00_world_sai.sql
index f06deb3a8fc..f06deb3a8fc 100644
--- a/sql/updates/world/2014_01_22_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_22_00_world_sai.sql
diff --git a/sql/updates/world/2014_01_22_01_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_22_01_world_creature_template.sql
index 376a6c007c8..376a6c007c8 100644
--- a/sql/updates/world/2014_01_22_01_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_22_01_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_23_00_world_quest_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_00_world_quest_template.sql
index 4c6f5e55841..4c6f5e55841 100644
--- a/sql/updates/world/2014_01_23_00_world_quest_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_00_world_quest_template.sql
diff --git a/sql/updates/world/2014_01_23_01_world_conditions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_01_world_conditions.sql
index 4afa30ee13d..4afa30ee13d 100644
--- a/sql/updates/world/2014_01_23_01_world_conditions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_01_world_conditions.sql
diff --git a/sql/updates/world/2014_01_23_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_02_world_sai.sql
index f55db997a4c..f55db997a4c 100644
--- a/sql/updates/world/2014_01_23_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_02_world_sai.sql
diff --git a/sql/updates/world/2014_01_23_03_world_conditions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_03_world_conditions.sql
index df83d50fd51..df83d50fd51 100644
--- a/sql/updates/world/2014_01_23_03_world_conditions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_03_world_conditions.sql
diff --git a/sql/updates/world/2014_01_23_04_world_game_event_creature.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_04_world_game_event_creature.sql
index 5d350803f82..5d350803f82 100644
--- a/sql/updates/world/2014_01_23_04_world_game_event_creature.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_04_world_game_event_creature.sql
diff --git a/sql/updates/world/2014_01_23_05_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_05_world_creature_template.sql
index a35a6191ea4..a35a6191ea4 100644
--- a/sql/updates/world/2014_01_23_05_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_05_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_23_06_world_creature.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_06_world_creature.sql
index 356db4fceb4..356db4fceb4 100644
--- a/sql/updates/world/2014_01_23_06_world_creature.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_06_world_creature.sql
diff --git a/sql/updates/world/2014_01_23_07_world_spell_bonus_data.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_07_world_spell_bonus_data.sql
index 1dfd35eac5a..1dfd35eac5a 100644
--- a/sql/updates/world/2014_01_23_07_world_spell_bonus_data.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_07_world_spell_bonus_data.sql
diff --git a/sql/updates/world/2014_01_23_08_world_graveyard.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_08_world_graveyard.sql
index 27cfc39647d..27cfc39647d 100644
--- a/sql/updates/world/2014_01_23_08_world_graveyard.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_08_world_graveyard.sql
diff --git a/sql/updates/world/2014_01_23_09_world_npc_trainer.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_09_world_npc_trainer.sql
index 3b44463b3da..3b44463b3da 100644
--- a/sql/updates/world/2014_01_23_09_world_npc_trainer.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_09_world_npc_trainer.sql
diff --git a/sql/updates/world/2014_01_23_10_world_creature_loot_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_10_world_creature_loot_template.sql
index f15bf25e5a8..f15bf25e5a8 100644
--- a/sql/updates/world/2014_01_23_10_world_creature_loot_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_10_world_creature_loot_template.sql
diff --git a/sql/updates/world/2014_01_23_11_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_11_world_creature_template.sql
index efb5c7871af..efb5c7871af 100644
--- a/sql/updates/world/2014_01_23_11_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_11_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_23_12_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_12_world_sai.sql
index a9935fd0c97..a9935fd0c97 100644
--- a/sql/updates/world/2014_01_23_12_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_12_world_sai.sql
diff --git a/sql/updates/world/2014_01_23_13_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_13_world_misc.sql
index 627aa99d56b..627aa99d56b 100644
--- a/sql/updates/world/2014_01_23_13_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_13_world_misc.sql
diff --git a/sql/updates/world/2014_01_23_14_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_14_world_creature_template.sql
index 05ce8f568fc..05ce8f568fc 100644
--- a/sql/updates/world/2014_01_23_14_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_14_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_23_15_world_spell_script_names.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_15_world_spell_script_names.sql
index f3812f60e2c..f3812f60e2c 100644
--- a/sql/updates/world/2014_01_23_15_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_23_15_world_spell_script_names.sql
diff --git a/sql/updates/world/2014_01_24_00_world_spell_script_name.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_00_world_spell_script_name.sql
index 51030a39a85..51030a39a85 100644
--- a/sql/updates/world/2014_01_24_00_world_spell_script_name.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_00_world_spell_script_name.sql
diff --git a/sql/updates/world/2014_01_24_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_01_world_sai.sql
index 56ecec3bafc..56ecec3bafc 100644
--- a/sql/updates/world/2014_01_24_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_01_world_sai.sql
diff --git a/sql/updates/world/2014_01_24_02_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_02_world_creature_template.sql
index be8bb9d6f07..be8bb9d6f07 100644
--- a/sql/updates/world/2014_01_24_02_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_02_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_24_03_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_03_world_sai.sql
index 06fe58f137a..06fe58f137a 100644
--- a/sql/updates/world/2014_01_24_03_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_03_world_sai.sql
diff --git a/sql/updates/world/2014_01_24_04_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_04_world_sai.sql
index 6864160c2c5..6864160c2c5 100644
--- a/sql/updates/world/2014_01_24_04_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_04_world_sai.sql
diff --git a/sql/updates/world/2014_01_24_05_world_creature_queststarter.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_05_world_creature_queststarter.sql
index 9b2893a859d..9b2893a859d 100644
--- a/sql/updates/world/2014_01_24_05_world_creature_queststarter.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_05_world_creature_queststarter.sql
diff --git a/sql/updates/world/2014_01_24_06_world_gameobject_loot_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_06_world_gameobject_loot_template.sql
index 3ca7a513409..3ca7a513409 100644
--- a/sql/updates/world/2014_01_24_06_world_gameobject_loot_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_06_world_gameobject_loot_template.sql
diff --git a/sql/updates/world/2014_01_24_07_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_07_world_sai.sql
index c1c00091be9..c1c00091be9 100644
--- a/sql/updates/world/2014_01_24_07_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_24_07_world_sai.sql
diff --git a/sql/updates/world/2014_01_26_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_00_world_sai.sql
index 671b0f081ba..671b0f081ba 100644
--- a/sql/updates/world/2014_01_26_00_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_00_world_sai.sql
diff --git a/sql/updates/world/2014_01_26_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_01_world_sai.sql
index b585b4a0547..b585b4a0547 100644
--- a/sql/updates/world/2014_01_26_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_01_world_sai.sql
diff --git a/sql/updates/world/2014_01_26_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_02_world_sai.sql
index 81d52f8e9e2..81d52f8e9e2 100644
--- a/sql/updates/world/2014_01_26_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_02_world_sai.sql
diff --git a/sql/updates/world/2014_01_26_04_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_04_world_sai.sql
index 0ca7e70159d..0ca7e70159d 100644
--- a/sql/updates/world/2014_01_26_04_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_04_world_sai.sql
diff --git a/sql/updates/world/2014_01_26_05_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_05_world_sai.sql
index 9f4b1092532..9f4b1092532 100644
--- a/sql/updates/world/2014_01_26_05_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_05_world_sai.sql
diff --git a/sql/updates/world/2014_01_26_06_world_spells.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_06_world_spells.sql
index ff00f9eddcb..ff00f9eddcb 100644
--- a/sql/updates/world/2014_01_26_06_world_spells.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_06_world_spells.sql
diff --git a/sql/updates/world/2014_01_26_07_world_spell_script_names.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_07_world_spell_script_names.sql
index b0809b98ece..b0809b98ece 100644
--- a/sql/updates/world/2014_01_26_07_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_07_world_spell_script_names.sql
diff --git a/sql/updates/world/2014_01_26_08_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_08_world_creature_template.sql
index 8adaaa07a50..8adaaa07a50 100644
--- a/sql/updates/world/2014_01_26_08_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_08_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_26_09_world_spell_script_names_335.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_09_world_spell_script_names_335.sql
index 664ff0f8228..664ff0f8228 100644
--- a/sql/updates/world/2014_01_26_09_world_spell_script_names_335.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_26_09_world_spell_script_names_335.sql
diff --git a/sql/updates/world/2014_01_27_00_world_creature_queststarter.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_00_world_creature_queststarter.sql
index d77ae243d5d..d77ae243d5d 100644
--- a/sql/updates/world/2014_01_27_00_world_creature_queststarter.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_00_world_creature_queststarter.sql
diff --git a/sql/updates/world/2014_01_27_01_world_creature.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_01_world_creature.sql
index 06383902c49..06383902c49 100644
--- a/sql/updates/world/2014_01_27_01_world_creature.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_01_world_creature.sql
diff --git a/sql/updates/world/2014_01_27_02_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_02_world_creature_template.sql
index 3f8a5288f38..3f8a5288f38 100644
--- a/sql/updates/world/2014_01_27_02_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_02_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_27_03_world_quest.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_03_world_quest.sql
index b431d304bb2..b431d304bb2 100644
--- a/sql/updates/world/2014_01_27_03_world_quest.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_03_world_quest.sql
diff --git a/sql/updates/world/2014_01_27_04_world_conditions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_04_world_conditions.sql
index 1ca0da434f3..1ca0da434f3 100644
--- a/sql/updates/world/2014_01_27_04_world_conditions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_04_world_conditions.sql
diff --git a/sql/updates/world/2014_01_27_05_world_spell_target_position.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_05_world_spell_target_position.sql
index 4dfb0ae26a4..4dfb0ae26a4 100644
--- a/sql/updates/world/2014_01_27_05_world_spell_target_position.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_05_world_spell_target_position.sql
diff --git a/sql/updates/world/2014_01_27_06_world_gameobject.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_06_world_gameobject.sql
index 80b613e7603..80b613e7603 100644
--- a/sql/updates/world/2014_01_27_06_world_gameobject.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_06_world_gameobject.sql
diff --git a/sql/updates/world/2014_01_27_07_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_07_world_creature_template.sql
index 6da1a479c5e..6da1a479c5e 100644
--- a/sql/updates/world/2014_01_27_07_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_07_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_27_08_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_08_world_creature_template.sql
index d5818d2c979..d5818d2c979 100644
--- a/sql/updates/world/2014_01_27_08_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_08_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_27_09_world_gameobject.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_09_world_gameobject.sql
index 0d4a56a1045..0d4a56a1045 100644
--- a/sql/updates/world/2014_01_27_09_world_gameobject.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_09_world_gameobject.sql
diff --git a/sql/updates/world/2014_01_27_10_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_10_world_creature_template.sql
index 6a47eb02805..6a47eb02805 100644
--- a/sql/updates/world/2014_01_27_10_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_10_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_27_11_world_creature_model_info.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_11_world_creature_model_info.sql
index adb94260fb9..adb94260fb9 100644
--- a/sql/updates/world/2014_01_27_11_world_creature_model_info.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_11_world_creature_model_info.sql
diff --git a/sql/updates/world/2014_01_27_12_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_12_world_creature_template.sql
index 7e88de7d20d..7e88de7d20d 100644
--- a/sql/updates/world/2014_01_27_12_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_12_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_27_13_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_13_world_creature_template.sql
index e7e6edf8ed5..e7e6edf8ed5 100644
--- a/sql/updates/world/2014_01_27_13_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_13_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_27_14_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_14_world_creature_template.sql
index 97aa6fe0fbb..97aa6fe0fbb 100644
--- a/sql/updates/world/2014_01_27_14_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_14_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_27_15_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_15_world_creature_template.sql
index d4ac82122c5..d4ac82122c5 100644
--- a/sql/updates/world/2014_01_27_15_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_15_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_27_16_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_16_world_creature_template.sql
index cf928d315d7..cf928d315d7 100644
--- a/sql/updates/world/2014_01_27_16_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_16_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_27_17_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_17_world_creature_template.sql
index a2ab1383b61..a2ab1383b61 100644
--- a/sql/updates/world/2014_01_27_17_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_17_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_27_18_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_18_world_creature_template.sql
index faad0b4ac7b..faad0b4ac7b 100644
--- a/sql/updates/world/2014_01_27_18_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_18_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_27_19_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_19_world_creature_template.sql
index a0127c48db8..a0127c48db8 100644
--- a/sql/updates/world/2014_01_27_19_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_19_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_27_20_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_20_world_creature_template.sql
index f28773dc0ec..f28773dc0ec 100644
--- a/sql/updates/world/2014_01_27_20_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_27_20_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_28_00_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_28_00_world_creature_template.sql
index adb67b75ac5..adb67b75ac5 100644
--- a/sql/updates/world/2014_01_28_00_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_28_00_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_28_01_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_28_01_world_creature_template.sql
index 725feaa6a3e..725feaa6a3e 100644
--- a/sql/updates/world/2014_01_28_01_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_28_01_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_28_02_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_28_02_world_creature_template.sql
index 81ec9d30f76..81ec9d30f76 100644
--- a/sql/updates/world/2014_01_28_02_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_28_02_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_28_03_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_28_03_world_creature_template.sql
index eaf09f891e7..eaf09f891e7 100644
--- a/sql/updates/world/2014_01_28_03_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_28_03_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_28_04_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_28_04_world_creature_template.sql
index ed8f6f0d5d3..ed8f6f0d5d3 100644
--- a/sql/updates/world/2014_01_28_04_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_28_04_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_28_05_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_28_05_world_creature_template.sql
index c6b6ccc7252..c6b6ccc7252 100644
--- a/sql/updates/world/2014_01_28_05_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_28_05_world_creature_template.sql
diff --git a/sql/updates/world/2014_01_29_00_world_spell_script_names.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_29_00_world_spell_script_names.sql
index 6e37da1abcc..6e37da1abcc 100644
--- a/sql/updates/world/2014_01_29_00_world_spell_script_names.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_29_00_world_spell_script_names.sql
diff --git a/sql/updates/world/2014_01_31_00_world_spell_custom_attr.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_31_00_world_spell_custom_attr.sql
index 488b09dc54e..488b09dc54e 100644
--- a/sql/updates/world/2014_01_31_00_world_spell_custom_attr.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_31_00_world_spell_custom_attr.sql
diff --git a/sql/updates/world/2014_01_31_01_world_item_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_31_01_world_item_template.sql
index f47e96cf403..f47e96cf403 100644
--- a/sql/updates/world/2014_01_31_01_world_item_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_01_31_01_world_item_template.sql
diff --git a/sql/updates/world/2014_02_01_01_world_creature_formations.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_01_01_world_creature_formations.sql
index 2e94aac45c4..2e94aac45c4 100644
--- a/sql/updates/world/2014_02_01_01_world_creature_formations.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_01_01_world_creature_formations.sql
diff --git a/sql/updates/world/2014_02_04_00_world_access_requirement.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_04_00_world_access_requirement.sql
index 5d2a89370f0..5d2a89370f0 100644
--- a/sql/updates/world/2014_02_04_00_world_access_requirement.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_04_00_world_access_requirement.sql
diff --git a/sql/updates/world/2014_02_04_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_04_01_world_sai.sql
index c29a64cf347..c29a64cf347 100644
--- a/sql/updates/world/2014_02_04_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_04_01_world_sai.sql
diff --git a/sql/updates/world/2014_02_06_00_world_gameobject.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_06_00_world_gameobject.sql
index ce516eae01a..ce516eae01a 100644
--- a/sql/updates/world/2014_02_06_00_world_gameobject.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_06_00_world_gameobject.sql
diff --git a/sql/updates/world/2014_02_08_00_world_item_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_08_00_world_item_template.sql
index fb611d9b16a..fb611d9b16a 100644
--- a/sql/updates/world/2014_02_08_00_world_item_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_08_00_world_item_template.sql
diff --git a/sql/updates/world/2014_02_09_00_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_09_00_world_creature_template.sql
index 226fc183385..226fc183385 100644
--- a/sql/updates/world/2014_02_09_00_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_09_00_world_creature_template.sql
diff --git a/sql/updates/world/2014_02_09_01_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_09_01_world_creature_template.sql
index 660ccac6268..660ccac6268 100644
--- a/sql/updates/world/2014_02_09_01_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_09_01_world_creature_template.sql
diff --git a/sql/updates/world/2014_02_09_02_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_09_02_world_creature_template.sql
index c6dafb9c68c..c6dafb9c68c 100644
--- a/sql/updates/world/2014_02_09_02_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_09_02_world_creature_template.sql
diff --git a/sql/updates/world/2014_02_09_03_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_09_03_world_creature_template.sql
index 0ce770493a6..0ce770493a6 100644
--- a/sql/updates/world/2014_02_09_03_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_09_03_world_creature_template.sql
diff --git a/sql/updates/world/2014_02_09_04_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_09_04_world_creature_template.sql
index 1cafe823d75..1cafe823d75 100644
--- a/sql/updates/world/2014_02_09_04_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_09_04_world_creature_template.sql
diff --git a/sql/updates/world/2014_02_09_05_world_conditions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_09_05_world_conditions.sql
index 6241c62417c..6241c62417c 100644
--- a/sql/updates/world/2014_02_09_05_world_conditions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_09_05_world_conditions.sql
diff --git a/sql/updates/world/2014_02_09_06_world_achievements.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_09_06_world_achievements.sql
index a64799b48df..a64799b48df 100644
--- a/sql/updates/world/2014_02_09_06_world_achievements.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_09_06_world_achievements.sql
diff --git a/sql/updates/world/2014_02_11_00_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_11_00_world_creature_template.sql
index 7b671d7fa34..7b671d7fa34 100644
--- a/sql/updates/world/2014_02_11_00_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_11_00_world_creature_template.sql
diff --git a/sql/updates/world/2014_02_12_00_world_quest_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_12_00_world_quest_template.sql
index 8021af4a2a2..8021af4a2a2 100644
--- a/sql/updates/world/2014_02_12_00_world_quest_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_12_00_world_quest_template.sql
diff --git a/sql/updates/world/2014_02_16_00_world_creature.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_16_00_world_creature.sql
index 0ddaa9a54d8..0ddaa9a54d8 100644
--- a/sql/updates/world/2014_02_16_00_world_creature.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_16_00_world_creature.sql
diff --git a/sql/updates/world/2014_02_16_01_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_16_01_world_creature_template.sql
index 7eb6d3fa38f..7eb6d3fa38f 100644
--- a/sql/updates/world/2014_02_16_01_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_16_01_world_creature_template.sql
diff --git a/sql/updates/world/2014_02_16_02_world_creature.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_16_02_world_creature.sql
index 00ada626a5c..00ada626a5c 100644
--- a/sql/updates/world/2014_02_16_02_world_creature.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_16_02_world_creature.sql
diff --git a/sql/updates/world/2014_02_16_03_world_reputation_reward_rate.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_16_03_world_reputation_reward_rate.sql
index 9da62bf7a75..9da62bf7a75 100644
--- a/sql/updates/world/2014_02_16_03_world_reputation_reward_rate.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_16_03_world_reputation_reward_rate.sql
diff --git a/sql/updates/world/2014_02_18_00_world_creature.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_18_00_world_creature.sql
index cb1ba931791..cb1ba931791 100644
--- a/sql/updates/world/2014_02_18_00_world_creature.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_18_00_world_creature.sql
diff --git a/sql/updates/world/2014_02_20_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_00_world_misc.sql
index f7d12a54d42..f7d12a54d42 100644
--- a/sql/updates/world/2014_02_20_00_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_00_world_misc.sql
diff --git a/sql/updates/world/2014_02_20_01_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_01_world_misc.sql
index bfa0ed01890..bfa0ed01890 100644
--- a/sql/updates/world/2014_02_20_01_world_misc.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_01_world_misc.sql
diff --git a/sql/updates/world/2014_02_20_02_world_creature.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_02_world_creature.sql
index 7a81afa2631..7a81afa2631 100644
--- a/sql/updates/world/2014_02_20_02_world_creature.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_02_world_creature.sql
diff --git a/sql/updates/world/2014_02_20_03_world_quest_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_03_world_quest_template.sql
index e411a9dc5b2..e411a9dc5b2 100644
--- a/sql/updates/world/2014_02_20_03_world_quest_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_03_world_quest_template.sql
diff --git a/sql/updates/world/2014_02_20_04_world_creature.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_04_world_creature.sql
index 4fbc704a839..4fbc704a839 100644
--- a/sql/updates/world/2014_02_20_04_world_creature.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_04_world_creature.sql
diff --git a/sql/updates/world/2014_02_20_05_world_creature.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_05_world_creature.sql
index 476ea180254..476ea180254 100644
--- a/sql/updates/world/2014_02_20_05_world_creature.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_05_world_creature.sql
diff --git a/sql/updates/world/2014_02_20_06_world_creature.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_06_world_creature.sql
index ce802dab5ac..ce802dab5ac 100644
--- a/sql/updates/world/2014_02_20_06_world_creature.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_06_world_creature.sql
diff --git a/sql/updates/world/2014_02_20_07_world_creature.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_07_world_creature.sql
index f8b8a42b91f..f8b8a42b91f 100644
--- a/sql/updates/world/2014_02_20_07_world_creature.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_20_07_world_creature.sql
diff --git a/sql/updates/world/2014_02_23_00_world_conditions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_23_00_world_conditions.sql
index 4ea26bfcee0..4ea26bfcee0 100644
--- a/sql/updates/world/2014_02_23_00_world_conditions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_23_00_world_conditions.sql
diff --git a/sql/updates/world/2014_02_23_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_23_01_world_sai.sql
index ad6a9db05bd..ad6a9db05bd 100644
--- a/sql/updates/world/2014_02_23_01_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_23_01_world_sai.sql
diff --git a/sql/updates/world/2014_02_23_02_world_item_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_23_02_world_item_template.sql
index ac736e7f3db..ac736e7f3db 100644
--- a/sql/updates/world/2014_02_23_02_world_item_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_23_02_world_item_template.sql
diff --git a/sql/updates/world/2014_02_23_03_world_conditions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_23_03_world_conditions.sql
index 1b3052f1fa1..1b3052f1fa1 100644
--- a/sql/updates/world/2014_02_23_03_world_conditions.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_23_03_world_conditions.sql
diff --git a/sql/updates/world/2014_02_23_04_world_item_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_23_04_world_item_template.sql
index 599a9072a84..599a9072a84 100644
--- a/sql/updates/world/2014_02_23_04_world_item_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_23_04_world_item_template.sql
diff --git a/sql/updates/world/2014_02_27_00_world_gameobject.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_27_00_world_gameobject.sql
index 1a047019790..1a047019790 100644
--- a/sql/updates/world/2014_02_27_00_world_gameobject.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_27_00_world_gameobject.sql
diff --git a/sql/updates/world/2014_02_27_01_world_npc_trainer.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_27_01_world_npc_trainer.sql
index 919232400bf..919232400bf 100644
--- a/sql/updates/world/2014_02_27_01_world_npc_trainer.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_27_01_world_npc_trainer.sql
diff --git a/sql/updates/world/2014_02_27_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_27_02_world_sai.sql
index 3f05493f5e8..3f05493f5e8 100644
--- a/sql/updates/world/2014_02_27_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_27_02_world_sai.sql
diff --git a/sql/updates/world/2014_02_27_03_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_27_03_world_sai.sql
index 959e7016fec..959e7016fec 100644
--- a/sql/updates/world/2014_02_27_03_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_27_03_world_sai.sql
diff --git a/sql/updates/world/2014_02_27_04_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_27_04_world_sai.sql
index 83a46c0adb4..83a46c0adb4 100644
--- a/sql/updates/world/2014_02_27_04_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_02_27_04_world_sai.sql
diff --git a/sql/updates/world/2014_03_03_00_world_creature_text.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_03_00_world_creature_text.sql
index 97d53e1625b..97d53e1625b 100644
--- a/sql/updates/world/2014_03_03_00_world_creature_text.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_03_00_world_creature_text.sql
diff --git a/sql/updates/world/2014_03_03_01_world_gossip.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_03_01_world_gossip.sql
index 8ddde0d6254..8ddde0d6254 100644
--- a/sql/updates/world/2014_03_03_01_world_gossip.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_03_01_world_gossip.sql
diff --git a/sql/updates/world/2014_03_03_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_03_02_world_sai.sql
index 236f989e1c4..236f989e1c4 100644
--- a/sql/updates/world/2014_03_03_02_world_sai.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_03_02_world_sai.sql
diff --git a/sql/updates/world/2014_03_04_00_world_creature_loot_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_04_00_world_creature_loot_template.sql
index 4f67d98b4ac..4f67d98b4ac 100644
--- a/sql/updates/world/2014_03_04_00_world_creature_loot_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_04_00_world_creature_loot_template.sql
diff --git a/sql/updates/world/2014_03_06_00_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_06_00_world_creature_template.sql
index 43e693d2cdb..43e693d2cdb 100644
--- a/sql/updates/world/2014_03_06_00_world_creature_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_06_00_world_creature_template.sql
diff --git a/sql/updates/world/2014_03_06_01_world_item_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_06_01_world_item_template.sql
index 198e27f26eb..198e27f26eb 100644
--- a/sql/updates/world/2014_03_06_01_world_item_template.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_06_01_world_item_template.sql
diff --git a/sql/updates/world/2014_03_06_02_world_battlemaster_entry.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_06_02_world_battlemaster_entry.sql
index 47a679c2c80..47a679c2c80 100644
--- a/sql/updates/world/2014_03_06_02_world_battlemaster_entry.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_06_02_world_battlemaster_entry.sql
diff --git a/sql/updates/world/2014_03_09_00_world_spell_group.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_09_00_world_spell_group.sql
index 3f9dbffd98f..3f9dbffd98f 100644
--- a/sql/updates/world/2014_03_09_00_world_spell_group.sql
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_09_00_world_spell_group.sql
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_13_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_13_00_world_sai.sql
new file mode 100644
index 00000000000..d4e7ec5881c
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_13_00_world_sai.sql
@@ -0,0 +1,6 @@
+--
+UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=22932;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=22932 AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(22932,0,0,0,25,0,100,0,0,0,0,0,11,39680,0,0,0,0,0,1,0,0,0,0,0,0,0,'Sai''kkal the Elder - On Spawn/Respawn/After Combat - Cast Sai''kkal Invisibility'),
+(22932,0,1,0,62,0,100,0,8617,0,0,0,33,22932,0,0,0,0,0,7,0,0,0,0,0,0,0,'Sai''kkal the Elder - On Gossip Menu Option Selected - Give Quest Credit');
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_13_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_13_01_world_sai.sql
new file mode 100644
index 00000000000..93697d52a66
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_13_01_world_sai.sql
@@ -0,0 +1,2 @@
+--
+UPDATE `smart_scripts` SET `target_param3`=0, `target_x`=8219, `target_y`=2187.09, `target_z`=499.82, `target_o`=3.10669 WHERE `entryorguid`=32347;
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_00_world_creature.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_00_world_creature.sql
new file mode 100644
index 00000000000..56f9c3f00df
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_00_world_creature.sql
@@ -0,0 +1,3 @@
+--
+UPDATE `creature_template` SET `ainame`='' WHERE `entry` IN (2406,2384);
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (2406,2384);
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_01_world_sai.sql
new file mode 100644
index 00000000000..5ff244346f2
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_01_world_sai.sql
@@ -0,0 +1,7 @@
+--
+DELETE FROM `smart_scripts` WHERE `entryorguid`=5089 AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(5089,0,0,1,2,0,100,1,0,20,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Balos Jacken - Between 0-20% Health - Say Line 0'),
+(5089,0,1,2,61,0,100,0,0,0,0,0,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'Balos Jacken - Link With Previous - Set Faction 35'),
+(5089,0,2,0,61,0,100,0,0,0,0,0,24,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Balos Jacken - Link With Previous - Evade'),
+(5089,0,3,0,1,0,100,0,120000,120000,120000,120000,2,54,0,0,0,0,0,1,0,0,0,0,0,0,0,'Balos Jacken - Out of Combat - Set Faction 54');
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_02_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_02_world_sai.sql
new file mode 100644
index 00000000000..775c6aa1d0c
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_02_world_sai.sql
@@ -0,0 +1,7 @@
+UPDATE `creature_template` SET `ainame`='SmartAI' WHERE `entry`=16031;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=16031 AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(16031,0,0,0,11,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ysida Harmon - On Respawn - Say Line 0');
+DELETE FROM `creature_text` WHERE `entry`=16031;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+(16031,0,0,'You did it... you''ve slain Baron Rivendare! The Argent Dawn shall hear of your valiant deeds!',12,0,0,0,0,0,'');
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_03_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_03_world_sai.sql
new file mode 100644
index 00000000000..2e5ce237dbe
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_03_world_sai.sql
@@ -0,0 +1,4 @@
+--
+UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid`=28256 AND `source_type`=1;
+UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid`=2825600 AND `source_type`=9 AND `id` BETWEEN 0 AND 4;
+UPDATE `smart_scripts` SET `target_type`=18, `target_param1`=30 WHERE `entryorguid`=2825600 AND `source_type`=9 AND `id`=5;
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_04_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_04_world_sai.sql
new file mode 100644
index 00000000000..e6d38d73174
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_04_world_sai.sql
@@ -0,0 +1,2 @@
+--
+UPDATE `smart_scripts` SET `action_type`=85, `action_param2`=2 WHERE `entryorguid` IN(5284,5285,5286,5287) AND `source_type`=2;
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_05_world_item_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_05_world_item_template.sql
new file mode 100644
index 00000000000..6a93d64ea92
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_16_05_world_item_template.sql
@@ -0,0 +1,3 @@
+--
+UPDATE `item_template` SET `subclass`=0, `WDBVerified`=-15595 WHERE `entry`=33604;
+UPDATE `item_template` SET `spelltrigger_3`=0, `spellid_3`=0, `WDBVerified`=-15595 WHERE `entry`=44851;
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_17_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_17_00_world_sai.sql
new file mode 100644
index 00000000000..c244170d5e6
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_17_00_world_sai.sql
@@ -0,0 +1,2 @@
+--
+UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=2249 AND `source_type`=0 AND `id`=0;
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_18_00_world_quest.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_18_00_world_quest.sql
new file mode 100644
index 00000000000..2ca49917a12
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_18_00_world_quest.sql
@@ -0,0 +1,20 @@
+-- The Splintered Throne
+UPDATE `quest_template` SET `NextQuestId`=24912 WHERE `Id`=24548;
+
+-- Shadowmourne...
+UPDATE `quest_template` SET `PrevQuestId`=24912 WHERE `Id`=24549;
+
+-- Empowerment
+UPDATE `quest_template` SET `PrevQuestId`=24548, `NextQuestId`=24549 WHERE `Id`=24912;
+
+DELETE FROM `creature_queststarter` WHERE `quest`=24912;
+INSERT INTO `creature_queststarter`(`id`,`quest`) VALUE
+(37120,24912);
+
+DELETE FROM `creature_questender` WHERE `quest`=24912;
+INSERT INTO `creature_questender`(`id`,`quest`) VALUE
+(37120,24912);
+
+-- Highlord Darion Mograine
+UPDATE `creature_template` SET `AIName`='' WHERE `entry`=37120;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=37120 AND `source_type`=0;
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_18_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_18_00_world_sai.sql
new file mode 100644
index 00000000000..126abb57f8c
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_18_00_world_sai.sql
@@ -0,0 +1,62 @@
+UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry`=467;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=467 AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(467,0,0,1,19,0,100,0,155,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'The Defias Traitor - On Accepted Quest ''The Defias Brotherhood'' - Say Line 0'),
+(467,0,1,2,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,'The Defias Traitor - Link With Previous - Store Target List'),
+(467,0,2,3,61,0,100,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'The Defias Traitor - Link With Previous - Remove npcflag ''Quest Giver'),
+(467,0,3,0,61,0,100,0,0,0,0,0,53,1,467,0,0,0,2,7,0,0,0,0,0,0,0,'The Defias Traitor - Link WIth Previous - Start WP'),
+(467,0,4,0,40,0,100,0,36,467,0,0,59,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'The Defias Traitor - On WP Reached 36 - Disable run'),
+(467,0,5,0,40,0,100,0,37,467,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'The Defias Traitor - On WP Reached 37 - Say Line 1'),
+(467,0,6,7,40,0,100,0,45,467,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'The Defias Traitor - On WP Reached 45 - Say Line 2'),
+(467,0,7,8,61,0,100,0,0,0,0,0,15,155,0,0,0,0,0,12,1,0,0,0,0,0,0,'The Defias Traitor - Link With Previous - Area Explored Or Event Happens'),
+(467,0,8,0,61,0,100,1,0,0,0,0,41,3000,0,0,0,0,0,1,0,0,0,0,0,0,0,'The Defias Traitor - Link WIth Previous - Despawn'),
+(467,0,9,0,4,0,100,0,0,0,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'The Defias Traitor - On Aggro - Say Line 3');
+
+DELETE FROM `script_waypoint` WHERE `entry`=467;
+DELETE FROM `waypoints` WHERE `entry`=467;
+INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES
+(467,1,-10508.4,1068,55.21,''),
+(467,2,-10518.3,1074.84,53.96,''),
+(467,3,-10534.8,1081.92,49.88,''),
+(467,4,-10546.5,1084.88,50.13,''),
+(467,5,-10555.3,1084.45,45.75,''),
+(467,6,-10566.6,1083.53,42.1,''),
+(467,7,-10575.8,1082.34,39.46,''),
+(467,8,-10585.7,1081.08,37.77,''),
+(467,9,-10600.1,1078.19,36.23,''),
+(467,10,-10608.7,1076.08,35.88,''),
+(467,11,-10621.3,1073,35.4,''),
+(467,12,-10638.1,1060.18,33.61,''),
+(467,13,-10655.9,1038.99,33.48,''),
+(467,14,-10664.7,1030.54,32.7,''),
+(467,15,-10708.7,1033.86,33.32,''),
+(467,16,-10754.4,1017.93,32.79,''),
+(467,17,-10802.3,1018.01,32.16,''),
+(467,18,-10832.6,1009.04,32.71,''),
+(467,19,-10866.6,1006.51,31.71,''),
+(467,20,-10880,1005.1,32.84,''),
+(467,21,-10892.5,1001.32,34.46,''),
+(467,22,-10906.1,997.11,36.15,''),
+(467,23,-10922.3,1002.23,35.74,''),
+(467,24,-10936.3,1023.38,36.52,''),
+(467,25,-10933.3,1052.61,35.85,''),
+(467,26,-10940.2,1077.66,36.49,''),
+(467,27,-10957.1,1099.33,36.83,''),
+(467,28,-10956.5,1119.9,36.73,''),
+(467,29,-10939.3,1150.75,37.42,''),
+(467,30,-10915.1,1202.09,36.55,''),
+(467,31,-10892.6,1257.03,33.37,''),
+(467,32,-10891.9,1306.66,35.45,''),
+(467,33,-10896.2,1327.86,37.77,''),
+(467,34,-10906,1368.05,40.91,''),
+(467,35,-10910.2,1389.33,42.62,''),
+(467,36,-10915.4,1417.72,42.93,''),
+(467,37,-10926.4,1421.18,43.04,'walk here and say'),
+(467,38,-10952.3,1421.74,43.4,''),
+(467,39,-10980,1411.38,42.79,''),
+(467,40,-11006.1,1420.47,43.26,''),
+(467,41,-11022,1450.59,43.09,''),
+(467,42,-11025.4,1491.59,43.15,''),
+(467,43,-11036.1,1508.32,43.28,''),
+(467,44,-11060.7,1526.72,43.19,''),
+(467,45,-11072.8,1527.77,43.2,'say and quest credit');
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_19_00_world_conditions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_19_00_world_conditions.sql
new file mode 100644
index 00000000000..fdbb175017d
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_19_00_world_conditions.sql
@@ -0,0 +1,4 @@
+UPDATE `creature_template` SET `scriptname`='' WHERE `entry`=3052;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=24 AND `SourceEntry`=0;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(15,24,0,0,0,8,0,770,0,0,1,0,0,'','Show gossip menu option if player has no quest ''The Demon Scarred Cloak'' rewarded');
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_19_00_world_tele.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_19_00_world_tele.sql
new file mode 100644
index 00000000000..d6fd0460bb9
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_19_00_world_tele.sql
@@ -0,0 +1,2 @@
+UPDATE `game_tele` SET `name`='CircleOfOuterBinding' WHERE `id`=211;
+UPDATE `game_tele` SET `name`='CircleOfInnerBinding' WHERE `id`=210;
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_19_01_world_conditions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_19_01_world_conditions.sql
new file mode 100644
index 00000000000..8e983892eab
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_19_01_world_conditions.sql
@@ -0,0 +1,9 @@
+UPDATE `creature_template` SET `scriptname`='' WHERE `entry`=7564;
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id`=922;
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`) VALUES
+(922,0,1,'I''d like to browse your goods.',3,128,0,0,0,0,NULL);
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=922 AND `SourceEntry`=0;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(15,922,0,0,0,8,0,2662,0,0,0,0,0,'','Show gossip menu option if only player has ''Noggenfogger Elixir'' quest rewarded');
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_19_01_world_reputation_reward_rate.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_19_01_world_reputation_reward_rate.sql
new file mode 100644
index 00000000000..3013a311b5d
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_19_01_world_reputation_reward_rate.sql
@@ -0,0 +1,2 @@
+--
+UPDATE `reputation_reward_rate` SET `quest_repeatable_rate`=4 WHERE `faction`=576;
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_20_00_world_creature_equip_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_20_00_world_creature_equip_template.sql
new file mode 100644
index 00000000000..10df4e459f4
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_20_00_world_creature_equip_template.sql
@@ -0,0 +1 @@
+UPDATE `creature_equip_template` SET `id`=1 WHERE `id`=0;
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_20_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_20_01_world_sai.sql
new file mode 100644
index 00000000000..8b8e318b524
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_20_01_world_sai.sql
@@ -0,0 +1,4 @@
+UPDATE `creature_template` SET `ainame`='SmartAI', `scriptname`='' WHERE `entry`=8816;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=8816 AND `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(8816,0,0,0,62,0,100,0,1541,0,0,0,11,12885,2,0,0,0,0,7,0,0,0,0,0,0,0,'On Gossip Option Selected - Cast ''Teleport to Razelikh''');
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_21_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_21_00_world_sai.sql
new file mode 100644
index 00000000000..830ff4ab00b
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_21_00_world_sai.sql
@@ -0,0 +1,10 @@
+--
+UPDATE `smart_scripts` SET `event_phase_mask`=1, `comment`='Bloodscalp Axe Thrower - Within 5-30 Range - Cast \'Throw\' (Phase 1)' WHERE `entryorguid`=694 AND `event_phase_mask`=2 AND `comment`='Bloodscalp Axe Thrower - Within 5-30 Range - Cast \'Throw\' (Phase 2)';
+UPDATE `smart_scripts` SET `event_phase_mask`=1, `comment`='Bloodscalp Axe Thrower - Within 5-30 Range - Set Sheath Ranged (Phase 1)' WHERE `entryorguid`=694 AND `event_phase_mask`=2 AND `comment`='Bloodscalp Axe Thrower - Within 5-30 Range - Set Sheath Ranged (Phase 2)';
+UPDATE `smart_scripts` SET `event_phase_mask`=1, `comment`='Bloodscalp Axe Thrower - Within 25-80 Range - Enable Combat Movement (Phase 1)' WHERE `entryorguid`=694 AND `event_phase_mask`=2 AND `comment`='Bloodscalp Axe Thrower - Within 25-80 Range - Enable Combat Movement (Phase 2)';
+UPDATE `smart_scripts` SET `event_phase_mask`=1, `comment`='Bloodscalp Axe Thrower - Within 25-80 Range - Start Attacking (Phase 1)' WHERE `entryorguid`=694 AND `event_phase_mask`=2 AND `comment`='Bloodscalp Axe Thrower - Within 25-80 Range - Start Attacking (Phase 2)';
+UPDATE `smart_scripts` SET `event_phase_mask`=1, `comment`='Bloodscalp Axe Thrower - Within 0-5 Range - Enable Combat Movement (Phase 1)' WHERE `entryorguid`=694 AND `event_phase_mask`=2 AND `comment`='Bloodscalp Axe Thrower - Within 0-5 Range - Enable Combat Movement (Phase 2)';
+UPDATE `smart_scripts` SET `event_phase_mask`=1, `comment`='Bloodscalp Axe Thrower - Within 0-5 Range - Set Sheath Melee (Phase 1)' WHERE `entryorguid`=694 AND `event_phase_mask`=2 AND `comment`='Bloodscalp Axe Thrower - Within 0-5 Range - Set Sheath Melee (Phase 2)';
+UPDATE `smart_scripts` SET `event_phase_mask`=1, `comment`='Bloodscalp Axe Thrower - Within 0-5 Range - Start Attacking (Phase 1)' WHERE `entryorguid`=694 AND `event_phase_mask`=2 AND `comment`='Bloodscalp Axe Thrower - Within 0-5 Range - Start Attacking (Phase 2)';
+UPDATE `smart_scripts` SET `event_phase_mask`=1, `comment`='Bloodscalp Axe Thrower - Within 5-15 Range - Disable Combat Movement (Phase 1)' WHERE `entryorguid`=694 AND `event_phase_mask`=2 AND `comment`='Bloodscalp Axe Thrower - Within 5-15 Range - Disable Combat Movement (Phase 2)';
+UPDATE `smart_scripts` SET `event_phase_mask`=1, `comment`='Bloodscalp Axe Thrower - Within 5-15 Range - Stop Attacking (Phase 1)' WHERE `entryorguid`=694 AND `event_phase_mask`=2 AND `comment`='Bloodscalp Axe Thrower - Within 5-15 Range - Stop Attacking (Phase 2)';
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_22_00_world_creature_template.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_22_00_world_creature_template.sql
new file mode 100644
index 00000000000..21409b157c2
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_22_00_world_creature_template.sql
@@ -0,0 +1 @@
+UPDATE `creature_template` SET `ScriptName`='' WHERE `entry`=18240;
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_22_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_22_01_world_sai.sql
new file mode 100644
index 00000000000..1879cfcff75
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_22_01_world_sai.sql
@@ -0,0 +1,2 @@
+--
+UPDATE `smart_scripts` SET `action_type`=86, `action_param1`=46377, `action_param2`=3, `action_param3`=19, `action_param4`=25987, `action_param5`=50, `target_type`=19, `target_param1`=25987, `target_param2`=50 WHERE `entryorguid`=24601 AND `source_type`=0 AND `id`=2 AND `link`=0;
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_22_02_world_creature_text.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_22_02_world_creature_text.sql
new file mode 100644
index 00000000000..89014367a71
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_22_02_world_creature_text.sql
@@ -0,0 +1,12 @@
+SET @ENTRY := 23557;
+DELETE FROM `creature_text` WHERE `entry`=@ENTRY;
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
+(@ENTRY, 0, 0, "Get on your knees and bow to da fang and claw!", 14, 0, 100, 0, 0, 12020, "Halazzi - Aggro"),
+(@ENTRY, 1, 0, "You gonna leave in pieces!", 14, 0, 100, 0, 0, 0, "Halazzi - Saber"),
+(@ENTRY, 1, 1, "Me gonna carve ya now!", 14, 0, 100, 0, 0, 0, "Halazzi - Saber"),
+(@ENTRY, 2, 0, "Me gonna carve ya now!", 14, 0, 100, 0, 0, 12021, "Halazzi - Split"),
+(@ENTRY, 3, 0, "Spirit, come back to me!", 14, 0, 100, 0, 0, 12022, "Halazzi - Merge"),
+(@ENTRY, 4, 0, "You cant fight the power!", 14, 0, 100, 0, 0, 12026, "Halazzi - Killed unit"),
+(@ENTRY, 4, 1, "You gonna fail!", 14, 0, 100, 0, 0, 12027, "Halazzi - Killed unit"),
+(@ENTRY, 5, 0, "Chaga... choka'jinn.", 14, 0, 100, 0, 0, 12028, "Halazzi - Death"),
+(@ENTRY, 6, 0, "Whatch you be doing? Pissin' yourselves...", 14, 0, 100, 0, 0, 12025, "Halazzi - Death");
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_23_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_23_00_world_misc.sql
new file mode 100644
index 00000000000..b57f6e09bb9
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_23_00_world_misc.sql
@@ -0,0 +1,397 @@
+UPDATE `creature_template` SET `ScriptName`='npc_gunship' WHERE `entry`=37215; -- Orgrim's Hammer
+UPDATE `creature_template` SET `ScriptName`='npc_gunship' WHERE `entry`=37540; -- The Skybreaker
+UPDATE `creature_template` SET `ScriptName`='npc_high_overlord_saurfang_igb' WHERE `entry`=36939; -- High Overlord Saurfang
+UPDATE `creature_template` SET `ScriptName`='npc_muradin_bronzebeard_igb' WHERE `entry`=36948; -- Muradin Bronzebeard
+UPDATE `creature_template` SET `ScriptName`='npc_zafod_boombox' WHERE `entry`=37184; -- Zafod Boombox
+UPDATE `creature_template` SET `ScriptName`='npc_gunship_boarding_leader' WHERE `entry` IN (36961,36960); -- Skybreaker Sergeant, Kor'kron Sergeant
+UPDATE `creature_template` SET `ScriptName`='npc_gunship_boarding_add' WHERE `entry` IN (36950,36957); -- Skybreaker Marine, Kor'kron Reaver
+UPDATE `creature_template` SET `ScriptName`='npc_gunship_gunner' WHERE `entry` IN (36969,36968); -- Skybreaker Rifleman, Kor'kron Axethrower
+UPDATE `creature_template` SET `ScriptName`='npc_gunship_rocketeer' WHERE `entry` IN (36978,36982); -- Skybreaker Mortar Soldier, Kor'kron Rocketeer
+UPDATE `creature_template` SET `ScriptName`='npc_gunship_mage' WHERE `entry` IN (37116,37117); -- Skybreaker Sorcerer, Kor'kron Battle-Mage
+UPDATE `creature_template` SET `ScriptName`='npc_gunship_cannon' WHERE `entry` IN (36838,36839); -- Alliance Gunship Cannon, Horde Gunship Cannon
+
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_jokkum_eject_all';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_the_lich_king_eject_all_passengers';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_gen_eject_all_passengers';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_igb_rocket_pack';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_igb_rocket_pack_useable';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_igb_on_gunship_deck';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_igb_periodic_trigger_with_power_cost';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_igb_cannon_blast';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_igb_incinerating_blast';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_igb_overheat';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_igb_below_zero';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_igb_teleport_to_enemy_ship';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_igb_burning_pitch_selector';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_igb_burning_pitch';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_igb_rocket_artillery';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_igb_rocket_artillery_explosion';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_igb_gunship_fall_teleport';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_igb_check_for_players';
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_igb_teleport_players_on_victory';
+INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
+(50630,'spell_gen_eject_all_passengers'),
+(63109,'spell_gen_eject_all_passengers'),
+(68576,'spell_gen_eject_all_passengers'),
+(68721,'spell_igb_rocket_pack'),
+(70348,'spell_igb_rocket_pack_useable'),
+(70120,'spell_igb_on_gunship_deck'),
+(70121,'spell_igb_on_gunship_deck'),
+(69470,'spell_igb_periodic_trigger_with_power_cost'),
+(69487,'spell_igb_periodic_trigger_with_power_cost'),
+(69399,'spell_igb_cannon_blast'),
+(70172,'spell_igb_cannon_blast'),
+(69402,'spell_igb_incinerating_blast'),
+(70175,'spell_igb_incinerating_blast'),
+(69487,'spell_igb_overheat'),
+(69705,'spell_igb_below_zero'),
+(70104,'spell_igb_teleport_to_enemy_ship'),
+(70397,'spell_igb_burning_pitch_selector'),
+(70403,'spell_igb_burning_pitch_selector'),
+(71335,'spell_igb_burning_pitch'),
+(71339,'spell_igb_burning_pitch'),
+(69678,'spell_igb_rocket_artillery'),
+(70609,'spell_igb_rocket_artillery'),
+(69679,'spell_igb_rocket_artillery_explosion'),
+(67335,'spell_igb_gunship_fall_teleport'),
+(70331,'spell_igb_check_for_players'),
+(72340,'spell_igb_teleport_players_on_victory');
+
+UPDATE `creature_template` SET `difficulty_entry_1`=0,`difficulty_entry_2`=0,`difficulty_entry_3`=0 WHERE `entry`=36838; -- Alliance Gunship Cannon
+UPDATE `creature_template` SET `difficulty_entry_1`=0,`difficulty_entry_2`=0,`difficulty_entry_3`=0 WHERE `entry`=36839; -- Horde Gunship Cannon
+UPDATE `creature_template` SET `difficulty_entry_1`=0,`difficulty_entry_2`=0,`difficulty_entry_3`=0 WHERE `entry`=36970; -- Skybreaker Deckhand
+UPDATE `creature_template` SET `difficulty_entry_1`=0,`difficulty_entry_2`=0,`difficulty_entry_3`=0 WHERE `entry`=36971; -- Orgrim's Hammer Crew
+UPDATE `creature_template` SET `difficulty_entry_1`=38157,`difficulty_entry_2`=38639,`difficulty_entry_3`=38640 WHERE `entry`=36948; -- Muradin Bronzebeard
+UPDATE `creature_template` SET `difficulty_entry_1`=38156,`difficulty_entry_2`=38637,`difficulty_entry_3`=38638 WHERE `entry`=36939; -- High Overlord Saurfang
+UPDATE `creature_template` SET `difficulty_entry_1`=38128,`difficulty_entry_2`=38699,`difficulty_entry_3`=38700 WHERE `entry`=37540; -- The Skybreaker
+UPDATE `creature_template` SET `difficulty_entry_1`=38129,`difficulty_entry_2`=38701,`difficulty_entry_3`=38702 WHERE `entry`=37215; -- Orgrim's Hammer
+UPDATE `creature_template` SET `difficulty_entry_1`=38256,`difficulty_entry_2`=38693,`difficulty_entry_3`=38694 WHERE `entry`=37116; -- Skybreaker Sorcerer
+UPDATE `creature_template` SET `difficulty_entry_1`=38408,`difficulty_entry_2`=38689,`difficulty_entry_3`=38690 WHERE `entry`=36969; -- Skybreaker Rifleman
+UPDATE `creature_template` SET `difficulty_entry_1`=38407,`difficulty_entry_2`=38687,`difficulty_entry_3`=38688 WHERE `entry`=36978; -- Skybreaker Mortar Soldier
+UPDATE `creature_template` SET `difficulty_entry_1`=38406,`difficulty_entry_2`=38685,`difficulty_entry_3`=38686 WHERE `entry`=36950; -- Skybreaker Marine
+UPDATE `creature_template` SET `difficulty_entry_1`=38261,`difficulty_entry_2`=38691,`difficulty_entry_3`=38692 WHERE `entry`=36961; -- Skybreaker Sergeant
+UPDATE `creature_template` SET `difficulty_entry_1`=38257,`difficulty_entry_2`=38677,`difficulty_entry_3`=38678 WHERE `entry`=37117; -- Kor'kron Battle-Mage
+UPDATE `creature_template` SET `difficulty_entry_1`=38403,`difficulty_entry_2`=38675,`difficulty_entry_3`=38676 WHERE `entry`=36968; -- Kor'kron Axethrower
+UPDATE `creature_template` SET `difficulty_entry_1`=38405,`difficulty_entry_2`=38681,`difficulty_entry_3`=38682 WHERE `entry`=36982; -- Kor'kron Rocketeer
+UPDATE `creature_template` SET `difficulty_entry_1`=38404,`difficulty_entry_2`=38679,`difficulty_entry_3`=38680 WHERE `entry`=36957; -- Kor'kron Reaver
+UPDATE `creature_template` SET `difficulty_entry_1`=38262,`difficulty_entry_2`=38683,`difficulty_entry_3`=38684 WHERE `entry`=36960; -- Kor'kron Sergeant
+
+UPDATE `creature_template` SET `spell1`=0,`spell2`=0,`spell3`=0,`spell4`=0,`spell5`=0,`spell6`=0,`spell7`=0,`spell8`=0 WHERE `entry` IN (36838,36839,36970,36971,36948,38157,38639,38640,36939,38156,38638,38637,37540,38128,38699,38700,37215,38129,38701,38702,
+37116,38256,38693,38694,36969,38408,38689,38690,36978,38407,38687,38688,36950,38406,38685,38686,36961,38261,38691,38692,37117,38257,38677,38678,36968,38403,38675,38676,36982,38405,38681,38682,36957,38404,38679,38680,36960,38262,38683,38684,37227,37488);
+
+UPDATE `creature_template` SET `minlevel`=80,`maxlevel`=80,`exp`=0,`faction_A`=1665,`faction_H`=1665,`npcflag`=0x1000000,`speed_walk`=1,`speed_run`=1,`unit_class`=4,`unit_flags`=0x4000,`unit_flags2`=0,`dynamicflags`=0,`baseattacktime`=2000,`spell1`=69399,`spell2`=70174,`VehicleId`=554,`InhabitType`=1,`mechanic_immune_mask`=650854267 WHERE `entry`=36838; -- Alliance Gunship Cannon
+UPDATE `creature_template` SET `minlevel`=80,`maxlevel`=80,`exp`=0,`faction_A`=1665,`faction_H`=1665,`npcflag`=0x1000000,`speed_walk`=1,`speed_run`=1,`unit_class`=4,`unit_flags`=0x4000,`unit_flags2`=0,`dynamicflags`=0,`baseattacktime`=2000,`spell1`=70172,`spell2`=69401,`VehicleId`=555,`InhabitType`=1,`mechanic_immune_mask`=650854267 WHERE `entry`=36839; -- Horde Gunship Cannon
+UPDATE `creature_template` SET `minlevel`=80,`maxlevel`=80,`exp`=0,`faction_A`=84,`faction_H`=84,`speed_walk`=1,`speed_run`=1.14286,`unit_flags`=0x300,`unit_flags2`=0x800,`dynamicflags`=0,`baseattacktime`=2000,`InhabitType`=1,`mechanic_immune_mask`=650854267 WHERE `entry`=36970; -- Skybreaker Deckhand
+UPDATE `creature_template` SET `minlevel`=80,`maxlevel`=80,`exp`=0,`faction_A`=83,`faction_H`=83,`speed_walk`=1,`speed_run`=1.14286,`unit_flags`=0x300,`unit_flags2`=0x800,`dynamicflags`=0,`baseattacktime`=2000,`InhabitType`=1,`mechanic_immune_mask`=650854267 WHERE `entry`=36971; -- Orgrim's Hammer Crew
+UPDATE `creature_template` SET `gossip_menu_id`=10875,`minlevel`=83,`maxlevel`=83,`exp`=2,`faction_A`=84,`faction_H`=84,`npcflag`=0x1,`speed_walk`=1,`speed_run`=1.71429,`unit_flags`=0x8000,`unit_flags2`=0,`dynamicflags`=0,`baseattacktime`=1500,`InhabitType`=1,`mechanic_immune_mask`=650854267 WHERE `entry` IN (36948,38157,38639,38640); -- Muradin Bronzebeard
+UPDATE `creature_template` SET `gossip_menu_id`=10954,`minlevel`=83,`maxlevel`=83,`exp`=2,`faction_A`=83,`faction_H`=83,`npcflag`=0x1,`speed_walk`=1,`speed_run`=1.71429,`unit_flags`=0x8000,`unit_flags2`=0,`dynamicflags`=0,`baseattacktime`=1500,`InhabitType`=1,`mechanic_immune_mask`=650854267 WHERE `entry` IN (36939,38156,38638,38637); -- High Overlord Saurfang
+UPDATE `creature_template` SET `minlevel`=83,`maxlevel`=83,`exp`=2,`faction_A`=35,`faction_H`=35,`speed_walk`=1,`speed_run`=1.42857,`unit_flags`=0,`unit_flags2`=0,`dynamicflags`=0,`baseattacktime`=2000,`InhabitType`=4,`flags_extra`=0,`mechanic_immune_mask`=650854267 WHERE `entry` IN (37540,38128,38699,38700); -- The Skybreaker
+UPDATE `creature_template` SET `minlevel`=83,`maxlevel`=83,`exp`=2,`faction_A`=35,`faction_H`=35,`speed_walk`=1,`speed_run`=1.42857,`unit_flags`=0,`unit_flags2`=0,`dynamicflags`=0,`baseattacktime`=2000,`InhabitType`=4,`flags_extra`=0,`mechanic_immune_mask`=650854267 WHERE `entry` IN (37215,38129,38701,38702); -- Orgrim's Hammer
+UPDATE `creature_template` SET `minlevel`=81,`maxlevel`=81,`exp`=0,`faction_A`=35,`faction_H`=35,`npcflag`=0x1000000,`speed_walk`=1,`speed_run`=1,`unit_class`=1,`unit_flags`=0,`unit_flags2`=0x800,`dynamicflags`=0,`baseattacktime`=2000,`InhabitType`=1,`flags_extra`=0,`mechanic_immune_mask`=650854267 WHERE `entry`=37227; -- Teleport Portal
+UPDATE `creature_template` SET `minlevel`=81,`maxlevel`=81,`exp`=0,`faction_A`=35,`faction_H`=35,`npcflag`=0,`speed_walk`=1,`speed_run`=1,`unit_class`=1,`unit_flags`=0x2000000,`unit_flags2`=0x800,`dynamicflags`=0,`baseattacktime`=2000,`InhabitType`=1,`flags_extra`=0,`mechanic_immune_mask`=650854267 WHERE `entry`=37488; -- Teleport Exit
+UPDATE `creature_template` SET `minlevel`=82,`maxlevel`=82,`exp`=2,`faction_A`=84,`faction_H`=84,`speed_walk`=1,`speed_run`=1.71429,`unit_class`=2,`unit_flags`=0x8040,`unit_flags2`=0,`dynamicflags`=0,`baseattacktime`=2000,`InhabitType`=1,`flags_extra`=0,`mechanic_immune_mask`=650854267 WHERE `entry` IN (37116,38256,38693,38694); -- Skybreaker Sorcerer
+UPDATE `creature_template` SET `minlevel`=82,`maxlevel`=82,`exp`=2,`faction_A`=84,`faction_H`=84,`speed_walk`=1,`speed_run`=1.42857,`unit_class`=1,`unit_flags`=0x8040,`unit_flags2`=0,`dynamicflags`=0,`baseattacktime`=2000,`InhabitType`=1,`flags_extra`=0,`mechanic_immune_mask`=650854267 WHERE `entry` IN (36969,38408,38689,38690); -- Skybreaker Rifleman
+UPDATE `creature_template` SET `minlevel`=82,`maxlevel`=82,`exp`=2,`faction_A`=84,`faction_H`=84,`speed_walk`=1,`speed_run`=1.42857,`unit_class`=1,`unit_flags`=0x8040,`unit_flags2`=0,`dynamicflags`=0,`baseattacktime`=2000,`InhabitType`=1,`flags_extra`=0,`mechanic_immune_mask`=650854267 WHERE `entry` IN (36978,38407,38687,38688); -- Skybreaker Mortar Soldier
+UPDATE `creature_template` SET `minlevel`=82,`maxlevel`=82,`exp`=2,`faction_A`=84,`faction_H`=84,`speed_walk`=1,`speed_run`=1.42857,`unit_class`=1,`unit_flags`=0x8040,`unit_flags2`=0,`dynamicflags`=0,`baseattacktime`=2000,`InhabitType`=1,`flags_extra`=0,`mechanic_immune_mask`=650854267 WHERE `entry` IN (36950,38406,38685,38686); -- Skybreaker Marine
+UPDATE `creature_template` SET `minlevel`=82,`maxlevel`=82,`exp`=2,`faction_A`=84,`faction_H`=84,`speed_walk`=1,`speed_run`=1.42857,`unit_class`=1,`unit_flags`=0x8040,`unit_flags2`=0,`dynamicflags`=0,`baseattacktime`=2000,`InhabitType`=1,`flags_extra`=0,`mechanic_immune_mask`=650854267 WHERE `entry` IN (36961,38261,38691,38692); -- Skybreaker Sergeant
+UPDATE `creature_template` SET `minlevel`=82,`maxlevel`=82,`exp`=2,`faction_A`=83,`faction_H`=83,`speed_walk`=1,`speed_run`=1.42857,`unit_class`=2,`unit_flags`=0x8040,`unit_flags2`=0,`dynamicflags`=0,`baseattacktime`=2000,`InhabitType`=1,`flags_extra`=0,`mechanic_immune_mask`=650854267 WHERE `entry` IN (37117,38257,38677,38678); -- Kor'kron Battle-Mage
+UPDATE `creature_template` SET `minlevel`=82,`maxlevel`=82,`exp`=2,`faction_A`=83,`faction_H`=83,`speed_walk`=1,`speed_run`=1.42857,`unit_class`=1,`unit_flags`=0x8040,`unit_flags2`=0,`dynamicflags`=0,`baseattacktime`=2000,`InhabitType`=1,`flags_extra`=0,`mechanic_immune_mask`=650854267 WHERE `entry` IN (36968,38403,38675,38676); -- Kor'kron Axethrower
+UPDATE `creature_template` SET `minlevel`=82,`maxlevel`=82,`exp`=2,`faction_A`=83,`faction_H`=83,`speed_walk`=1,`speed_run`=1.42857,`unit_class`=1,`unit_flags`=0x8040,`unit_flags2`=0,`dynamicflags`=0,`baseattacktime`=2000,`InhabitType`=1,`flags_extra`=0,`mechanic_immune_mask`=650854267 WHERE `entry` IN (36982,38405,38681,38682); -- Kor'kron Rocketeer
+UPDATE `creature_template` SET `minlevel`=82,`maxlevel`=82,`exp`=2,`faction_A`=83,`faction_H`=83,`speed_walk`=1,`speed_run`=1.42857,`unit_class`=1,`unit_flags`=0x8040,`unit_flags2`=0,`dynamicflags`=0,`baseattacktime`=2000,`InhabitType`=1,`flags_extra`=0,`mechanic_immune_mask`=650854267 WHERE `entry` IN (36957,38404,38679,38680); -- Kor'kron Reaver
+UPDATE `creature_template` SET `minlevel`=82,`maxlevel`=82,`exp`=2,`faction_A`=83,`faction_H`=83,`speed_walk`=1,`speed_run`=1.42857,`unit_class`=1,`unit_flags`=0x8040,`unit_flags2`=0x800,`dynamicflags`=0,`baseattacktime`=2000,`InhabitType`=1,`flags_extra`=0,`mechanic_immune_mask`=650854267 WHERE `entry` IN (36960,38262,38683,38684); -- Kor'kron Sergeant
+UPDATE `creature_template` SET `npcflag`=1,`gossip_menu_id`=10885,`mechanic_immune_mask`=650854267 WHERE `entry`=37184; -- Zafod Boombox
+UPDATE `creature_template` SET `minlevel`=80,`maxlevel`=80,`exp`=2,`faction_A`=84,`faction_H`=84,`speed_walk`=1,`speed_run`=1.14286,`unit_class`=1,`unit_flags`=0x300,`unit_flags2`=0,`dynamicflags`=0,`baseattacktime`=2000,`InhabitType`=1,`flags_extra`=0,`mechanic_immune_mask`=650854267 WHERE `entry`=37182; -- High Captain Justin Bartlett
+UPDATE `creature_template` SET `minlevel`=80,`maxlevel`=80,`exp`=2,`faction_A`=84,`faction_H`=84,`speed_walk`=1,`speed_run`=1.14286,`unit_class`=1,`unit_flags`=0x300,`unit_flags2`=0,`dynamicflags`=0,`baseattacktime`=2000,`InhabitType`=1,`flags_extra`=0,`mechanic_immune_mask`=650854267 WHERE `entry`=37833; -- Sky-Reaver Korm Blackscar
+
+UPDATE `gameobject_template` SET `faction`=94,`flags`=16 WHERE `entry` IN (202178,202180,202177,202179); -- Gunship Armory
+UPDATE `gameobject_template` SET `faction`=94,`flags`=16 WHERE `entry` IN (201873,201874,201872,201875); -- Gunship Armory
+
+DELETE FROM `creature_text` WHERE `entry`=36939 AND `groupid` BETWEEN 0 AND 13;
+DELETE FROM `creature_text` WHERE `entry`=36948 AND `groupid` BETWEEN 0 AND 14;
+DELETE FROM `creature_text` WHERE `entry` IN (37184,36838,36839);
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(36939, 0,0,'Rise up, sons and daughters of the Horde! Today we battle a hated enemy of the Horde! LOK''TAR OGAR!',14,0,100,0,0,17087,'High Overlord Saurfang - SAY_SAURFANG_INTRO_1'),
+(36939, 1,0,'Kor''kron, take us out!',14,0,100,0,0,17088,'High Overlord Saurfang - SAY_SAURFANG_INTRO_2'),
+(36939, 2,0,'What is that? Something approaching in the distance.',14,0,100,0,0,17089,'High Overlord Saurfang - SAY_SAURFANG_INTRO_3'),
+(36939, 3,0,'ALLIANCE GUNSHIP! ALL HANDS ON DECK!',14,0,100,0,0,17090,'High Overlord Saurfang - SAY_SAURFANG_INTRO_4'),
+(36939, 4,0,'You answer to Saurfang now!',14,0,100,0,0,17091,'High Overlord Saurfang - SAY_SAURFANG_INTRO_5'),
+(36939, 5,0,'You will know our business soon. Kor''kron, ANNIHILATE THEM!',14,0,100,0,0,17092,'High Overlord Saurfang - SAY_SAURFANG_INTRO_6'),
+(36939, 6,0,'This is not your battle, dwarf. Back down or we will be forced to destroy your ship.',14,0,100,0,0,17083,'High Overlord Saurfang - SAY_SAURFANG_INTRO_A'),
+(36939, 7,0,'You DARE board my ship? Your death will come swiftly.',14,0,100,0,0,17083,'High Overlord Saurfang - SAY_SAURFANG_BOARD'),
+(36939, 8,0,'Reavers, Sergeants, attack!',14,0,100,0,0,17081,'High Overlord Saurfang - SAY_SAURFANG_ENTER_SKYBREAKER'),
+(36939, 9,0,'Axethrowers, hurl faster!',14,0,100,0,0,17079,'High Overlord Saurfang - SAY_SAURFANG_AXETHROWERS'),
+(36939,10,0,'Rocketeers, reload!',14,0,100,0,0,17080,'High Overlord Saurfang - SAY_SAURFANG_ROCKETEERS'),
+(36939,11,0,'We''re taking hull damage, get a battle-mage out here to shut down those cannons!',14,0,100,0,0,17082,'High Overlord Saurfang - SAY_SAURFANG_MAGES'),
+(36939,12,0,'The Alliance falter. Onward to the Lich King!',14,0,100,0,0,17084,'High Overlord Saurfang - SAY_SAURFANG_VICTORY'),
+(36939,13,0,'Damage control! Put those fires out. You haven''t seen the last of the Horde!',14,0,100,0,0,17085,'High Overlord Saurfang - SAY_SAURFANG_WIPE'),
+(36948, 0,0,'Fire up the engines! We got a meetin'' with destiny, lads!',14,0,100,0,0,16962,'Muradin Bronzebeard - SAY_MURADIN_INTRO_1'),
+(36948, 1,0,'Hold on to yer hats!',14,0,100,0,0,16963,'Muradin Bronzebeard - SAY_MURADIN_INTRO_2'),
+(36948, 2,0,'What in the world is that? Grab me spyglass, crewman!',14,0,100,0,0,16964,'Muradin Bronzebeard - SAY_MURADIN_INTRO_3'),
+(36948, 3,0,'By me own beard! HORDE SAILIN'' IN FAST ''N HOT!',14,0,100,0,0,16965,'Muradin Bronzebeard - SAY_MURADIN_INTRO_4'),
+(36948, 4,0,'EVASIVE ACTION! MAN THE GUNS!',14,0,100,0,0,16966,'Muradin Bronzebeard - SAY_MURADIN_INTRO_5'),
+(36948, 5,0,'Cowardly dogs! Ye blindsided us!',14,0,100,0,0,16967,'Muradin Bronzebeard - SAY_MURADIN_INTRO_6'),
+(36948, 6,0,'Not me battle? I dunnae who ye think ye are, mister, but I got a score to settle with Arthas and yer not gettin'' in me way! FIRE ALL GUNS! FIRE! FIRE!',14,0,100,0,0,16968,'Muradin Bronzebeard - SAY_MURADIN_INTRO_7'),
+(36948, 7,0,'Move yer jalopy or we''ll blow it out of the sky, orc! The Horde''s got no business here.',14,0,100,0,0,16969,'Muradin Bronzebeard - SAY_MURADIN_INTRO_H'),
+(36948, 8,0,'What''s this then?! Ye won''t be takin'' this son o'' Ironforge''s vessel without a fight!',14,0,100,0,0,16958,'Muradin Bronzebeard - SAY_MURADIN_BOARD'),
+(36948, 9,0,'Marines, Sergeants, attack!',14,0,100,0,0,16956,'Muradin Bronzebeard - SAY_MURADIN_ENTER_ORGRIMMS_HAMMER'),
+(36948,10,0,'Riflemen, shoot faster!',14,0,100,0,0,16954,'Muradin Bronzebeard - SAY_MURADIN_RIFLEMAN'),
+(36948,11,0,'Mortar team, reload!',14,0,100,0,0,16955,'Muradin Bronzebeard - SAY_MURADIN_MORTAR'),
+(36948,12,0,'We''re taking hull damage, get a sorcerer out here to shut down those cannons!',14,0,100,0,0,16957,'Muradin Bronzebeard - SAY_MURADIN_SORCERERS'),
+(36948,13,0,'Don''t say I didn''t warn ya, scoundrels! Onward, brothers and sisters!',14,0,100,0,0,16959,'Muradin Bronzebeard - SAY_MURADIN_VICTORY'),
+(36948,14,0,'Captain Bartlett, get us out of here! We''re taken too much damage to stay afloat!',14,0,100,0,0,16960,'Muradin Bronzebeard - SAY_MURADIN_WIPE'),
+(37184,0,0,'Rocket Pack Active!',15,0,100,0,0,0,'Zafod Boombox - SAY_ZAFOD_ROCKET_PACK_ACTIVE'),
+(37184,1,0,'Rocket Pack Disabled. Move closer to Zafod Boombox to re-activate.',15,0,100,0,0,0,'Zafod Boombox - SAY_ZAFOD_ROCKET_PACK_DISABLED'),
+(36838,0,0,'|TInterface\\Icons\\Spell_Fire_Flameshock.blp:20|t|cFFBC0000 OVERHEAT |r|TInterface\\Icons\\Spell_Fire_Flameshock.blp:20|t',42,0,100,0,0,0,'Alliance Gunship Cannon - SAY_OVERHEAT'),
+(36839,0,0,'|TInterface\\Icons\\Spell_Fire_Flameshock.blp:20|t|cFFBC0000 OVERHEAT |r|TInterface\\Icons\\Spell_Fire_Flameshock.blp:20|t',42,0,100,0,0,0,'Horde Gunship Cannon - SAY_OVERHEAT');
+
+DELETE FROM `gossip_menu` WHERE `entry` IN (10875,10954,10885);
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
+(10875,15101),
+(10954,15219),
+(10885,15134),
+(10885,15123);
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (10875,10885,10954);
+INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES
+(10875,0,0,'My companions are all accounted for, Muradin. Let''s go!',1,1,0,0,0,0,''),
+(10954,0,0,'My companions are all accounted for, Saurfang. Let''s go!',1,1,0,0,0,0,''),
+(10885,0,0,'Yeah, I''m sure safety is your top priority. Give me a rocket pack.',1,1,0,0,0,0,'');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=10885;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=10885;
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (72347,70104,70173,69400,69402,70175,69705,70403,70397,70383,70374,70444,67335);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`Comment`) VALUES
+(15,10885,0,0,2,49278,1,0,1,'Gossip Option - Show Option if player does not have item 49278'),
+(14,10885,15134,0,2,49278,1,0,1,'Gossip Option - Show text 15134 if player does not have item 49278'),
+(14,10885,15123,0,2,49278,1,0,0,'Gossip Option - Show text 15123 if player has item 49278'),
+(13,1,72347,0,31,3,38569,0,0,'Lock Players and Tap Chest - target Martyr Stalker (IGB/Saurfang)'),
+(13,1,70104,0,31,3,37488,0,0,'Teleport to Enemy Ship - target Teleport Exit'),
+(13,2,70173,0,31,3,37540,0,0,'Cannon Blast - target The Skybreaker'),
+(13,2,69400,0,31,3,37215,0,0,'Cannon Blast - target Orgrim''s Hammer'),
+(13,2,69402,0,31,3,37540,0,0,'Incinerating Blast - target The Skybreaker'),
+(13,2,70175,0,31,3,37215,0,0,'Incinerating Blast - target Orgrim''s Hammer'),
+(13,1,69705,0,31,3,36839,0,0,'Below Zero - target Horde Gunship Cannon'),
+(13,1,69705,1,31,3,36838,0,0,'Below Zero - target Alliance Gunship Cannon'),
+(13,1,70403,0,31,3,37547,0,0,'Burning Pitch - target Gunship Hull'),
+(13,1,70397,0,31,3,37547,0,0,'Burning Pitch - target Gunship Hull'),
+(13,1,70383,0,31,3,37215,0,0,'Burning Pitch - target Orgrim''s Hammer'),
+(13,1,70374,0,31,3,37540,0,0,'Burning Pitch - target The Skybreaker'),
+(13,1,70444,0,31,3,37116,0,0,'Explosion - target Skybreaker Sorcerer'),
+(13,1,70444,1,31,3,36969,0,0,'Explosion - target Skybreaker Rifleman'),
+(13,1,70444,2,31,3,36978,0,0,'Explosion - target Skybreaker Mortar Soldier'),
+(13,1,70444,3,31,3,37117,0,0,'Explosion - target Kor''kron Battle-Mage'),
+(13,1,70444,4,31,3,36968,0,0,'Explosion - target Kor''kron Axethrower'),
+(13,1,70444,5,31,3,36982,0,0,'Explosion - target Kor''kron Rocketeer'),
+(13,1,67335,0,31,3,37540,0,0,'Gunship Fall Teleport - target The Skybreaker'),
+(13,1,67335,1,31,3,37215,0,0,'Gunship Fall Teleport - target Orgrim''s Hammer');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=68645;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`Comment`) VALUES
+(17,0,68645,0,1,70348,0,0,0,173,'Rocket Pack - require Rocket Pack Useable');
+
+
+DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` IN (37227,36838,36839);
+INSERT INTO `npc_spellclick_spells` (`npc_entry`,`spell_id`,`cast_flags`,`user_type`) VALUES
+(37227,70104,3,0),
+(36838,70510,1,0),
+(36839,70510,1,0);
+
+DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (68645,73077);
+INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES
+(68645,68721,1,'Rocket Pack - additional aura'),
+(73077,69188,2,'Rocket Pack - linked aura');
+
+DELETE FROM `creature_template_addon` WHERE `entry` IN (36838,36839,37184,37488);
+INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`auras`) VALUES
+(36838,0,0x0,0x1,'69470'), -- Alliance Gunship Cannon - Heat Drain
+(36839,0,0x0,0x1,'69470'), -- Horde Gunship Cannon - Heat Drain
+(37184,0,0x0,0x1,'69188 70348'), -- Zafod Boombox - Rocket Pack, Rocket Pack Useable
+(37488,0,0x2000000,0x1,''); -- Teleport Exit
+
+DELETE FROM `creature` WHERE `guid` IN (201047,201030);
+SET @CGUID := 133934;
+DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID AND @CGUID+58;
+INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES
+(@CGUID+0,37540,672,15,1,31043,0,-13.1429,-0.36969,12.8909,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+1,37547,672,15,1,0,0,-50.1652,9.71624,23.5871,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+2,37547,672,15,1,0,0,-34.2702,-26.1897,21.3748,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+3,37547,672,15,1,0,0,-41.4456,-7.6475,20.4975,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+4,37519,672,15,1,0,0,-28.275,15.5946,20.5379,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+5,37547,672,15,1,0,0,-11.6446,-19.8518,20.8843,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+6,37547,672,15,1,0,0,-19.8822,-6.57876,20.5744,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+7,36948,672,15,1,0,0,1.34481,-0.077413,20.8492,3.15905,604800,0,0,1,0,0,0,0,0),
+(@CGUID+8,32780,672,15,1,0,0,1.29247,-0.006242,20.8767,3.12414,604800,0,0,1,0,0,0,0,0),
+(@CGUID+9,37547,672,15,1,0,0,0.554884,-1.2329,20.5371,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+10,37547,672,15,1,0,0,19.7229,-2.19379,33.0698,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+11,37547,672,15,1,0,0,8.5994,-28.5585,24.7992,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+12,37547,672,15,1,0,0,11.4584,16.3662,20.5419,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+13,37547,672,15,1,0,0,38.9434,-33.808,25.3962,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+14,37519,672,15,1,0,0,39.4475,0.136515,25.2321,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+15,37547,673,15,1,0,0,53.1563,29.0877,44.7302,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+16,37547,673,15,1,0,0,-58.1547,0.748094,41.8766,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+17,37547,673,15,1,0,0,-39.4953,16.6872,34.3943,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+18,37547,673,15,1,0,0,-27.097,27.9929,34.3631,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+19,37547,673,15,1,0,0,-15.0316,12.0216,33.8629,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+20,37547,673,15,1,0,0,9.46182,16.1523,35.1091,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+21,37547,673,15,1,0,0,27.6276,27.103,36.8003,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+22,36939,673,15,1,0,0,36.4055,0.184604,36.7153,3.10669,604800,0,0,1,0,0,0,0,0),
+(@CGUID+23,37184,673,15,1,0,0,38.5985,18.0196,36.6939,3.94444,604800,0,0,1,0,0,0,0,0),
+(@CGUID+24,37833,673,15,1,0,0,60.4547,0.021568,38.7034,3.12414,604800,0,0,1,0,0,0,0,0),
+(@CGUID+25,37547,673,15,1,0,0,4.7803,-29.0523,35.0963,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+26,37547,673,15,1,0,0,23.4778,-7.53715,35.8162,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+27,37547,673,15,1,0,0,-5.60755,-6.35065,34.0036,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+28,37519,673,15,1,0,0,-19.9011,-11.1976,33.4849,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+29,37519,673,15,1,0,0,22.1763,-11.4125,34.9973,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+30,36971,673,15,1,0,0,-56.4357,12.2929,34.6332,2.51327,604800,0,0,1,0,0,0,0,0),
+(@CGUID+31,36971,673,15,1,0,0,30.8803,22.7656,36.3547,1.69297,604800,0,0,1,0,0,0,0,0),
+(@CGUID+32,36971,673,15,1,0,0,-26.8348,13.4803,34.6954,5.3058,604800,0,0,1,0,0,0,0,0),
+(@CGUID+33,36971,673,15,1,0,0,-29.3313,-23.2348,33.9633,2.80988,604800,0,0,1,0,0,0,0,0),
+(@CGUID+34,36971,673,15,1,0,0,-26.1657,-13.3904,34.679,0.890118,604800,0,0,1,0,0,0,0,0),
+(@CGUID+35,36971,673,15,1,0,0,60.0911,-6.35005,38.9569,2.54818,604800,0,0,1,0,0,0,0,0),
+(@CGUID+36,36971,673,15,1,0,0,59.6708,6.21392,39.0067,3.735,604800,0,0,1,0,0,0,0,0),
+(@CGUID+37,36971,673,15,1,0,0,30.9602,-22.9078,36.363,4.46804,604800,0,0,1,0,0,0,0,0),
+(@CGUID+38,36839,673,15,1,0,0,-15.6908,31.1423,34.391,1.5708,604800,0,0,1,0,0,0,0,0),
+(@CGUID+39,37215,673,15,1,31044,0,3.8386,0.183334,24.1005,0,604800,0,0,1,0,0,0,0,0),
+(@CGUID+40,36839,673,15,1,0,0,18.1923,29.8694,36.3265,1.55334,604800,0,0,1,0,0,0,0,0),
+(@CGUID+41,36971,673,15,1,0,0,-54.3389,-14.5897,34.4998,3.9619,604800,0,0,1,0,0,0,0,0),
+(@CGUID+42,37184,672,15,1,0,0,18.8226,9.700101,20.41841,3.106686,604800,0,0,1,0,0,0,0,0), -- Zafod Boombox (A)
+(@CGUID+43,37182,672,15,1,0,0,42.78902,-0.010491,25.24052,3.124139,604800,0,0,1,0,0,0,0,0), -- High Captain Justin Bartlett
+(@CGUID+44,36970,672,15,1,0,0,42.80151,25.06216,31.84073,4.756748,604800,0,0,1,0,0,0,0,0), -- Skybreaker Deckhand
+(@CGUID+45,36970,672,15,1,0,0,35.651,20.29211,25.11613,1.58825,604800,0,0,1,0,0,0,0,0), -- Skybreaker Deckhand
+(@CGUID+46,36970,672,15,1,0,0,29.25061,-6.920386,23.37144,3.455752,604800,0,0,1,0,0,0,0,0), -- Skybreaker Deckhand
+(@CGUID+47,36970,672,15,1,0,0,35.57132,-20.18365,25.1162,4.712389,604800,0,0,1,0,0,0,0,0), -- Skybreaker Deckhand
+(@CGUID+48,36970,672,15,1,0,0,9.26111,-22.73216,21.84549,5.864306,604800,0,0,1,0,0,0,0,0), -- Skybreaker Deckhand
+(@CGUID+49,36970,672,15,1,0,0,-36.38065,2.928953,20.5322,1.570796,604800,0,0,1,0,0,0,0,0), -- Skybreaker Deckhand
+(@CGUID+50,36970,672,15,1,0,0,-36.22218,-2.960294,20.53312,4.694936,604800,0,0,1,0,0,0,0,0), -- Skybreaker Deckhand
+(@CGUID+51,36970,672,15,1,0,0,-64.70975,4.575944,23.52326,2.094395,604800,0,0,1,0,0,0,0,0), -- Skybreaker Deckhand
+(@CGUID+52,36948,672,15,1,0,0,13.51547,-0.160213,20.87252,3.106686,604800,0,0,1,0,0,0,0,0), -- Muradin Bronzebeard (A)
+(@CGUID+53,36838,672,15,1,0,0,-6.155821,-25.23873,21.70498,4.712389,604800,0,0,1,0,0,0,0,0), -- Alliance Gunship Cannon
+(@CGUID+54,36838,672,15,1,0,0,-33.6443,-24.06576,21.68014,4.712389,604800,0,0,1,0,0,0,0,0), -- Alliance Gunship Cannon
+(@CGUID+55,36838,672,10,1,0,0,-24.66251,-24.52669,21.64428,4.712389,604800,0,0,1,0,0,0,0,0), -- Alliance Gunship Cannon
+(@CGUID+56,36838,672,10,1,0,0,-15.35026,-24.90373,21.62014,4.712389,604800,0,0,1,0,0,0,0,0), -- Alliance Gunship Cannon
+(@CGUID+57,36839,673,10,1,0,0,11.17875,30.73435,35.95937,1.553343,604800,0,0,1,0,0,0,0,0), -- Horde Gunship Cannon
+(@CGUID+58,36839,673,10,1,0,0,-8.200627,31.49327,34.52401,1.553343,604800,0,0,1,0,0,0,0,0); -- Horde Gunship Cannon
+
+DELETE FROM `creature_addon` WHERE `guid` IN (@CGUID+04,@CGUID+14,@CGUID+28,@CGUID+29,200879);
+INSERT INTO `creature_addon` (`guid`,`mount`,`bytes1`,`bytes2`,`auras`) VALUES
+(@CGUID+04,0,0x3000000,0x1,'70120'), -- Safe Area (IGB) - On Skybreaker Deck
+(@CGUID+14,0,0x3000000,0x1,'70120'), -- Safe Area (IGB) - On Skybreaker Deck
+(@CGUID+28,0,0x3000000,0x1,'70121'), -- Safe Area (IGB) - On Orgrim's Hammer Deck
+(@CGUID+29,0,0x3000000,0x1,'70121'), -- Safe Area (IGB) - On Orgrim's Hammer Deck
+( 200879,0,0x0000000,0x1,'69942'); -- Invisible Stalker (All Phases) - Phase Normal + Dungeon Encounter 1
+
+SET @OGUID := 14732;
+DELETE FROM `gameobject` WHERE `id`=202211;
+DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID AND @OGUID+7;
+INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
+(@OGUID+0,202178,673,1,1,-19.87256,-14.17484,33.63771,4.71239,0,0,0,1,604800,255,1), -- Gunship Armory
+(@OGUID+1,202180,673,2,1,-19.87256,-14.17484,33.63771,4.71239,0,0,0,1,604800,255,1), -- Gunship Armory
+(@OGUID+2,202177,673,4,1,-19.87256,-14.17484,33.63771,4.71239,0,0,0,1,604800,255,1), -- Gunship Armory
+(@OGUID+3,202179,673,8,1,-19.87256,-14.17484,33.63771,4.71239,0,0,0,1,604800,255,1), -- Gunship Armory
+(@OGUID+4,201873,672,1,1,-45.44891,-0.062003,20.56404,0.2697698,0,0,0,1,604800,255,1),
+(@OGUID+5,201874,672,2,1,-45.44891,-0.062003,20.56404,0.2697698,0,0,0,1,604800,255,1),
+(@OGUID+6,201872,672,4,1,-45.44891,-0.062003,20.56404,0.2697698,0,0,0,1,604800,255,1),
+(@OGUID+7,201875,672,8,1,-45.44891,-0.062003,20.56404,0.2697698,0,0,0,1,604800,255,1);
+
+DELETE FROM `spell_custom_attr` WHERE `entry` IN (72347);
+INSERT INTO `spell_custom_attr` (`entry`,`attributes`) VALUES
+(72347,4096);
+
+UPDATE `creature_model_info` SET `bounding_radius`=0.520500,`combat_reach`=2.25000,`gender`=0 WHERE `modelid`=30508; -- Muradin Bronzebeard
+UPDATE `creature_model_info` SET `bounding_radius`=0.558000,`combat_reach`=2.25000,`gender`=0 WHERE `modelid`=30416; -- High Overlord Saurfang
+UPDATE `creature_model_info` SET `bounding_radius`=0.500000,`combat_reach`=1.00000,`gender`=2 WHERE `modelid`=31043; -- The Skybreaker
+UPDATE `creature_model_info` SET `bounding_radius`=0.500000,`combat_reach`=1.00000,`gender`=2 WHERE `modelid`=31044; -- Orgrim's Hammer
+UPDATE `creature_model_info` SET `bounding_radius`=1.250000,`combat_reach`=1.25000,`gender`=2 WHERE `modelid`=30615; -- Teleport Portal, Teleport Exit
+UPDATE `creature_model_info` SET `bounding_radius`=0.364000,`combat_reach`=2.62500,`gender`=1 WHERE `modelid`=30609; -- Skybreaker Sorcerer
+UPDATE `creature_model_info` SET `bounding_radius`=0.615825,`combat_reach`=3.01875,`gender`=1 WHERE `modelid`=30610; -- Skybreaker Sorcerer
+UPDATE `creature_model_info` SET `bounding_radius`=0.615825,`combat_reach`=3.01875,`gender`=0 WHERE `modelid`=30611; -- Skybreaker Sorcerer
+UPDATE `creature_model_info` SET `bounding_radius`=0.347000,`combat_reach`=1.50000,`gender`=0 WHERE `modelid`=30603; -- Skybreaker Rifleman
+UPDATE `creature_model_info` SET `bounding_radius`=0.381700,`combat_reach`=1.65000,`gender`=0 WHERE `modelid`=30604; -- Skybreaker Rifleman
+UPDATE `creature_model_info` SET `bounding_radius`=0.347000,`combat_reach`=1.50000,`gender`=1 WHERE `modelid`=30605; -- Skybreaker Rifleman
+UPDATE `creature_model_info` SET `bounding_radius`=0.416400,`combat_reach`=1.80000,`gender`=0 WHERE `modelid`=30602; -- Skybreaker Mortar Soldier
+UPDATE `creature_model_info` SET `bounding_radius`=0.306000,`combat_reach`=1.50000,`gender`=0 WHERE `modelid`=30598; -- Skybreaker Marine
+UPDATE `creature_model_info` SET `bounding_radius`=0.306000,`combat_reach`=1.50000,`gender`=0 WHERE `modelid`=30599; -- Skybreaker Marine
+UPDATE `creature_model_info` SET `bounding_radius`=1.000000,`combat_reach`=1.50000,`gender`=0 WHERE `modelid`=30600; -- Skybreaker Marine
+UPDATE `creature_model_info` SET `bounding_radius`=0.208000,`combat_reach`=1.50000,`gender`=1 WHERE `modelid`=30601; -- Skybreaker Marine
+UPDATE `creature_model_info` SET `bounding_radius`=0.397800,`combat_reach`=1.95000,`gender`=0 WHERE `modelid`=30606; -- Skybreaker Sergeant
+UPDATE `creature_model_info` SET `bounding_radius`=0.367200,`combat_reach`=1.80000,`gender`=0 WHERE `modelid`=30607; -- Skybreaker Sergeant
+UPDATE `creature_model_info` SET `bounding_radius`=0.382500,`combat_reach`=1.87500,`gender`=0 WHERE `modelid`=30608; -- Skybreaker Sergeant
+UPDATE `creature_model_info` SET `bounding_radius`=0.670250,`combat_reach`=2.62500,`gender`=0 WHERE `modelid`=30741; -- Kor'kron Battle-Mage
+UPDATE `creature_model_info` SET `bounding_radius`=0.670250,`combat_reach`=2.62500,`gender`=0 WHERE `modelid`=30742; -- Kor'kron Battle-Mage
+UPDATE `creature_model_info` SET `bounding_radius`=0.670250,`combat_reach`=2.62500,`gender`=1 WHERE `modelid`=30743; -- Kor'kron Battle-Mage
+UPDATE `creature_model_info` SET `bounding_radius`=0.670250,`combat_reach`=2.62500,`gender`=1 WHERE `modelid`=30744; -- Kor'kron Battle-Mage
+UPDATE `creature_model_info` SET `bounding_radius`=0.306000,`combat_reach`=1.50000,`gender`=0 WHERE `modelid`=30739; -- Kor'kron Axethrower
+UPDATE `creature_model_info` SET `bounding_radius`=0.306000,`combat_reach`=1.50000,`gender`=0 WHERE `modelid`=30740; -- Kor'kron Axethrower
+UPDATE `creature_model_info` SET `bounding_radius`=0.459000,`combat_reach`=2.25000,`gender`=0 WHERE `modelid`=30748; -- Kor'kron Rocketeer
+UPDATE `creature_model_info` SET `bounding_radius`=0.459000,`combat_reach`=2.25000,`gender`=1 WHERE `modelid`=30749; -- Kor'kron Rocketeer
+UPDATE `creature_model_info` SET `bounding_radius`=0.372000,`combat_reach`=1.50000,`gender`=0 WHERE `modelid`=30750; -- Kor'kron Reaver
+UPDATE `creature_model_info` SET `bounding_radius`=0.372000,`combat_reach`=1.50000,`gender`=0 WHERE `modelid`=30751; -- Kor'kron Reaver
+UPDATE `creature_model_info` SET `bounding_radius`=0.236000,`combat_reach`=1.50000,`gender`=1 WHERE `modelid`=30752; -- Kor'kron Reaver
+UPDATE `creature_model_info` SET `bounding_radius`=0.520833,`combat_reach`=2.25000,`gender`=0 WHERE `modelid`=30745; -- Kor'kron Sergeant
+UPDATE `creature_model_info` SET `bounding_radius`=0.520833,`combat_reach`=2.25000,`gender`=0 WHERE `modelid`=30746; -- Kor'kron Sergeant
+UPDATE `creature_model_info` SET `bounding_radius`=0.520833,`combat_reach`=2.25000,`gender`=0 WHERE `modelid`=30747; -- Kor'kron Sergeant
+
+DELETE FROM `creature_equip_template` WHERE `entry` IN (36948,36939,37116,36969,36950,36961,37117,36968,36957,36960,36970,36971,37182,37833);
+INSERT INTO `creature_equip_template` (`entry`,`id`,`itemEntry1`,`itemEntry2`,`itemEntry3`) VALUES
+(36948,1,49775,49774,0), -- Muradin Bronzebeard
+(36939,1,49773,0,0), -- High Overlord Saurfang
+(37116,1,39746,0,0), -- Skybreaker Sorcerer
+(36969,1,0,0,12523), -- Skybreaker Rifleman
+(36950,1,49687,0,0), -- Skybreaker Marine
+(36961,1,49637,0,0), -- Skybreaker Sergeant
+(37117,1,39746,0,0), -- Kor'kron Battle-Mage
+(36968,1,49691,0,49873), -- Kor'kron Axethrower
+(36957,1,49689,0,0), -- Kor'kron Reaver
+(36960,1,34638,0,0), -- Kor'kron Sergeant
+(36970,1,1493,0,0), -- Skybreaker Deckhand
+(36971,1,11019,0,0), -- Orgrim's Hammer Crew
+(37182,1,42757,0,2552), -- High Captain Justin Bartlett
+(37833,1,43175,0,21554); -- Sky-Reaver Korm Blackscar
+
+DELETE FROM `spell_target_position` WHERE `id` IN (70446,71284,72340);
+INSERT INTO `spell_target_position` (`id`,`effIndex`,`target_map`,`target_position_x`,`target_position_y`,`target_position_z`,`target_orientation`) VALUES
+(70446,1,631,-437.078,2390.10,191.233,1.57080),
+(71284,1,631,-437.447,2032.51,191.234,4.73831),
+(72340,1,631,-548.983,2211.24,539.290,0.00576);
+
+DELETE FROM `spell_scripts` WHERE `id`=50630;
+
+DELETE FROM `gameobject_loot_template` WHERE `entry` IN (28045,28072,28057,28090);
+INSERT INTO `gameobject_loot_template` (`entry`, `item`, `ChanceOrQuestChance`, `lootmode`, `groupid`, `mincountOrRef`, `maxcount`) VALUES
+(28045,1,100,1,0,-12036,2),
+(28045,49426,100,1,0,2,2), -- 10N, Emblem of Frost
+(28072,1,100,1,0,-34251,2),
+(28072,49426,100,1,0,2,2), -- 25N, Emblem of Frost
+(28072,49908,38,1,0,1,1), -- 25N, Primordial Saronite
+(28072,50274,-35,1,0,1,1), -- 25N, Shadowfrost Shard
+(28057,1,100,1,0,-34263,2),
+(28057,49426,100,1,0,2,2), -- 10H, Emblem of Frost
+(28057,49908,38,1,0,1,1), -- 10H, Primordial Saronite
+(28090,1,100,1,0,-34275,2),
+(28090,49426,100,1,0,2,2), -- 25H, Emblem of Frost
+(28090,49908,50,1,0,1,1), -- 25H, Primordial Saronite
+(28090,50274,-75,1,0,1,1); -- 25H, Shadowfrost Shard
+
+DELETE FROM `disables` WHERE `sourceType`=4 AND `entry` IN (12771,12777,12947,13041,13052,13079,13080,13081,13094,13109,13110,13111,13187,13198,13333,13353);
+DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (12771,12777,12947,13041,13052,13079,13080,13081,13094,13109,13110,13111,13187,13198,13333,13353);
+INSERT INTO `achievement_criteria_data` (`criteria_id`,`type`,`value1`,`value2`,`ScriptName`) VALUES
+(13333,12,0,0,''), -- Lich King 10-player bosses defeated
+(13353,12,1,0,''), -- Lich King 25-player bosses defeated
+(12771,12,0,0,''), -- Storming the Citadel (10 player)
+(13041,12,2,0,''), -- Heroic: Storming the Citadel (10 player)
+(12947,12,0,0,''), -- Storming the Citadel (25 player)
+(13052,12,3,0,''), -- Heroic: Storming the Citadel (25 player)
+(12777,12,0,0,''), -- I'm on a Boat (10 player)
+(13080,12,1,0,''), -- I'm on a Boat (25 player)
+(13079,12,2,0,''), -- I'm on a Boat (10 player, Heroic)
+(13081,12,3,0,''), -- I'm on a Boat (25 player, Heroic)
+(12777,11,0,0,'achievement_im_on_a_boat'), -- I'm on a Boat (10 player)
+(13080,11,0,0,'achievement_im_on_a_boat'), -- I'm on a Boat (25 player)
+(13079,11,0,0,'achievement_im_on_a_boat'), -- I'm on a Boat (10 player, Heroic)
+(13081,11,0,0,'achievement_im_on_a_boat'), -- I'm on a Boat (25 player, Heroic)
+(13094,12,0,0,''), -- Gunship Battle victories (Icecrown 10 player)
+(13110,12,2,0,''), -- Gunship Battle victories (Heroic Icecrown 10 player)
+(13109,12,1,0,''), -- Gunship Battle victories (Icecrown 25 player)
+(13111,12,3,0,''), -- Gunship Battle victories (Heroic Icecrown 25 player)
+(13187,12,3,0,''),
+(13198,12,2,0,'');
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_00_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_00_world_misc.sql
new file mode 100644
index 00000000000..2db428bc146
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_00_world_misc.sql
@@ -0,0 +1,4 @@
+UPDATE `creature_template` SET `faction_A`=83,`faction_H`=83 WHERE `entry`=37833; -- Sky-Reaver Korm Blackscar
+UPDATE `gameobject_template` SET `flags`=40 WHERE `entry` IN (201812,201811,201581,201580);
+UPDATE `achievement_criteria_data` SET `value1`=1 WHERE `criteria_id`=12947 AND `type`=12;-- Storming the Citadel (25 player)
+DELETE FROM `gameobject` WHERE `id`=201880;
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_01_world_sai.sql
new file mode 100644
index 00000000000..0288cd6e03a
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_01_world_sai.sql
@@ -0,0 +1,2 @@
+--
+UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=6004 AND `source_type`=0 AND `id`=14 AND `link`=15;
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_02_world_creature_classlevelstats.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_02_world_creature_classlevelstats.sql
new file mode 100644
index 00000000000..17d3d89b4bc
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_02_world_creature_classlevelstats.sql
@@ -0,0 +1,2 @@
+--
+ALTER TABLE `creature_classlevelstats` CHANGE `comment` `comment` TEXT NULL DEFAULT NULL;
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_02_world_quest.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_02_world_quest.sql
new file mode 100644
index 00000000000..12bfb1dd1cb
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_02_world_quest.sql
@@ -0,0 +1,16 @@
+-- Fix for Expression of Gratitude quest chain ( http://www.wowwiki.com/Quest:Expression_of_Gratitude )
+-- Cast Phase Shift: Garm Assault (54635) on player once Know No Fear (12822) quest is taken.
+DELETE FROM `spell_area` WHERE `spell`=54635 AND `area`=4461;
+INSERT INTO `spell_area` (`spell`, `area`, `quest_start`, `quest_end`, `aura_spell`, `racemask`, `gender`, `autocast`, `quest_start_status`, `quest_end_status`) VALUES
+(54635, 4461, 12822, 0, 0, 0, 2, 1, 74, 1);
+
+-- Ample Inspiration (12828) needs Expression of Gratitude (12836) quest completed (https://www.youtube.com/watch?v=lwHuQAL51m0, https://www.youtube.com/watch?v=K_rsnPXwouY)
+UPDATE `quest_template` SET `PrevQuestId`=12836 WHERE `Id`=12828;
+
+-- Opening the Backdoor (12821) needs Ample Inspiration (12828) quest completed (https://www.youtube.com/watch?v=K_rsnPXwouY, https://www.youtube.com/watch?v=DzLrImBiYvM)
+UPDATE `quest_template` SET `PrevQuestId`=12828 WHERE `Id`=12821;
+
+-- Overstock (12833) needs Demolitionist Extraordinaire (12824) quest completed (http://www.wowhead.com/quest=12833#comments:id=468099)
+UPDATE `quest_template` SET `PrevQuestId`=12824 WHERE `Id`=12833;
+
+UPDATE `gameobject` SET `phaseMask`=3 WHERE `guid`=58035;
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_04_world_quest_templte.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_04_world_quest_templte.sql
new file mode 100644
index 00000000000..25db2a66c5d
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_04_world_quest_templte.sql
@@ -0,0 +1,2 @@
+--
+UPDATE `quest_template` SET `exclusivegroup`=0 WHERE `exclusivegroup`=96;
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_05_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_05_world_sai.sql
new file mode 100644
index 00000000000..e3895d49b63
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_05_world_sai.sql
@@ -0,0 +1,3 @@
+--
+UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=2346 AND `source_type`=0 AND `id`=13;
+UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=2345 AND `source_type`=0 AND `id`=16;
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_06_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_06_world_sai.sql
new file mode 100644
index 00000000000..4d8e4ccb079
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_06_world_sai.sql
@@ -0,0 +1,5 @@
+--
+UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=2230;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=2230 and `source_type`=0;
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+(2230,0,0,0,20,0,100,0,499,0,0,0,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Umpi - On quest reward Elixir of Agony - Die');
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_07_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_07_world_sai.sql
new file mode 100644
index 00000000000..b005ebfbc3b
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_07_world_sai.sql
@@ -0,0 +1,2 @@
+--
+UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=2359 AND `source_type`=0 AND `id` IN (0,2,4);
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_08_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_08_world_sai.sql
new file mode 100644
index 00000000000..835f160a6bf
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_08_world_sai.sql
@@ -0,0 +1,2 @@
+--
+UPDATE `smart_scripts` SET `event_flags`=1 WHERE `entryorguid`=2249 AND `source_type`=0 AND `id`=0;
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_09_world_misc.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_09_world_misc.sql
new file mode 100644
index 00000000000..7b31ac09df7
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_09_world_misc.sql
@@ -0,0 +1,6 @@
+--
+UPDATE `gameobject_loot_template` SET `item`=31708 WHERE `entry`=21872 AND `item`=31709;
+UPDATE `gameobject_loot_template` SET `item`=31709 WHERE `entry`=21870 AND `item`=31708;
+UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid`=1972300 AND `source_type`=9 AND `id`=1 AND `link`=0;
+UPDATE `smart_scripts` SET `target_type`=1 WHERE `entryorguid`=1972400 AND `source_type`=9 AND `id`=1 AND `link`=0;
+UPDATE `conditions` SET `ElseGroup`=0 WHERE `ConditionValue1` = 13105 AND `SourceEntry` = 13120;
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_10_world_conditions.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_10_world_conditions.sql
new file mode 100644
index 00000000000..58aa20c9151
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_24_10_world_conditions.sql
@@ -0,0 +1,4 @@
+--
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=43239;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
+(13,1,43239,0,0,31,0,3,24196,0,0,0,0,'','Despawn Trapped Creature hits only Trapped Animal');
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_25_00_world_creature.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_25_00_world_creature.sql
new file mode 100644
index 00000000000..7e5487362d4
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_25_00_world_creature.sql
@@ -0,0 +1,2 @@
+--
+UPDATE `creature` SET `position_z`=31.25 WHERE guid=23411;
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_26_00_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_26_00_world_sai.sql
new file mode 100644
index 00000000000..44ce75cd95e
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_26_00_world_sai.sql
@@ -0,0 +1,5 @@
+DELETE FROM `smart_scripts` WHERE `entryorguid`=24601 AND `source_type`=0 AND `id`=2;
+
+DELETE FROM `spell_script_names` WHERE `spell_id`=46374;
+INSERT INTO `spell_script_names`(`spell_id`,`ScriptName`) VALUE
+(46374,'spell_windsoul_totem_aura');
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_26_01_world_sai.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_26_01_world_sai.sql
new file mode 100644
index 00000000000..08ba1ded00d
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_26_01_world_sai.sql
@@ -0,0 +1 @@
+DELETE FROM `smart_scripts` WHERE `entryorguid`=23595 AND `id`=1;
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_28_00_world_page_text.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_28_00_world_page_text.sql
new file mode 100644
index 00000000000..dd22574801b
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_28_00_world_page_text.sql
@@ -0,0 +1,9 @@
+DELETE FROM `page_text` WHERE `entry` IN (3470, 3471);
+INSERT INTO `page_text` (`entry`, `text`, `next_page`, `WDBVerified`) VALUES
+(3470, 'The sheer vastness of the nether is no excuse for using it as a garbage repository! Your Portal and Teleport spells are a great privilege and responsibility, and carelessly casting the waste from your noontime meals into a portal could have GRAVE CONSEQUENCES for all of Azeroth! Please secure all objects when traveling via portal and report any lost objects to the Kirin Tor council at once. Read the latest edition of "Thinking with Portals - A Memorandum on Proper Portal Usage" for all information regarding portal use. ', 3471, 17538), -- 3470
+(3471, 'If this problem grows any further out of hand, I will be forced to insist that all portal travelers relinquish their weaponry and personal hygiene supplies before embarking. And the next time my lecture notes appear among the rubbish, I will personally transform the heads of all apprentices into dunce caps!
+
+--Archmage Runeweaver
+', 0, 17538); -- 3471
+
+UPDATE `page_text` SET `text`='As you are all well aware, we as an organization make a regular habit of combing the local reaches of the twisting nether for misplaced objects. This has turned up all manner of wayward treasure, from errant magical essences to crackling shards of mystic power to entire suits of armor and powerful weaponry. Increasingly of late, however, we have also begun to turn up garbage and refuse as well.', `next_page`=3470, `WDBVerified`=17538 WHERE `entry`=3469; -- 3469
diff --git a/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_28_01_world_page_text.sql b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_28_01_world_page_text.sql
new file mode 100644
index 00000000000..34c2d1a2cf9
--- /dev/null
+++ b/sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2014_03_28_01_world_page_text.sql
@@ -0,0 +1,15 @@
+DELETE FROM `page_text` WHERE `entry` IN (3404, 3405, 3406, 3407, 3408);
+INSERT INTO `page_text` (`entry`, `text`, `next_page`, `WDBVerified`) VALUES
+(3404, 'At the age of 12, Antonidas'' thesis, "The Ramifications of Refining Reverse Time Travel Phenomena into Quantifiable Magical Practice" earned him the Kirin Tor Sash of Supreme Acumen, the youngest ever to receive the award. Shortly thereafter the Ruling Council offered him official placement in the Kirin Tor Advanced Research and Illumination Sect, also the youngest to receive an official invitation.', 3405, 17538),
+(3405, 'As the mage grew older, he continued to learn and hone his abilities. His natural talent for defensive magic and wisdom beyond his years made Antonidas an ideal candidate for a position on the Council of Six, which he eventually attained. Antonidas proved not only wise and fair, but infinitely regimented in goal to become more knowledgeable. He quickly became one of the dominant voices of Dalaran.', 3406, 17538),
+(3406, 'Before the Second War, leaders of each of the Azerothian nations met in Lordaeron to discuss the threat of the orc invasion. Archmage Antonidas attended the summit on behalf of the Council of Six, pledging loyalty to the Alliance on Dalaran''s behalf. He also monitored the progress of the young but extremely talented mage Khadgar, who had served as Medivh''s apprentice during the first war. In the aftermath of the Second War, Antonidas promoted Khadgar to the rank of archmage and placed him in a position of authority over the mission to enter the Dark Portal and investigate Draenor.', 3407, 17538),
+(3407, 'After the Second War, Antonidas investigated the lethargy of the orcs. The archmage published several theses on his research:
+
+"The Causality of War: A Comprehensive Study on Orc Lassitude."
+
+"The Contrast of Orc Tradition, Sociology, and Psychological Practices from Before and After the Second War."
+
+"Empirical Study on the Formulation and History of High Profile Fel Magics, and their Relation to the Orc Race."', 3408, 17538),
+(3408, 'The consensuses of many of these reports are largely inconclusive. Antonidas himself has said on occasion that finding a cure for the malaise of the orcs would be an almost unachievable venture. His formal conclusion was that the orcs'' only path to a healthy lifestyle would be a spiritual one.', 0, 17538);
+
+UPDATE `page_text` SET `text`='Antonidas was but a mere boy when he became an apprentice to one of the Kirin Tor. He was a tenacious learner, pouring over books in the magical libraries of Dalaran. After only a few short years of studying under the sect, Antonidas had outclassed his peers and earned their admiration, as well as the respect of his elders.', `next_page`=3404, `WDBVerified`=17538 WHERE `entry`=3403;
diff --git a/sql/updates/world/2014_03_29_00_world_version.sql b/sql/updates/world/2014_03_29_00_world_version.sql
new file mode 100644
index 00000000000..eefa4650128
--- /dev/null
+++ b/sql/updates/world/2014_03_29_00_world_version.sql
@@ -0,0 +1 @@
+UPDATE `version` SET `db_version`='TDB 335.53', `cache_id`=53 LIMIT 1;
diff --git a/src/server/authserver/Authentication/TOTP.h b/src/server/authserver/Authentication/TOTP.h
index 04b4a8c2110..7ced260758c 100644
--- a/src/server/authserver/Authentication/TOTP.h
+++ b/src/server/authserver/Authentication/TOTP.h
@@ -16,7 +16,7 @@
*/
#ifndef _TOTP_H
-#define _TOPT_H
+#define _TOTP_H
#include "openssl/hmac.h"
#include "openssl/evp.h"
diff --git a/src/server/collision/Management/MMapManager.h b/src/server/collision/Management/MMapManager.h
index 8b0d42b83cd..7840921e4e6 100644
--- a/src/server/collision/Management/MMapManager.h
+++ b/src/server/collision/Management/MMapManager.h
@@ -23,6 +23,7 @@
#include "DetourAlloc.h"
#include "DetourNavMesh.h"
#include "DetourNavMeshQuery.h"
+#include <string>
// move map related classes
namespace MMAP
diff --git a/src/server/collision/Models/GameObjectModel.cpp b/src/server/collision/Models/GameObjectModel.cpp
index d254a640279..42584693a13 100644
--- a/src/server/collision/Models/GameObjectModel.cpp
+++ b/src/server/collision/Models/GameObjectModel.cpp
@@ -130,17 +130,13 @@ bool GameObjectModel::initialize(const GameObject& go, const GameObjectDisplayIn
for (int i = 0; i < 8; ++i)
rotated_bounds.merge(iRotation * mdl_box.corner(i));
- this->iBound = rotated_bounds + iPos;
+ iBound = rotated_bounds + iPos;
#ifdef SPAWN_CORNERS
// test:
for (int i = 0; i < 8; ++i)
{
Vector3 pos(iBound.corner(i));
- if (Creature* c = const_cast<GameObject&>(go).SummonCreature(24440, pos.x, pos.y, pos.z, 0, TEMPSUMMON_MANUAL_DESPAWN))
- {
- c->setFaction(35);
- c->SetObjectScale(0.1f);
- }
+ go.SummonCreature(1, pos.x, pos.y, pos.z, 0, TEMPSUMMON_MANUAL_DESPAWN);
}
#endif
@@ -184,3 +180,43 @@ bool GameObjectModel::intersectRay(const G3D::Ray& ray, float& MaxDist, bool Sto
}
return hit;
}
+
+bool GameObjectModel::Relocate(const GameObject& go)
+{
+ if (!iModel)
+ return false;
+
+ ModelList::const_iterator it = model_list.find(go.GetDisplayId());
+ if (it == model_list.end())
+ return false;
+
+ G3D::AABox mdl_box(it->second.bound);
+ // ignore models with no bounds
+ if (mdl_box == G3D::AABox::zero())
+ {
+ VMAP_ERROR_LOG("misc", "GameObject model %s has zero bounds, loading skipped", it->second.name.c_str());
+ return false;
+ }
+
+ iPos = Vector3(go.GetPositionX(), go.GetPositionY(), go.GetPositionZ());
+
+ G3D::Matrix3 iRotation = G3D::Matrix3::fromEulerAnglesZYX(go.GetOrientation(), 0, 0);
+ iInvRot = iRotation.inverse();
+ // transform bounding box:
+ mdl_box = AABox(mdl_box.low() * iScale, mdl_box.high() * iScale);
+ AABox rotated_bounds;
+ for (int i = 0; i < 8; ++i)
+ rotated_bounds.merge(iRotation * mdl_box.corner(i));
+
+ iBound = rotated_bounds + iPos;
+#ifdef SPAWN_CORNERS
+ // test:
+ for (int i = 0; i < 8; ++i)
+ {
+ Vector3 pos(iBound.corner(i));
+ go.SummonCreature(1, pos.x, pos.y, pos.z, 0, TEMPSUMMON_MANUAL_DESPAWN);
+ }
+#endif
+
+ return true;
+}
diff --git a/src/server/collision/Models/GameObjectModel.h b/src/server/collision/Models/GameObjectModel.h
index 06a74cc6eb0..6088b924343 100644
--- a/src/server/collision/Models/GameObjectModel.h
+++ b/src/server/collision/Models/GameObjectModel.h
@@ -45,7 +45,7 @@ class GameObjectModel /*, public Intersectable*/
float iScale;
VMAP::WorldModel* iModel;
- GameObjectModel() : phasemask(0), iModel(NULL) { }
+ GameObjectModel() : phasemask(0), iInvScale(0), iScale(0), iModel(NULL) { }
bool initialize(const GameObject& go, const GameObjectDisplayInfoEntry& info);
public:
@@ -66,6 +66,8 @@ public:
bool intersectRay(const G3D::Ray& Ray, float& MaxDist, bool StopAtFirstHit, uint32 ph_mask) const;
static GameObjectModel* Create(const GameObject& go);
+
+ bool Relocate(GameObject const& go);
};
-#endif // _GAMEOBJECT_MODEL_H \ No newline at end of file
+#endif // _GAMEOBJECT_MODEL_H
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 49beb0ae86f..231f3808aa9 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -512,7 +512,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
// unless target is outside spell range, out of mana, or LOS.
bool _allowMove = false;
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(e.action.cast.spell);
+ SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(e.action.cast.spell);
int32 mana = me->GetPower(POWER_MANA);
if (me->GetDistance(*itr) > spellInfo->GetMaxRange(true) ||
@@ -3118,6 +3118,68 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
ProcessTimedAction(e, e.event.friendlyHealthPct.repeatMin, e.event.friendlyHealthPct.repeatMax, target);
break;
}
+ case SMART_EVENT_DISTANCE_CREATURE:
+ {
+ if (!me)
+ return;
+
+ WorldObject* creature = NULL;
+
+ if (e.event.distance.guid != 0)
+ {
+ creature = FindCreatureNear(me, e.event.distance.guid);
+
+ if (!creature)
+ return;
+
+ if (!me->IsInRange(creature, 0, (float)e.event.distance.dist))
+ return;
+ }
+ else if (e.event.distance.entry != 0)
+ {
+ std::list<Creature*> list;
+ me->GetCreatureListWithEntryInGrid(list, e.event.distance.entry, (float)e.event.distance.dist);
+
+ if (list.size() > 0)
+ creature = list.front();
+ }
+
+ if (creature)
+ ProcessTimedAction(e, e.event.distance.repeat, e.event.distance.repeat);
+
+ break;
+ }
+ case SMART_EVENT_DISTANCE_GAMEOBJECT:
+ {
+ if (!me)
+ return;
+
+ WorldObject* gameobject = NULL;
+
+ if (e.event.distance.guid != 0)
+ {
+ gameobject = FindGameObjectNear(me, e.event.distance.guid);
+
+ if (!gameobject)
+ return;
+
+ if (!me->IsInRange(gameobject, 0, (float)e.event.distance.dist))
+ return;
+ }
+ else if (e.event.distance.entry != 0)
+ {
+ std::list<GameObject*> list;
+ me->GetGameObjectListWithEntryInGrid(list, e.event.distance.entry, (float)e.event.distance.dist);
+
+ if (list.size() > 0)
+ gameobject = list.front();
+ }
+
+ if (gameobject)
+ ProcessTimedAction(e, e.event.distance.repeat, e.event.distance.repeat);
+
+ break;
+ }
default:
TC_LOG_ERROR("sql.sql", "SmartScript::ProcessEvent: Unhandled Event type %u", e.GetEventType());
break;
@@ -3138,6 +3200,10 @@ void SmartScript::InitTimer(SmartScriptHolder& e)
case SMART_EVENT_OOC_LOS:
RecalcTimer(e, e.event.los.cooldownMin, e.event.los.cooldownMax);
break;
+ case SMART_EVENT_DISTANCE_CREATURE:
+ case SMART_EVENT_DISTANCE_GAMEOBJECT:
+ RecalcTimer(e, e.event.distance.repeat, e.event.distance.repeat);
+ break;
default:
e.active = true;
break;
@@ -3198,6 +3264,8 @@ void SmartScript::UpdateTimer(SmartScriptHolder& e, uint32 const diff)
case SMART_EVENT_TARGET_BUFFED:
case SMART_EVENT_IS_BEHIND_TARGET:
case SMART_EVENT_FRIENDLY_HEALTH_PCT:
+ case SMART_EVENT_DISTANCE_CREATURE:
+ case SMART_EVENT_DISTANCE_GAMEOBJECT:
{
ProcessEvent(e);
if (e.GetScriptType() == SMART_SCRIPT_TYPE_TIMED_ACTIONLIST)
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
index c6b73a468d2..93a9c6419b0 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp
@@ -583,6 +583,56 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
return false;
}
break;
+ case SMART_EVENT_DISTANCE_CREATURE:
+ if (e.event.distance.guid == 0 && e.event.distance.entry == 0)
+ {
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Event SMART_EVENT_DISTANCE_CREATURE did not provide creature guid or entry, skipped.");
+ return false;
+ }
+
+ if (e.event.distance.guid != 0 && e.event.distance.entry != 0)
+ {
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Event SMART_EVENT_DISTANCE_CREATURE provided both an entry and guid, skipped.");
+ return false;
+ }
+
+ if (e.event.distance.guid != 0 && !sObjectMgr->GetCreatureData(e.event.distance.guid))
+ {
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Event SMART_EVENT_DISTANCE_CREATURE using invalid creature guid %u, skipped.", e.event.distance.guid);
+ return false;
+ }
+
+ if (e.event.distance.entry != 0 && !sObjectMgr->GetCreatureTemplate(e.event.distance.entry))
+ {
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Event SMART_EVENT_DISTANCE_CREATURE using invalid creature entry %u, skipped.", e.event.distance.entry);
+ return false;
+ }
+ break;
+ case SMART_EVENT_DISTANCE_GAMEOBJECT:
+ if (e.event.distance.guid == 0 && e.event.distance.entry == 0)
+ {
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Event SMART_EVENT_DISTANCE_GAMEOBJECT did not provide gameobject guid or entry, skipped.");
+ return false;
+ }
+
+ if (e.event.distance.guid != 0 && e.event.distance.entry != 0)
+ {
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Event SMART_EVENT_DISTANCE_GAMEOBJECT provided both an entry and guid, skipped.");
+ return false;
+ }
+
+ if (e.event.distance.guid != 0 && !sObjectMgr->GetGOData(e.event.distance.guid))
+ {
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Event SMART_EVENT_DISTANCE_GAMEOBJECT using invalid gameobject guid %u, skipped.", e.event.distance.guid);
+ return false;
+ }
+
+ if (e.event.distance.entry != 0 && !sObjectMgr->GetGameObjectTemplate(e.event.distance.entry))
+ {
+ TC_LOG_ERROR("sql.sql", "SmartAIMgr: Event SMART_EVENT_DISTANCE_GAMEOBJECT using invalid gameobject entry %u, skipped.", e.event.distance.entry);
+ return false;
+ }
+ break;
case SMART_EVENT_GO_STATE_CHANGED:
case SMART_EVENT_GO_EVENT_INFORM:
case SMART_EVENT_TIMED_EVENT_TRIGGERED:
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
index 265df8e2ac4..ac67fac0bfd 100644
--- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h
+++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h
@@ -165,8 +165,10 @@ enum SMART_EVENT
SMART_EVENT_ACTION_DONE = 72, // eventId (SharedDefines.EventId)
SMART_EVENT_ON_SPELLCLICK = 73, // clicker (unit)
SMART_EVENT_FRIENDLY_HEALTH_PCT = 74, // minHpPct, maxHpPct, repeatMin, repeatMax
+ SMART_EVENT_DISTANCE_CREATURE = 75, // guid, entry, distance, repeat
+ SMART_EVENT_DISTANCE_GAMEOBJECT = 76, // guid, entry, distance, repeat
- SMART_EVENT_END = 75
+ SMART_EVENT_END = 77
};
struct SmartEvent
@@ -388,6 +390,14 @@ struct SmartEvent
struct
{
+ uint32 guid;
+ uint32 entry;
+ uint32 dist;
+ uint32 repeat;
+ } distance;
+
+ struct
+ {
uint32 param1;
uint32 param2;
uint32 param3;
@@ -1220,7 +1230,7 @@ const uint32 SmartAIEventMask[SMART_EVENT_END][2] =
{SMART_EVENT_REACHED_HOME, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_RECEIVE_EMOTE, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_HAS_AURA, SMART_SCRIPT_TYPE_MASK_CREATURE },
- {SMART_EVENT_TARGET_BUFFED, SMART_SCRIPT_TYPE_MASK_CREATURE + SMART_SCRIPT_TYPE_MASK_GAMEOBJECT },
+ {SMART_EVENT_TARGET_BUFFED, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_RESET, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_IC_LOS, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_PASSENGER_BOARDED, SMART_SCRIPT_TYPE_MASK_CREATURE },
@@ -1271,6 +1281,8 @@ const uint32 SmartAIEventMask[SMART_EVENT_END][2] =
{SMART_EVENT_ACTION_DONE, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_ON_SPELLCLICK, SMART_SCRIPT_TYPE_MASK_CREATURE },
{SMART_EVENT_FRIENDLY_HEALTH_PCT, SMART_SCRIPT_TYPE_MASK_CREATURE },
+ {SMART_EVENT_DISTANCE_CREATURE, SMART_SCRIPT_TYPE_MASK_CREATURE },
+ {SMART_EVENT_DISTANCE_GAMEOBJECT, SMART_SCRIPT_TYPE_MASK_CREATURE },
};
enum SmartEventFlags
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 3fcfab81c73..c4aa3ef4481 100644
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -1522,21 +1522,33 @@ void Battleground::DoorOpen(uint32 type)
type, GUID_LOPART(BgObjects[type]), m_MapId, m_InstanceID);
}
-GameObject* Battleground::GetBGObject(uint32 type)
+GameObject* Battleground::GetBGObject(uint32 type, bool logError)
{
GameObject* obj = GetBgMap()->GetGameObject(BgObjects[type]);
if (!obj)
- TC_LOG_ERROR("bg.battleground", "Battleground::GetBGObject: gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
- type, GUID_LOPART(BgObjects[type]), m_MapId, m_InstanceID);
+ {
+ if (logError)
+ TC_LOG_ERROR("bg.battleground", "Battleground::GetBGObject: gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
+ type, GUID_LOPART(BgObjects[type]), m_MapId, m_InstanceID);
+ else
+ TC_LOG_INFO("bg.battleground", "Battleground::GetBGObject: gameobject (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
+ type, GUID_LOPART(BgObjects[type]), m_MapId, m_InstanceID);
+ }
return obj;
}
-Creature* Battleground::GetBGCreature(uint32 type)
+Creature* Battleground::GetBGCreature(uint32 type, bool logError)
{
Creature* creature = GetBgMap()->GetCreature(BgCreatures[type]);
if (!creature)
- TC_LOG_ERROR("bg.battleground", "Battleground::GetBGCreature: creature (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
- type, GUID_LOPART(BgCreatures[type]), m_MapId, m_InstanceID);
+ {
+ if (logError)
+ TC_LOG_ERROR("bg.battleground", "Battleground::GetBGCreature: creature (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
+ type, GUID_LOPART(BgCreatures[type]), m_MapId, m_InstanceID);
+ else
+ TC_LOG_INFO("bg.battleground", "Battleground::GetBGCreature: creature (type: %u, GUID: %u) not found for BG (map: %u, instance id: %u)!",
+ type, GUID_LOPART(BgCreatures[type]), m_MapId, m_InstanceID);
+ }
return creature;
}
diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h
index a866f09639a..5e2aa4b2316 100644
--- a/src/server/game/Battlegrounds/Battleground.h
+++ b/src/server/game/Battlegrounds/Battleground.h
@@ -382,8 +382,8 @@ class Battleground
void StartBattleground();
- GameObject* GetBGObject(uint32 type);
- Creature* GetBGCreature(uint32 type);
+ GameObject* GetBGObject(uint32 type, bool logError = true);
+ Creature* GetBGCreature(uint32 type, bool logError = true);
// Location
void SetMapId(uint32 MapID) { m_MapId = MapID; }
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
index 6256f53f07b..610e0bcecc7 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
@@ -790,7 +790,7 @@ void BattlegroundAV::PopulateNode(BG_AV_Nodes node)
if (node >= BG_AV_NODES_MAX)//fail safe
return;
- Creature* trigger = GetBGCreature(node + 302);//0-302 other creatures
+ Creature* trigger = GetBGCreature(node + 302, false);//0-302 other creatures
if (!trigger)
{
trigger = AddCreature(WORLD_TRIGGER,
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
index be2684631df..bc684aed176 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
@@ -780,7 +780,7 @@ void BattlegroundEY::EventTeamCapturedPoint(Player* player, uint32 Point)
if (Point >= EY_POINTS_MAX)
return;
- Creature* trigger = GetBGCreature(Point + 6);//0-5 spirit guides
+ Creature* trigger = GetBGCreature(Point + 6, false);//0-5 spirit guides
if (!trigger)
trigger = AddCreature(WORLD_TRIGGER, Point+6, Team, BG_EY_TriggerPositions[Point][0], BG_EY_TriggerPositions[Point][1], BG_EY_TriggerPositions[Point][2], BG_EY_TriggerPositions[Point][3]);
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
index 590a07541fe..fc3f839ae76 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
@@ -658,7 +658,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
// we must del opposing faction vehicles when the node is captured (unused ones)
for (uint8 i = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_GLAIVE_THROWER_1_H : BG_IC_NPC_GLAIVE_THROWER_1_A); i < (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_GLAIVE_THROWER_2_H : BG_IC_NPC_GLAIVE_THROWER_2_A); ++i)
{
- if (Creature* glaiveThrower = GetBGCreature(i))
+ if (Creature* glaiveThrower = GetBGCreature(i, false))
{
if (Vehicle* vehicleGlaive = glaiveThrower->GetVehicleKit())
{
@@ -670,7 +670,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
for (uint8 i = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_CATAPULT_1_H : BG_IC_NPC_CATAPULT_1_A); i < (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_CATAPULT_4_H : BG_IC_NPC_CATAPULT_4_A); ++i)
{
- if (Creature* catapult = GetBGCreature(i))
+ if (Creature* catapult = GetBGCreature(i, false))
{
if (Vehicle* vehicleGlaive = catapult->GetVehicleKit())
{
@@ -685,7 +685,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
{
uint8 type = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_GLAIVE_THROWER_1_A : BG_IC_NPC_GLAIVE_THROWER_1_H)+i;
- if (GetBGCreature(type) && GetBGCreature(type)->IsAlive())
+ if (GetBGCreature(type, false) && GetBGCreature(type)->IsAlive())
continue;
if (AddCreature(nodePoint->faction == TEAM_ALLIANCE ? NPC_GLAIVE_THROWER_A : NPC_GLAIVE_THROWER_H, type, nodePoint->faction,
@@ -700,7 +700,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
{
uint8 type = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_CATAPULT_1_A : BG_IC_NPC_CATAPULT_1_H)+i;
- if (GetBGCreature(type) && GetBGCreature(type)->IsAlive())
+ if (GetBGCreature(type, false) && GetBGCreature(type)->IsAlive())
continue;
if (AddCreature(NPC_CATAPULT, type, nodePoint->faction,
@@ -720,7 +720,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
// we must del opposing faction vehicles when the node is captured (unused ones)
for (uint8 i = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_DEMOLISHER_1_H : BG_IC_NPC_DEMOLISHER_1_A); i < (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_DEMOLISHER_4_H : BG_IC_NPC_DEMOLISHER_4_A); ++i)
{
- if (Creature* demolisher = GetBGCreature(i))
+ if (Creature* demolisher = GetBGCreature(i, false))
{
if (Vehicle* vehicleDemolisher = demolisher->GetVehicleKit())
{
@@ -735,7 +735,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
{
uint8 type = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_DEMOLISHER_1_A : BG_IC_NPC_DEMOLISHER_1_H)+i;
- if (GetBGCreature(type) && GetBGCreature(type)->IsAlive())
+ if (GetBGCreature(type, false) && GetBGCreature(type)->IsAlive())
continue;
if (AddCreature(NPC_DEMOLISHER, type, nodePoint->faction,
@@ -748,7 +748,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
// we check if the opossing siege engine is in use
int8 enemySiege = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_SIEGE_ENGINE_H : BG_IC_NPC_SIEGE_ENGINE_A);
- if (Creature* siegeEngine = GetBGCreature(enemySiege))
+ if (Creature* siegeEngine = GetBGCreature(enemySiege, false))
{
if (Vehicle* vehicleSiege = siegeEngine->GetVehicleKit())
{
@@ -759,7 +759,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
}
uint8 siegeType = (nodePoint->faction == TEAM_ALLIANCE ? BG_IC_NPC_SIEGE_ENGINE_A : BG_IC_NPC_SIEGE_ENGINE_H);
- if (!GetBGCreature(siegeType) || !GetBGCreature(siegeType)->IsAlive())
+ if (!GetBGCreature(siegeType, false) || !GetBGCreature(siegeType)->IsAlive())
{
AddCreature((nodePoint->faction == TEAM_ALLIANCE ? NPC_SIEGE_ENGINE_A : NPC_SIEGE_ENGINE_H), siegeType, nodePoint->faction,
BG_IC_WorkshopVehicles[4].GetPositionX(), BG_IC_WorkshopVehicles[4].GetPositionY(),
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index e76ba18f1e2..bb1a722ec42 100644
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -1078,8 +1078,7 @@ bool ConditionMgr::addToGossipMenuItems(Condition* cond)
bool ConditionMgr::addToSpellImplicitTargetConditions(Condition* cond)
{
uint32 conditionEffMask = cond->SourceGroup;
- SpellInfo* spellInfo = const_cast<SpellInfo*>(sSpellMgr->GetSpellInfo(cond->SourceEntry));
- ASSERT(spellInfo);
+ SpellInfo* spellInfo = const_cast<SpellInfo*>(sSpellMgr->EnsureSpellInfo(cond->SourceEntry));
std::list<uint32> sharedMasks;
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
@@ -1994,7 +1993,7 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
}
case CONDITION_UNIT_STATE:
{
- if (cond->ConditionValue1 > uint32(UNIT_STATE_ALL_STATE))
+ if (!(cond->ConditionValue1 & UNIT_STATE_ALL_STATE_SUPPORTED))
{
TC_LOG_ERROR("sql.sql", "UnitState condition has non existing UnitState in value1 (%u), skipped", cond->ConditionValue1);
return false;
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp
index a4b3ded80e5..37f4f4c1930 100644
--- a/src/server/game/DataStores/DBCStores.cpp
+++ b/src/server/game/DataStores/DBCStores.cpp
@@ -123,6 +123,7 @@ DBCStorage <ItemRandomSuffixEntry> sItemRandomSuffixStore(ItemRandomSuffixfmt);
DBCStorage <ItemSetEntry> sItemSetStore(ItemSetEntryfmt);
DBCStorage <LFGDungeonEntry> sLFGDungeonStore(LFGDungeonEntryfmt);
+DBCStorage <LightEntry> sLightStore(LightEntryfmt);
DBCStorage <LiquidTypeEntry> sLiquidTypeStore(LiquidTypefmt);
DBCStorage <LockEntry> sLockStore(LockEntryfmt);
@@ -371,6 +372,7 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales, bad_dbc_files, sItemSetStore, dbcPath, "ItemSet.dbc");
LoadDBC(availableDbcLocales, bad_dbc_files, sLFGDungeonStore, dbcPath, "LFGDungeons.dbc");
+ LoadDBC(availableDbcLocales, bad_dbc_files, sLightStore, dbcPath, "Light.dbc");
LoadDBC(availableDbcLocales, bad_dbc_files, sLiquidTypeStore, dbcPath, "LiquidType.dbc");
LoadDBC(availableDbcLocales, bad_dbc_files, sLockStore, dbcPath, "Lock.dbc");
@@ -944,3 +946,18 @@ LFGDungeonEntry const* GetLFGDungeon(uint32 mapId, Difficulty difficulty)
return NULL;
}
+
+uint32 GetDefaultMapLight(uint32 mapId)
+{
+ for (int32 i = sLightStore.GetNumRows(); i >= 0; --i)
+ {
+ LightEntry const* light = sLightStore.LookupEntry(uint32(i));
+ if (!light)
+ continue;
+
+ if (light->MapId == mapId && light->X == 0.0f && light->Y == 0.0f && light->Z == 0.0f)
+ return light->Id;
+ }
+
+ return 0;
+}
diff --git a/src/server/game/DataStores/DBCStores.h b/src/server/game/DataStores/DBCStores.h
index fe8fb35220b..39747141322 100644
--- a/src/server/game/DataStores/DBCStores.h
+++ b/src/server/game/DataStores/DBCStores.h
@@ -72,6 +72,8 @@ CharStartOutfitEntry const* GetCharStartOutfitEntry(uint8 race, uint8 class_, ui
LFGDungeonEntry const* GetLFGDungeon(uint32 mapId, Difficulty difficulty);
+uint32 GetDefaultMapLight(uint32 mapId);
+
extern DBCStorage <AchievementEntry> sAchievementStore;
extern DBCStorage <AchievementCriteriaEntry> sAchievementCriteriaStore;
extern DBCStorage <AreaTableEntry> sAreaStore;// recommend access using functions
diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h
index d1db4fb634d..8efc32cc9b2 100644
--- a/src/server/game/DataStores/DBCStructure.h
+++ b/src/server/game/DataStores/DBCStructure.h
@@ -1230,6 +1230,24 @@ struct LFGDungeonEntry
uint32 Entry() const { return ID + (type << 24); }
};
+struct LightEntry
+{
+ uint32 Id;
+ uint32 MapId;
+ float X;
+ float Y;
+ float Z;
+ //float FalloffStart;
+ //float FalloffEnd;
+ //uint32 SkyAndFog;
+ //uint32 WaterSettings;
+ //uint32 SunsetParams;
+ //uint32 OtherParams;
+ //uint32 DeathParams;
+ //uint32 Unknown;
+ //uint32 Unknown;
+ //uint32 Unknown;
+};
struct LiquidTypeEntry
{
diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h
index be4369399d4..a1587dd6087 100644
--- a/src/server/game/DataStores/DBCfmt.h
+++ b/src/server/game/DataStores/DBCfmt.h
@@ -79,6 +79,7 @@ char const ItemRandomPropertiesfmt[] = "nxiiixxssssssssssssssssx";
char const ItemRandomSuffixfmt[] = "nssssssssssssssssxxiiixxiiixx";
char const ItemSetEntryfmt[] = "dssssssssssssssssxiiiiiiiiiixxxxxxxiiiiiiiiiiiiiiiiii";
char const LFGDungeonEntryfmt[] = "nssssssssssssssssxiiiiiiiiixxixixxxxxxxxxxxxxxxxx";
+char const LightEntryfmt[] = "nifffxxxxxxxxxx";
char const LiquidTypefmt[] = "nxxixixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
char const LockEntryfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiixxxxxxxx";
char const MailTemplateEntryfmt[] = "nxxxxxxxxxxxxxxxxxssssssssssssssssx";
diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp
index d9df2057b54..98ca9222e67 100644
--- a/src/server/game/DungeonFinding/LFGMgr.cpp
+++ b/src/server/game/DungeonFinding/LFGMgr.cpp
@@ -968,6 +968,7 @@ void LFGMgr::MakeNewGroup(LfgProposal const& proposal)
player->CastSpell(player, LFG_SPELL_DUNGEON_COOLDOWN, false);
}
+ ASSERT(grp);
grp->SetDungeonDifficulty(Difficulty(dungeon->difficulty));
uint64 gguid = grp->GetGUID();
SetDungeon(gguid, dungeon->Entry());
diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h
index 737e3072091..69c3d169170 100644
--- a/src/server/game/Entities/Creature/Creature.h
+++ b/src/server/game/Entities/Creature/Creature.h
@@ -635,13 +635,13 @@ class Creature : public Unit, public GridObject<Creature>, public MapObject
void SetHomePosition(float x, float y, float z, float o) { m_homePosition.Relocate(x, y, z, o); }
void SetHomePosition(const Position &pos) { m_homePosition.Relocate(pos); }
- void GetHomePosition(float &x, float &y, float &z, float &ori) const { m_homePosition.GetPosition(x, y, z, ori); }
- Position GetHomePosition() const { return m_homePosition; }
+ void GetHomePosition(float& x, float& y, float& z, float& ori) const { m_homePosition.GetPosition(x, y, z, ori); }
+ Position const& GetHomePosition() const { return m_homePosition; }
void SetTransportHomePosition(float x, float y, float z, float o) { m_transportHomePosition.Relocate(x, y, z, o); }
void SetTransportHomePosition(const Position &pos) { m_transportHomePosition.Relocate(pos); }
- void GetTransportHomePosition(float &x, float &y, float &z, float &ori) { m_transportHomePosition.GetPosition(x, y, z, ori); }
- Position GetTransportHomePosition() { return m_transportHomePosition; }
+ void GetTransportHomePosition(float& x, float& y, float& z, float& ori) const { m_transportHomePosition.GetPosition(x, y, z, ori); }
+ Position const& GetTransportHomePosition() const { return m_transportHomePosition; }
uint32 GetWaypointPath() const { return m_path_id; }
void LoadPath(uint32 pathid) { m_path_id = pathid; }
diff --git a/src/server/game/Entities/Creature/GossipDef.cpp b/src/server/game/Entities/Creature/GossipDef.cpp
index ffb28849925..8671caf864d 100644
--- a/src/server/game/Entities/Creature/GossipDef.cpp
+++ b/src/server/game/Entities/Creature/GossipDef.cpp
@@ -28,6 +28,7 @@ GossipMenu::GossipMenu()
{
_menuId = 0;
_locale = DEFAULT_LOCALE;
+ _senderGUID = 0;
}
GossipMenu::~GossipMenu()
@@ -166,8 +167,10 @@ void PlayerMenu::ClearMenus()
_questMenu.ClearMenu();
}
-void PlayerMenu::SendGossipMenu(uint32 titleTextId, uint64 objectGUID) const
+void PlayerMenu::SendGossipMenu(uint32 titleTextId, uint64 objectGUID)
{
+ _gossipMenu.SetSenderGUID(objectGUID);
+
WorldPacket data(SMSG_GOSSIP_MESSAGE, 100); // guess size
data << uint64(objectGUID);
data << uint32(_gossipMenu.GetMenuId()); // new 2.4.0
@@ -222,8 +225,10 @@ void PlayerMenu::SendGossipMenu(uint32 titleTextId, uint64 objectGUID) const
_session->SendPacket(&data);
}
-void PlayerMenu::SendCloseGossip() const
+void PlayerMenu::SendCloseGossip()
{
+ _gossipMenu.SetSenderGUID(0);
+
WorldPacket data(SMSG_GOSSIP_COMPLETE, 0);
_session->SendPacket(&data);
}
diff --git a/src/server/game/Entities/Creature/GossipDef.h b/src/server/game/Entities/Creature/GossipDef.h
index 9a30fdeee2b..e8fac878409 100644
--- a/src/server/game/Entities/Creature/GossipDef.h
+++ b/src/server/game/Entities/Creature/GossipDef.h
@@ -25,7 +25,7 @@
class WorldSession;
-#define GOSSIP_MAX_MENU_ITEMS 64 // client supported items unknown, but provided number must be enough
+#define GOSSIP_MAX_MENU_ITEMS 32
#define DEFAULT_GOSSIP_MESSAGE 0xffffff
enum Gossip_Option
@@ -167,6 +167,8 @@ class GossipMenu
void SetMenuId(uint32 menu_id) { _menuId = menu_id; }
uint32 GetMenuId() const { return _menuId; }
+ void SetSenderGUID(uint64 guid) { _senderGUID = guid; }
+ uint64 GetSenderGUID() const { return _senderGUID; }
void SetLocale(LocaleConstant locale) { _locale = locale; }
LocaleConstant GetLocale() const { return _locale; }
@@ -215,6 +217,7 @@ class GossipMenu
GossipMenuItemContainer _menuItems;
GossipMenuItemDataContainer _menuItemData;
uint32 _menuId;
+ uint64 _senderGUID;
LocaleConstant _locale;
};
@@ -264,8 +267,8 @@ class PlayerMenu
uint32 GetGossipOptionAction(uint32 selection) const { return _gossipMenu.GetMenuItemAction(selection); }
bool IsGossipOptionCoded(uint32 selection) const { return _gossipMenu.IsMenuItemCoded(selection); }
- void SendGossipMenu(uint32 titleTextId, uint64 objectGUID) const;
- void SendCloseGossip() const;
+ void SendGossipMenu(uint32 titleTextId, uint64 objectGUID);
+ void SendCloseGossip();
void SendPointOfInterest(uint32 poiId) const;
/*********************************************************/
diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.cpp b/src/server/game/Entities/DynamicObject/DynamicObject.cpp
index f4e956e8839..7cc94d992a1 100644
--- a/src/server/game/Entities/DynamicObject/DynamicObject.cpp
+++ b/src/server/game/Entities/DynamicObject/DynamicObject.cpp
@@ -26,6 +26,7 @@
#include "CellImpl.h"
#include "GridNotifiersImpl.h"
#include "ScriptMgr.h"
+#include "Transport.h"
DynamicObject::DynamicObject(bool isWorldObject) : WorldObject(isWorldObject),
_aura(NULL), _removedAura(NULL), _caster(NULL), _duration(0), _isViewpoint(false)
@@ -47,6 +48,18 @@ DynamicObject::~DynamicObject()
delete _removedAura;
}
+void DynamicObject::CleanupsBeforeDelete(bool finalCleanup /* = true */)
+{
+ WorldObject::CleanupsBeforeDelete(finalCleanup);
+
+ if (Transport* transport = GetTransport())
+ {
+ transport->RemovePassenger(this);
+ SetTransport(NULL);
+ m_movementInfo.transport.Reset();
+ }
+}
+
void DynamicObject::AddToWorld()
{
///- Register the dynamicObject for guid lookup and for caster
@@ -108,8 +121,28 @@ bool DynamicObject::CreateDynamicObject(uint32 guidlow, Unit* caster, uint32 spe
if (IsWorldObject())
setActive(true); //must before add to map to be put in world container
+ Transport* transport = caster->GetTransport();
+ if (transport)
+ {
+ m_movementInfo.transport.guid = GetGUID();
+
+ float x, y, z, o;
+ pos.GetPosition(x, y, z, o);
+ transport->CalculatePassengerOffset(x, y, z, &o);
+ m_movementInfo.transport.pos.Relocate(x, y, z, o);
+
+ SetTransport(transport);
+ // This object must be added to transport before adding to map for the client to properly display it
+ transport->AddPassenger(this);
+ }
+
if (!GetMap()->AddToMap(this))
+ {
+ // Returning false will cause the object to be deleted - remove from transport
+ if (transport)
+ transport->RemovePassenger(this);
return false;
+ }
return true;
}
diff --git a/src/server/game/Entities/DynamicObject/DynamicObject.h b/src/server/game/Entities/DynamicObject/DynamicObject.h
index 5b68bf377b9..cdba5982b3f 100644
--- a/src/server/game/Entities/DynamicObject/DynamicObject.h
+++ b/src/server/game/Entities/DynamicObject/DynamicObject.h
@@ -32,7 +32,7 @@ enum DynamicObjectType
DYNAMIC_OBJECT_FARSIGHT_FOCUS = 0x2
};
-class DynamicObject : public WorldObject, public GridObject<DynamicObject>
+class DynamicObject : public WorldObject, public GridObject<DynamicObject>, public MapObject
{
public:
DynamicObject(bool isWorldObject);
@@ -41,6 +41,8 @@ class DynamicObject : public WorldObject, public GridObject<DynamicObject>
void AddToWorld();
void RemoveFromWorld();
+ void CleanupsBeforeDelete(bool finalCleanup = true) OVERRIDE;
+
bool CreateDynamicObject(uint32 guidlow, Unit* caster, uint32 spellId, Position const& pos, float radius, DynamicObjectType type);
void Update(uint32 p_time);
void Remove();
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index e3c8c9c8136..67f7b1a46b2 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -148,7 +148,7 @@ void GameObject::AddToWorld()
sObjectAccessor->AddObject(this);
// The state can be changed after GameObject::Create but before GameObject::AddToWorld
- bool toggledState = GetGoType() == GAMEOBJECT_TYPE_CHEST ? getLootState() == GO_READY : GetGoState() == GO_STATE_READY;
+ bool toggledState = GetGoType() == GAMEOBJECT_TYPE_CHEST ? getLootState() == GO_READY : (GetGoState() == GO_STATE_READY || IsTransport());
if (m_model)
GetMap()->InsertGameObjectModel(*m_model);
@@ -317,7 +317,6 @@ void GameObject::Update(uint32 diff)
m_lootState = GO_READY;
break;
}
- /* TODO: Fix movement in unloaded grid - currently GO will just disappear
case GAMEOBJECT_TYPE_TRANSPORT:
{
if (!m_goValue.Transport.AnimationInfo)
@@ -326,6 +325,7 @@ void GameObject::Update(uint32 diff)
if (GetGoState() == GO_STATE_READY)
{
m_goValue.Transport.PathProgress += diff;
+ /* TODO: Fix movement in unloaded grid - currently GO will just disappear
uint32 timer = m_goValue.Transport.PathProgress % m_goValue.Transport.AnimationInfo->TotalTime;
TransportAnimationEntry const* node = m_goValue.Transport.AnimationInfo->GetAnimNode(timer);
if (node && m_goValue.Transport.CurrentSeg != node->TimeSeg)
@@ -341,14 +341,14 @@ void GameObject::Update(uint32 diff)
G3D::Vector3 src(GetPositionX(), GetPositionY(), GetPositionZ());
- TC_LOG_INFO("misc", "Src: %s Dest: %s", src.toString().c_str(), pos.toString().c_str());
+ TC_LOG_DEBUG("misc", "Src: %s Dest: %s", src.toString().c_str(), pos.toString().c_str());
GetMap()->GameObjectRelocation(this, pos.x, pos.y, pos.z, GetOrientation());
}
+ */
}
break;
}
- */
case GAMEOBJECT_TYPE_FISHINGNODE:
{
// fishing code (bobber ready)
@@ -2019,7 +2019,7 @@ void GameObject::SetGoState(GOState state)
{
SetByteValue(GAMEOBJECT_BYTES_1, 0, state);
sScriptMgr->OnGameObjectStateChanged(this, state);
- if (m_model)
+ if (m_model && !IsTransport())
{
if (!IsInWorld())
return;
@@ -2238,3 +2238,16 @@ float GameObject::GetInteractionDistance()
return INTERACTION_DISTANCE;
}
}
+
+void GameObject::UpdateModelPosition()
+{
+ if (!m_model)
+ return;
+
+ if (GetMap()->ContainsGameObjectModel(*m_model))
+ {
+ GetMap()->RemoveGameObjectModel(*m_model);
+ m_model->Relocate(*this);
+ GetMap()->InsertGameObjectModel(*m_model);
+ }
+}
diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h
index 84abc391bc6..48db64a3687 100644
--- a/src/server/game/Entities/GameObject/GameObject.h
+++ b/src/server/game/Entities/GameObject/GameObject.h
@@ -832,6 +832,8 @@ class GameObject : public WorldObject, public GridObject<GameObject>, public Map
float GetInteractionDistance();
+ void UpdateModelPosition();
+
protected:
bool AIM_Initialize();
void UpdateModel(); // updates model in case displayId were changed
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index 8af48f277bd..12c8d0ba2ac 100644
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -370,6 +370,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint16 flags) const
{
if (flags & UPDATEFLAG_POSITION)
{
+ ASSERT(object);
Transport* transport = object->GetTransport();
if (transport)
@@ -412,6 +413,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint16 flags) const
// 0x40
if (flags & UPDATEFLAG_STATIONARY_POSITION)
{
+ ASSERT(object);
*data << object->GetStationaryX();
*data << object->GetStationaryY();
*data << object->GetStationaryZ();
@@ -459,6 +461,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint16 flags) const
// 0x4
if (flags & UPDATEFLAG_HAS_TARGET)
{
+ ASSERT(unit);
if (Unit* victim = unit->GetVictim())
data->append(victim->GetPackGUID());
else
@@ -469,7 +472,12 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint16 flags) const
if (flags & UPDATEFLAG_TRANSPORT)
{
GameObject const* go = ToGameObject();
- if (go && go->IsTransport())
+ /** @TODO Use IsTransport() to also handle type 11 (TRANSPORT)
+ Currently grid objects are not updated if there are no nearby players,
+ this causes clients to receive different PathProgress
+ resulting in players seeing the object in a different position
+ */
+ if (go && go->ToTransport())
*data << uint32(go->GetGOValue()->Transport.PathProgress);
else
*data << uint32(getMSTime());
@@ -479,6 +487,9 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint16 flags) const
if (flags & UPDATEFLAG_VEHICLE)
{
/// @todo Allow players to aquire this updateflag.
+ ASSERT(unit);
+ ASSERT(unit->GetVehicleKit());
+ ASSERT(unit->GetVehicleKit()->GetVehicleInfo());
*data << uint32(unit->GetVehicleKit()->GetVehicleInfo()->m_ID);
if (unit->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
*data << float(unit->GetTransOffsetO());
@@ -739,7 +750,7 @@ void Object::SetByteValue(uint16 index, uint8 offset, uint8 value)
{
ASSERT(index < m_valuesCount || PrintIndexError(index, true));
- if (offset > 4)
+ if (offset > 3)
{
TC_LOG_ERROR("misc", "Object::SetByteValue: wrong offset %u", offset);
return;
@@ -763,7 +774,7 @@ void Object::SetUInt16Value(uint16 index, uint8 offset, uint16 value)
{
ASSERT(index < m_valuesCount || PrintIndexError(index, true));
- if (offset > 2)
+ if (offset > 1)
{
TC_LOG_ERROR("misc", "Object::SetUInt16Value: wrong offset %u", offset);
return;
@@ -903,7 +914,7 @@ void Object::SetByteFlag(uint16 index, uint8 offset, uint8 newFlag)
{
ASSERT(index < m_valuesCount || PrintIndexError(index, true));
- if (offset > 4)
+ if (offset > 3)
{
TC_LOG_ERROR("misc", "Object::SetByteFlag: wrong offset %u", offset);
return;
@@ -926,7 +937,7 @@ void Object::RemoveByteFlag(uint16 index, uint8 offset, uint8 oldFlag)
{
ASSERT(index < m_valuesCount || PrintIndexError(index, true));
- if (offset > 4)
+ if (offset > 3)
{
TC_LOG_ERROR("misc", "Object::RemoveByteFlag: wrong offset %u", offset);
return;
@@ -1552,9 +1563,9 @@ void WorldObject::GetRandomPoint(const Position &srcPos, float distance, Positio
void WorldObject::UpdateGroundPositionZ(float x, float y, float &z) const
{
- float new_z = GetBaseMap()->GetHeight(GetPhaseMask(), x, y, z, true);
+ float new_z = GetMap()->GetHeight(GetPhaseMask(), x, y, z + 2.0f, true);
if (new_z > INVALID_HEIGHT)
- z = new_z+ 0.05f; // just to be sure that we are not a few pixel under the surface
+ z = new_z + 0.05f; // just to be sure that we are not a few pixel under the surface
}
void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
@@ -1574,8 +1585,8 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
bool canSwim = ToCreature()->CanSwim();
float ground_z = z;
float max_z = canSwim
- ? GetBaseMap()->GetWaterOrGroundLevel(x, y, z, &ground_z, !ToUnit()->HasAuraType(SPELL_AURA_WATER_WALK))
- : ((ground_z = GetBaseMap()->GetHeight(GetPhaseMask(), x, y, z, true)));
+ ? GetMap()->GetWaterOrGroundLevel(x, y, z, &ground_z, !ToUnit()->HasAuraType(SPELL_AURA_WATER_WALK))
+ : ((ground_z = GetMap()->GetHeight(GetPhaseMask(), x, y, z, true)));
if (max_z > INVALID_HEIGHT)
{
if (z > max_z)
@@ -1586,7 +1597,7 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
}
else
{
- float ground_z = GetBaseMap()->GetHeight(GetPhaseMask(), x, y, z, true);
+ float ground_z = GetMap()->GetHeight(GetPhaseMask(), x, y, z, true);
if (z < ground_z)
z = ground_z;
}
@@ -1598,7 +1609,7 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
if (!ToPlayer()->CanFly())
{
float ground_z = z;
- float max_z = GetBaseMap()->GetWaterOrGroundLevel(x, y, z, &ground_z, !ToUnit()->HasAuraType(SPELL_AURA_WATER_WALK));
+ float max_z = GetMap()->GetWaterOrGroundLevel(x, y, z, &ground_z, !ToUnit()->HasAuraType(SPELL_AURA_WATER_WALK));
if (max_z > INVALID_HEIGHT)
{
if (z > max_z)
@@ -1609,7 +1620,7 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
}
else
{
- float ground_z = GetBaseMap()->GetHeight(GetPhaseMask(), x, y, z, true);
+ float ground_z = GetMap()->GetHeight(GetPhaseMask(), x, y, z, true);
if (z < ground_z)
z = ground_z;
}
@@ -1617,7 +1628,7 @@ void WorldObject::UpdateAllowedPositionZ(float x, float y, float &z) const
}
default:
{
- float ground_z = GetBaseMap()->GetHeight(GetPhaseMask(), x, y, z, true);
+ float ground_z = GetMap()->GetHeight(GetPhaseMask(), x, y, z, true);
if (ground_z > INVALID_HEIGHT)
z = ground_z;
break;
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index 1d7db005a0b..19ac8dd57b5 100644
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -2060,8 +2060,7 @@ void Pet::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs)
continue;
uint32 unSpellId = itr->first;
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(unSpellId);
- ASSERT(spellInfo);
+ SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(unSpellId);
// Not send cooldown for this spells
if (spellInfo->IsCooldownStartedOnEvent())
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 2f7b37a2254..05c89a99ed2 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -4204,7 +4204,7 @@ bool Player::Has310Flyer(bool checkAllSpells, uint32 excludeSpellId)
if (_spell_idx->second->skillId != SKILL_MOUNTS)
break; // We can break because mount spells belong only to one skillline (at least 310 flyers do)
- spellInfo = sSpellMgr->GetSpellInfo(itr->first);
+ spellInfo = sSpellMgr->EnsureSpellInfo(itr->first);
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
if (spellInfo->Effects[i].ApplyAuraName == SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED &&
spellInfo->Effects[i].CalcValue() == 310)
@@ -15743,6 +15743,7 @@ bool Player::SatisfyQuestExclusiveGroup(Quest const* qInfo, bool msg)
// not allow have daily quest if daily quest from exclusive group already recently completed
Quest const* Nquest = sObjectMgr->GetQuestTemplate(exclude_Id);
+ ASSERT(Nquest);
if (!SatisfyQuestDay(Nquest, false) || !SatisfyQuestWeek(Nquest, false) || !SatisfyQuestSeasonal(Nquest, false))
{
if (msg)
@@ -15944,6 +15945,7 @@ bool Player::TakeQuestSourceItem(uint32 questId, bool msg)
return false;
}
+ ASSERT(item);
bool destroyItem = true;
for (uint8 n = 0; n < QUEST_ITEM_OBJECTIVES_COUNT; ++n)
if (item->StartQuest == questId && srcItemId == quest->RequiredItemId[n])
@@ -21334,6 +21336,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
if (sWorld->getBoolConfig(CONFIG_INSTANT_TAXI))
{
TaxiNodesEntry const* lastPathNode = sTaxiNodesStore.LookupEntry(nodes[nodes.size()-1]);
+ ASSERT(lastPathNode);
m_taxi.ClearTaxiDestinations();
TeleportTo(lastPathNode->map_id, lastPathNode->x, lastPathNode->y, lastPathNode->z, GetOrientation());
return false;
@@ -21554,6 +21557,7 @@ inline bool Player::_StoreOrEquipNewItem(uint32 vendorslot, uint32 item, uint8 c
if (crItem->ExtendedCost) // case for new honor system
{
ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(crItem->ExtendedCost);
+ ASSERT(iece);
if (iece->reqhonorpoints)
ModifyHonorPoints(- int32(iece->reqhonorpoints * count));
@@ -24745,6 +24749,12 @@ void Player::StoreLootItem(uint8 lootSlot, Loot* loot)
return;
}
+ if (!item->AllowedForPlayer(this))
+ {
+ SendLootRelease(GetLootGUID());
+ return;
+ }
+
// questitems use the blocked field for other purposes
if (!qitem && item->is_blocked)
{
diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp
index f8c38d32390..cf7cadadbfd 100644
--- a/src/server/game/Entities/Transport/Transport.cpp
+++ b/src/server/game/Entities/Transport/Transport.cpp
@@ -31,6 +31,7 @@
#include "Player.h"
#include "Cell.h"
#include "CellImpl.h"
+#include "Totem.h"
Transport::Transport() : GameObject(),
_transportInfo(NULL), _isMoving(true), _pendingStop(false),
@@ -95,9 +96,26 @@ bool Transport::Create(uint32 guidlow, uint32 entry, uint32 mapid, float x, floa
SetGoAnimProgress(animprogress);
SetName(goinfo->name);
UpdateRotationFields(0.0f, 1.0f);
+
+ m_model = GameObjectModel::Create(*this);
return true;
}
+void Transport::CleanupsBeforeDelete(bool finalCleanup /*= true*/)
+{
+ UnloadStaticPassengers();
+ while (!_passengers.empty())
+ {
+ WorldObject* obj = *_passengers.begin();
+ obj->m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_ONTRANSPORT);
+ obj->m_movementInfo.transport.Reset();
+ obj->SetTransport(NULL);
+ RemovePassenger(obj);
+ }
+
+ GameObject::CleanupsBeforeDelete(finalCleanup);
+}
+
void Transport::Update(uint32 diff)
{
uint32 const positionUpdateDelay = 200;
@@ -202,6 +220,9 @@ void Transport::Update(uint32 diff)
void Transport::AddPassenger(WorldObject* passenger)
{
+ if (!IsInWorld())
+ return;
+
if (_passengers.insert(passenger).second)
{
TC_LOG_DEBUG("entities.transport", "Object %s boarded transport %s.", passenger->GetName().c_str(), GetName().c_str());
@@ -308,11 +329,135 @@ GameObject* Transport::CreateGOPassenger(uint32 guid, GameObjectData const* data
return go;
}
+TempSummon* Transport::SummonPassenger(uint32 entry, Position const& pos, TempSummonType summonType, SummonPropertiesEntry const* properties /*= NULL*/, uint32 duration /*= 0*/, Unit* summoner /*= NULL*/, uint32 spellId /*= 0*/, uint32 vehId /*= 0*/)
+{
+ Map* map = FindMap();
+ if (!map)
+ return NULL;
+
+ uint32 mask = UNIT_MASK_SUMMON;
+ if (properties)
+ {
+ switch (properties->Category)
+ {
+ case SUMMON_CATEGORY_PET:
+ mask = UNIT_MASK_GUARDIAN;
+ break;
+ case SUMMON_CATEGORY_PUPPET:
+ mask = UNIT_MASK_PUPPET;
+ break;
+ case SUMMON_CATEGORY_VEHICLE:
+ mask = UNIT_MASK_MINION;
+ break;
+ case SUMMON_CATEGORY_WILD:
+ case SUMMON_CATEGORY_ALLY:
+ case SUMMON_CATEGORY_UNK:
+ {
+ switch (properties->Type)
+ {
+ case SUMMON_TYPE_MINION:
+ case SUMMON_TYPE_GUARDIAN:
+ case SUMMON_TYPE_GUARDIAN2:
+ mask = UNIT_MASK_GUARDIAN;
+ break;
+ case SUMMON_TYPE_TOTEM:
+ case SUMMON_TYPE_LIGHTWELL:
+ mask = UNIT_MASK_TOTEM;
+ break;
+ case SUMMON_TYPE_VEHICLE:
+ case SUMMON_TYPE_VEHICLE2:
+ mask = UNIT_MASK_SUMMON;
+ break;
+ case SUMMON_TYPE_MINIPET:
+ mask = UNIT_MASK_MINION;
+ break;
+ default:
+ if (properties->Flags & 512) // Mirror Image, Summon Gargoyle
+ mask = UNIT_MASK_GUARDIAN;
+ break;
+ }
+ break;
+ }
+ default:
+ return NULL;
+ }
+ }
+
+ uint32 phase = PHASEMASK_NORMAL;
+ uint32 team = 0;
+ if (summoner)
+ {
+ phase = summoner->GetPhaseMask();
+ if (summoner->GetTypeId() == TYPEID_PLAYER)
+ team = summoner->ToPlayer()->GetTeam();
+ }
+
+ TempSummon* summon = NULL;
+ switch (mask)
+ {
+ case UNIT_MASK_SUMMON:
+ summon = new TempSummon(properties, summoner, false);
+ break;
+ case UNIT_MASK_GUARDIAN:
+ summon = new Guardian(properties, summoner, false);
+ break;
+ case UNIT_MASK_PUPPET:
+ summon = new Puppet(properties, summoner);
+ break;
+ case UNIT_MASK_TOTEM:
+ summon = new Totem(properties, summoner);
+ break;
+ case UNIT_MASK_MINION:
+ summon = new Minion(properties, summoner, false);
+ break;
+ }
+
+ float x, y, z, o;
+ pos.GetPosition(x, y, z, o);
+ CalculatePassengerPosition(x, y, z, &o);
+
+ if (!summon->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, phase, entry, vehId, team, x, y, z, o))
+ {
+ delete summon;
+ return NULL;
+ }
+
+ summon->SetUInt32Value(UNIT_CREATED_BY_SPELL, spellId);
+
+ summon->SetTransport(this);
+ summon->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT);
+ summon->m_movementInfo.transport.guid = GetGUID();
+ summon->m_movementInfo.transport.pos.Relocate(pos);
+ summon->Relocate(x, y, z, o);
+ summon->SetHomePosition(x, y, z, o);
+ summon->SetTransportHomePosition(pos);
+
+ /// @HACK - transport models are not added to map's dynamic LoS calculations
+ /// because the current GameObjectModel cannot be moved without recreating
+ summon->AddUnitState(UNIT_STATE_IGNORE_PATHFINDING);
+
+ summon->InitStats(duration);
+
+ if (!map->AddToMap<Creature>(summon))
+ {
+ delete summon;
+ return NULL;
+ }
+
+ _staticPassengers.insert(summon);
+
+ summon->InitSummon();
+ summon->SetTempSummonType(summonType);
+
+ return summon;
+}
+
void Transport::UpdatePosition(float x, float y, float z, float o)
{
bool newActive = GetMap()->IsGridLoaded(x, y);
Relocate(x, y, z, o);
+ UpdateModelPosition();
UpdatePassengerPositions(_passengers);
@@ -450,12 +595,16 @@ bool Transport::TeleportTransport(uint32 newMapid, float x, float y, float z, fl
if (!obj->ToPlayer()->TeleportTo(newMapid, destX, destY, destZ, destO, TELE_TO_NOT_LEAVE_TRANSPORT))
_passengers.erase(obj);
break;
+ case TYPEID_DYNAMICOBJECT:
+ obj->AddObjectToRemoveList();
+ break;
default:
break;
}
}
Relocate(x, y, z, o);
+ UpdateModelPosition();
GetMap()->AddToMap<Transport>(this);
return true;
}
@@ -518,6 +667,9 @@ void Transport::UpdatePassengerPositions(std::set<WorldObject*>& passengers)
case TYPEID_GAMEOBJECT:
GetMap()->GameObjectRelocation(passenger->ToGameObject(), x, y, z, o, false);
break;
+ case TYPEID_DYNAMICOBJECT:
+ GetMap()->DynamicObjectRelocation(passenger->ToDynObject(), x, y, z, o);
+ break;
default:
break;
}
diff --git a/src/server/game/Entities/Transport/Transport.h b/src/server/game/Entities/Transport/Transport.h
index 55f4daddecc..398356c4980 100644
--- a/src/server/game/Entities/Transport/Transport.h
+++ b/src/server/game/Entities/Transport/Transport.h
@@ -34,9 +34,11 @@ class Transport : public GameObject, public TransportBase
~Transport();
bool Create(uint32 guidlow, uint32 entry, uint32 mapid, float x, float y, float z, float ang, uint32 animprogress);
- void Update(uint32 diff);
+ void CleanupsBeforeDelete(bool finalCleanup = true) OVERRIDE;
- void BuildUpdate(UpdateDataMapType& data_map);
+ void Update(uint32 diff) OVERRIDE;
+
+ void BuildUpdate(UpdateDataMapType& data_map) OVERRIDE;
void AddPassenger(WorldObject* passenger);
void RemovePassenger(WorldObject* passenger);
@@ -45,14 +47,32 @@ class Transport : public GameObject, public TransportBase
Creature* CreateNPCPassenger(uint32 guid, CreatureData const* data);
GameObject* CreateGOPassenger(uint32 guid, GameObjectData const* data);
+ /**
+ * @fn bool Transport::SummonPassenger(uint64, Position const&, TempSummonType, SummonPropertiesEntry const*, uint32, Unit*, uint32, uint32)
+ *
+ * @brief Temporarily summons a creature as passenger on this transport.
+ *
+ * @param entry Id of the creature from creature_template table
+ * @param pos Initial position of the creature (transport offsets)
+ * @param summonType
+ * @param properties
+ * @param duration Determines how long the creauture will exist in world depending on @summonType (in milliseconds)
+ * @param summoner Summoner of the creature (for AI purposes)
+ * @param spellId
+ * @param vehId If set, this value overrides vehicle id from creature_template that the creature will use
+ *
+ * @return Summoned creature.
+ */
+ TempSummon* SummonPassenger(uint32 entry, Position const& pos, TempSummonType summonType, SummonPropertiesEntry const* properties = NULL, uint32 duration = 0, Unit* summoner = NULL, uint32 spellId = 0, uint32 vehId = 0);
+
/// This method transforms supplied transport offsets into global coordinates
- void CalculatePassengerPosition(float& x, float& y, float& z, float* o /*= NULL*/) const
+ void CalculatePassengerPosition(float& x, float& y, float& z, float* o = NULL) const OVERRIDE
{
TransportBase::CalculatePassengerPosition(x, y, z, o, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
}
/// This method transforms supplied global coordinates into local offsets
- void CalculatePassengerOffset(float& x, float& y, float& z, float* o /*= NULL*/) const
+ void CalculatePassengerOffset(float& x, float& y, float& z, float* o = NULL) const OVERRIDE
{
TransportBase::CalculatePassengerOffset(x, y, z, o, GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
}
diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp
index 3afa6b016d2..04136221d0d 100644
--- a/src/server/game/Entities/Unit/StatSystem.cpp
+++ b/src/server/game/Entities/Unit/StatSystem.cpp
@@ -1149,7 +1149,7 @@ bool Guardian::UpdateStats(Stats stat)
if (itr != ToPet()->m_spells.end()) // If pet has Wild Hunt
{
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
+ SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
AddPct(mod, spellInfo->Effects[EFFECT_0].CalcValue());
}
}
@@ -1318,7 +1318,7 @@ void Guardian::UpdateAttackPowerAndDamage(bool ranged)
if (itr != ToPet()->m_spells.end()) // If pet has Wild Hunt
{
- SpellInfo const* sProto = sSpellMgr->GetSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
+ SpellInfo const* sProto = sSpellMgr->EnsureSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
mod += CalculatePct(1.0f, sProto->Effects[1].CalcValue());
}
}
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 52565a2eaa5..379cecc3db7 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -1286,10 +1286,8 @@ void Unit::CalculateMeleeDamage(Unit* victim, uint32 damage, CalcDamageInfo* dam
damageInfo->HitInfo |= HITINFO_AFFECTS_VICTIM;
int32 resilienceReduction = damageInfo->damage;
- if (attackType != RANGED_ATTACK)
- ApplyResilience(victim, NULL, &resilienceReduction, (damageInfo->hitOutCome == MELEE_HIT_CRIT), CR_CRIT_TAKEN_MELEE);
- else
- ApplyResilience(victim, NULL, &resilienceReduction, (damageInfo->hitOutCome == MELEE_HIT_CRIT), CR_CRIT_TAKEN_RANGED);
+ // attackType is checked already for BASE_ATTACK or OFF_ATTACK so it can't be RANGED_ATTACK here
+ ApplyResilience(victim, NULL, &resilienceReduction, (damageInfo->hitOutCome == MELEE_HIT_CRIT), CR_CRIT_TAKEN_MELEE);
resilienceReduction = damageInfo->damage - resilienceReduction;
damageInfo->damage -= resilienceReduction;
damageInfo->cleanDamage += resilienceReduction;
@@ -12990,6 +12988,8 @@ float Unit::GetSpellMaxRangeForTarget(Unit const* target, SpellInfo const* spell
return 0;
if (spellInfo->RangeEntry->maxRangeFriend == spellInfo->RangeEntry->maxRangeHostile)
return spellInfo->GetMaxRange();
+ if (target == NULL)
+ return spellInfo->GetMaxRange(true);
return spellInfo->GetMaxRange(!IsHostileTo(target));
}
@@ -17288,7 +17288,12 @@ bool CharmInfo::IsCommandFollow()
void CharmInfo::SaveStayPosition()
{
//! At this point a new spline destination is enabled because of Unit::StopMoving()
- G3D::Vector3 const stayPos = _unit->movespline->FinalDestination();
+ G3D::Vector3 stayPos = _unit->movespline->FinalDestination();
+
+ if (_unit->movespline->onTransport)
+ if (TransportBase* transport = _unit->GetDirectTransport())
+ transport->CalculatePassengerPosition(stayPos.x, stayPos.y, stayPos.z);
+
_stayX = stayPos.x;
_stayY = stayPos.y;
_stayZ = stayPos.z;
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index 751bfcb8126..6b6d844472a 100644
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -513,6 +513,12 @@ enum UnitState
UNIT_STATE_CHASE_MOVE = 0x04000000,
UNIT_STATE_FOLLOW_MOVE = 0x08000000,
UNIT_STATE_IGNORE_PATHFINDING = 0x10000000, // do not use pathfinding in any MovementGenerator
+ UNIT_STATE_ALL_STATE_SUPPORTED = UNIT_STATE_DIED | UNIT_STATE_MELEE_ATTACKING | UNIT_STATE_STUNNED | UNIT_STATE_ROAMING | UNIT_STATE_CHASE
+ | UNIT_STATE_FLEEING | UNIT_STATE_IN_FLIGHT | UNIT_STATE_FOLLOW | UNIT_STATE_ROOT | UNIT_STATE_CONFUSED
+ | UNIT_STATE_DISTRACTED | UNIT_STATE_ISOLATED | UNIT_STATE_ATTACK_PLAYER | UNIT_STATE_CASTING
+ | UNIT_STATE_POSSESSED | UNIT_STATE_CHARGING | UNIT_STATE_JUMPING | UNIT_STATE_MOVE | UNIT_STATE_ROTATING
+ | UNIT_STATE_EVADE | UNIT_STATE_ROAMING_MOVE | UNIT_STATE_CONFUSED_MOVE | UNIT_STATE_FLEEING_MOVE
+ | UNIT_STATE_CHASE_MOVE | UNIT_STATE_FOLLOW_MOVE | UNIT_STATE_IGNORE_PATHFINDING,
UNIT_STATE_UNATTACKABLE = UNIT_STATE_IN_FLIGHT,
// for real move using movegen check and stop (except unstoppable flight)
UNIT_STATE_MOVING = UNIT_STATE_ROAMING_MOVE | UNIT_STATE_CONFUSED_MOVE | UNIT_STATE_FLEEING_MOVE | UNIT_STATE_CHASE_MOVE | UNIT_STATE_FOLLOW_MOVE,
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 48e4411e035..8784e2ca4e7 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -1087,6 +1087,11 @@ void ObjectMgr::LoadEquipmentTemplates()
}
uint8 id = fields[1].GetUInt8();
+ if (!id)
+ {
+ TC_LOG_ERROR("sql.sql", "Creature equipment template with id 0 found for creature %u, skipped.", entry);
+ continue;
+ }
EquipmentInfo& equipmentInfo = _equipmentInfoStore[entry][id];
@@ -1437,6 +1442,7 @@ bool ObjectMgr::SetCreatureLinkedRespawn(uint32 guidLow, uint32 linkedGuidLow)
return false;
const CreatureData* master = GetCreatureData(guidLow);
+ ASSERT(master);
uint64 guid = MAKE_NEW_GUID(guidLow, master->id, HIGHGUID_UNIT);
if (!linkedGuidLow) // we're removing the linking
diff --git a/src/server/game/Handlers/AddonHandler.cpp b/src/server/game/Handlers/AddonHandler.cpp
index 3c9a66bedb5..806cbd1c7fc 100644
--- a/src/server/game/Handlers/AddonHandler.cpp
+++ b/src/server/game/Handlers/AddonHandler.cpp
@@ -49,7 +49,7 @@ bool AddonHandler::BuildAddonPacket(WorldPacket* source, WorldPacket* target)
AddOnPacked.resize(AddonRealSize); // resize target for zlib action
- if (!uncompress(AddOnPacked.contents(), &AddonRealSize, source->contents() + CurrentPosition, source->size() - CurrentPosition)!= Z_OK)
+ if (uncompress(AddOnPacked.contents(), &AddonRealSize, source->contents() + CurrentPosition, source->size() - CurrentPosition) == Z_OK)
{
target->Initialize(SMSG_ADDON_INFO);
diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp
index 60f4fb09c28..4fd1d516d31 100644
--- a/src/server/game/Handlers/MiscHandler.cpp
+++ b/src/server/game/Handlers/MiscHandler.cpp
@@ -97,9 +97,19 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData)
recvData >> guid >> menuId >> gossipListId;
+ if (!_player->PlayerTalkClass->GetGossipMenu().GetItem(gossipListId))
+ {
+ recvData.rfinish();
+ return;
+ }
+
if (_player->PlayerTalkClass->IsGossipOptionCoded(gossipListId))
recvData >> code;
+ // Prevent cheating on C++ scripted menus
+ if (_player->PlayerTalkClass->GetGossipMenu().GetSenderGUID() != guid)
+ return;
+
Creature* unit = NULL;
GameObject* go = NULL;
if (IS_CRE_OR_VEH_GUID(guid))
@@ -151,7 +161,8 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recvData)
else
{
go->AI()->GossipSelectCode(_player, menuId, gossipListId, code.c_str());
- sScriptMgr->OnGossipSelectCode(_player, go, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId), code.c_str());
+ if (!sScriptMgr->OnGossipSelectCode(_player, go, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId), code.c_str()))
+ _player->OnGossipSelect(go, gossipListId, menuId);
}
}
else
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index 21e282cfcf4..8dc393c5f85 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -217,13 +217,13 @@ void Map::DeleteStateMachine()
}
Map::Map(uint32 id, time_t expiry, uint32 InstanceId, uint8 SpawnMode, Map* _parent):
-_creatureToMoveLock(false), _gameObjectsToMoveLock(false),
+_creatureToMoveLock(false), _gameObjectsToMoveLock(false), _dynamicObjectsToMoveLock(false),
i_mapEntry(sMapStore.LookupEntry(id)), i_spawnMode(SpawnMode), i_InstanceId(InstanceId),
m_unloadTimer(0), m_VisibleDistance(DEFAULT_VISIBILITY_DISTANCE),
m_VisibilityNotifyPeriod(DEFAULT_VISIBILITY_NOTIFY_PERIOD),
m_activeNonPlayersIter(m_activeNonPlayers.end()), _transportsUpdateIter(_transports.end()),
i_gridExpiry(expiry),
-i_scriptLock(false)
+i_scriptLock(false), _defaultLight(GetDefaultMapLight(id))
{
m_parentMap = (_parent ? _parent : this);
for (unsigned int idx=0; idx < MAX_NUMBER_OF_GRIDS; ++idx)
@@ -281,6 +281,15 @@ void Map::AddToGrid(GameObject* obj, Cell const& cell)
obj->SetCurrentCell(cell);
}
+template<>
+void Map::AddToGrid(DynamicObject* obj, Cell const& cell)
+{
+ NGridType* grid = getNGrid(cell.GridX(), cell.GridY());
+ grid->GetGridType(cell.CellX(), cell.CellY()).AddGridObject(obj);
+
+ obj->SetCurrentCell(cell);
+}
+
template<class T>
void Map::SwitchGridContainers(T* /*obj*/, bool /*on*/) { }
@@ -468,6 +477,7 @@ bool Map::AddPlayerToMap(Player* player)
SendInitSelf(player);
SendInitTransports(player);
+ SendZoneDynamicInfo(player);
player->m_clientGUIDs.clear();
player->UpdateObjectVisibility(false);
@@ -944,6 +954,7 @@ void Map::GameObjectRelocation(GameObject* go, float x, float y, float z, float
else
{
go->Relocate(x, y, z, orientation);
+ go->UpdateModelPosition();
go->UpdateObjectVisibility(false);
RemoveGameObjectFromMoveList(go);
}
@@ -953,6 +964,38 @@ void Map::GameObjectRelocation(GameObject* go, float x, float y, float z, float
ASSERT(integrity_check == old_cell);
}
+void Map::DynamicObjectRelocation(DynamicObject* dynObj, float x, float y, float z, float orientation)
+{
+ Cell integrity_check(dynObj->GetPositionX(), dynObj->GetPositionY());
+ Cell old_cell = dynObj->GetCurrentCell();
+
+ ASSERT(integrity_check == old_cell);
+ Cell new_cell(x, y);
+
+ if (!getNGrid(new_cell.GridX(), new_cell.GridY()))
+ return;
+
+ // delay creature move for grid/cell to grid/cell moves
+ if (old_cell.DiffCell(new_cell) || old_cell.DiffGrid(new_cell))
+ {
+#ifdef TRINITY_DEBUG
+ TC_LOG_DEBUG("maps", "GameObject (GUID: %u) added to moving list from grid[%u, %u]cell[%u, %u] to grid[%u, %u]cell[%u, %u].", dynObj->GetGUIDLow(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
+#endif
+ AddDynamicObjectToMoveList(dynObj, x, y, z, orientation);
+ // in diffcell/diffgrid case notifiers called at finishing move dynObj in Map::MoveAllGameObjectsInMoveList
+ }
+ else
+ {
+ dynObj->Relocate(x, y, z, orientation);
+ dynObj->UpdateObjectVisibility(false);
+ RemoveDynamicObjectFromMoveList(dynObj);
+ }
+
+ old_cell = dynObj->GetCurrentCell();
+ integrity_check = Cell(dynObj->GetPositionX(), dynObj->GetPositionY());
+ ASSERT(integrity_check == old_cell);
+}
+
void Map::AddCreatureToMoveList(Creature* c, float x, float y, float z, float ang)
{
if (_creatureToMoveLock) //can this happen?
@@ -991,6 +1034,25 @@ void Map::RemoveGameObjectFromMoveList(GameObject* go)
go->_moveState = MAP_OBJECT_CELL_MOVE_INACTIVE;
}
+void Map::AddDynamicObjectToMoveList(DynamicObject* dynObj, float x, float y, float z, float ang)
+{
+ if (_dynamicObjectsToMoveLock) //can this happen?
+ return;
+
+ if (dynObj->_moveState == MAP_OBJECT_CELL_MOVE_NONE)
+ _dynamicObjectsToMove.push_back(dynObj);
+ dynObj->SetNewCellPosition(x, y, z, ang);
+}
+
+void Map::RemoveDynamicObjectFromMoveList(DynamicObject* dynObj)
+{
+ if (_dynamicObjectsToMoveLock) //can this happen?
+ return;
+
+ if (dynObj->_moveState == MAP_OBJECT_CELL_MOVE_ACTIVE)
+ dynObj->_moveState = MAP_OBJECT_CELL_MOVE_INACTIVE;
+}
+
void Map::MoveAllCreaturesInMoveList()
{
_creatureToMoveLock = true;
@@ -1071,6 +1133,7 @@ void Map::MoveAllGameObjectsInMoveList()
{
// update pos
go->Relocate(go->_newPosition);
+ go->UpdateModelPosition();
go->UpdateObjectVisibility(false);
}
else
@@ -1091,6 +1154,44 @@ void Map::MoveAllGameObjectsInMoveList()
_gameObjectsToMoveLock = false;
}
+void Map::MoveAllDynamicObjectsInMoveList()
+{
+ _dynamicObjectsToMoveLock = true;
+ for (std::vector<DynamicObject*>::iterator itr = _dynamicObjectsToMove.begin(); itr != _dynamicObjectsToMove.end(); ++itr)
+ {
+ DynamicObject* dynObj = *itr;
+ if (dynObj->FindMap() != this) //transport is teleported to another map
+ continue;
+
+ if (dynObj->_moveState != MAP_OBJECT_CELL_MOVE_ACTIVE)
+ {
+ dynObj->_moveState = MAP_OBJECT_CELL_MOVE_NONE;
+ continue;
+ }
+
+ dynObj->_moveState = MAP_OBJECT_CELL_MOVE_NONE;
+ if (!dynObj->IsInWorld())
+ continue;
+
+ // do move or do move to respawn or remove creature if previous all fail
+ if (DynamicObjectCellRelocation(dynObj, Cell(dynObj->_newPosition.m_positionX, dynObj->_newPosition.m_positionY)))
+ {
+ // update pos
+ dynObj->Relocate(dynObj->_newPosition);
+ dynObj->UpdateObjectVisibility(false);
+ }
+ else
+ {
+#ifdef TRINITY_DEBUG
+ TC_LOG_DEBUG("maps", "DynamicObject (GUID: %u) cannot be moved to unloaded grid.", dynObj->GetGUIDLow());
+#endif
+ }
+ }
+
+ _dynamicObjectsToMove.clear();
+ _dynamicObjectsToMoveLock = false;
+}
+
bool Map::CreatureCellRelocation(Creature* c, Cell new_cell)
{
Cell const& old_cell = c->GetCurrentCell();
@@ -1213,6 +1314,67 @@ bool Map::GameObjectCellRelocation(GameObject* go, Cell new_cell)
return false;
}
+bool Map::DynamicObjectCellRelocation(DynamicObject* go, Cell new_cell)
+{
+ Cell const& old_cell = go->GetCurrentCell();
+ if (!old_cell.DiffGrid(new_cell)) // in same grid
+ {
+ // if in same cell then none do
+ if (old_cell.DiffCell(new_cell))
+ {
+ #ifdef TRINITY_DEBUG
+ TC_LOG_DEBUG("maps", "DynamicObject (GUID: %u) moved in grid[%u, %u] from cell[%u, %u] to cell[%u, %u].", go->GetGUIDLow(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.CellX(), new_cell.CellY());
+ #endif
+
+ go->RemoveFromGrid();
+ AddToGrid(go, new_cell);
+ }
+ else
+ {
+ #ifdef TRINITY_DEBUG
+ TC_LOG_DEBUG("maps", "DynamicObject (GUID: %u) moved in same grid[%u, %u]cell[%u, %u].", go->GetGUIDLow(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY());
+ #endif
+ }
+
+ return true;
+ }
+
+ // in diff. grids but active GameObject
+ if (go->isActiveObject())
+ {
+ EnsureGridLoadedForActiveObject(new_cell, go);
+
+ #ifdef TRINITY_DEBUG
+ TC_LOG_DEBUG("maps", "Active DynamicObject (GUID: %u) moved from grid[%u, %u]cell[%u, %u] to grid[%u, %u]cell[%u, %u].", go->GetGUIDLow(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
+ #endif
+
+ go->RemoveFromGrid();
+ AddToGrid(go, new_cell);
+
+ return true;
+ }
+
+ // in diff. loaded grid normal GameObject
+ if (IsGridLoaded(GridCoord(new_cell.GridX(), new_cell.GridY())))
+ {
+ #ifdef TRINITY_DEBUG
+ TC_LOG_DEBUG("maps", "DynamicObject (GUID: %u) moved from grid[%u, %u]cell[%u, %u] to grid[%u, %u]cell[%u, %u].", go->GetGUIDLow(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
+ #endif
+
+ go->RemoveFromGrid();
+ EnsureGridCreated(GridCoord(new_cell.GridX(), new_cell.GridY()));
+ AddToGrid(go, new_cell);
+
+ return true;
+ }
+
+ // fail to move: normal GameObject attempt move to unloaded grid
+ #ifdef TRINITY_DEBUG
+ TC_LOG_DEBUG("maps", "DynamicObject (GUID: %u) attempted to move from grid[%u, %u]cell[%u, %u] to unloaded grid[%u, %u]cell[%u, %u].", go->GetGUIDLow(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
+ #endif
+ return false;
+}
+
bool Map::CreatureRespawnRelocation(Creature* c, bool diffGridOnly)
{
float resp_x, resp_y, resp_z, resp_o;
@@ -2490,7 +2652,10 @@ void Map::RemoveAllObjectsInRemoveList()
RemoveFromMap((DynamicObject*)obj, true);
break;
case TYPEID_GAMEOBJECT:
- RemoveFromMap((GameObject*)obj, true);
+ if (Transport* transport = obj->ToGameObject()->ToTransport())
+ RemoveFromMap(transport, true);
+ else
+ RemoveFromMap(obj->ToGameObject(), true);
break;
case TYPEID_UNIT:
// in case triggered sequence some spell can continue casting after prev CleanupsBeforeDelete call
@@ -3274,3 +3439,103 @@ time_t Map::GetLinkedRespawnTime(uint64 guid) const
return time_t(0);
}
+void Map::SendZoneDynamicInfo(Player* player)
+{
+ uint32 zoneId = GetZoneId(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
+ ZoneDynamicInfoMap::const_iterator itr = _zoneDynamicInfo.find(zoneId);
+ if (itr == _zoneDynamicInfo.end())
+ return;
+
+ if (uint32 music = itr->second.MusicId)
+ {
+ WorldPacket data(SMSG_PLAY_MUSIC, 4);
+ data << uint32(music);
+ player->SendDirectMessage(&data);
+ }
+
+ if (uint32 weather = itr->second.WeatherId)
+ {
+ WorldPacket data(SMSG_WEATHER, 4 + 4 + 1);
+ data << uint32(weather);
+ data << float(itr->second.WeatherGrade);
+ data << uint8(0);
+ player->SendDirectMessage(&data);
+ }
+
+ if (uint32 overrideLight = itr->second.OverrideLightId)
+ {
+ WorldPacket data(SMSG_OVERRIDE_LIGHT, 4 + 4 + 1);
+ data << uint32(_defaultLight);
+ data << uint32(overrideLight);
+ data << uint32(itr->second.LightFadeInTime);
+ player->SendDirectMessage(&data);
+ }
+}
+
+void Map::SetZoneMusic(uint32 zoneId, uint32 musicId)
+{
+ if (_zoneDynamicInfo.find(zoneId) == _zoneDynamicInfo.end())
+ _zoneDynamicInfo.insert(ZoneDynamicInfoMap::value_type(zoneId, ZoneDynamicInfo()));
+
+ _zoneDynamicInfo[zoneId].MusicId = musicId;
+
+ Map::PlayerList const& players = GetPlayers();
+ if (!players.isEmpty())
+ {
+ WorldPacket data(SMSG_PLAY_MUSIC, 4);
+ data << uint32(musicId);
+
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ if (Player* player = itr->GetSource())
+ if (player->GetZoneId() == zoneId)
+ player->SendDirectMessage(&data);
+ }
+}
+
+void Map::SetZoneWeather(uint32 zoneId, uint32 weatherId, float weatherGrade)
+{
+ if (_zoneDynamicInfo.find(zoneId) == _zoneDynamicInfo.end())
+ _zoneDynamicInfo.insert(ZoneDynamicInfoMap::value_type(zoneId, ZoneDynamicInfo()));
+
+ ZoneDynamicInfo& info = _zoneDynamicInfo[zoneId];
+ info.WeatherId = weatherId;
+ info.WeatherGrade = weatherGrade;
+ Map::PlayerList const& players = GetPlayers();
+
+ if (!players.isEmpty())
+ {
+ WorldPacket data(SMSG_WEATHER, 4 + 4 + 1);
+ data << uint32(weatherId);
+ data << float(weatherGrade);
+ data << uint8(0);
+
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ if (Player* player = itr->GetSource())
+ if (player->GetZoneId() == zoneId)
+ player->SendDirectMessage(&data);
+ }
+}
+
+void Map::SetZoneOverrideLight(uint32 zoneId, uint32 lightId, uint32 fadeInTime)
+{
+ if (_zoneDynamicInfo.find(zoneId) == _zoneDynamicInfo.end())
+ _zoneDynamicInfo.insert(ZoneDynamicInfoMap::value_type(zoneId, ZoneDynamicInfo()));
+
+ ZoneDynamicInfo& info = _zoneDynamicInfo[zoneId];
+ info.OverrideLightId = lightId;
+ info.LightFadeInTime = fadeInTime;
+ Map::PlayerList const& players = GetPlayers();
+
+ if (!players.isEmpty())
+ {
+ WorldPacket data(SMSG_OVERRIDE_LIGHT, 4 + 4 + 1);
+ data << uint32(_defaultLight);
+ data << uint32(lightId);
+ data << uint32(fadeInTime);
+
+ for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ if (Player* player = itr->GetSource())
+ if (player->GetZoneId() == zoneId)
+ player->SendDirectMessage(&data);
+ }
+}
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h
index 8e7886dc5d2..4daeebe43d1 100644
--- a/src/server/game/Maps/Map.h
+++ b/src/server/game/Maps/Map.h
@@ -229,6 +229,18 @@ enum LevelRequirementVsMode
LEVELREQUIREMENT_HEROIC = 70
};
+struct ZoneDynamicInfo
+{
+ ZoneDynamicInfo() : MusicId(0), WeatherId(0), WeatherGrade(0.0f),
+ OverrideLightId(0), LightFadeInTime(0) { }
+
+ uint32 MusicId;
+ uint32 WeatherId;
+ float WeatherGrade;
+ uint32 OverrideLightId;
+ uint32 LightFadeInTime;
+};
+
#if defined(__GNUC__)
#pragma pack()
#else
@@ -243,6 +255,8 @@ enum LevelRequirementVsMode
typedef std::map<uint32/*leaderDBGUID*/, CreatureGroup*> CreatureGroupHolderType;
+typedef UNORDERED_MAP<uint32 /*zoneId*/, ZoneDynamicInfo> ZoneDynamicInfoMap;
+
class Map : public GridRefManager<NGridType>
{
friend class MapReference;
@@ -280,6 +294,7 @@ class Map : public GridRefManager<NGridType>
void PlayerRelocation(Player*, float x, float y, float z, float orientation);
void CreatureRelocation(Creature* creature, float x, float y, float z, float ang, bool respawnRelocationOnFail = true);
void GameObjectRelocation(GameObject* go, float x, float y, float z, float orientation, bool respawnRelocationOnFail = true);
+ void DynamicObjectRelocation(DynamicObject* go, float x, float y, float z, float orientation);
template<class T, class CONTAINER> void Visit(const Cell& cell, TypeContainerVisitor<T, CONTAINER> &visitor);
@@ -353,6 +368,7 @@ class Map : public GridRefManager<NGridType>
void MoveAllCreaturesInMoveList();
void MoveAllGameObjectsInMoveList();
+ void MoveAllDynamicObjectsInMoveList();
void RemoveAllObjectsInRemoveList();
virtual void RemoveAllPlayers();
@@ -488,6 +504,11 @@ class Map : public GridRefManager<NGridType>
void SendInitTransports(Player* player);
void SendRemoveTransports(Player* player);
+ void SendZoneDynamicInfo(Player* player);
+
+ void SetZoneMusic(uint32 zoneId, uint32 musicId);
+ void SetZoneWeather(uint32 zoneId, uint32 weatherId, float weatherGrade);
+ void SetZoneOverrideLight(uint32 zoneId, uint32 lightId, uint32 fadeInTime);
private:
void LoadMapAndVMap(int gx, int gy);
@@ -502,12 +523,15 @@ class Map : public GridRefManager<NGridType>
bool CreatureCellRelocation(Creature* creature, Cell new_cell);
bool GameObjectCellRelocation(GameObject* go, Cell new_cell);
+ bool DynamicObjectCellRelocation(DynamicObject* go, Cell new_cell);
template<class T> void InitializeObject(T* obj);
void AddCreatureToMoveList(Creature* c, float x, float y, float z, float ang);
void RemoveCreatureFromMoveList(Creature* c);
void AddGameObjectToMoveList(GameObject* go, float x, float y, float z, float ang);
void RemoveGameObjectFromMoveList(GameObject* go);
+ void AddDynamicObjectToMoveList(DynamicObject* go, float x, float y, float z, float ang);
+ void RemoveDynamicObjectFromMoveList(DynamicObject* go);
bool _creatureToMoveLock;
std::vector<Creature*> _creaturesToMove;
@@ -515,6 +539,9 @@ class Map : public GridRefManager<NGridType>
bool _gameObjectsToMoveLock;
std::vector<GameObject*> _gameObjectsToMove;
+ bool _dynamicObjectsToMoveLock;
+ std::vector<DynamicObject*> _dynamicObjectsToMove;
+
bool IsGridLoaded(const GridCoord &) const;
void EnsureGridCreated(const GridCoord &);
void EnsureGridCreated_i(const GridCoord &);
@@ -626,6 +653,9 @@ class Map : public GridRefManager<NGridType>
UNORDERED_MAP<uint32 /*dbGUID*/, time_t> _creatureRespawnTimes;
UNORDERED_MAP<uint32 /*dbGUID*/, time_t> _goRespawnTimes;
+
+ ZoneDynamicInfoMap _zoneDynamicInfo;
+ uint32 _defaultLight;
};
enum InstanceResetMethod
diff --git a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
index f1656592000..28e58c87323 100644
--- a/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
+++ b/src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
@@ -25,6 +25,7 @@
#include "MoveSplineInit.h"
#include "MoveSpline.h"
#include "Player.h"
+#include "VehicleDefines.h"
template<class T, typename D>
void TargetedMovementGeneratorMedium<T, D>::_setTargetLocation(T* owner, bool updateDestination)
@@ -154,6 +155,9 @@ bool TargetedMovementGeneratorMedium<T, D>::DoUpdate(T* owner, uint32 time_diff)
//More distance let have better performance, less distance let have more sensitive reaction at target move.
float allowed_dist = owner->GetCombatReach() + sWorld->getRate(RATE_TARGET_POS_RECALCULATION_RANGE);
G3D::Vector3 dest = owner->movespline->FinalDestination();
+ if (owner->movespline->onTransport)
+ if (TransportBase* transport = owner->GetDirectTransport())
+ transport->CalculatePassengerPosition(dest.x, dest.y, dest.z);
if (owner->GetTypeId() == TYPEID_UNIT && owner->ToCreature()->CanFly())
targetMoved = !i_target->IsWithinDist3d(dest.x, dest.y, dest.z, allowed_dist);
diff --git a/src/server/game/Movement/Spline/MovementTypedefs.h b/src/server/game/Movement/Spline/MovementTypedefs.h
index ffc19f10454..22850036b61 100644
--- a/src/server/game/Movement/Spline/MovementTypedefs.h
+++ b/src/server/game/Movement/Spline/MovementTypedefs.h
@@ -47,12 +47,6 @@ namespace Movement
float computeFallTime(float path_length, bool isSafeFall);
float computeFallElevation(float t_passed, bool isSafeFall, float start_velocity = 0.0f);
-#ifndef static_assert
- #define CONCAT(x, y) CONCAT1 (x, y)
- #define CONCAT1(x, y) x##y
- #define static_assert(expr, msg) typedef char CONCAT(static_assert_failed_at_line_, __LINE__) [(expr) ? 1 : -1]
-#endif
-
template<class T, T limit>
class counter
{
diff --git a/src/server/game/Movement/Spline/Spline.h b/src/server/game/Movement/Spline/Spline.h
index 1444b2872d1..6e8a5a0281d 100644
--- a/src/server/game/Movement/Spline/Spline.h
+++ b/src/server/game/Movement/Spline/Spline.h
@@ -56,7 +56,7 @@ protected:
// client's value is 20, blizzs use 2-3 steps to compute length
STEPS_PER_SEGMENT = 3
};
- static_assert(STEPS_PER_SEGMENT > 0, "shouldn't be lesser than 1");
+ static_assert(STEPS_PER_SEGMENT > 0, "STEPS_PER_SEGMENT shouldn't be lesser than 1");
protected:
void EvaluateLinear(index_type, float, Vector3&) const;
diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp
index 8da94ef2852..7365d592a62 100644
--- a/src/server/game/Scripting/ScriptLoader.cpp
+++ b/src/server/game/Scripting/ScriptLoader.cpp
@@ -522,6 +522,7 @@ void AddSC_boss_falric();
void AddSC_boss_marwyn();
void AddSC_boss_lord_marrowgar(); // Icecrown Citadel
void AddSC_boss_lady_deathwhisper();
+void AddSC_boss_icecrown_gunship_battle();
void AddSC_boss_deathbringer_saurfang();
void AddSC_boss_festergut();
void AddSC_boss_rotface();
@@ -1361,6 +1362,7 @@ void AddNorthrendScripts()
AddSC_boss_marwyn();
AddSC_boss_lord_marrowgar(); // Icecrown Citadel
AddSC_boss_lady_deathwhisper();
+ AddSC_boss_icecrown_gunship_battle();
AddSC_boss_deathbringer_saurfang();
AddSC_boss_festergut();
AddSC_boss_rotface();
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index b7aabcc7589..4ed742167a5 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -4772,7 +4772,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
uint32 spellId = 24659;
if (apply && caster)
{
- SpellInfo const* spell = sSpellMgr->GetSpellInfo(spellId);
+ SpellInfo const* spell = sSpellMgr->EnsureSpellInfo(spellId);
for (uint32 i = 0; i < spell->StackAmount; ++i)
caster->CastSpell(target, spell->Id, true, NULL, NULL, GetCasterGUID());
@@ -4787,7 +4787,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
uint32 spellId = 24662;
if (apply && caster)
{
- SpellInfo const* spell = sSpellMgr->GetSpellInfo(spellId);
+ SpellInfo const* spell = sSpellMgr->EnsureSpellInfo(spellId);
for (uint32 i = 0; i < spell->StackAmount; ++i)
caster->CastSpell(target, spell->Id, true, NULL, NULL, GetCasterGUID());
break;
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 8b88ec9af92..124c1c21332 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -953,7 +953,7 @@ void Spell::SelectImplicitChannelTargets(SpellEffIndex effIndex, SpellImplicitTa
case TARGET_UNIT_CHANNEL_TARGET:
{
WorldObject* target = ObjectAccessor::GetUnit(*m_caster, m_originalCaster->GetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT));
- CallScriptObjectTargetSelectHandlers(target, effIndex);
+ CallScriptObjectTargetSelectHandlers(target, effIndex, targetType);
// unit target may be no longer avalible - teleported out of map for example
if (target && target->ToUnit())
AddUnitTarget(target->ToUnit(), 1 << effIndex);
@@ -966,7 +966,7 @@ void Spell::SelectImplicitChannelTargets(SpellEffIndex effIndex, SpellImplicitTa
m_targets.SetDst(channeledSpell->m_targets);
else if (WorldObject* target = ObjectAccessor::GetWorldObject(*m_caster, m_originalCaster->GetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT)))
{
- CallScriptObjectTargetSelectHandlers(target, effIndex);
+ CallScriptObjectTargetSelectHandlers(target, effIndex, targetType);
if (target)
m_targets.SetDst(*target);
}
@@ -1047,17 +1047,34 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar
return;
}
- CallScriptObjectTargetSelectHandlers(target, effIndex);
+ CallScriptObjectTargetSelectHandlers(target, effIndex, targetType);
+ if (!target)
+ {
+ TC_LOG_DEBUG("spells", "Spell::SelectImplicitNearbyTargets: OnObjectTargetSelect script hook for spell Id %u set NULL target, effect %u", m_spellInfo->Id, effIndex);
+ return;
+ }
switch (targetType.GetObjectType())
{
case TARGET_OBJECT_TYPE_UNIT:
+ {
if (Unit* unitTarget = target->ToUnit())
AddUnitTarget(unitTarget, effMask, true, false);
+ else
+ {
+ TC_LOG_DEBUG("spells", "Spell::SelectImplicitNearbyTargets: OnObjectTargetSelect script hook for spell Id %u set object of wrong type, expected unit, got %s, effect %u", m_spellInfo->Id, GetLogNameForGuid(target->GetGUID()), effMask);
+ return;
+ }
break;
+ }
case TARGET_OBJECT_TYPE_GOBJ:
if (GameObject* gobjTarget = target->ToGameObject())
AddGOTarget(gobjTarget, effMask);
+ else
+ {
+ TC_LOG_DEBUG("spells", "Spell::SelectImplicitNearbyTargets: OnObjectTargetSelect script hook for spell Id %u set object of wrong type, expected gameobject, got %s, effect %u", m_spellInfo->Id, GetLogNameForGuid(target->GetGUID()), effMask);
+ return;
+ }
break;
case TARGET_OBJECT_TYPE_DEST:
m_targets.SetDst(*target);
@@ -1090,7 +1107,7 @@ void Spell::SelectImplicitConeTargets(SpellEffIndex effIndex, SpellImplicitTarge
Trinity::WorldObjectListSearcher<Trinity::WorldObjectSpellConeTargetCheck> searcher(m_caster, targets, check, containerTypeMask);
SearchTargets<Trinity::WorldObjectListSearcher<Trinity::WorldObjectSpellConeTargetCheck> >(searcher, containerTypeMask, m_caster, m_caster, radius);
- CallScriptObjectAreaTargetSelectHandlers(targets, effIndex);
+ CallScriptObjectAreaTargetSelectHandlers(targets, effIndex, targetType);
if (!targets.empty())
{
@@ -1171,7 +1188,7 @@ void Spell::SelectImplicitAreaTargets(SpellEffIndex effIndex, SpellImplicitTarge
float radius = m_spellInfo->Effects[effIndex].CalcRadius(m_caster) * m_spellValue->RadiusMod;
SearchAreaTargets(targets, radius, center, referer, targetType.GetObjectType(), targetType.GetCheckType(), m_spellInfo->Effects[effIndex].ImplicitTargetConditions);
- CallScriptObjectAreaTargetSelectHandlers(targets, effIndex);
+ CallScriptObjectAreaTargetSelectHandlers(targets, effIndex, targetType);
if (!targets.empty())
{
@@ -1280,7 +1297,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
}
}
- CallScriptDestinationTargetSelectHandlers(dest, effIndex);
+ CallScriptDestinationTargetSelectHandlers(dest, effIndex, targetType);
m_targets.SetDst(dest);
}
@@ -1313,7 +1330,7 @@ void Spell::SelectImplicitTargetDestTargets(SpellEffIndex effIndex, SpellImplici
}
}
- CallScriptDestinationTargetSelectHandlers(dest, effIndex);
+ CallScriptDestinationTargetSelectHandlers(dest, effIndex, targetType);
m_targets.SetDst(dest);
}
@@ -1352,7 +1369,7 @@ void Spell::SelectImplicitDestDestTargets(SpellEffIndex effIndex, SpellImplicitT
}
}
- CallScriptDestinationTargetSelectHandlers(dest, effIndex);
+ CallScriptDestinationTargetSelectHandlers(dest, effIndex, targetType);
m_targets.ModDst(dest);
}
@@ -1395,7 +1412,7 @@ void Spell::SelectImplicitCasterObjectTargets(SpellEffIndex effIndex, SpellImpli
break;
}
- CallScriptObjectTargetSelectHandlers(target, effIndex);
+ CallScriptObjectTargetSelectHandlers(target, effIndex, targetType);
if (target && target->ToUnit())
AddUnitTarget(target->ToUnit(), 1 << effIndex, checkIfValid);
@@ -1407,7 +1424,7 @@ void Spell::SelectImplicitTargetObjectTargets(SpellEffIndex effIndex, SpellImpli
WorldObject* target = m_targets.GetObjectTarget();
- CallScriptObjectTargetSelectHandlers(target, effIndex);
+ CallScriptObjectTargetSelectHandlers(target, effIndex, targetType);
if (target)
{
@@ -1442,7 +1459,7 @@ void Spell::SelectImplicitChainTargets(SpellEffIndex effIndex, SpellImplicitTarg
, m_spellInfo->Effects[effIndex].ImplicitTargetConditions, targetType.GetTarget() == TARGET_UNIT_TARGET_CHAINHEAL_ALLY);
// Chain primary target is added earlier
- CallScriptObjectAreaTargetSelectHandlers(targets, effIndex);
+ CallScriptObjectAreaTargetSelectHandlers(targets, effIndex, targetType);
for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
if (Unit* unitTarget = (*itr)->ToUnit())
@@ -1596,7 +1613,7 @@ void Spell::SelectImplicitTrajTargets(SpellEffIndex effIndex)
SpellDestination dest(*m_targets.GetDst());
dest.Relocate(trajDst);
- CallScriptDestinationTargetSelectHandlers(dest, effIndex);
+ CallScriptDestinationTargetSelectHandlers(dest, effIndex, SpellImplicitTargetInfo(TARGET_DEST_TRAJ));
m_targets.ModDst(dest);
}
}
@@ -1613,7 +1630,7 @@ void Spell::SelectEffectTypeImplicitTargets(uint8 effIndex)
{
WorldObject* target = ObjectAccessor::FindPlayer(m_caster->GetTarget());
- CallScriptObjectTargetSelectHandlers(target, SpellEffIndex(effIndex));
+ CallScriptObjectTargetSelectHandlers(target, SpellEffIndex(effIndex), SpellImplicitTargetInfo());
if (target && target->ToPlayer())
AddUnitTarget(target->ToUnit(), 1 << effIndex, false);
@@ -1673,7 +1690,7 @@ void Spell::SelectEffectTypeImplicitTargets(uint8 effIndex)
break;
}
- CallScriptObjectTargetSelectHandlers(target, SpellEffIndex(effIndex));
+ CallScriptObjectTargetSelectHandlers(target, SpellEffIndex(effIndex), SpellImplicitTargetInfo());
if (target)
{
@@ -5120,6 +5137,7 @@ SpellCastResult Spell::CheckCast(bool strict)
case SUMMON_CATEGORY_PET:
if (m_caster->GetPetGUID())
return SPELL_FAILED_ALREADY_HAVE_SUMMON;
+ // intentional missing break, check both GetPetGUID() and GetCharmGUID for SUMMON_CATEGORY_PET
case SUMMON_CATEGORY_PUPPET:
if (m_caster->GetCharmGUID())
return SPELL_FAILED_ALREADY_HAVE_CHARM;
@@ -6967,42 +6985,42 @@ void Spell::CallScriptAfterHitHandlers()
}
}
-void Spell::CallScriptObjectAreaTargetSelectHandlers(std::list<WorldObject*>& targets, SpellEffIndex effIndex)
+void Spell::CallScriptObjectAreaTargetSelectHandlers(std::list<WorldObject*>& targets, SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType)
{
for (std::list<SpellScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end(); ++scritr)
{
(*scritr)->_PrepareScriptCall(SPELL_SCRIPT_HOOK_OBJECT_AREA_TARGET_SELECT);
std::list<SpellScript::ObjectAreaTargetSelectHandler>::iterator hookItrEnd = (*scritr)->OnObjectAreaTargetSelect.end(), hookItr = (*scritr)->OnObjectAreaTargetSelect.begin();
for (; hookItr != hookItrEnd; ++hookItr)
- if ((*hookItr).IsEffectAffected(m_spellInfo, effIndex))
- (*hookItr).Call(*scritr, targets);
+ if (hookItr->IsEffectAffected(m_spellInfo, effIndex) && targetType.GetTarget() == hookItr->GetTarget())
+ hookItr->Call(*scritr, targets);
(*scritr)->_FinishScriptCall();
}
}
-void Spell::CallScriptObjectTargetSelectHandlers(WorldObject*& target, SpellEffIndex effIndex)
+void Spell::CallScriptObjectTargetSelectHandlers(WorldObject*& target, SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType)
{
for (std::list<SpellScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end(); ++scritr)
{
(*scritr)->_PrepareScriptCall(SPELL_SCRIPT_HOOK_OBJECT_TARGET_SELECT);
std::list<SpellScript::ObjectTargetSelectHandler>::iterator hookItrEnd = (*scritr)->OnObjectTargetSelect.end(), hookItr = (*scritr)->OnObjectTargetSelect.begin();
for (; hookItr != hookItrEnd; ++hookItr)
- if ((*hookItr).IsEffectAffected(m_spellInfo, effIndex))
- (*hookItr).Call(*scritr, target);
+ if (hookItr->IsEffectAffected(m_spellInfo, effIndex) && targetType.GetTarget() == hookItr->GetTarget())
+ hookItr->Call(*scritr, target);
(*scritr)->_FinishScriptCall();
}
}
-void Spell::CallScriptDestinationTargetSelectHandlers(SpellDestination& target, SpellEffIndex effIndex)
+void Spell::CallScriptDestinationTargetSelectHandlers(SpellDestination& target, SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType)
{
for (std::list<SpellScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end(); ++scritr)
{
(*scritr)->_PrepareScriptCall(SPELL_SCRIPT_HOOK_DESTINATION_TARGET_SELECT);
std::list<SpellScript::DestinationTargetSelectHandler>::iterator hookItrEnd = (*scritr)->OnDestinationTargetSelect.end(), hookItr = (*scritr)->OnDestinationTargetSelect.begin();
for (; hookItr != hookItrEnd; ++hookItr)
- if (hookItr->IsEffectAffected(m_spellInfo, effIndex))
+ if (hookItr->IsEffectAffected(m_spellInfo, effIndex) && targetType.GetTarget() == hookItr->GetTarget())
hookItr->Call(*scritr, target);
(*scritr)->_FinishScriptCall();
diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h
index 031311f2749..e87e2c2085a 100644
--- a/src/server/game/Spells/Spell.h
+++ b/src/server/game/Spells/Spell.h
@@ -639,9 +639,9 @@ class Spell
void CallScriptBeforeHitHandlers();
void CallScriptOnHitHandlers();
void CallScriptAfterHitHandlers();
- void CallScriptObjectAreaTargetSelectHandlers(std::list<WorldObject*>& targets, SpellEffIndex effIndex);
- void CallScriptObjectTargetSelectHandlers(WorldObject*& target, SpellEffIndex effIndex);
- void CallScriptDestinationTargetSelectHandlers(SpellDestination& target, SpellEffIndex effIndex);
+ void CallScriptObjectAreaTargetSelectHandlers(std::list<WorldObject*>& targets, SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType);
+ void CallScriptObjectTargetSelectHandlers(WorldObject*& target, SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType);
+ void CallScriptDestinationTargetSelectHandlers(SpellDestination& target, SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType);
bool CheckScriptEffectImplicitTargets(uint32 effIndex, uint32 effIndexToCheck);
std::list<SpellScript*> m_loadedScripts;
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 73d3c39148a..609c9ba05be 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -1829,7 +1829,7 @@ void Spell::EffectEnergize(SpellEffIndex effIndex)
sSpellMgr->GetSetOfSpellsInSpellGroup(SPELL_GROUP_ELIXIR_BATTLE, avalibleElixirs);
for (std::set<uint32>::iterator itr = avalibleElixirs.begin(); itr != avalibleElixirs.end();)
{
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(*itr);
+ SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(*itr);
if (spellInfo->SpellLevel < m_spellInfo->SpellLevel || spellInfo->SpellLevel > unitTarget->getLevel())
avalibleElixirs.erase(itr++);
else if (sSpellMgr->IsSpellMemberOfSpellGroup(*itr, SPELL_GROUP_ELIXIR_SHATTRATH))
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 93f264d2d61..009b9861eb6 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -3384,6 +3384,15 @@ void SpellMgr::LoadSpellInfoCorrections()
case 71169: // Shadow's Fate
spellInfo->AttributesEx3 |= SPELL_ATTR3_STACK_FOR_DIFF_CASTERS;
break;
+ case 72347: // Lock Players and Tap Chest
+ spellInfo->AttributesEx3 &= ~SPELL_ATTR3_NO_INITIAL_AGGRO;
+ break;
+ case 73843: // Award Reputation - Boss Kill
+ case 73844: // Award Reputation - Boss Kill
+ case 73845: // Award Reputation - Boss Kill
+ case 73846: // Award Reputation - Boss Kill
+ spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_50000_YARDS); // 50000yd
+ break;
case 72378: // Blood Nova (Deathbringer Saurfang)
case 73058: // Blood Nova (Deathbringer Saurfang)
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS);
diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h
index 01fe7708db2..76d59bd1e85 100644
--- a/src/server/game/Spells/SpellMgr.h
+++ b/src/server/game/Spells/SpellMgr.h
@@ -690,6 +690,14 @@ class SpellMgr
// SpellInfo object management
SpellInfo const* GetSpellInfo(uint32 spellId) const { return spellId < GetSpellInfoStoreSize() ? mSpellInfoMap[spellId] : NULL; }
+ // Use this only with 100% valid spellIds
+ SpellInfo const* EnsureSpellInfo(uint32 spellId) const
+ {
+ ASSERT(spellId < GetSpellInfoStoreSize());
+ SpellInfo const* spellInfo = mSpellInfoMap[spellId];
+ ASSERT(spellInfo);
+ return spellInfo;
+ }
uint32 GetSpellInfoStoreSize() const { return mSpellInfoMap.size(); }
private:
diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h
index 6378a8bed9b..75a191a9801 100644
--- a/src/server/game/Spells/SpellScript.h
+++ b/src/server/game/Spells/SpellScript.h
@@ -208,6 +208,7 @@ class SpellScript : public _SpellScript
TargetHook(uint8 _effectIndex, uint16 _targetType, bool _area, bool _dest);
bool CheckEffect(SpellInfo const* spellInfo, uint8 effIndex);
std::string ToString();
+ uint16 GetTarget() const { return targetType; }
protected:
uint16 targetType;
bool area;
diff --git a/src/server/game/Tickets/TicketMgr.cpp b/src/server/game/Tickets/TicketMgr.cpp
index 43c9ba80e24..b9ecfffb8c3 100644
--- a/src/server/game/Tickets/TicketMgr.cpp
+++ b/src/server/game/Tickets/TicketMgr.cpp
@@ -36,7 +36,9 @@ GmTicket::GmTicket() : _id(0), _playerGuid(0), _posX(0), _posY(0), _posZ(0), _ma
_closedBy(0), _assignedTo(0), _completed(false), _escalatedStatus(TICKET_UNASSIGNED), _viewed(false),
_needResponse(false), _needMoreHelp(false) { }
-GmTicket::GmTicket(Player* player) : _createTime(time(NULL)), _lastModifiedTime(time(NULL)), _closedBy(0), _assignedTo(0), _completed(false), _escalatedStatus(TICKET_UNASSIGNED), _viewed(false), _needResponse(false), _needMoreHelp(false)
+GmTicket::GmTicket(Player* player) : _posX(0), _posY(0), _posZ(0), _mapId(0), _createTime(time(NULL)), _lastModifiedTime(time(NULL)),
+ _closedBy(0), _assignedTo(0), _completed(false), _escalatedStatus(TICKET_UNASSIGNED), _viewed(false),
+ _needResponse(false), _needMoreHelp(false)
{
_id = sTicketMgr->GenerateTicketId();
_playerName = player->GetName();
diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp
index d0c21168c80..cae2f5e511d 100644
--- a/src/server/scripts/Commands/cs_misc.cpp
+++ b/src/server/scripts/Commands/cs_misc.cpp
@@ -1018,7 +1018,6 @@ public:
int32 area = GetAreaFlagByAreaID(atoi((char*)args));
int32 offset = area / 32;
- uint32 val = uint32((1 << (area % 32)));
if (area<0 || offset >= PLAYER_EXPLORED_ZONES_SIZE)
{
@@ -1027,6 +1026,7 @@ public:
return false;
}
+ uint32 val = uint32((1 << (area % 32)));
uint32 currFields = playerTarget->GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset);
playerTarget->SetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset, uint32((currFields | val)));
@@ -1049,7 +1049,6 @@ public:
int32 area = GetAreaFlagByAreaID(atoi((char*)args));
int32 offset = area / 32;
- uint32 val = uint32((1 << (area % 32)));
if (area < 0 || offset >= PLAYER_EXPLORED_ZONES_SIZE)
{
@@ -1058,6 +1057,7 @@ public:
return false;
}
+ uint32 val = uint32((1 << (area % 32)));
uint32 currFields = playerTarget->GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset);
playerTarget->SetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset, uint32((currFields ^ val)));
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
index ab135a2fd78..0b031f54ea0 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
@@ -50,7 +50,12 @@ public:
struct npc_water_elementalAI : public ScriptedAI
{
- npc_water_elementalAI(Creature* creature) : ScriptedAI(creature) { }
+ npc_water_elementalAI(Creature* creature) : ScriptedAI(creature)
+ {
+ waterBoltTimer = 3 * IN_MILLISECONDS;
+ resetTimer = 5 * IN_MILLISECONDS;
+ balindaGUID = 0;
+ }
uint32 waterBoltTimer;
uint64 balindaGUID;
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp
index 8989a8065dc..0cb96a519e7 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp
@@ -164,7 +164,12 @@ public:
struct boss_rend_blackhandAI : public BossAI
{
- boss_rend_blackhandAI(Creature* creature) : BossAI(creature, DATA_WARCHIEF_REND_BLACKHAND) { }
+ boss_rend_blackhandAI(Creature* creature) : BossAI(creature, DATA_WARCHIEF_REND_BLACKHAND)
+ {
+ gythEvent = false;
+ victorGUID = 0;
+ portcullisGUID = 0;
+ }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp
index 39d2a6d87d5..560f2e2e995 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp
@@ -56,6 +56,28 @@ public:
{
instance_blackwing_lair_InstanceMapScript(Map* map) : InstanceScript(map)
{
+ // Razorgore
+ EggCount = 0;
+ EggEvent = 0;
+ RazorgoreTheUntamedGUID = 0;
+ RazorgoreDoorGUID = 0;
+ // Vaelastrasz the Corrupt
+ VaelastraszTheCorruptGUID = 0;
+ VaelastraszDoorGUID = 0;
+ // Broodlord Lashlayer
+ BroodlordLashlayerGUID = 0;
+ BroodlordDoorGUID = 0;
+ // 3 Dragons
+ FiremawGUID = 0;
+ EbonrocGUID = 0;
+ FlamegorGUID = 0;
+ ChrommagusDoorGUID = 0;
+ // Chormaggus
+ ChromaggusGUID = 0;
+ NefarianDoorGUID = 0;
+ // Nefarian
+ LordVictorNefariusGUID = 0;
+ NefarianGUID = 0;
SetBossNumber(EncounterCount);
}
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
index 241ac85faa2..b5c3bdd86d4 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
@@ -584,10 +584,13 @@ public:
arca->MonsterYell(SAY_DIALOG_ARCANAGOS_8, LANG_UNIVERSAL, NULL);
return 5000;
case 12:
- arca->GetMotionMaster()->MovePoint(0, -11010.82f, -1761.18f, 156.47f);
- arca->setActive(true);
- arca->InterruptNonMeleeSpells(true);
- arca->SetSpeed(MOVE_FLIGHT, 2.0f);
+ if (arca)
+ {
+ arca->GetMotionMaster()->MovePoint(0, -11010.82f, -1761.18f, 156.47f);
+ arca->setActive(true);
+ arca->InterruptNonMeleeSpells(true);
+ arca->SetSpeed(MOVE_FLIGHT, 2.0f);
+ }
return 10000;
case 13:
me->MonsterYell(SAY_DIALOG_MEDIVH_9, LANG_UNIVERSAL, NULL);
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
index 31219e18121..ad87b2d8d3d 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
@@ -787,7 +787,11 @@ public:
struct npc_pulsing_pumpkinAI : public ScriptedAI
{
- npc_pulsing_pumpkinAI(Creature* creature) : ScriptedAI(creature) { }
+ npc_pulsing_pumpkinAI(Creature* creature) : ScriptedAI(creature)
+ {
+ sprouted = false;
+ debuffGUID = 0;
+ }
bool sprouted;
uint64 debuffGUID;
diff --git a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
index d8518085b26..9ceaf8cb85b 100644
--- a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
+++ b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp
@@ -310,6 +310,15 @@ class instance_stratholme : public InstanceMapScript
{
HandleGameObject(ziggurat4GUID, false);
HandleGameObject(ziggurat5GUID, false);
+ }
+ if (data == DONE || data == NOT_STARTED)
+ {
+ HandleGameObject(ziggurat4GUID, true);
+ HandleGameObject(ziggurat5GUID, true);
+ }
+ if (data == DONE)
+ {
+ HandleGameObject(portGauntletGUID, true);
if (GetData(TYPE_BARON_RUN) == IN_PROGRESS)
{
DoRemoveAurasDueToSpellOnPlayers(SPELL_BARON_ULTIMATUM);
@@ -318,18 +327,13 @@ class instance_stratholme : public InstanceMapScript
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
if (Player* player = itr->GetSource())
if (player->GetQuestStatus(QUEST_DEAD_MAN_PLEA) == QUEST_STATUS_INCOMPLETE)
+ {
player->AreaExploredOrEventHappens(QUEST_DEAD_MAN_PLEA);
-
+ player->KilledMonsterCredit(NPC_YSIDA);
+ }
SetData(TYPE_BARON_RUN, DONE);
}
}
- if (data == DONE || data == NOT_STARTED)
- {
- HandleGameObject(ziggurat4GUID, true);
- HandleGameObject(ziggurat5GUID, true);
- }
- if (data == DONE)
- HandleGameObject(portGauntletGUID, true);
EncounterState[5] = data;
break;
case TYPE_SH_AELMAR:
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
index 4e354b47be5..0c8eb663c9a 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp
@@ -16,35 +16,11 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: boss_Halazzi
-SD%Complete: 80
-SDComment:
-SDCategory: Zul'Aman
-EndScriptData */
-
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "zulaman.h"
#include "SpellInfo.h"
-#define YELL_AGGRO "Get on your knees and bow to da fang and claw!"
-#define SOUND_AGGRO 12020
-#define YELL_SABER_ONE "You gonna leave in pieces!"
-#define YELL_SABER_TWO "Me gonna carve ya now!"
-#define YELL_SPLIT "Me gonna carve ya now!"
-#define SOUND_SPLIT 12021
-#define YELL_MERGE "Spirit, come back to me!"
-#define SOUND_MERGE 12022
-#define YELL_KILL_ONE "You cant fight the power!"
-#define SOUND_KILL_ONE 12026
-#define YELL_KILL_TWO "You gonna fail!"
-#define SOUND_KILL_TWO 12027
-#define YELL_DEATH "Chaga... choka'jinn."
-#define SOUND_DEATH 12028
-#define YELL_BERSERK "Whatch you be doing? Pissin' yourselves..."
-#define SOUND_BERSERK 12025
-
enum Spells
{
SPELL_DUAL_WIELD = 29651,
@@ -78,23 +54,32 @@ enum PhaseHalazzi
PHASE_ENRAGE = 5
};
+enum Yells
+{
+ SAY_AGGRO = 0,
+ SAY_SABER = 1,
+ SAY_SPLIT = 2,
+ SAY_MERGE = 3,
+ SAY_KILL = 4,
+ SAY_DEATH = 5,
+ SAY_BERSERK = 6
+};
+
class boss_halazzi : public CreatureScript
{
public:
-
- boss_halazzi()
- : CreatureScript("boss_halazzi")
- {
- }
+ boss_halazzi() : CreatureScript("boss_halazzi") { }
struct boss_halazziAI : public ScriptedAI
{
- boss_halazziAI(Creature* creature) : ScriptedAI(creature)
+ boss_halazziAI(Creature* creature) : ScriptedAI(creature), summons(me)
{
instance = creature->GetInstanceScript();
}
InstanceScript* instance;
+ SummonList summons;
+ PhaseHalazzi Phase;
uint32 FrenzyTimer;
uint32 SaberlashTimer;
@@ -102,16 +87,14 @@ class boss_halazzi : public CreatureScript
uint32 TotemTimer;
uint32 CheckTimer;
uint32 BerserkTimer;
-
uint32 TransformCount;
- PhaseHalazzi Phase;
-
uint64 LynxGUID;
void Reset() OVERRIDE
{
instance->SetData(DATA_HALAZZIEVENT, NOT_STARTED);
+ summons.DespawnAll();
LynxGUID = 0;
TransformCount = 0;
@@ -127,10 +110,7 @@ class boss_halazzi : public CreatureScript
void EnterCombat(Unit* /*who*/) OVERRIDE
{
instance->SetData(DATA_HALAZZIEVENT, IN_PROGRESS);
-
- me->MonsterYell(YELL_AGGRO, LANG_UNIVERSAL, NULL);
- DoPlaySoundToSet(me, SOUND_AGGRO);
-
+ Talk(SAY_AGGRO);
EnterPhase(PHASE_LYNX);
}
@@ -139,6 +119,7 @@ class boss_halazzi : public CreatureScript
summon->AI()->AttackStart(me->GetVictim());
if (summon->GetEntry() == NPC_SPIRIT_LYNX)
LynxGUID = summon->GetGUID();
+ summons.Summon(summon);
}
void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE
@@ -155,7 +136,8 @@ class boss_halazzi : public CreatureScript
void AttackStart(Unit* who) OVERRIDE
{
- if (Phase != PHASE_MERGE) ScriptedAI::AttackStart(who);
+ if (Phase != PHASE_MERGE)
+ ScriptedAI::AttackStart(who);
}
void EnterPhase(PhaseHalazzi NextPhase)
@@ -180,8 +162,7 @@ class boss_halazzi : public CreatureScript
TotemTimer = 12000;
break;
case PHASE_SPLIT:
- me->MonsterYell(YELL_SPLIT, LANG_UNIVERSAL, NULL);
- DoPlaySoundToSet(me, SOUND_SPLIT);
+ Talk(SAY_SPLIT);
DoCast(me, SPELL_TRANSFORM_SPLIT, true);
break;
case PHASE_HUMAN:
@@ -195,8 +176,7 @@ class boss_halazzi : public CreatureScript
case PHASE_MERGE:
if (Unit* pLynx = Unit::GetUnit(*me, LynxGUID))
{
- me->MonsterYell(YELL_MERGE, LANG_UNIVERSAL, NULL);
- DoPlaySoundToSet(me, SOUND_MERGE);
+ Talk(SAY_MERGE);
pLynx->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
pLynx->GetMotionMaster()->Clear();
pLynx->GetMotionMaster()->MoveFollow(me, 0, 0);
@@ -211,15 +191,14 @@ class boss_halazzi : public CreatureScript
Phase = NextPhase;
}
- void UpdateAI(uint32 diff) OVERRIDE
+ void UpdateAI(uint32 diff) OVERRIDE
{
if (!UpdateVictim())
return;
if (BerserkTimer <= diff)
{
- me->MonsterYell(YELL_BERSERK, LANG_UNIVERSAL, NULL);
- DoPlaySoundToSet(me, SOUND_BERSERK);
+ Talk(SAY_BERSERK);
DoCast(me, SPELL_BERSERK, true);
BerserkTimer = 60000;
} else BerserkTimer -= diff;
@@ -313,28 +292,18 @@ class boss_halazzi : public CreatureScript
DoMeleeAttackIfReady();
}
- void KilledUnit(Unit* /*victim*/) OVERRIDE
+ void KilledUnit(Unit* victim) OVERRIDE
{
- switch (urand(0, 1))
- {
- case 0:
- me->MonsterYell(YELL_KILL_ONE, LANG_UNIVERSAL, NULL);
- DoPlaySoundToSet(me, SOUND_KILL_ONE);
- break;
-
- case 1:
- me->MonsterYell(YELL_KILL_TWO, LANG_UNIVERSAL, NULL);
- DoPlaySoundToSet(me, SOUND_KILL_TWO);
- break;
- }
+ if (victim->GetTypeId() != TYPEID_PLAYER)
+ return;
+
+ Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/) OVERRIDE
{
instance->SetData(DATA_HALAZZIEVENT, DONE);
-
- me->MonsterYell(YELL_DEATH, LANG_UNIVERSAL, NULL);
- DoPlaySoundToSet(me, SOUND_DEATH);
+ Talk(SAY_DEATH);
}
};
@@ -348,11 +317,7 @@ class boss_halazzi : public CreatureScript
class npc_halazzi_lynx : public CreatureScript
{
public:
-
- npc_halazzi_lynx()
- : CreatureScript("npc_halazzi_lynx")
- {
- }
+ npc_halazzi_lynx() : CreatureScript("npc_halazzi_lynx") { }
struct npc_halazzi_lynxAI : public ScriptedAI
{
@@ -414,5 +379,3 @@ void AddSC_boss_halazzi()
new boss_halazzi();
new npc_halazzi_lynx();
}
-
-
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
index 336599f2cc5..5d4bafb5f94 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp
@@ -152,9 +152,11 @@ class boss_jeklik : public CreatureScript
case EVENT_SONIC_BURST:
DoCastVictim(SPELL_SONICBURST);
events.ScheduleEvent(EVENT_SONIC_BURST, urand(8000, 13000), 0, PHASE_ONE);
+ break;
case EVENT_SCREECH:
DoCastVictim(SPELL_SCREECH);
events.ScheduleEvent(EVENT_SCREECH, urand(18000, 26000), 0, PHASE_ONE);
+ break;
case EVENT_SPAWN_BATS:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
for (uint8 i = 0; i < 6; ++i)
diff --git a/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp b/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp
index 3fcd3c093b7..bc09983fee1 100644
--- a/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp
@@ -17,11 +17,7 @@
/*
Blasted_Lands
-Quest support: 3628. Teleporter to Rise of the Defiler.
-*/
-
-/*
-npc_deathly_usher
+Quest support: 3628.
*/
#include "ScriptMgr.h"
@@ -31,10 +27,6 @@ npc_deathly_usher
#include "Player.h"
#include "Group.h"
-/*######
-## npc_deathly_usher
-######*/
-
enum DeathlyUsher
{
SPELL_TELEPORT_SINGLE = 12885,
@@ -42,28 +34,6 @@ enum DeathlyUsher
SPELL_TELEPORT_GROUP = 27686
};
-class npc_deathly_usher : public CreatureScript
-{
-public:
- npc_deathly_usher() : CreatureScript("npc_deathly_usher") { }
-
- struct npc_deathly_usherAI : public ScriptedAI
- {
- npc_deathly_usherAI(Creature* creature) : ScriptedAI(creature) { }
-
- void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/) OVERRIDE
- {
- player->CLOSE_GOSSIP_MENU();
- me->CastSpell(player, SPELL_TELEPORT_GROUP, true);
- }
- };
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_deathly_usherAI(creature);
- }
-};
-
/*#####
# spell_razelikh_teleport_group
#####*/
@@ -113,6 +83,5 @@ class spell_razelikh_teleport_group : public SpellScriptLoader
void AddSC_blasted_lands()
{
- new npc_deathly_usher();
new spell_razelikh_teleport_group();
}
diff --git a/src/server/scripts/EasternKingdoms/zone_westfall.cpp b/src/server/scripts/EasternKingdoms/zone_westfall.cpp
index 350ceead706..d01806028c6 100644
--- a/src/server/scripts/EasternKingdoms/zone_westfall.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_westfall.cpp
@@ -19,13 +19,12 @@
/* ScriptData
SDName: Westfall
SD%Complete: 90
-SDComment: Quest support: 155, 1651
+SDComment: Quest support: 1651
SDCategory: Westfall
EndScriptData */
/* ContentData
npc_daphne_stilwell
-npc_defias_traitor
EndContentData */
#include "ScriptMgr.h"
@@ -202,79 +201,7 @@ public:
};
};
-/*######
-## npc_defias_traitor
-######*/
-enum DefiasSays
-{
- SAY_START = 0,
- SAY_PROGRESS = 1,
- SAY_END = 2,
- SAY_AGGRO = 3
-};
-
-
-#define QUEST_DEFIAS_BROTHERHOOD 155
-
-class npc_defias_traitor : public CreatureScript
-{
-public:
- npc_defias_traitor() : CreatureScript("npc_defias_traitor") { }
-
- bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE
- {
- if (quest->GetQuestId() == QUEST_DEFIAS_BROTHERHOOD)
- {
- if (npc_escortAI* pEscortAI = CAST_AI(npc_defias_traitor::npc_defias_traitorAI, creature->AI()))
- pEscortAI->Start(true, true, player->GetGUID());
-
- creature->AI()->Talk(SAY_START, player);
- }
-
- return true;
- }
-
- CreatureAI* GetAI(Creature* creature) const OVERRIDE
- {
- return new npc_defias_traitorAI(creature);
- }
-
- struct npc_defias_traitorAI : public npc_escortAI
- {
- npc_defias_traitorAI(Creature* creature) : npc_escortAI(creature) { Reset(); }
-
- void WaypointReached(uint32 waypointId) OVERRIDE
- {
- Player* player = GetPlayerForEscort();
- if (!player)
- return;
-
- switch (waypointId)
- {
- case 35:
- SetRun(false);
- break;
- case 36:
- Talk(SAY_PROGRESS, player);
- break;
- case 44:
- Talk(SAY_END, player);
- player->GroupEventHappens(QUEST_DEFIAS_BROTHERHOOD, me);
- break;
- }
- }
-
- void EnterCombat(Unit* who) OVERRIDE
- {
- Talk(SAY_AGGRO, who);
- }
-
- void Reset() OVERRIDE { }
- };
-};
-
void AddSC_westfall()
{
new npc_daphne_stilwell();
- new npc_defias_traitor();
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
index c7803f23e1b..e5ddcd1c2ef 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_anetheron.cpp
@@ -185,6 +185,8 @@ public:
{
npc_towering_infernalAI(Creature* creature) : ScriptedAI(creature)
{
+ ImmolationTimer = 5000;
+ CheckTimer = 5000;
instance = creature->GetInstanceScript();
AnetheronGUID = instance->GetData64(DATA_ANETHERON);
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp
index 4decce7482f..16002b59f1a 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_azgalor.cpp
@@ -191,6 +191,9 @@ public:
{
npc_lesser_doomguardAI(Creature* creature) : hyjal_trashAI(creature)
{
+ CrippleTimer = 50000;
+ WarstompTimer = 10000;
+ CheckTimer = 5000;
instance = creature->GetInstanceScript();
AzgalorGUID = instance->GetData64(DATA_AZGALOR);
}
diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/boss_glutton.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/boss_glutton.cpp
index 830c3fed382..1e0d481249d 100644
--- a/src/server/scripts/Kalimdor/RazorfenDowns/boss_glutton.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenDowns/boss_glutton.cpp
@@ -42,6 +42,7 @@ public:
{
boss_gluttonAI(Creature* creature) : BossAI(creature, DATA_GLUTTON)
{
+ hp50 = false;
hp15 = false;
}
diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp
index b9605794074..f1d8e1b67e8 100644
--- a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp
@@ -158,6 +158,8 @@ public:
{
instance = creature->GetInstanceScript();
eventInProgress = false;
+ channeling = false;
+ eventProgress = 0;
spawnerCount = 0;
}
diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
index f04b71d1da9..1dc37e063ba 100644
--- a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
@@ -171,7 +171,11 @@ public:
struct npc_snufflenose_gopherAI : public PetAI
{
- npc_snufflenose_gopherAI(Creature* creature) : PetAI(creature) { }
+ npc_snufflenose_gopherAI(Creature* creature) : PetAI(creature)
+ {
+ IsMovementActive = false;
+ TargetTubberGUID = 0;
+ }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
index 9e3244cccdb..988436066b6 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
@@ -898,6 +898,9 @@ public:
{
eye_tentacleAI(Creature* creature) : ScriptedAI(creature)
{
+ MindflayTimer = 500;
+ KillSelfTimer = 35000;
+
Portal = 0;
if (Creature* pPortal = me->SummonCreature(NPC_SMALL_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
{
@@ -974,6 +977,10 @@ public:
{
claw_tentacleAI(Creature* creature) : ScriptedAI(creature)
{
+ GroundRuptureTimer = 500;
+ HamstringTimer = 2000;
+ EvadeTimer = 5000;
+
SetCombatMovement(false);
Portal = 0;
@@ -1085,6 +1092,11 @@ public:
{
giant_claw_tentacleAI(Creature* creature) : ScriptedAI(creature)
{
+ GroundRuptureTimer = 500;
+ HamstringTimer = 2000;
+ ThrashTimer = 5000;
+ EvadeTimer = 5000;
+
SetCombatMovement(false);
Portal = 0;
@@ -1205,6 +1217,8 @@ public:
{
giant_eye_tentacleAI(Creature* creature) : ScriptedAI(creature)
{
+ BeamTimer = 500;
+
SetCombatMovement(false);
Portal = 0;
diff --git a/src/server/scripts/Kalimdor/zone_mulgore.cpp b/src/server/scripts/Kalimdor/zone_mulgore.cpp
index f70460ec7b6..f8cc21da209 100644
--- a/src/server/scripts/Kalimdor/zone_mulgore.cpp
+++ b/src/server/scripts/Kalimdor/zone_mulgore.cpp
@@ -24,7 +24,6 @@ SDCategory: Mulgore
EndScriptData */
/* ContentData
-npc_skorn_whitecloud
npc_kyle_frenzied
npc_plains_vision
EndContentData */
@@ -35,41 +34,6 @@ EndContentData */
#include "Player.h"
#include "SpellInfo.h"
-/*######
-# npc_skorn_whitecloud
-######*/
-
-#define GOSSIP_SW "Tell me a story, Skorn."
-
-class npc_skorn_whitecloud : public CreatureScript
-{
-public:
- npc_skorn_whitecloud() : CreatureScript("npc_skorn_whitecloud") { }
-
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
- {
- player->PlayerTalkClass->ClearMenus();
- if (action == GOSSIP_ACTION_INFO_DEF)
- player->SEND_GOSSIP_MENU(523, creature->GetGUID());
-
- return true;
- }
-
- bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
- {
- if (creature->IsQuestGiver())
- player->PrepareQuestMenu(creature->GetGUID());
-
- if (!player->GetQuestRewardStatus(770))
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SW, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
-
- player->SEND_GOSSIP_MENU(522, creature->GetGUID());
-
- return true;
- }
-
-};
-
/*#####
# npc_kyle_frenzied
######*/
@@ -321,7 +285,6 @@ public:
void AddSC_mulgore()
{
- new npc_skorn_whitecloud();
new npc_kyle_frenzied();
new npc_plains_vision();
}
diff --git a/src/server/scripts/Kalimdor/zone_silithus.cpp b/src/server/scripts/Kalimdor/zone_silithus.cpp
index b002bbe8a48..24d557222eb 100644
--- a/src/server/scripts/Kalimdor/zone_silithus.cpp
+++ b/src/server/scripts/Kalimdor/zone_silithus.cpp
@@ -649,11 +649,11 @@ public:
Unit* mob = NULL;
for (uint8 i = 0; i < 4; ++i)
{
- mob = player->FindNearestCreature(entries[i], 50, me);
+ mob = player->FindNearestCreature(entries[i], 50);
while (mob)
{
mob->RemoveFromWorld();
- mob = player->FindNearestCreature(15423, 50, me);
+ mob = player->FindNearestCreature(15423, 50);
}
}
break;
@@ -1021,7 +1021,7 @@ public:
{
if (quest->GetQuestId() == QUEST_A_PAWN_ON_THE_ETERNAL_BOARD)
{
- if (Creature* trigger = go->FindNearestCreature(15454, 100, player))
+ if (Creature* trigger = go->FindNearestCreature(15454, 100))
{
Unit* Merithra = trigger->SummonCreature(15378, -8034.535f, 1535.14f, 2.61f, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
Unit* Caelestrasz = trigger->SummonCreature(15379, -8032.767f, 1533.148f, 2.61f, 1.5f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
diff --git a/src/server/scripts/Kalimdor/zone_tanaris.cpp b/src/server/scripts/Kalimdor/zone_tanaris.cpp
index 204a2960611..3ced3c7115d 100644
--- a/src/server/scripts/Kalimdor/zone_tanaris.cpp
+++ b/src/server/scripts/Kalimdor/zone_tanaris.cpp
@@ -19,14 +19,13 @@
/* ScriptData
SDName: Tanaris
SD%Complete: 80
-SDComment: Quest support: 648, 1560, 2954, 4005, 10277, 10279(Special flight path). Noggenfogger vendor
+SDComment: Quest support: 648, 1560, 2954, 4005, 10277, 10279(Special flight path).
SDCategory: Tanaris
EndScriptData */
/* ContentData
npc_aquementas
npc_custodian_of_time
-npc_marin_noggenfogger
npc_steward_of_time
npc_stone_watcher_of_norgannon
npc_OOX17
@@ -282,39 +281,6 @@ public:
};
/*######
-## npc_marin_noggenfogger
-######*/
-
-class npc_marin_noggenfogger : public CreatureScript
-{
-public:
- npc_marin_noggenfogger() : CreatureScript("npc_marin_noggenfogger") { }
-
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
- {
- player->PlayerTalkClass->ClearMenus();
- if (action == GOSSIP_ACTION_TRADE)
- player->GetSession()->SendListInventory(creature->GetGUID());
-
- return true;
- }
-
- bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
- {
- if (creature->IsQuestGiver())
- player->PrepareQuestMenu(creature->GetGUID());
-
- if (creature->IsVendor() && player->GetQuestRewardStatus(2662))
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
-
- player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
-
- return true;
- }
-
-};
-
-/*######
## npc_steward_of_time
######*/
@@ -681,7 +647,6 @@ void AddSC_tanaris()
{
new npc_aquementas();
new npc_custodian_of_time();
- new npc_marin_noggenfogger();
new npc_steward_of_time();
new npc_stone_watcher_of_norgannon();
new npc_OOX17();
diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
index efe439de440..31c565e5be2 100644
--- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_prince_taldaram.cpp
@@ -88,6 +88,9 @@ class boss_prince_taldaram : public CreatureScript
boss_prince_taldaramAI(Creature* creature) : BossAI(creature, DATA_PRINCE_TALDARAM)
{
me->SetDisableGravity(true);
+ _flameSphereTargetGUID = 0;
+ _embraceTargetGUID = 0;
+ _embraceTakenDamage = 0;
}
void Reset() OVERRIDE
@@ -283,7 +286,10 @@ class npc_prince_taldaram_flame_sphere : public CreatureScript
struct npc_prince_taldaram_flame_sphereAI : public ScriptedAI
{
- npc_prince_taldaram_flame_sphereAI(Creature* creature) : ScriptedAI(creature) { }
+ npc_prince_taldaram_flame_sphereAI(Creature* creature) : ScriptedAI(creature)
+ {
+ _flameSphereTargetGUID = 0;
+ }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp
index 19e6b55b5c5..1281d40fe5c 100644
--- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_krikthir_the_gatewatcher.cpp
@@ -203,7 +203,7 @@ class npc_skittering_infector : public CreatureScript
enum TrashEvents
{
// Anubar Skrimisher
- EVENT_ANUBAR_CHARGE,
+ EVENT_ANUBAR_CHARGE = 1,
EVENT_BACKSTAB,
// Anubar Shadowcaster
diff --git a/src/server/scripts/Northrend/CMakeLists.txt b/src/server/scripts/Northrend/CMakeLists.txt
index 42a7ee15bb6..aff3c0a9528 100644
--- a/src/server/scripts/Northrend/CMakeLists.txt
+++ b/src/server/scripts/Northrend/CMakeLists.txt
@@ -168,6 +168,7 @@ set(scripts_STAT_SRCS
Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
+ Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp
Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
Northrend/IcecrownCitadel/boss_festergut.cpp
Northrend/IcecrownCitadel/boss_rotface.cpp
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp
index 9ae6f811e19..a24cd4db7c5 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/obsidian_sanctum.cpp
@@ -73,7 +73,7 @@ enum Enums
//Whelps
NPC_TWILIGHT_WHELP = 30890,
- NPC_SHARTHARION_TWILIGHT_WHELP = 31214,
+ NPC_SARTHARION_TWILIGHT_WHELP = 31214,
SPELL_FADE_ARMOR = 60708, // Reduces the armor of an enemy by 1500 for 15s
//flame tsunami
@@ -253,7 +253,7 @@ struct dummy_dragonAI : public ScriptedAI
{
case NPC_TENEBRON:
{
- if (!instance->GetBossState(DATA_SARTHARION) == IN_PROGRESS)
+ if (instance->GetBossState(DATA_SARTHARION) != IN_PROGRESS)
{
for (uint32 i = 0; i < 6; ++i)
me->SummonCreature(NPC_TWILIGHT_EGG, TwilightEggs[i], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000);
@@ -267,7 +267,7 @@ struct dummy_dragonAI : public ScriptedAI
}
case NPC_SHADRON:
{
- if (!instance->GetBossState(DATA_SARTHARION) == IN_PROGRESS)
+ if (instance->GetBossState(DATA_SARTHARION) != IN_PROGRESS)
me->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 28000);
else
me->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron2, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 28000);
@@ -276,7 +276,7 @@ struct dummy_dragonAI : public ScriptedAI
}
case NPC_VESPERON:
{
- if (!instance->GetBossState(DATA_SARTHARION) == IN_PROGRESS)
+ if (instance->GetBossState(DATA_SARTHARION) != IN_PROGRESS)
{
if (Creature* acolyte = me->SummonCreature(NPC_ACOLYTE_OF_VESPERON, AcolyteofVesperon, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000))
{
@@ -816,10 +816,10 @@ public:
{
me->RemoveAllAuras();
- if (!instance->GetBossState(DATA_SARTHARION) == IN_PROGRESS)
+ if (instance->GetBossState(DATA_SARTHARION) != IN_PROGRESS)
me->SummonCreature(NPC_TWILIGHT_WHELP, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
else
- me->SummonCreature(NPC_SHARTHARION_TWILIGHT_WHELP, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
+ me->SummonCreature(NPC_SARTHARION_TWILIGHT_WHELP, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
me->DealDamage(me, me->GetHealth());
}
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
index ea166585bb3..4210ebfcad5 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
@@ -294,6 +294,8 @@ class npc_snobold_vassal : public CreatureScript
{
npc_snobold_vassalAI(Creature* creature) : ScriptedAI(creature)
{
+ _targetGUID = 0;
+ _targetDied = false;
_instance = creature->GetInstanceScript();
_instance->SetData(DATA_SNOBOLD_COUNT, INCREASE);
}
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
index 1f4713415ac..de14b930220 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
@@ -1180,7 +1180,10 @@ enum TrashEvents
struct npc_gauntlet_trash : public ScriptedAI
{
- npc_gauntlet_trash(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
+ npc_gauntlet_trash(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript())
+ {
+ InternalWaveId = 0;
+ }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
index dd1d35e639e..0feec20d55f 100644
--- a/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
+++ b/src/server/scripts/Northrend/Gundrak/boss_slad_ran.cpp
@@ -219,7 +219,10 @@ public:
struct npc_slad_ran_constrictorAI : public ScriptedAI
{
- npc_slad_ran_constrictorAI(Creature* creature) : ScriptedAI(creature) { }
+ npc_slad_ran_constrictorAI(Creature* creature) : ScriptedAI(creature)
+ {
+ uiGripOfSladRanTimer = 1 * IN_MILLISECONDS;
+ }
uint32 uiGripOfSladRanTimer;
@@ -247,8 +250,9 @@ public:
target->CastSpell(target, SPELL_SNAKE_WRAP, true);
if (TempSummon* _me = me->ToTempSummon())
- if (Creature* sladran = _me->GetSummoner()->ToCreature())
- sladran->AI()->SetGUID(target->GetGUID(), DATA_SNAKES_WHYD_IT_HAVE_TO_BE_SNAKES);
+ if (Unit* summoner = _me->GetSummoner())
+ if (Creature* sladran = summoner->ToCreature())
+ sladran->AI()->SetGUID(target->GetGUID(), DATA_SNAKES_WHYD_IT_HAVE_TO_BE_SNAKES);
me->DespawnOrUnsummon();
}
@@ -270,7 +274,10 @@ public:
struct npc_slad_ran_viperAI : public ScriptedAI
{
- npc_slad_ran_viperAI(Creature* creature) : ScriptedAI(creature) { }
+ npc_slad_ran_viperAI(Creature* creature) : ScriptedAI(creature)
+ {
+ uiVenomousBiteTimer = 2 * IN_MILLISECONDS;
+ }
uint32 uiVenomousBiteTimer;
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp
index 3d4ee279685..bbf3e8afc0f 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_queen_lana_thel.cpp
@@ -800,7 +800,7 @@ class spell_blood_queen_pact_of_the_darkfallen_dmg : public SpellScriptLoader
// this is an additional effect to be executed
void PeriodicTick(AuraEffect const* aurEff)
{
- SpellInfo const* damageSpell = sSpellMgr->GetSpellInfo(SPELL_PACT_OF_THE_DARKFALLEN_DAMAGE);
+ SpellInfo const* damageSpell = sSpellMgr->EnsureSpellInfo(SPELL_PACT_OF_THE_DARKFALLEN_DAMAGE);
int32 damage = damageSpell->Effects[EFFECT_0].CalcValue();
float multiplier = 0.3375f + 0.1f * uint32(aurEff->GetTickNumber()/10); // do not convert to 0.01f - we need tick number/10 as INT (damage increases every 10 ticks)
damage = int32(damage * multiplier);
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
index 7be766c0a0e..e8048404027 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
@@ -333,6 +333,7 @@ class boss_deathbringer_saurfang : public CreatureScript
void JustReachedHome() OVERRIDE
{
_JustReachedHome();
+ Reset();
instance->SetBossState(DATA_DEATHBRINGER_SAURFANG, FAIL);
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_MARK_OF_THE_FALLEN_CHAMPION);
}
@@ -376,7 +377,16 @@ class boss_deathbringer_saurfang : public CreatureScript
void JustSummoned(Creature* summon) OVERRIDE
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true))
+ {
+ if (target->GetTransport())
+ {
+ summon->DespawnOrUnsummon(1);
+ EnterEvadeMode();
+ return;
+ }
+
summon->AI()->AttackStart(target);
+ }
summon->CastSpell(summon, SPELL_BLOOD_LINK_BEAST, true);
summon->CastSpell(summon, SPELL_RESISTANT_SKIN, true);
@@ -399,6 +409,12 @@ class boss_deathbringer_saurfang : public CreatureScript
void SpellHitTarget(Unit* target, SpellInfo const* spell) OVERRIDE
{
+ if (target->GetTransport())
+ {
+ EnterEvadeMode();
+ return;
+ }
+
switch (spell->Id)
{
case SPELL_MARK_OF_THE_FALLEN_CHAMPION:
@@ -571,6 +587,14 @@ class boss_deathbringer_saurfang : public CreatureScript
}
}
+ bool CanAIAttack(Unit const* target) const OVERRIDE
+ {
+ if (target->GetTransport())
+ return false;
+
+ return true;
+ }
+
static uint32 const FightWonValue;
private:
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp
new file mode 100644
index 00000000000..0a9e207db36
--- /dev/null
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp
@@ -0,0 +1,2484 @@
+/*
+ * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "CellImpl.h"
+#include "CreatureTextMgr.h"
+#include "GridNotifiersImpl.h"
+#include "GossipDef.h"
+#include "MoveSpline.h"
+#include "MoveSplineInit.h"
+#include "PassiveAI.h"
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "SpellAuraEffects.h"
+#include "SpellScript.h"
+#include "Transport.h"
+#include "TransportMgr.h"
+#include "Vehicle.h"
+#include "icecrown_citadel.h"
+
+enum Texts
+{
+ // High Overlord Saurfang
+ SAY_SAURFANG_INTRO_1 = 0,
+ SAY_SAURFANG_INTRO_2 = 1,
+ SAY_SAURFANG_INTRO_3 = 2,
+ SAY_SAURFANG_INTRO_4 = 3,
+ SAY_SAURFANG_INTRO_5 = 4,
+ SAY_SAURFANG_INTRO_6 = 5,
+ SAY_SAURFANG_INTRO_A = 6,
+ SAY_SAURFANG_BOARD = 7,
+ SAY_SAURFANG_ENTER_SKYBREAKER = 8,
+ SAY_SAURFANG_AXETHROWERS = 9,
+ SAY_SAURFANG_ROCKETEERS = 10,
+ SAY_SAURFANG_MAGES = 11,
+ SAY_SAURFANG_VICTORY = 12,
+ SAY_SAURFANG_WIPE = 13,
+
+ // Muradin Bronzebeard
+ SAY_MURADIN_INTRO_1 = 0,
+ SAY_MURADIN_INTRO_2 = 1,
+ SAY_MURADIN_INTRO_3 = 2,
+ SAY_MURADIN_INTRO_4 = 3,
+ SAY_MURADIN_INTRO_5 = 4,
+ SAY_MURADIN_INTRO_6 = 5,
+ SAY_MURADIN_INTRO_7 = 6,
+ SAY_MURADIN_INTRO_H = 7,
+ SAY_MURADIN_BOARD = 8,
+ SAY_MURADIN_ENTER_ORGRIMMS_HAMMER = 9,
+ SAY_MURADIN_RIFLEMAN = 10,
+ SAY_MURADIN_MORTAR = 11,
+ SAY_MURADIN_SORCERERS = 12,
+ SAY_MURADIN_VICTORY = 13,
+ SAY_MURADIN_WIPE = 14,
+
+ SAY_ZAFOD_ROCKET_PACK_ACTIVE = 0,
+ SAY_ZAFOD_ROCKET_PACK_DISABLED = 1,
+
+ SAY_OVERHEAT = 0
+};
+
+enum Events
+{
+ // High Overlord Saurfang
+ EVENT_INTRO_H_1 = 1,
+ EVENT_INTRO_H_2 = 2,
+ EVENT_INTRO_SUMMON_SKYBREAKER = 3,
+ EVENT_INTRO_H_3 = 4,
+ EVENT_INTRO_H_4 = 5,
+ EVENT_INTRO_H_5 = 6,
+ EVENT_INTRO_H_6 = 7,
+
+ // Muradin Bronzebeard
+ EVENT_INTRO_A_1 = 1,
+ EVENT_INTRO_A_2 = 2,
+ EVENT_INTRO_SUMMON_ORGRIMS_HAMMER = 3,
+ EVENT_INTRO_A_3 = 4,
+ EVENT_INTRO_A_4 = 5,
+ EVENT_INTRO_A_5 = 6,
+ EVENT_INTRO_A_6 = 7,
+ EVENT_INTRO_A_7 = 8,
+
+ EVENT_KEEP_PLAYER_IN_COMBAT = 9,
+ EVENT_SUMMON_MAGE = 10,
+ EVENT_ADDS = 11,
+ EVENT_ADDS_BOARD_YELL = 12,
+ EVENT_CHECK_RIFLEMAN = 13,
+ EVENT_CHECK_MORTAR = 14,
+ EVENT_CLEAVE = 15,
+
+ EVENT_BLADESTORM = 16,
+ EVENT_WOUNDING_STRIKE = 17
+};
+
+enum Spells
+{
+ // Applied on friendly transport NPCs
+ SPELL_FRIENDLY_BOSS_DAMAGE_MOD = 70339,
+ SPELL_CHECK_FOR_PLAYERS = 70332,
+ SPELL_GUNSHIP_FALL_TELEPORT = 67335,
+ SPELL_TELEPORT_PLAYERS_ON_RESET_A = 70446,
+ SPELL_TELEPORT_PLAYERS_ON_RESET_H = 71284,
+ SPELL_TELEPORT_PLAYERS_ON_VICTORY = 72340,
+ SPELL_ACHIEVEMENT = 72959,
+ SPELL_AWARD_REPUTATION_BOSS_KILL = 73843,
+
+ // Murading Bronzebeard
+ // High Overlord Saurfang
+ SPELL_BATTLE_FURY = 69637,
+ SPELL_RENDING_THROW = 70309,
+ SPELL_CLEAVE = 15284,
+ SPELL_TASTE_OF_BLOOD = 69634,
+
+ // Applied on enemy NPCs
+ SPELL_MELEE_TARGETING_ON_SKYBREAKER = 70219,
+ SPELL_MELEE_TARGETING_ON_ORGRIMS_HAMMER = 70294,
+
+ // Gunship Hull
+ SPELL_EXPLOSION_WIPE = 72134,
+ SPELL_EXPLOSION_VICTORY = 72137,
+
+ // Hostile NPCs
+ SPELL_TELEPORT_TO_ENEMY_SHIP = 70104,
+ SPELL_BATTLE_EXPERIENCE = 71201,
+ SPELL_EXPERIENCED = 71188,
+ SPELL_VETERAN = 71193,
+ SPELL_ELITE = 71195,
+ SPELL_ADDS_BERSERK = 72525,
+
+ // Skybreaker Sorcerer
+ // Kor'kron Battle-Mage
+ SPELL_SHADOW_CHANNELING = 43897,
+ SPELL_BELOW_ZERO = 69705,
+
+ // Skybreaker Rifleman
+ // Kor'kron Axethrower
+ SPELL_SHOOT = 70162,
+ SPELL_HURL_AXE = 70161,
+ SPELL_BURNING_PITCH_A = 70403,
+ SPELL_BURNING_PITCH_H = 70397,
+ SPELL_BURNING_PITCH = 69660,
+
+ // Skybreaker Mortar Soldier
+ // Kor'kron Rocketeer
+ SPELL_ROCKET_ARTILLERY_A = 70609,
+ SPELL_ROCKET_ARTILLERY_H = 69678,
+ SPELL_BURNING_PITCH_DAMAGE_A = 70383,
+ SPELL_BURNING_PITCH_DAMAGE_H = 70374,
+
+ // Skybreaker Marine
+ // Kor'kron Reaver
+ SPELL_DESPERATE_RESOLVE = 69647,
+
+ // Skybreaker Sergeant
+ // Kor'kron Sergeant
+ SPELL_BLADESTORM = 69652,
+ SPELL_WOUNDING_STRIKE = 69651,
+
+ //
+ SPELL_LOCK_PLAYERS_AND_TAP_CHEST = 72347,
+ SPELL_ON_SKYBREAKER_DECK = 70120,
+ SPELL_ON_ORGRIMS_HAMMER_DECK = 70121,
+
+ // Rocket Pack
+ SPELL_ROCKET_PACK_DAMAGE = 69193,
+ SPELL_ROCKET_BURST = 69192,
+ SPELL_ROCKET_PACK_USEABLE = 70348,
+
+ // Alliance Gunship Cannon
+ // Horde Gunship Cannon
+ SPELL_OVERHEAT = 69487,
+ SPELL_EJECT_ALL_PASSENGERS_BELOW_ZERO = 68576,
+ SPELL_EJECT_ALL_PASSENGERS_WIPE = 50630
+};
+
+enum MiscData
+{
+ ITEM_GOBLIN_ROCKET_PACK = 49278,
+
+ PHASE_COMBAT = 0,
+ PHASE_INTRO = 1,
+
+ MUSIC_ENCOUNTER = 17289
+};
+
+enum EncounterActions
+{
+ ACTION_SPAWN_MAGE = 1,
+ ACTION_SPAWN_ALL_ADDS = 2,
+ ACTION_CLEAR_SLOT = 3,
+ ACTION_SET_SLOT = 4,
+ ACTION_SHIP_VISITS = 5
+};
+
+Position const SkybreakerAddsSpawnPos = { 15.91131f, 0.0f, 20.4628f, M_PI };
+Position const OrgrimsHammerAddsSpawnPos = { 60.728395f, 0.0f, 38.93467f, M_PI };
+
+// Horde encounter
+Position const SkybreakerTeleportPortal = { 6.666975f, 0.013001f, 20.87888f, 0.0f };
+Position const OrgrimsHammerTeleportExit = { 7.461699f, 0.158853f, 35.72989f, 0.0f };
+
+// Alliance encounter
+Position const OrgrimsHammerTeleportPortal = { 47.550990f, -0.101778f, 37.61111f, 0.0f };
+Position const SkybreakerTeleportExit = { -17.55738f, -0.090421f, 21.18366f, 0.0f };
+
+uint32 const MuradinExitPathSize = 10;
+G3D::Vector3 const MuradinExitPath[MuradinExitPathSize] =
+{
+ { 8.130936f, -0.2699585f, 20.31728f },
+ { 6.380936f, -0.2699585f, 20.31728f },
+ { 3.507703f, 0.02986573f, 20.78463f },
+ { -2.767633f, 3.743143f, 20.37663f },
+ { -4.017633f, 4.493143f, 20.12663f },
+ { -7.242224f, 6.856013f, 20.03468f },
+ { -7.742224f, 8.606013f, 20.78468f },
+ { -7.992224f, 9.856013f, 21.28468f },
+ { -12.24222f, 23.10601f, 21.28468f },
+ { -14.88477f, 25.20844f, 21.59985f },
+};
+
+uint32 const SaurfangExitPathSize = 13;
+G3D::Vector3 const SaurfangExitPath[SaurfangExitPathSize] =
+{
+ { 30.43987f, 0.1475817f, 36.10674f },
+ { 21.36141f, -3.056458f, 35.42970f },
+ { 19.11141f, -3.806458f, 35.42970f },
+ { 19.01736f, -3.299440f, 35.39428f },
+ { 18.6747f, -5.862823f, 35.66611f },
+ { 18.6747f, -7.862823f, 35.66611f },
+ { 18.1747f, -17.36282f, 35.66611f },
+ { 18.1747f, -22.61282f, 35.66611f },
+ { 17.9247f, -24.36282f, 35.41611f },
+ { 17.9247f, -26.61282f, 35.66611f },
+ { 17.9247f, -27.86282f, 35.66611f },
+ { 17.9247f, -29.36282f, 35.66611f },
+ { 15.33203f, -30.42621f, 35.93796f }
+};
+
+enum PassengerSlots
+{
+ // Freezing the cannons
+ SLOT_FREEZE_MAGE = 0,
+
+ // Channeling the portal, refilled with adds that board player's ship
+ SLOT_MAGE_1 = 1,
+ SLOT_MAGE_2 = 2,
+
+ // Rifleman
+ SLOT_RIFLEMAN_1 = 3,
+ SLOT_RIFLEMAN_2 = 4,
+ SLOT_RIFLEMAN_3 = 5,
+ SLOT_RIFLEMAN_4 = 6,
+
+ // Additional Rifleman on 25 man
+ SLOT_RIFLEMAN_5 = 7,
+ SLOT_RIFLEMAN_6 = 8,
+ SLOT_RIFLEMAN_7 = 9,
+ SLOT_RIFLEMAN_8 = 10,
+
+ // Mortar
+ SLOT_MORTAR_1 = 11,
+ SLOT_MORTAR_2 = 12,
+
+ // Additional spawns on 25 man
+ SLOT_MORTAR_3 = 13,
+ SLOT_MORTAR_4 = 14,
+
+ // Marines
+ SLOT_MARINE_1 = 15,
+ SLOT_MARINE_2 = 16,
+
+ // Additional spawns on 25 man
+ SLOT_MARINE_3 = 17,
+ SLOT_MARINE_4 = 18,
+
+ // Sergeants
+ SLOT_SERGEANT_1 = 19,
+
+ // Additional spawns on 25 man
+ SLOT_SERGEANT_2 = 20,
+
+ MAX_SLOTS
+};
+
+struct SlotInfo
+{
+ uint32 Entry;
+ Position TargetPosition;
+ uint32 Cooldown;
+};
+
+SlotInfo const SkybreakerSlotInfo[MAX_SLOTS] =
+{
+ { NPC_SKYBREAKER_SORCERER, { -9.479858f, 0.05663967f, 20.77026f, 4.729842f }, 0 },
+
+ { NPC_SKYBREAKER_SORCERER, { 6.385986f, 4.978760f, 20.55417f, 4.694936f }, 0 },
+ { NPC_SKYBREAKER_SORCERER, { 6.579102f, -4.674561f, 20.55060f, 1.553343f }, 0 },
+
+ { NPC_SKYBREAKER_RIFLEMAN, { -29.563900f, -17.95801f, 20.73837f, 4.747295f }, 30 },
+ { NPC_SKYBREAKER_RIFLEMAN, { -18.017210f, -18.82056f, 20.79150f, 4.747295f }, 30 },
+ { NPC_SKYBREAKER_RIFLEMAN, { -9.1193850f, -18.79102f, 20.58887f, 4.712389f }, 30 },
+ { NPC_SKYBREAKER_RIFLEMAN, { -0.3364258f, -18.87183f, 20.56824f, 4.712389f }, 30 },
+
+ { NPC_SKYBREAKER_RIFLEMAN, { -34.705810f, -17.67261f, 20.51523f, 4.729842f }, 30 },
+ { NPC_SKYBREAKER_RIFLEMAN, { -23.562010f, -18.28564f, 20.67859f, 4.729842f }, 30 },
+ { NPC_SKYBREAKER_RIFLEMAN, { -13.602780f, -18.74268f, 20.59622f, 4.712389f }, 30 },
+ { NPC_SKYBREAKER_RIFLEMAN, { -4.3350220f, -18.84619f, 20.58234f, 4.712389f }, 30 },
+
+ { NPC_SKYBREAKER_MORTAR_SOLDIER, { -31.70142f, 18.02783f, 20.77197f, 4.712389f }, 30 },
+ { NPC_SKYBREAKER_MORTAR_SOLDIER, { -9.368652f, 18.75806f, 20.65335f, 4.712389f }, 30 },
+
+ { NPC_SKYBREAKER_MORTAR_SOLDIER, { -20.40851f, 18.40381f, 20.50647f, 4.694936f }, 30 },
+ { NPC_SKYBREAKER_MORTAR_SOLDIER, { 0.1585693f, 18.11523f, 20.41949f, 4.729842f }, 30 },
+
+ { NPC_SKYBREAKER_MARINE, SkybreakerTeleportPortal, 0 },
+ { NPC_SKYBREAKER_MARINE, SkybreakerTeleportPortal, 0 },
+
+ { NPC_SKYBREAKER_MARINE, SkybreakerTeleportPortal, 0 },
+ { NPC_SKYBREAKER_MARINE, SkybreakerTeleportPortal, 0 },
+
+ { NPC_SKYBREAKER_SERGEANT, SkybreakerTeleportPortal, 0 },
+
+ { NPC_SKYBREAKER_SERGEANT, SkybreakerTeleportPortal, 0 }
+};
+
+SlotInfo const OrgrimsHammerSlotInfo[MAX_SLOTS] =
+{
+ { NPC_KOR_KRON_BATTLE_MAGE, { 13.58548f, 0.3867192f, 34.99243f, 1.53589f }, 0 },
+
+ { NPC_KOR_KRON_BATTLE_MAGE, { 47.29290f, -4.308941f, 37.55550f, 1.570796f }, 0 },
+ { NPC_KOR_KRON_BATTLE_MAGE, { 47.34621f, 4.032004f, 37.70952f, 4.817109f }, 0 },
+
+ { NPC_KOR_KRON_AXETHROWER, { -12.09280f, 27.65942f, 33.58557f, 1.53589f }, 30 },
+ { NPC_KOR_KRON_AXETHROWER, { -3.170555f, 28.30652f, 34.21082f, 1.53589f }, 30 },
+ { NPC_KOR_KRON_AXETHROWER, { 14.928040f, 26.18018f, 35.47803f, 1.53589f }, 30 },
+ { NPC_KOR_KRON_AXETHROWER, { 24.703310f, 25.36584f, 35.97845f, 1.53589f }, 30 },
+
+ { NPC_KOR_KRON_AXETHROWER, { -16.65302f, 27.59668f, 33.18726f, 1.53589f }, 30 },
+ { NPC_KOR_KRON_AXETHROWER, { -8.084572f, 28.21448f, 33.93805f, 1.53589f }, 30 },
+ { NPC_KOR_KRON_AXETHROWER, { 7.594765f, 27.41968f, 35.00775f, 1.53589f }, 30 },
+ { NPC_KOR_KRON_AXETHROWER, { 20.763390f, 25.58215f, 35.75287f, 1.53589f }, 30 },
+
+ { NPC_KOR_KRON_ROCKETEER, { -11.44849f, -25.71838f, 33.64343f, 1.518436f }, 30 },
+ { NPC_KOR_KRON_ROCKETEER, { 12.30336f, -25.69653f, 35.32373f, 1.518436f }, 30 },
+
+ { NPC_KOR_KRON_ROCKETEER, { -0.05931854f, -25.46399f, 34.50592f, 1.518436f }, 30 },
+ { NPC_KOR_KRON_ROCKETEER, { 27.62149000f, -23.48108f, 36.12708f, 1.518436f }, 30 },
+
+ { NPC_KOR_KRON_REAVER, OrgrimsHammerTeleportPortal, 0 },
+ { NPC_KOR_KRON_REAVER, OrgrimsHammerTeleportPortal, 0 },
+
+ { NPC_KOR_KRON_REAVER, OrgrimsHammerTeleportPortal, 0 },
+ { NPC_KOR_KRON_REAVER, OrgrimsHammerTeleportPortal, 0 },
+
+ { NPC_KOR_KRON_SERGEANT, OrgrimsHammerTeleportPortal, 0 },
+
+ { NPC_KOR_KRON_SERGEANT, OrgrimsHammerTeleportPortal, 0 }
+};
+
+class PassengerController
+{
+public:
+ PassengerController()
+ {
+ ResetSlots(HORDE);
+ }
+
+ void SetTransport(Transport* transport) { _transport = transport; }
+
+ void ResetSlots(uint32 team)
+ {
+ _transport = NULL;
+ memset(_controlledSlots, 0, sizeof(uint64)* MAX_SLOTS);
+ memset(_respawnCooldowns, 0, sizeof(time_t)* MAX_SLOTS);
+ _spawnPoint = team == HORDE ? &OrgrimsHammerAddsSpawnPos : &SkybreakerAddsSpawnPos;
+ _slotInfo = team == HORDE ? OrgrimsHammerSlotInfo : SkybreakerSlotInfo;
+ }
+
+ bool SummonCreatures(PassengerSlots first, PassengerSlots last)
+ {
+ if (!_transport)
+ return false;
+
+ bool summoned = false;
+ time_t now = time(NULL);
+ for (int32 i = first; i <= last; ++i)
+ {
+ if (_respawnCooldowns[i] > now)
+ continue;
+
+ if (_controlledSlots[i])
+ {
+ Creature* current = ObjectAccessor::GetCreature(*_transport, _controlledSlots[i]);
+ if (current && current->IsAlive())
+ continue;
+ }
+
+ if (Creature* passenger = _transport->SummonPassenger(_slotInfo[i].Entry, SelectSpawnPoint(), TEMPSUMMON_CORPSE_TIMED_DESPAWN, NULL, 15000))
+ {
+ _controlledSlots[i] = passenger->GetGUID();
+ _respawnCooldowns[i] = time_t(0);
+ passenger->AI()->SetData(ACTION_SET_SLOT, i);
+ summoned = true;
+ }
+ }
+
+ return summoned;
+ }
+
+ void ClearSlot(PassengerSlots slot)
+ {
+ _controlledSlots[slot] = 0;
+ _respawnCooldowns[slot] = time(NULL) + _slotInfo[slot].Cooldown;
+ }
+
+ bool SlotsNeedRefill(PassengerSlots first, PassengerSlots last) const
+ {
+ for (int32 i = first; i <= last; ++i)
+ if (!_controlledSlots[i])
+ return true;
+
+ return false;
+ }
+
+private:
+ Position SelectSpawnPoint() const
+ {
+ Position newPos;
+ float angle = frand(-M_PI * 0.5f, M_PI * 0.5f);
+ newPos.m_positionX = _spawnPoint->GetPositionX() + 2.0f * std::cos(angle);
+ newPos.m_positionY = _spawnPoint->GetPositionY() + 2.0f * std::sin(angle);
+ newPos.m_positionZ = _spawnPoint->GetPositionZ();
+ newPos.SetOrientation(_spawnPoint->GetOrientation());
+ return newPos;
+ }
+
+ Transport* _transport;
+ uint64 _controlledSlots[MAX_SLOTS];
+ time_t _respawnCooldowns[MAX_SLOTS];
+ Position const* _spawnPoint;
+ SlotInfo const* _slotInfo;
+};
+
+class DelayedMovementEvent : public BasicEvent
+{
+public:
+ DelayedMovementEvent(Creature* owner, Position const& dest) : _owner(owner), _dest(dest) { }
+
+ bool Execute(uint64, uint32) OVERRIDE
+ {
+ if (!_owner->IsAlive())
+ return true;
+
+ _owner->GetMotionMaster()->MovePoint(EVENT_CHARGE_PREPATH, *_owner, false);
+
+ Movement::MoveSplineInit init(_owner);
+ init.DisableTransportPathTransformations();
+ init.MoveTo(_dest.GetPositionX(), _dest.GetPositionY(), _dest.GetPositionZ(), false);
+ init.Launch();
+
+ return true;
+ }
+
+private:
+ Creature* _owner;
+ Position const& _dest;
+};
+
+class ResetEncounterEvent : public BasicEvent
+{
+public:
+ ResetEncounterEvent(Unit* caster, uint32 spellId, uint64 otherTransport) : _caster(caster), _spellId(spellId), _otherTransport(otherTransport) { }
+
+ bool Execute(uint64, uint32) OVERRIDE
+ {
+ _caster->CastSpell(_caster, _spellId, true);
+ _caster->GetTransport()->AddObjectToRemoveList();
+
+ if (GameObject* go = HashMapHolder<GameObject>::Find(_otherTransport))
+ go->AddObjectToRemoveList();
+
+ return true;
+ }
+
+private:
+ Unit* _caster;
+ uint32 _spellId;
+ uint64 _otherTransport;
+};
+
+class BattleExperienceEvent : public BasicEvent
+{
+public:
+ static uint32 const ExperiencedSpells[5];
+ static uint32 const ExperiencedTimes[5];
+
+ BattleExperienceEvent(Creature* creature) : _creature(creature), _level(0) { }
+
+ bool Execute(uint64 timer, uint32 /*diff*/) OVERRIDE
+ {
+ if (!_creature->IsAlive())
+ return true;
+
+ _creature->RemoveAurasDueToSpell(ExperiencedSpells[_level]);
+ ++_level;
+
+ _creature->CastSpell(_creature, ExperiencedSpells[_level], TRIGGERED_FULL_MASK);
+ if (_level < (_creature->GetMap()->IsHeroic() ? 4 : 3))
+ {
+ _creature->m_Events.AddEvent(this, timer + ExperiencedTimes[_level]);
+ return false;
+ }
+
+ return true;
+ }
+
+private:
+ Creature* _creature;
+ int32 _level;
+};
+
+uint32 const BattleExperienceEvent::ExperiencedSpells[5] = { 0, SPELL_EXPERIENCED, SPELL_VETERAN, SPELL_ELITE, SPELL_ADDS_BERSERK };
+uint32 const BattleExperienceEvent::ExperiencedTimes[5] = { 100000, 70000, 60000, 90000, 0 };
+
+struct gunship_npc_AI : public ScriptedAI
+{
+ gunship_npc_AI(Creature* creature) : ScriptedAI(creature),
+ Instance(creature->GetInstanceScript()), Slot(NULL), Index(uint32(-1))
+ {
+ BurningPitchId = Instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE ? SPELL_BURNING_PITCH_A : SPELL_BURNING_PITCH_H;
+ me->setRegeneratingHealth(false);
+ }
+
+ void SetData(uint32 type, uint32 data) OVERRIDE
+ {
+ if (type == ACTION_SET_SLOT && data < MAX_SLOTS)
+ {
+ SetSlotInfo(data);
+
+ me->SetReactState(REACT_PASSIVE);
+
+ float x, y, z, o;
+ Slot->TargetPosition.GetPosition(x, y, z, o);
+
+ me->SetTransportHomePosition(Slot->TargetPosition);
+ float hx = x, hy = y, hz = z, ho = o;
+ me->GetTransport()->CalculatePassengerPosition(hx, hy, hz, &ho);
+ me->SetHomePosition(hx, hy, hz, ho);
+
+ me->GetMotionMaster()->MovePoint(EVENT_CHARGE_PREPATH, Slot->TargetPosition, false);
+
+ Movement::MoveSplineInit init(me);
+ init.DisableTransportPathTransformations();
+ init.MoveTo(x, y, z, false);
+ init.Launch();
+ }
+ }
+
+ void EnterEvadeMode() OVERRIDE
+ {
+ if (!me->IsAlive() || !me->IsInCombat())
+ return;
+
+ me->DeleteThreatList();
+ me->CombatStop(true);
+ me->GetMotionMaster()->MoveTargetedHome();
+ }
+
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ if (Slot)
+ if (Creature* captain = me->FindNearestCreature(Instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE ? NPC_IGB_MURADIN_BRONZEBEARD : NPC_IGB_HIGH_OVERLORD_SAURFANG, 200.0f))
+ captain->AI()->SetData(ACTION_CLEAR_SLOT, Index);
+ }
+
+ void MovementInform(uint32 type, uint32 pointId) OVERRIDE
+ {
+ if (type != POINT_MOTION_TYPE)
+ return;
+
+ if (pointId == EVENT_CHARGE_PREPATH && Slot)
+ {
+ me->SetFacingTo(Slot->TargetPosition.GetOrientation());
+ me->m_Events.AddEvent(new BattleExperienceEvent(me), me->m_Events.CalculateTime(BattleExperienceEvent::ExperiencedTimes[0]));
+ DoCast(me, SPELL_BATTLE_EXPERIENCE, true);
+ me->SetReactState(REACT_AGGRESSIVE);
+ }
+ }
+
+ bool CanAIAttack(Unit const* target) const OVERRIDE
+ {
+ if (Instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != IN_PROGRESS)
+ return false;
+ return target->HasAura(Instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE ? SPELL_ON_ORGRIMS_HAMMER_DECK : SPELL_ON_SKYBREAKER_DECK);
+ }
+
+protected:
+ void SetSlotInfo(uint32 index)
+ {
+ Index = index;
+ Slot = &((Instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE ? SkybreakerSlotInfo : OrgrimsHammerSlotInfo)[Index]);
+ }
+
+ bool SelectVictim()
+ {
+ if (Instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != IN_PROGRESS)
+ {
+ EnterEvadeMode();
+ return false;
+ }
+
+ if (!me->HasReactState(REACT_PASSIVE))
+ {
+ if (Unit* victim = me->SelectVictim())
+ AttackStart(victim);
+ return me->GetVictim();
+ }
+ else if (me->getThreatManager().isThreatListEmpty())
+ {
+ EnterEvadeMode();
+ return false;
+ }
+
+ return true;
+ }
+
+ void TriggerBurningPitch()
+ {
+ if (Instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) == IN_PROGRESS &&
+ !me->HasUnitState(UNIT_STATE_CASTING) && !me->HasReactState(REACT_PASSIVE) &&
+ !me->HasSpellCooldown(BurningPitchId))
+ {
+ DoCastAOE(BurningPitchId, true);
+ me->_AddCreatureSpellCooldown(BurningPitchId, time(NULL) + urand(3000, 4000) / IN_MILLISECONDS);
+ }
+ }
+
+ InstanceScript* Instance;
+ SlotInfo const* Slot;
+ uint32 Index;
+ uint32 BurningPitchId;
+};
+
+class npc_gunship : public CreatureScript
+{
+ public:
+ npc_gunship() : CreatureScript("npc_gunship") { }
+
+ struct npc_gunshipAI : public NullCreatureAI
+ {
+ npc_gunshipAI(Creature* creature) : NullCreatureAI(creature),
+ _teamInInstance(creature->GetInstanceScript()->GetData(DATA_TEAM_IN_INSTANCE)),
+ _summonedFirstMage(false), _died(false)
+ {
+ me->setRegeneratingHealth(false);
+ }
+
+ void DamageTaken(Unit* /*source*/, uint32& damage) OVERRIDE
+ {
+ if (damage >= me->GetHealth())
+ {
+ JustDied(NULL);
+ damage = me->GetHealth() - 1;
+ return;
+ }
+
+ if (_summonedFirstMage)
+ return;
+
+ if (me->GetTransport()->GetEntry() != uint32(_teamInInstance == HORDE ? GO_THE_SKYBREAKER_H : GO_ORGRIMS_HAMMER_A))
+ return;
+
+ if (!me->HealthBelowPctDamaged(90, damage))
+ return;
+
+ _summonedFirstMage = true;
+ if (Creature* captain = me->FindNearestCreature(_teamInInstance == HORDE ? NPC_IGB_MURADIN_BRONZEBEARD : NPC_IGB_HIGH_OVERLORD_SAURFANG, 100.0f))
+ captain->AI()->DoAction(ACTION_SPAWN_MAGE);
+ }
+
+ void JustDied(Unit* /*killer*/) OVERRIDE
+ {
+ if (_died)
+ return;
+
+ _died = true;
+
+ bool isVictory = me->GetTransport()->GetEntry() == GO_THE_SKYBREAKER_H || me->GetTransport()->GetEntry() == GO_ORGRIMS_HAMMER_A;
+ InstanceScript* instance = me->GetInstanceScript();
+ instance->SetBossState(DATA_ICECROWN_GUNSHIP_BATTLE, isVictory ? DONE : FAIL);
+ if (Creature* creature = me->FindNearestCreature(me->GetEntry() == NPC_ORGRIMS_HAMMER ? NPC_THE_SKYBREAKER : NPC_ORGRIMS_HAMMER, 200.0f))
+ {
+ instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, creature);
+ creature->RemoveAurasDueToSpell(SPELL_CHECK_FOR_PLAYERS);
+ }
+
+ instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
+ me->RemoveAurasDueToSpell(SPELL_CHECK_FOR_PLAYERS);
+
+ me->GetMap()->SetZoneMusic(AREA_ICECROWN_CITADEL, 0);
+ std::list<Creature*> creatures;
+ GetCreatureListWithEntryInGrid(creatures, me, NPC_MARTYR_STALKER_IGB_SAURFANG, SIZE_OF_GRIDS);
+ for (std::list<Creature*>::iterator itr = creatures.begin(); itr != creatures.end(); ++itr)
+ {
+ Creature* stalker = *itr;
+ stalker->RemoveAllAuras();
+ stalker->DeleteThreatList();
+ stalker->CombatStop(true);
+ }
+
+ uint32 explosionSpell = isVictory ? SPELL_EXPLOSION_VICTORY : SPELL_EXPLOSION_WIPE;
+ creatures.clear();
+ GetCreatureListWithEntryInGrid(creatures, me, NPC_GUNSHIP_HULL, 200.0f);
+ for (std::list<Creature*>::iterator itr = creatures.begin(); itr != creatures.end(); ++itr)
+ {
+ Creature* hull = *itr;
+ if (hull->GetTransport() != me->GetTransport())
+ continue;
+
+ hull->CastSpell(hull, explosionSpell, TRIGGERED_FULL_MASK);
+ }
+
+ creatures.clear();
+ GetCreatureListWithEntryInGrid(creatures, me, _teamInInstance == HORDE ? NPC_HORDE_GUNSHIP_CANNON : NPC_ALLIANCE_GUNSHIP_CANNON, 200.0f);
+ for (std::list<Creature*>::iterator itr = creatures.begin(); itr != creatures.end(); ++itr)
+ {
+ Creature* cannon = *itr;
+ if (isVictory)
+ {
+ cannon->CastSpell(cannon, SPELL_EJECT_ALL_PASSENGERS_BELOW_ZERO, TRIGGERED_FULL_MASK);
+
+ WorldPacket data(SMSG_PLAYER_VEHICLE_DATA, cannon->GetPackGUID().size() + 4);
+ data.append(cannon->GetPackGUID());
+ data << uint32(0);
+ cannon->SendMessageToSet(&data, true);
+
+ cannon->RemoveVehicleKit();
+ }
+ else
+ cannon->CastSpell(cannon, SPELL_EJECT_ALL_PASSENGERS_WIPE, TRIGGERED_FULL_MASK);
+ }
+
+ uint32 creatureEntry = NPC_IGB_MURADIN_BRONZEBEARD;
+ uint8 textId = isVictory ? SAY_MURADIN_VICTORY : SAY_MURADIN_WIPE;
+ if (_teamInInstance == HORDE)
+ {
+ creatureEntry = NPC_IGB_HIGH_OVERLORD_SAURFANG;
+ textId = isVictory ? SAY_SAURFANG_VICTORY : SAY_SAURFANG_WIPE;
+ }
+
+ if (Creature* creature = me->FindNearestCreature(creatureEntry, 100.0f))
+ creature->AI()->Talk(textId);
+
+ if (isVictory)
+ {
+ if (GameObject* go = HashMapHolder<GameObject>::Find(instance->GetData64(DATA_ICECROWN_GUNSHIP_BATTLE)))
+ if (Transport* otherTransport = go->ToTransport())
+ otherTransport->EnableMovement(true);
+
+ me->GetTransport()->EnableMovement(true);
+
+ if (Creature* ship = me->FindNearestCreature(_teamInInstance == HORDE ? NPC_ORGRIMS_HAMMER : NPC_THE_SKYBREAKER, 200.0f))
+ {
+ ship->CastSpell(ship, SPELL_TELEPORT_PLAYERS_ON_VICTORY, TRIGGERED_FULL_MASK);
+ ship->CastSpell(ship, SPELL_ACHIEVEMENT, TRIGGERED_FULL_MASK);
+ ship->CastSpell(ship, SPELL_AWARD_REPUTATION_BOSS_KILL, TRIGGERED_FULL_MASK);
+ }
+
+ creatures.clear();
+ GetCreatureListWithEntryInGrid(creatures, me, NPC_SKYBREAKER_MARINE, 200.0f);
+ GetCreatureListWithEntryInGrid(creatures, me, NPC_SKYBREAKER_SERGEANT, 200.0f);
+ GetCreatureListWithEntryInGrid(creatures, me, NPC_KOR_KRON_REAVER, 200.0f);
+ GetCreatureListWithEntryInGrid(creatures, me, NPC_KOR_KRON_SERGEANT, 200.0f);
+ for (std::list<Creature*>::iterator itr = creatures.begin(); itr != creatures.end(); ++itr)
+ (*itr)->DespawnOrUnsummon(1);
+ }
+ else
+ {
+ uint32 teleportSpellId = _teamInInstance == HORDE ? SPELL_TELEPORT_PLAYERS_ON_RESET_H : SPELL_TELEPORT_PLAYERS_ON_RESET_A;
+ me->m_Events.AddEvent(new ResetEncounterEvent(me, teleportSpellId, me->GetInstanceScript()->GetData64(DATA_ENEMY_GUNSHIP)),
+ me->m_Events.CalculateTime(8000));
+ }
+ }
+
+ void SetGUID(uint64 guid, int32 id/* = 0*/) OVERRIDE
+ {
+ if (id != ACTION_SHIP_VISITS)
+ return;
+
+ std::map<uint64, uint32>::iterator itr = _shipVisits.find(guid);
+ if (itr == _shipVisits.end())
+ _shipVisits[guid] = 1;
+ else
+ ++itr->second;
+ }
+
+ uint32 GetData(uint32 id) const OVERRIDE
+ {
+ if (id != ACTION_SHIP_VISITS)
+ return 0;
+
+ uint32 max = 0;
+ for (std::map<uint64, uint32>::const_iterator itr = _shipVisits.begin(); itr != _shipVisits.end(); ++itr)
+ max = std::max(max, itr->second);
+
+ return max;
+ }
+
+ private:
+ uint32 _teamInInstance;
+ std::map<uint64, uint32> _shipVisits;
+ bool _summonedFirstMage;
+ bool _died;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ if (!creature->GetTransport())
+ return NULL;
+
+ return GetIcecrownCitadelAI<npc_gunshipAI>(creature);
+ }
+};
+
+class npc_high_overlord_saurfang_igb : public CreatureScript
+{
+ public:
+ npc_high_overlord_saurfang_igb() : CreatureScript("npc_high_overlord_saurfang_igb") { }
+
+ struct npc_high_overlord_saurfang_igbAI : public ScriptedAI
+ {
+ npc_high_overlord_saurfang_igbAI(Creature* creature) : ScriptedAI(creature),
+ _instance(creature->GetInstanceScript())
+ {
+ _controller.ResetSlots(HORDE);
+ _controller.SetTransport(creature->GetTransport());
+ me->setRegeneratingHealth(false);
+ me->m_CombatDistance = 70.0f;
+ _firstMageCooldown = time(NULL) + 60;
+ _axethrowersYellCooldown = time_t(0);
+ _rocketeersYellCooldown = time_t(0);
+ }
+
+ void InitializeAI() OVERRIDE
+ {
+ ScriptedAI::InitializeAI();
+
+ _events.Reset();
+ _firstMageCooldown = time(NULL) + 60;
+ _axethrowersYellCooldown = time_t(0);
+ _rocketeersYellCooldown = time_t(0);
+ }
+
+ void EnterCombat(Unit* /*target*/) OVERRIDE
+ {
+ _events.SetPhase(PHASE_COMBAT);
+ DoCast(me, _instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE ? SPELL_FRIENDLY_BOSS_DAMAGE_MOD : SPELL_MELEE_TARGETING_ON_ORGRIMS_HAMMER, true);
+ DoCast(me, SPELL_BATTLE_FURY, true);
+ _events.ScheduleEvent(EVENT_CLEAVE, urand(2000, 10000));
+ }
+
+ void EnterEvadeMode() OVERRIDE
+ {
+ if (!me->IsAlive())
+ return;
+
+ me->DeleteThreatList();
+ me->CombatStop(true);
+ me->GetMotionMaster()->MoveTargetedHome();
+
+ Reset();
+ }
+
+ void DoAction(int32 action) OVERRIDE
+ {
+ if (action == ACTION_ENEMY_GUNSHIP_TALK)
+ {
+ if (Creature* muradin = me->FindNearestCreature(NPC_IGB_MURADIN_BRONZEBEARD, 100.0f))
+ muradin->AI()->DoAction(ACTION_SPAWN_ALL_ADDS);
+
+ Talk(SAY_SAURFANG_INTRO_5);
+ _events.ScheduleEvent(EVENT_INTRO_H_5, 4000);
+ _events.ScheduleEvent(EVENT_INTRO_H_6, 11000);
+ _events.ScheduleEvent(EVENT_KEEP_PLAYER_IN_COMBAT, 1);
+
+ _instance->SetBossState(DATA_ICECROWN_GUNSHIP_BATTLE, IN_PROGRESS);
+ // Combat starts now
+ if (Creature* skybreaker = me->FindNearestCreature(NPC_THE_SKYBREAKER, 100.0f))
+ _instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, skybreaker, 1);
+
+ if (Creature* orgrimsHammer = me->FindNearestCreature(NPC_ORGRIMS_HAMMER, 100.0f))
+ {
+ _instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, orgrimsHammer, 2);
+ orgrimsHammer->CastSpell(orgrimsHammer, SPELL_CHECK_FOR_PLAYERS, TRIGGERED_FULL_MASK);
+ }
+
+ me->GetMap()->SetZoneMusic(AREA_ICECROWN_CITADEL, MUSIC_ENCOUNTER);
+ }
+ else if (action == ACTION_SPAWN_MAGE)
+ {
+ time_t now = time(NULL);
+ if (_firstMageCooldown > now)
+ _events.ScheduleEvent(EVENT_SUMMON_MAGE, (_firstMageCooldown - now) * IN_MILLISECONDS);
+ else
+ _events.ScheduleEvent(EVENT_SUMMON_MAGE, 1);
+ }
+ else if (action == ACTION_SPAWN_ALL_ADDS)
+ {
+ _events.ScheduleEvent(EVENT_ADDS, 12000);
+ _events.ScheduleEvent(EVENT_CHECK_RIFLEMAN, 13000);
+ _events.ScheduleEvent(EVENT_CHECK_MORTAR, 13000);
+ if (Is25ManRaid())
+ _controller.SummonCreatures(SLOT_MAGE_1, SLOT_MORTAR_4);
+ else
+ {
+ _controller.SummonCreatures(SLOT_MAGE_1, SLOT_MAGE_2);
+ _controller.SummonCreatures(SLOT_MORTAR_1, SLOT_MORTAR_2);
+ _controller.SummonCreatures(SLOT_RIFLEMAN_1, SLOT_RIFLEMAN_4);
+ }
+ }
+ else if (action == ACTION_EXIT_SHIP)
+ {
+ Position pos;
+ pos.Relocate(SaurfangExitPath[SaurfangExitPathSize - 1].x, SaurfangExitPath[SaurfangExitPathSize - 1].y, SaurfangExitPath[SaurfangExitPathSize - 1].z);
+ me->GetMotionMaster()->MovePoint(EVENT_CHARGE_PREPATH, pos, false);
+
+ Movement::PointsArray path(SaurfangExitPath, SaurfangExitPath + SaurfangExitPathSize);
+
+ Movement::MoveSplineInit init(me);
+ init.DisableTransportPathTransformations();
+ init.MovebyPath(path, 0);
+ init.Launch();
+
+ me->DespawnOrUnsummon(18000);
+ }
+ }
+
+ void SetData(uint32 type, uint32 data) OVERRIDE
+ {
+ if (type == ACTION_CLEAR_SLOT)
+ {
+ _controller.ClearSlot(PassengerSlots(data));
+ if (data == SLOT_FREEZE_MAGE)
+ _events.ScheduleEvent(EVENT_SUMMON_MAGE, urand(30000, 33500));
+ }
+ }
+
+ void sGossipSelect(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/) OVERRIDE
+ {
+ me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->GetTransport()->EnableMovement(true);
+ _events.SetPhase(PHASE_INTRO);
+ _events.ScheduleEvent(EVENT_INTRO_H_1, 5000, 0, PHASE_INTRO);
+ _events.ScheduleEvent(EVENT_INTRO_H_2, 16000, 0, PHASE_INTRO);
+ _events.ScheduleEvent(EVENT_INTRO_SUMMON_SKYBREAKER, 24600, 0, PHASE_INTRO);
+ _events.ScheduleEvent(EVENT_INTRO_H_3, 29600, 0, PHASE_INTRO);
+ _events.ScheduleEvent(EVENT_INTRO_H_4, 39200, 0, PHASE_INTRO);
+ }
+
+ void DamageTaken(Unit* , uint32& damage) OVERRIDE
+ {
+ if (me->HealthBelowPctDamaged(65, damage) && !me->HasAura(SPELL_TASTE_OF_BLOOD))
+ DoCast(me, SPELL_TASTE_OF_BLOOD, true);
+
+ if (damage >= me->GetHealth())
+ damage = me->GetHealth() - 1;
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!UpdateVictim() && !_events.IsInPhase(PHASE_INTRO) && _instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != IN_PROGRESS)
+ return;
+
+ _events.Update(diff);
+
+ while (uint32 eventId = _events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_INTRO_H_1:
+ Talk(SAY_SAURFANG_INTRO_1);
+ break;
+ case EVENT_INTRO_H_2:
+ Talk(SAY_SAURFANG_INTRO_2);
+ break;
+ case EVENT_INTRO_SUMMON_SKYBREAKER:
+ sTransportMgr->CreateTransport(GO_THE_SKYBREAKER_H, 0, me->GetMap());
+ break;
+ case EVENT_INTRO_H_3:
+ Talk(SAY_SAURFANG_INTRO_3);
+ break;
+ case EVENT_INTRO_H_4:
+ Talk(SAY_SAURFANG_INTRO_4);
+ break;
+ case EVENT_INTRO_H_5:
+ if (Creature* muradin = me->FindNearestCreature(NPC_IGB_MURADIN_BRONZEBEARD, 100.0f))
+ muradin->AI()->Talk(SAY_MURADIN_INTRO_H);
+ break;
+ case EVENT_INTRO_H_6:
+ Talk(SAY_SAURFANG_INTRO_6);
+ break;
+ case EVENT_KEEP_PLAYER_IN_COMBAT:
+ if (_instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) == IN_PROGRESS)
+ {
+ _instance->DoCastSpellOnPlayers(SPELL_LOCK_PLAYERS_AND_TAP_CHEST);
+ _events.ScheduleEvent(EVENT_KEEP_PLAYER_IN_COMBAT, urand(5000, 8000));
+ }
+ break;
+ case EVENT_SUMMON_MAGE:
+ Talk(SAY_SAURFANG_MAGES);
+ _controller.SummonCreatures(SLOT_FREEZE_MAGE, SLOT_FREEZE_MAGE);
+ break;
+ case EVENT_ADDS:
+ Talk(SAY_SAURFANG_ENTER_SKYBREAKER);
+ _controller.SummonCreatures(SLOT_MAGE_1, SLOT_MAGE_2);
+ _controller.SummonCreatures(SLOT_MARINE_1, Is25ManRaid() ? SLOT_MARINE_4 : SLOT_MARINE_2);
+ _controller.SummonCreatures(SLOT_SERGEANT_1, Is25ManRaid() ? SLOT_SERGEANT_2 : SLOT_SERGEANT_1);
+ if (Transport* orgrimsHammer = me->GetTransport())
+ orgrimsHammer->SummonPassenger(NPC_TELEPORT_PORTAL, OrgrimsHammerTeleportPortal, TEMPSUMMON_TIMED_DESPAWN, NULL, 21000);
+
+ if (GameObject* go = HashMapHolder<GameObject>::Find(_instance->GetData64(DATA_ICECROWN_GUNSHIP_BATTLE)))
+ if (Transport* skybreaker = go->ToTransport())
+ skybreaker->SummonPassenger(NPC_TELEPORT_EXIT, SkybreakerTeleportExit, TEMPSUMMON_TIMED_DESPAWN, NULL, 23000);
+
+ _events.ScheduleEvent(EVENT_ADDS_BOARD_YELL, 6000);
+ _events.ScheduleEvent(EVENT_ADDS, 60000);
+ break;
+ case EVENT_ADDS_BOARD_YELL:
+ if (Creature* muradin = me->FindNearestCreature(NPC_IGB_MURADIN_BRONZEBEARD, 200.0f))
+ muradin->AI()->Talk(SAY_MURADIN_BOARD);
+ break;
+ case EVENT_CHECK_RIFLEMAN:
+ if (_controller.SummonCreatures(SLOT_RIFLEMAN_1, Is25ManRaid() ? SLOT_RIFLEMAN_8 : SLOT_RIFLEMAN_4))
+ {
+ if (_axethrowersYellCooldown < time(NULL))
+ {
+ Talk(SAY_SAURFANG_AXETHROWERS);
+ _axethrowersYellCooldown = time(NULL) + 5;
+ }
+ }
+ _events.ScheduleEvent(EVENT_CHECK_RIFLEMAN, 1000);
+ break;
+ case EVENT_CHECK_MORTAR:
+ if (_controller.SummonCreatures(SLOT_MORTAR_1, Is25ManRaid() ? SLOT_MORTAR_4 : SLOT_MORTAR_2))
+ {
+ if (_rocketeersYellCooldown < time(NULL))
+ {
+ Talk(SAY_SAURFANG_ROCKETEERS);
+ _rocketeersYellCooldown = time(NULL) + 5;
+ }
+ }
+ _events.ScheduleEvent(EVENT_CHECK_MORTAR, 1000);
+ break;
+ case EVENT_CLEAVE:
+ DoCastVictim(SPELL_CLEAVE);
+ _events.ScheduleEvent(EVENT_CLEAVE, urand(2000, 10000));
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (me->IsWithinMeleeRange(me->GetVictim()))
+ DoMeleeAttackIfReady();
+ else if (me->isAttackReady())
+ {
+ DoCastVictim(SPELL_RENDING_THROW);
+ me->resetAttackTimer();
+ }
+ }
+
+ bool CanAIAttack(Unit const* target) const OVERRIDE
+ {
+ if (_instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != IN_PROGRESS)
+ return false;
+ return target->HasAura(SPELL_ON_ORGRIMS_HAMMER_DECK) || target->GetEntry() == NPC_SKYBREAKER_MARINE || target->GetEntry() == NPC_SKYBREAKER_SERGEANT;
+ }
+
+ private:
+ EventMap _events;
+ PassengerController _controller;
+ InstanceScript* _instance;
+ time_t _firstMageCooldown;
+ time_t _axethrowersYellCooldown;
+ time_t _rocketeersYellCooldown;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetIcecrownCitadelAI<npc_high_overlord_saurfang_igbAI>(creature);
+ }
+};
+
+class npc_muradin_bronzebeard_igb : public CreatureScript
+{
+ public:
+ npc_muradin_bronzebeard_igb() : CreatureScript("npc_muradin_bronzebeard_igb") { }
+
+ struct npc_muradin_bronzebeard_igbAI : public ScriptedAI
+ {
+ npc_muradin_bronzebeard_igbAI(Creature* creature) : ScriptedAI(creature),
+ _instance(creature->GetInstanceScript())
+ {
+ _controller.ResetSlots(ALLIANCE);
+ _controller.SetTransport(creature->GetTransport());
+ me->setRegeneratingHealth(false);
+ me->m_CombatDistance = 70.0f;
+ _firstMageCooldown = time(NULL) + 60;
+ _riflemanYellCooldown = time_t(0);
+ _mortarYellCooldown = time_t(0);
+ }
+
+ void InitializeAI() OVERRIDE
+ {
+ ScriptedAI::InitializeAI();
+
+ _events.Reset();
+ _firstMageCooldown = time(NULL) + 60;
+ _riflemanYellCooldown = time_t(0);
+ _mortarYellCooldown = time_t(0);
+ }
+
+ void EnterCombat(Unit* /*target*/) OVERRIDE
+ {
+ _events.SetPhase(PHASE_COMBAT);
+ DoCast(me, _instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE ? SPELL_FRIENDLY_BOSS_DAMAGE_MOD : SPELL_MELEE_TARGETING_ON_SKYBREAKER, true);
+ DoCast(me, SPELL_BATTLE_FURY, true);
+ _events.ScheduleEvent(EVENT_CLEAVE, urand(2000, 10000));
+ }
+
+ void EnterEvadeMode() OVERRIDE
+ {
+ if (!me->IsAlive())
+ return;
+
+ me->DeleteThreatList();
+ me->CombatStop(true);
+ me->GetMotionMaster()->MoveTargetedHome();
+
+ Reset();
+ }
+
+ void DoAction(int32 action) OVERRIDE
+ {
+ if (action == ACTION_ENEMY_GUNSHIP_TALK)
+ {
+ if (Creature* muradin = me->FindNearestCreature(NPC_IGB_HIGH_OVERLORD_SAURFANG, 100.0f))
+ muradin->AI()->DoAction(ACTION_SPAWN_ALL_ADDS);
+
+ Talk(SAY_MURADIN_INTRO_6);
+ _events.ScheduleEvent(EVENT_INTRO_A_6, 5000);
+ _events.ScheduleEvent(EVENT_INTRO_A_7, 11000);
+ _events.ScheduleEvent(EVENT_KEEP_PLAYER_IN_COMBAT, 1);
+
+ _instance->SetBossState(DATA_ICECROWN_GUNSHIP_BATTLE, IN_PROGRESS);
+ // Combat starts now
+ if (Creature* orgrimsHammer = me->FindNearestCreature(NPC_ORGRIMS_HAMMER, 100.0f))
+ _instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, orgrimsHammer, 1);
+
+ if (Creature* skybreaker = me->FindNearestCreature(NPC_THE_SKYBREAKER, 100.0f))
+ {
+ _instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, skybreaker, 2);
+ skybreaker->CastSpell(skybreaker, SPELL_CHECK_FOR_PLAYERS, TRIGGERED_FULL_MASK);
+ }
+
+ me->GetMap()->SetZoneMusic(AREA_ICECROWN_CITADEL, MUSIC_ENCOUNTER);
+ }
+ else if (action == ACTION_SPAWN_MAGE)
+ {
+ time_t now = time(NULL);
+ if (_firstMageCooldown > now)
+ _events.ScheduleEvent(EVENT_SUMMON_MAGE, (_firstMageCooldown - now) * IN_MILLISECONDS);
+ else
+ _events.ScheduleEvent(EVENT_SUMMON_MAGE, 1);
+ }
+ else if (action == ACTION_SPAWN_ALL_ADDS)
+ {
+ _events.ScheduleEvent(EVENT_ADDS, 12000);
+ _events.ScheduleEvent(EVENT_CHECK_RIFLEMAN, 13000);
+ _events.ScheduleEvent(EVENT_CHECK_MORTAR, 13000);
+ if (Is25ManRaid())
+ _controller.SummonCreatures(SLOT_MAGE_1, SLOT_MORTAR_4);
+ else
+ {
+ _controller.SummonCreatures(SLOT_MAGE_1, SLOT_MAGE_2);
+ _controller.SummonCreatures(SLOT_MORTAR_1, SLOT_MORTAR_2);
+ _controller.SummonCreatures(SLOT_RIFLEMAN_1, SLOT_RIFLEMAN_4);
+ }
+ }
+ else if (action == ACTION_EXIT_SHIP)
+ {
+ Position pos;
+ pos.Relocate(MuradinExitPath[MuradinExitPathSize - 1].x, MuradinExitPath[MuradinExitPathSize - 1].y, MuradinExitPath[MuradinExitPathSize - 1].z);
+ me->GetMotionMaster()->MovePoint(EVENT_CHARGE_PREPATH, pos, false);
+
+ Movement::PointsArray path(MuradinExitPath, MuradinExitPath + MuradinExitPathSize);
+
+ Movement::MoveSplineInit init(me);
+ init.DisableTransportPathTransformations();
+ init.MovebyPath(path, 0);
+ init.Launch();
+
+ me->DespawnOrUnsummon(18000);
+ }
+ }
+
+ void SetData(uint32 type, uint32 data) OVERRIDE
+ {
+ if (type == ACTION_CLEAR_SLOT)
+ {
+ _controller.ClearSlot(PassengerSlots(data));
+ if (data == SLOT_FREEZE_MAGE)
+ _events.ScheduleEvent(EVENT_SUMMON_MAGE, urand(30000, 33500));
+ }
+ }
+
+ void sGossipSelect(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/) OVERRIDE
+ {
+ me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ me->GetTransport()->EnableMovement(true);
+ _events.SetPhase(PHASE_INTRO);
+ _events.ScheduleEvent(EVENT_INTRO_A_1, 5000);
+ _events.ScheduleEvent(EVENT_INTRO_A_2, 10000, 0, PHASE_INTRO);
+ _events.ScheduleEvent(EVENT_INTRO_SUMMON_ORGRIMS_HAMMER, 28000, 0, PHASE_INTRO);
+ _events.ScheduleEvent(EVENT_INTRO_A_3, 33000, 0, PHASE_INTRO);
+ _events.ScheduleEvent(EVENT_INTRO_A_4, 39000, 0, PHASE_INTRO);
+ _events.ScheduleEvent(EVENT_INTRO_A_5, 45000, 0, PHASE_INTRO);
+ }
+
+ void DamageTaken(Unit* , uint32& damage) OVERRIDE
+ {
+ if (me->HealthBelowPctDamaged(65, damage) && me->HasAura(SPELL_TASTE_OF_BLOOD))
+ DoCast(me, SPELL_TASTE_OF_BLOOD, true);
+
+ if (damage >= me->GetHealth())
+ damage = me->GetHealth() - 1;
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!UpdateVictim() && !_events.IsInPhase(PHASE_INTRO) && _instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != IN_PROGRESS)
+ return;
+
+ _events.Update(diff);
+
+ while (uint32 eventId = _events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_INTRO_A_1:
+ Talk(SAY_MURADIN_INTRO_1);
+ break;
+ case EVENT_INTRO_A_2:
+ Talk(SAY_MURADIN_INTRO_2);
+ break;
+ case EVENT_INTRO_SUMMON_ORGRIMS_HAMMER:
+ sTransportMgr->CreateTransport(GO_ORGRIMS_HAMMER_A, 0, me->GetMap());
+ break;
+ case EVENT_INTRO_A_3:
+ Talk(SAY_MURADIN_INTRO_3);
+ break;
+ case EVENT_INTRO_A_4:
+ Talk(SAY_MURADIN_INTRO_4);
+ break;
+ case EVENT_INTRO_A_5:
+ Talk(SAY_MURADIN_INTRO_5);
+ break;
+ case EVENT_INTRO_A_6:
+ if (Creature* saurfang = me->FindNearestCreature(NPC_IGB_HIGH_OVERLORD_SAURFANG, 100.0f))
+ saurfang->AI()->Talk(SAY_SAURFANG_INTRO_A);
+ break;
+ case EVENT_INTRO_A_7:
+ Talk(SAY_MURADIN_INTRO_7);
+ break;
+ case EVENT_KEEP_PLAYER_IN_COMBAT:
+ if (_instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) == IN_PROGRESS)
+ {
+ _instance->DoCastSpellOnPlayers(SPELL_LOCK_PLAYERS_AND_TAP_CHEST);
+ _events.ScheduleEvent(EVENT_KEEP_PLAYER_IN_COMBAT, urand(5000, 8000));
+ }
+ break;
+ case EVENT_SUMMON_MAGE:
+ Talk(SAY_MURADIN_SORCERERS);
+ _controller.SummonCreatures(SLOT_FREEZE_MAGE, SLOT_FREEZE_MAGE);
+ break;
+ case EVENT_ADDS:
+ Talk(SAY_MURADIN_ENTER_ORGRIMMS_HAMMER);
+ _controller.SummonCreatures(SLOT_MAGE_1, SLOT_MAGE_2);
+ _controller.SummonCreatures(SLOT_MARINE_1, Is25ManRaid() ? SLOT_MARINE_4 : SLOT_MARINE_2);
+ _controller.SummonCreatures(SLOT_SERGEANT_1, Is25ManRaid() ? SLOT_SERGEANT_2 : SLOT_SERGEANT_1);
+ if (Transport* skybreaker = me->GetTransport())
+ skybreaker->SummonPassenger(NPC_TELEPORT_PORTAL, SkybreakerTeleportPortal, TEMPSUMMON_TIMED_DESPAWN, NULL, 21000);
+
+ if (GameObject* go = HashMapHolder<GameObject>::Find(_instance->GetData64(DATA_ICECROWN_GUNSHIP_BATTLE)))
+ if (Transport* orgrimsHammer = go->ToTransport())
+ orgrimsHammer->SummonPassenger(NPC_TELEPORT_EXIT, OrgrimsHammerTeleportExit, TEMPSUMMON_TIMED_DESPAWN, NULL, 23000);
+
+ _events.ScheduleEvent(EVENT_ADDS_BOARD_YELL, 6000);
+ _events.ScheduleEvent(EVENT_ADDS, 60000);
+ break;
+ case EVENT_ADDS_BOARD_YELL:
+ if (Creature* saurfang = me->FindNearestCreature(NPC_IGB_HIGH_OVERLORD_SAURFANG, 200.0f))
+ saurfang->AI()->Talk(SAY_SAURFANG_BOARD);
+ break;
+ case EVENT_CHECK_RIFLEMAN:
+ if (_controller.SummonCreatures(SLOT_RIFLEMAN_1, Is25ManRaid() ? SLOT_RIFLEMAN_8 : SLOT_RIFLEMAN_4))
+ {
+ if (_riflemanYellCooldown < time(NULL))
+ {
+ Talk(SAY_MURADIN_RIFLEMAN);
+ _riflemanYellCooldown = time(NULL) + 5;
+ }
+ }
+ _events.ScheduleEvent(EVENT_CHECK_RIFLEMAN, 1000);
+ break;
+ case EVENT_CHECK_MORTAR:
+ if (_controller.SummonCreatures(SLOT_MORTAR_1, Is25ManRaid() ? SLOT_MORTAR_4 : SLOT_MORTAR_2))
+ {
+ if (_mortarYellCooldown < time(NULL))
+ {
+ Talk(SAY_MURADIN_MORTAR);
+ _mortarYellCooldown = time(NULL) + 5;
+ }
+ }
+ _events.ScheduleEvent(EVENT_CHECK_MORTAR, 1000);
+ break;
+ case EVENT_CLEAVE:
+ DoCastVictim(SPELL_CLEAVE);
+ _events.ScheduleEvent(EVENT_CLEAVE, urand(2000, 10000));
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (me->IsWithinMeleeRange(me->GetVictim()))
+ DoMeleeAttackIfReady();
+ else if (me->isAttackReady())
+ {
+ DoCastVictim(SPELL_RENDING_THROW);
+ me->resetAttackTimer();
+ }
+ }
+
+ bool CanAIAttack(Unit const* target) const OVERRIDE
+ {
+ if (_instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != IN_PROGRESS)
+ return false;
+ return target->HasAura(SPELL_ON_SKYBREAKER_DECK) || target->GetEntry() == NPC_KOR_KRON_REAVER || target->GetEntry() == NPC_KOR_KRON_SERGEANT;
+ }
+
+ private:
+ EventMap _events;
+ PassengerController _controller;
+ InstanceScript* _instance;
+ time_t _firstMageCooldown;
+ time_t _riflemanYellCooldown;
+ time_t _mortarYellCooldown;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetIcecrownCitadelAI<npc_muradin_bronzebeard_igbAI>(creature);
+ }
+};
+
+class npc_zafod_boombox : public CreatureScript
+{
+ public:
+ npc_zafod_boombox() : CreatureScript("npc_zafod_boombox") { }
+
+ struct npc_zafod_boomboxAI : public gunship_npc_AI
+ {
+ npc_zafod_boomboxAI(Creature* creature) : gunship_npc_AI(creature)
+ {
+ }
+
+ void Reset() OVERRIDE
+ {
+ me->SetReactState(REACT_PASSIVE);
+ }
+
+ void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/) OVERRIDE
+ {
+ player->AddItem(ITEM_GOBLIN_ROCKET_PACK, 1);
+ player->PlayerTalkClass->SendCloseGossip();
+ }
+
+ void UpdateAI(uint32 /*diff*/) OVERRIDE
+ {
+ UpdateVictim();
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetIcecrownCitadelAI<npc_zafod_boomboxAI>(creature);
+ }
+};
+
+struct npc_gunship_boarding_addAI : public gunship_npc_AI
+{
+ npc_gunship_boarding_addAI(Creature* creature) : gunship_npc_AI(creature)
+ {
+ me->m_CombatDistance = 80.0f;
+ _usedDesperateResolve = false;
+ }
+
+ void SetData(uint32 type, uint32 data) OVERRIDE
+ {
+ // detach from captain
+ if (type == ACTION_SET_SLOT)
+ {
+ SetSlotInfo(data);
+
+ me->SetReactState(REACT_PASSIVE);
+
+ me->m_Events.AddEvent(new DelayedMovementEvent(me, Slot->TargetPosition), me->m_Events.CalculateTime(3000 * (Index - SLOT_MARINE_1)));
+
+ if (Creature* captain = me->FindNearestCreature(Instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE ? NPC_IGB_MURADIN_BRONZEBEARD : NPC_IGB_HIGH_OVERLORD_SAURFANG, 200.0f))
+ captain->AI()->SetData(ACTION_CLEAR_SLOT, Index);
+ }
+ }
+
+ void MovementInform(uint32 type, uint32 pointId) OVERRIDE
+ {
+ if (type != POINT_MOTION_TYPE)
+ return;
+
+ if (pointId == EVENT_CHARGE_PREPATH && Slot)
+ {
+ Position const& otherTransportPos = Instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE ? OrgrimsHammerTeleportExit : SkybreakerTeleportExit;
+ float x, y, z, o;
+ otherTransportPos.GetPosition(x, y, z, o);
+
+ Transport* myTransport = me->GetTransport();
+ if (!myTransport)
+ return;
+
+ if (GameObject* go = HashMapHolder<GameObject>::Find(Instance->GetData64(DATA_ICECROWN_GUNSHIP_BATTLE)))
+ if (Transport* destTransport = go->ToTransport())
+ destTransport->CalculatePassengerPosition(x, y, z, &o);
+
+ float angle = frand(0, M_PI * 2.0f);
+ x += 2.0f * std::cos(angle);
+ y += 2.0f * std::sin(angle);
+
+ me->SetHomePosition(x, y, z, o);
+ myTransport->CalculatePassengerOffset(x, y, z, &o);
+ me->SetTransportHomePosition(x, y, z, o);
+
+ me->m_Events.AddEvent(new BattleExperienceEvent(me), me->m_Events.CalculateTime(BattleExperienceEvent::ExperiencedTimes[0]));
+ DoCast(me, SPELL_BATTLE_EXPERIENCE, true);
+ DoCast(me, SPELL_TELEPORT_TO_ENEMY_SHIP, true);
+ DoCast(me, Instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE ? SPELL_MELEE_TARGETING_ON_ORGRIMS_HAMMER : SPELL_MELEE_TARGETING_ON_SKYBREAKER, true);
+ me->_AddCreatureSpellCooldown(BurningPitchId, time(NULL) + 3);
+
+ std::list<Player*> players;
+ Trinity::UnitAuraCheck check(true, Instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE ? SPELL_ON_ORGRIMS_HAMMER_DECK : SPELL_ON_SKYBREAKER_DECK);
+ Trinity::PlayerListSearcher<Trinity::UnitAuraCheck> searcher(me, players, check);
+ me->VisitNearbyWorldObject(200.0f, searcher);
+
+ players.remove_if([this](Player* player)
+ {
+ return !me->_IsTargetAcceptable(player) || !me->CanStartAttack(player, true);
+ });
+
+ if (!players.empty())
+ {
+ players.sort(Trinity::ObjectDistanceOrderPred(me));
+ for (std::list<Player*>::iterator itr = players.begin(); itr != players.end(); ++itr)
+ me->AddThreat(*itr, 1.0f);
+
+ AttackStart(players.front());
+ }
+
+ me->SetReactState(REACT_AGGRESSIVE);
+ }
+ }
+
+ void DamageTaken(Unit* /*attacker*/, uint32& damage) OVERRIDE
+ {
+ if (_usedDesperateResolve)
+ return;
+
+ if (!me->HealthBelowPctDamaged(25, damage))
+ return;
+
+ _usedDesperateResolve = true;
+ DoCast(me, SPELL_DESPERATE_RESOLVE, true);
+ }
+
+ void UpdateAI(uint32 /*diff*/) OVERRIDE
+ {
+ if (!SelectVictim())
+ {
+ TriggerBurningPitch();
+ return;
+ }
+
+ if (!HasAttackablePlayerNearby())
+ TriggerBurningPitch();
+
+ DoMeleeAttackIfReady();
+ }
+
+ bool CanAIAttack(Unit const* target) const OVERRIDE
+ {
+ uint32 spellId = SPELL_ON_SKYBREAKER_DECK;
+ uint32 creatureEntry = NPC_IGB_MURADIN_BRONZEBEARD;
+ if (Instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE)
+ {
+ spellId = SPELL_ON_ORGRIMS_HAMMER_DECK;
+ creatureEntry = NPC_IGB_HIGH_OVERLORD_SAURFANG;
+ }
+
+ return target->HasAura(spellId) || target->GetEntry() == creatureEntry;
+ }
+
+ bool HasAttackablePlayerNearby()
+ {
+ std::list<Player*> players;
+ Trinity::UnitAuraCheck check(true, Instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE ? SPELL_ON_ORGRIMS_HAMMER_DECK : SPELL_ON_SKYBREAKER_DECK);
+ Trinity::PlayerListSearcher<Trinity::UnitAuraCheck> searcher(me, players, check);
+ me->VisitNearbyWorldObject(200.0f, searcher);
+
+ players.remove_if([this](Player* player)
+ {
+ return !me->_IsTargetAcceptable(player) || !me->CanStartAttack(player, true);
+ });
+
+ return !players.empty();
+ }
+
+private:
+ bool _usedDesperateResolve;
+};
+
+class npc_gunship_boarding_leader : public CreatureScript
+{
+ public:
+ npc_gunship_boarding_leader() : CreatureScript("npc_gunship_boarding_leader") { }
+
+ struct npc_gunship_boarding_leaderAI : public npc_gunship_boarding_addAI
+ {
+ npc_gunship_boarding_leaderAI(Creature* creature) : npc_gunship_boarding_addAI(creature)
+ {
+ }
+
+ void EnterCombat(Unit* target) OVERRIDE
+ {
+ npc_gunship_boarding_addAI::EnterCombat(target);
+ _events.ScheduleEvent(EVENT_BLADESTORM, urand(13000, 18000));
+ _events.ScheduleEvent(EVENT_WOUNDING_STRIKE, urand(8000, 10000));
+ }
+
+ void UpdateAI(uint32 diff) OVERRIDE
+ {
+ if (!SelectVictim())
+ {
+ TriggerBurningPitch();
+ return;
+ }
+
+ _events.Update(diff);
+
+ if (me->HasUnitState(UNIT_STATE_CASTING) || me->HasAura(SPELL_BLADESTORM))
+ return;
+
+ if (!HasAttackablePlayerNearby())
+ TriggerBurningPitch();
+
+ while (uint32 eventId = _events.ExecuteEvent())
+ {
+ switch (eventId)
+ {
+ case EVENT_BLADESTORM:
+ DoCastAOE(SPELL_BLADESTORM);
+ _events.ScheduleEvent(EVENT_BLADESTORM, urand(25000, 30000));
+ break;
+ case EVENT_WOUNDING_STRIKE:
+ DoCastVictim(SPELL_WOUNDING_STRIKE);
+ _events.ScheduleEvent(EVENT_WOUNDING_STRIKE, urand(9000, 13000));
+ break;
+ default:
+ break;
+ }
+ }
+
+ DoMeleeAttackIfReady();
+ }
+
+ private:
+ EventMap _events;
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetIcecrownCitadelAI<npc_gunship_boarding_leaderAI>(creature);
+ }
+};
+
+class npc_gunship_boarding_add : public CreatureScript
+{
+ public:
+ npc_gunship_boarding_add() : CreatureScript("npc_gunship_boarding_add") { }
+
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetIcecrownCitadelAI<npc_gunship_boarding_addAI>(creature);
+ }
+};
+
+class npc_gunship_gunner : public CreatureScript
+{
+ public:
+ npc_gunship_gunner() : CreatureScript("npc_gunship_gunner") { }
+
+ struct npc_gunship_gunnerAI : public gunship_npc_AI
+ {
+ npc_gunship_gunnerAI(Creature* creature) : gunship_npc_AI(creature)
+ {
+ creature->m_CombatDistance = 200.0f;
+ }
+
+ void AttackStart(Unit* target) OVERRIDE
+ {
+ me->Attack(target, false);
+ }
+
+ void MovementInform(uint32 type, uint32 pointId) OVERRIDE
+ {
+ gunship_npc_AI::MovementInform(type, pointId);
+ if (type == POINT_MOTION_TYPE && pointId == EVENT_CHARGE_PREPATH)
+ me->SetControlled(true, UNIT_STATE_ROOT);
+ }
+
+ void UpdateAI(uint32 /*diff*/) OVERRIDE
+ {
+ if (!SelectVictim())
+ {
+ TriggerBurningPitch();
+ return;
+ }
+
+ DoSpellAttackIfReady(me->GetEntry() == NPC_SKYBREAKER_RIFLEMAN ? SPELL_SHOOT : SPELL_HURL_AXE);
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetIcecrownCitadelAI<npc_gunship_gunnerAI>(creature);
+ }
+};
+
+class npc_gunship_rocketeer : public CreatureScript
+{
+ public:
+ npc_gunship_rocketeer() : CreatureScript("npc_gunship_rocketeer") { }
+
+ struct npc_gunship_rocketeerAI : public gunship_npc_AI
+ {
+ npc_gunship_rocketeerAI(Creature* creature) : gunship_npc_AI(creature)
+ {
+ creature->m_CombatDistance = 200.0f;
+ }
+
+ void MovementInform(uint32 type, uint32 pointId) OVERRIDE
+ {
+ gunship_npc_AI::MovementInform(type, pointId);
+ if (type == POINT_MOTION_TYPE && pointId == EVENT_CHARGE_PREPATH)
+ me->SetControlled(true, UNIT_STATE_ROOT);
+ }
+
+ void UpdateAI(uint32 /*diff*/) OVERRIDE
+ {
+ if (!SelectVictim())
+ return;
+
+ if (me->HasUnitState(UNIT_STATE_CASTING))
+ return;
+
+ uint32 spellId = me->GetEntry() == NPC_SKYBREAKER_MORTAR_SOLDIER ? SPELL_ROCKET_ARTILLERY_A : SPELL_ROCKET_ARTILLERY_H;
+ if (me->HasSpellCooldown(spellId))
+ return;
+
+ DoCastAOE(spellId, true);
+ me->_AddCreatureSpellCooldown(spellId, time(NULL) + 9);
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetIcecrownCitadelAI<npc_gunship_rocketeerAI>(creature);
+ }
+};
+
+class npc_gunship_mage : public CreatureScript
+{
+ public:
+ npc_gunship_mage() : CreatureScript("npc_gunship_mage") { }
+
+ struct npc_gunship_mageAI : public gunship_npc_AI
+ {
+ npc_gunship_mageAI(Creature* creature) : gunship_npc_AI(creature)
+ {
+ me->SetReactState(REACT_PASSIVE);
+ }
+
+ void EnterEvadeMode() OVERRIDE
+ {
+ ScriptedAI::EnterEvadeMode();
+ }
+
+ void MovementInform(uint32 type, uint32 pointId) OVERRIDE
+ {
+ if (type != POINT_MOTION_TYPE)
+ return;
+
+ if (pointId == EVENT_CHARGE_PREPATH && Slot)
+ {
+ SlotInfo const* slots = Instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE ? SkybreakerSlotInfo : OrgrimsHammerSlotInfo;
+ me->SetFacingTo(slots[Index].TargetPosition.GetOrientation());
+ switch (Index)
+ {
+ case SLOT_FREEZE_MAGE:
+ DoCastAOE(SPELL_BELOW_ZERO);
+ break;
+ case SLOT_MAGE_1:
+ case SLOT_MAGE_2:
+ DoCastAOE(SPELL_SHADOW_CHANNELING);
+ break;
+ default:
+ break;
+ }
+
+ me->SetControlled(true, UNIT_STATE_ROOT);
+ }
+ }
+
+ void UpdateAI(uint32 /*diff*/) OVERRIDE
+ {
+ UpdateVictim();
+ }
+
+ bool CanAIAttack(Unit const* /*target*/) const OVERRIDE
+ {
+ return true;
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return GetIcecrownCitadelAI<npc_gunship_mageAI>(creature);
+ }
+};
+
+/** @HACK This AI only resets MOVEMENTFLAG_ROOT on the vehicle.
+ Currently the core always removes MOVEMENTFLAG_ROOT sent from client packets to prevent cheaters from freezing clients of other players
+ but it actually is a valid flag - needs more research to fix both freezes and keep the flag as is (see WorldSession::ReadMovementInfo)
+
+Example packet:
+ClientToServer: CMSG_FORCE_MOVE_ROOT_ACK (0x00E9) Length: 67 ConnectionIndex: 0 Time: 03/04/2010 03:57:55.000 Number: 471326
+Guid:
+Movement Counter: 80
+Movement Flags: OnTransport, Root (2560)
+Extra Movement Flags: None (0)
+Time: 52291611
+Position: X: -396.0302 Y: 2482.906 Z: 249.86
+Orientation: 1.468665
+Transport GUID: Full: 0x1FC0000000000460 Type: MOTransport Low: 1120
+Transport Position: X: -6.152398 Y: -23.49037 Z: 21.64464 O: 4.827727
+Transport Time: 9926
+Transport Seat: 255
+Fall Time: 824
+*/
+class npc_gunship_cannon : public CreatureScript
+{
+ public:
+ npc_gunship_cannon() : CreatureScript("npc_gunship_cannon") { }
+
+ struct npc_gunship_cannonAI : public PassiveAI
+ {
+ npc_gunship_cannonAI(Creature* creature) : PassiveAI(creature)
+ {
+ }
+
+ void OnCharmed(bool /*apply*/) OVERRIDE { }
+
+ void PassengerBoarded(Unit* /*passenger*/, int8 /*seat*/, bool apply) OVERRIDE
+ {
+ if (!apply)
+ {
+ me->SetControlled(false, UNIT_STATE_ROOT);
+ me->SetControlled(true, UNIT_STATE_ROOT);
+ }
+ }
+ };
+
+ CreatureAI* GetAI(Creature* creature) const OVERRIDE
+ {
+ return new npc_gunship_cannonAI(creature);
+ }
+};
+
+class spell_igb_rocket_pack : public SpellScriptLoader
+{
+ public:
+ spell_igb_rocket_pack() : SpellScriptLoader("spell_igb_rocket_pack") { }
+
+ class spell_igb_rocket_pack_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_igb_rocket_pack_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_ROCKET_PACK_DAMAGE) ||
+ !sSpellMgr->GetSpellInfo(SPELL_ROCKET_BURST))
+ return false;
+
+ return true;
+ }
+
+ void HandlePeriodic(AuraEffect const* /*aurEff*/)
+ {
+ if (GetTarget()->movespline->Finalized())
+ Remove(AURA_REMOVE_BY_EXPIRE);
+ }
+
+ void HandleRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
+ {
+ SpellInfo const* damageInfo = sSpellMgr->EnsureSpellInfo(SPELL_ROCKET_PACK_DAMAGE);
+ GetTarget()->CastCustomSpell(SPELL_ROCKET_PACK_DAMAGE, SPELLVALUE_BASE_POINT0, 2 * (damageInfo->Effects[EFFECT_0].CalcValue() + aurEff->GetTickNumber() * aurEff->GetAmplitude()), NULL, TRIGGERED_FULL_MASK);
+ GetTarget()->CastSpell(NULL, SPELL_ROCKET_BURST, TRIGGERED_FULL_MASK);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_igb_rocket_pack_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
+ OnEffectRemove += AuraEffectRemoveFn(spell_igb_rocket_pack_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const OVERRIDE
+ {
+ return new spell_igb_rocket_pack_AuraScript();
+ }
+};
+
+class spell_igb_rocket_pack_useable : public SpellScriptLoader
+{
+ public:
+ spell_igb_rocket_pack_useable() : SpellScriptLoader("spell_igb_rocket_pack_useable") { }
+
+ class spell_igb_rocket_pack_useable_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_igb_rocket_pack_useable_AuraScript);
+
+ bool Load()
+ {
+ return GetOwner()->GetInstanceScript();
+ }
+
+ bool CheckAreaTarget(Unit* target)
+ {
+ return target->GetTypeId() == TYPEID_PLAYER && GetOwner()->GetInstanceScript()->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != DONE;
+ }
+
+ void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (Creature* owner = GetOwner()->ToCreature())
+ if (Player* target = GetTarget()->ToPlayer())
+ if (target->HasItemCount(ITEM_GOBLIN_ROCKET_PACK, 1))
+ sCreatureTextMgr->SendChat(owner, SAY_ZAFOD_ROCKET_PACK_ACTIVE, target, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, target);
+ }
+
+ void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (Creature* owner = GetOwner()->ToCreature())
+ if (Player* target = GetTarget()->ToPlayer())
+ if (target->HasItemCount(ITEM_GOBLIN_ROCKET_PACK, 1))
+ sCreatureTextMgr->SendChat(owner, SAY_ZAFOD_ROCKET_PACK_DISABLED, target, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, target);
+ }
+
+ void Register() OVERRIDE
+ {
+ DoCheckAreaTarget += AuraCheckAreaTargetFn(spell_igb_rocket_pack_useable_AuraScript::CheckAreaTarget);
+ AfterEffectApply += AuraEffectApplyFn(spell_igb_rocket_pack_useable_AuraScript::HandleApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ AfterEffectRemove += AuraEffectRemoveFn(spell_igb_rocket_pack_useable_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const OVERRIDE
+ {
+ return new spell_igb_rocket_pack_useable_AuraScript();
+ }
+};
+
+class spell_igb_on_gunship_deck : public SpellScriptLoader
+{
+ public:
+ spell_igb_on_gunship_deck() : SpellScriptLoader("spell_igb_on_gunship_deck") { }
+
+ class spell_igb_on_gunship_deck_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_igb_on_gunship_deck_AuraScript);
+
+ bool Load() OVERRIDE
+ {
+ if (InstanceScript* instance = GetOwner()->GetInstanceScript())
+ _teamInInstance = instance->GetData(DATA_TEAM_IN_INSTANCE);
+ else
+ _teamInInstance = 0;
+ return true;
+ }
+
+ bool CheckAreaTarget(Unit* unit)
+ {
+ return unit->GetTypeId() == TYPEID_PLAYER;
+ }
+
+ void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ if (GetSpellInfo()->Id == uint32(_teamInInstance == HORDE ? SPELL_ON_SKYBREAKER_DECK : SPELL_ON_ORGRIMS_HAMMER_DECK))
+ if (Creature* gunship = GetOwner()->FindNearestCreature(_teamInInstance == HORDE ? NPC_ORGRIMS_HAMMER : NPC_THE_SKYBREAKER, 200.0f))
+ gunship->AI()->SetGUID(GetTarget()->GetGUID(), ACTION_SHIP_VISITS);
+ }
+
+ void Register() OVERRIDE
+ {
+ DoCheckAreaTarget += AuraCheckAreaTargetFn(spell_igb_on_gunship_deck_AuraScript::CheckAreaTarget);
+ AfterEffectApply += AuraEffectApplyFn(spell_igb_on_gunship_deck_AuraScript::HandleApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+
+ uint32 _teamInInstance;
+ };
+
+ AuraScript* GetAuraScript() const OVERRIDE
+ {
+ return new spell_igb_on_gunship_deck_AuraScript();
+ }
+};
+
+class spell_igb_periodic_trigger_with_power_cost : public SpellScriptLoader
+{
+ public:
+ spell_igb_periodic_trigger_with_power_cost() : SpellScriptLoader("spell_igb_periodic_trigger_with_power_cost") { }
+
+ class spell_igb_periodic_trigger_with_power_cost_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_igb_periodic_trigger_with_power_cost_AuraScript);
+
+ void HandlePeriodicTick(AuraEffect const* /*aurEff*/)
+ {
+ PreventDefaultAction();
+ GetTarget()->CastSpell(GetTarget(), GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_POWER_AND_REAGENT_COST));
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_igb_periodic_trigger_with_power_cost_AuraScript::HandlePeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const OVERRIDE
+ {
+ return new spell_igb_periodic_trigger_with_power_cost_AuraScript();
+ }
+};
+
+class spell_igb_cannon_blast : public SpellScriptLoader
+{
+ public:
+ spell_igb_cannon_blast() : SpellScriptLoader("spell_igb_cannon_blast") { }
+
+ class spell_igb_cannon_blast_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_igb_cannon_blast_SpellScript);
+
+ bool Load()
+ {
+ return GetCaster()->GetTypeId() == TYPEID_UNIT;
+ }
+
+ void CheckEnergy()
+ {
+ if (GetCaster()->GetPower(POWER_ENERGY) >= 100)
+ {
+ GetCaster()->CastSpell(GetCaster(), SPELL_OVERHEAT, TRIGGERED_FULL_MASK);
+ if (Vehicle* vehicle = GetCaster()->GetVehicleKit())
+ if (Unit* passenger = vehicle->GetPassenger(0))
+ sCreatureTextMgr->SendChat(GetCaster()->ToCreature(), SAY_OVERHEAT, passenger);
+ }
+ }
+
+ void Register() OVERRIDE
+ {
+ AfterHit += SpellHitFn(spell_igb_cannon_blast_SpellScript::CheckEnergy);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_igb_cannon_blast_SpellScript();
+ }
+};
+
+class spell_igb_incinerating_blast : public SpellScriptLoader
+{
+ public:
+ spell_igb_incinerating_blast() : SpellScriptLoader("spell_igb_incinerating_blast") { }
+
+ class spell_igb_incinerating_blast_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_igb_incinerating_blast_SpellScript);
+
+ void StoreEnergy()
+ {
+ _energyLeft = GetCaster()->GetPower(POWER_ENERGY) - 10;
+ }
+
+ void RemoveEnergy()
+ {
+ GetCaster()->SetPower(POWER_ENERGY, 0);
+ }
+
+ void CalculateDamage(SpellEffIndex /*effIndex*/)
+ {
+ SetEffectValue(GetEffectValue() + _energyLeft * _energyLeft * 8);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnCast += SpellCastFn(spell_igb_incinerating_blast_SpellScript::StoreEnergy);
+ AfterCast += SpellCastFn(spell_igb_incinerating_blast_SpellScript::RemoveEnergy);
+ OnEffectLaunchTarget += SpellEffectFn(spell_igb_incinerating_blast_SpellScript::CalculateDamage, EFFECT_1, SPELL_EFFECT_SCHOOL_DAMAGE);
+ }
+
+ uint32 _energyLeft;
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_igb_incinerating_blast_SpellScript();
+ }
+};
+
+class spell_igb_overheat : public SpellScriptLoader
+{
+ public:
+ spell_igb_overheat() : SpellScriptLoader("spell_igb_overheat") { }
+
+ class spell_igb_overheat_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_igb_overheat_AuraScript);
+
+ bool Load() OVERRIDE
+ {
+ if (GetAura()->GetType() != UNIT_AURA_TYPE)
+ return false;
+ return GetUnitOwner()->IsVehicle();
+ }
+
+ void SendClientControl(uint8 value)
+ {
+ if (Vehicle* vehicle = GetUnitOwner()->GetVehicleKit())
+ {
+ if (Unit* passenger = vehicle->GetPassenger(0))
+ {
+ if (Player* player = passenger->ToPlayer())
+ {
+ WorldPacket data(SMSG_CLIENT_CONTROL_UPDATE, GetUnitOwner()->GetPackGUID().size() + 1);
+ data.append(GetUnitOwner()->GetPackGUID());
+ data << uint8(value);
+ player->GetSession()->SendPacket(&data);
+ }
+ }
+ }
+ }
+
+ void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ SendClientControl(0);
+ }
+
+ void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ SendClientControl(1);
+ }
+
+ void Register() OVERRIDE
+ {
+ AfterEffectApply += AuraEffectApplyFn(spell_igb_overheat_AuraScript::HandleApply, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
+ AfterEffectRemove += AuraEffectRemoveFn(spell_igb_overheat_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const OVERRIDE
+ {
+ return new spell_igb_overheat_AuraScript();
+ }
+};
+
+class spell_igb_below_zero : public SpellScriptLoader
+{
+ public:
+ spell_igb_below_zero() : SpellScriptLoader("spell_igb_below_zero") { }
+
+ class spell_igb_below_zero_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_igb_below_zero_SpellScript);
+
+ void RemovePassengers()
+ {
+ GetHitUnit()->CastSpell(GetHitUnit(), SPELL_EJECT_ALL_PASSENGERS_BELOW_ZERO, TRIGGERED_FULL_MASK);
+ }
+
+ void Register() OVERRIDE
+ {
+ BeforeHit += SpellHitFn(spell_igb_below_zero_SpellScript::RemovePassengers);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_igb_below_zero_SpellScript();
+ }
+};
+
+class spell_igb_teleport_to_enemy_ship : public SpellScriptLoader
+{
+ public:
+ spell_igb_teleport_to_enemy_ship() : SpellScriptLoader("spell_igb_teleport_to_enemy_ship") { }
+
+ class spell_igb_teleport_to_enemy_ship_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_igb_teleport_to_enemy_ship_SpellScript);
+
+ void RelocateTransportOffset(SpellEffIndex /*effIndex*/)
+ {
+ WorldLocation const* dest = GetHitDest();
+ Unit* target = GetHitUnit();
+ if (!dest || !target || !target->GetTransport())
+ return;
+
+ float x, y, z, o;
+ dest->GetPosition(x, y, z, o);
+ target->GetTransport()->CalculatePassengerOffset(x, y, z, &o);
+ target->m_movementInfo.transport.pos.Relocate(x, y, z, o);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_igb_teleport_to_enemy_ship_SpellScript::RelocateTransportOffset, EFFECT_0, SPELL_EFFECT_TELEPORT_UNITS);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_igb_teleport_to_enemy_ship_SpellScript();
+ }
+};
+
+class spell_igb_burning_pitch_selector : public SpellScriptLoader
+{
+ public:
+ spell_igb_burning_pitch_selector() : SpellScriptLoader("spell_igb_burning_pitch_selector") { }
+
+ class spell_igb_burning_pitch_selector_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_igb_burning_pitch_selector_SpellScript);
+
+ void FilterTargets(std::list<WorldObject*>& targets)
+ {
+ uint32 team = HORDE;
+ if (InstanceScript* instance = GetCaster()->GetInstanceScript())
+ team = instance->GetData(DATA_TEAM_IN_INSTANCE);
+
+ targets.remove_if([team](WorldObject* target) -> bool
+ {
+ if (Transport* transport = target->GetTransport())
+ return transport->GetEntry() != uint32(team == HORDE ? GO_ORGRIMS_HAMMER_H : GO_THE_SKYBREAKER_A);
+ return true;
+ });
+
+ if (!targets.empty())
+ {
+ WorldObject* target = Trinity::Containers::SelectRandomContainerElement(targets);
+ targets.clear();
+ targets.push_back(target);
+ }
+ }
+
+ void HandleDummy(SpellEffIndex effIndex)
+ {
+ PreventHitDefaultEffect(effIndex);
+ GetCaster()->CastSpell(GetHitUnit(), uint32(GetEffectValue()), TRIGGERED_NONE);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_igb_burning_pitch_selector_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
+ OnEffectHitTarget += SpellEffectFn(spell_igb_burning_pitch_selector_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_igb_burning_pitch_selector_SpellScript();
+ }
+};
+
+class spell_igb_burning_pitch : public SpellScriptLoader
+{
+ public:
+ spell_igb_burning_pitch() : SpellScriptLoader("spell_igb_burning_pitch") { }
+
+ class spell_igb_burning_pitch_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_igb_burning_pitch_SpellScript);
+
+ void HandleDummy(SpellEffIndex effIndex)
+ {
+ PreventHitDefaultEffect(effIndex);
+ GetCaster()->CastCustomSpell(uint32(GetEffectValue()), SPELLVALUE_BASE_POINT0, 8000, NULL, TRIGGERED_FULL_MASK);
+ GetHitUnit()->CastSpell(GetHitUnit(), SPELL_BURNING_PITCH, TRIGGERED_FULL_MASK);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_igb_burning_pitch_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_igb_burning_pitch_SpellScript();
+ }
+};
+
+class spell_igb_rocket_artillery : public SpellScriptLoader
+{
+ public:
+ spell_igb_rocket_artillery() : SpellScriptLoader("spell_igb_rocket_artillery") { }
+
+ class spell_igb_rocket_artillery_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_igb_rocket_artillery_SpellScript);
+
+ void SelectRandomTarget(std::list<WorldObject*>& targets)
+ {
+ if (!targets.empty())
+ {
+ WorldObject* target = Trinity::Containers::SelectRandomContainerElement(targets);
+ targets.clear();
+ targets.push_back(target);
+ }
+ }
+
+ void HandleScript(SpellEffIndex effIndex)
+ {
+ PreventHitDefaultEffect(effIndex);
+ GetCaster()->CastSpell(GetHitUnit(), uint32(GetEffectValue()), TRIGGERED_NONE);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_igb_rocket_artillery_SpellScript::SelectRandomTarget, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
+ OnEffectHitTarget += SpellEffectFn(spell_igb_rocket_artillery_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_igb_rocket_artillery_SpellScript();
+ }
+};
+
+class spell_igb_rocket_artillery_explosion : public SpellScriptLoader
+{
+ public:
+ spell_igb_rocket_artillery_explosion() : SpellScriptLoader("spell_igb_rocket_artillery_explosion") { }
+
+ class spell_igb_rocket_artillery_explosion_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_igb_rocket_artillery_explosion_SpellScript);
+
+ void DamageGunship(SpellEffIndex /*effIndex*/)
+ {
+ if (InstanceScript* instance = GetCaster()->GetInstanceScript())
+ GetCaster()->CastCustomSpell(instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE ? SPELL_BURNING_PITCH_DAMAGE_A : SPELL_BURNING_PITCH_DAMAGE_H, SPELLVALUE_BASE_POINT0, 5000, NULL, TRIGGERED_FULL_MASK);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectHit += SpellEffectFn(spell_igb_rocket_artillery_explosion_SpellScript::DamageGunship, EFFECT_0, SPELL_EFFECT_TRIGGER_MISSILE);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_igb_rocket_artillery_explosion_SpellScript();
+ }
+};
+
+class spell_igb_gunship_fall_teleport : public SpellScriptLoader
+{
+ public:
+ spell_igb_gunship_fall_teleport() : SpellScriptLoader("spell_igb_gunship_fall_teleport") { }
+
+ class spell_igb_gunship_fall_teleport_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_igb_gunship_fall_teleport_SpellScript);
+
+ bool Load()
+ {
+ return GetCaster()->GetInstanceScript();
+ }
+
+ void SelectTransport(WorldObject*& target)
+ {
+ if (InstanceScript* instance = target->GetInstanceScript())
+ target = HashMapHolder<GameObject>::Find(instance->GetData64(DATA_ICECROWN_GUNSHIP_BATTLE));
+ }
+
+ void RelocateDest(SpellEffIndex /*effIndex*/)
+ {
+ if (GetCaster()->GetInstanceScript()->GetData(DATA_TEAM_IN_INSTANCE) == HORDE)
+ GetHitDest()->RelocateOffset({ 0.0f, 0.0f, 36.0f, 0.0f });
+ else
+ GetHitDest()->RelocateOffset({ 0.0f, 0.0f, 21.0f, 0.0f });
+ }
+
+ void Register() OVERRIDE
+ {
+ OnObjectTargetSelect += SpellObjectTargetSelectFn(spell_igb_gunship_fall_teleport_SpellScript::SelectTransport, EFFECT_0, TARGET_DEST_NEARBY_ENTRY);
+ OnEffectLaunch += SpellEffectFn(spell_igb_gunship_fall_teleport_SpellScript::RelocateDest, EFFECT_0, SPELL_EFFECT_TELEPORT_UNITS);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_igb_gunship_fall_teleport_SpellScript();
+ }
+};
+
+class spell_igb_check_for_players : public SpellScriptLoader
+{
+ public:
+ spell_igb_check_for_players() : SpellScriptLoader("spell_igb_check_for_players") { }
+
+ class spell_igb_check_for_players_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_igb_check_for_players_SpellScript);
+
+ bool Load() OVERRIDE
+ {
+ _playerCount = 0;
+ return GetCaster()->GetTypeId() == TYPEID_UNIT;
+ }
+
+ void CountTargets(std::list<WorldObject*>& targets)
+ {
+ _playerCount = targets.size();
+ }
+
+ void TriggerWipe()
+ {
+ if (!_playerCount)
+ GetCaster()->ToCreature()->AI()->JustDied(NULL);
+ }
+
+ void TeleportPlayer(SpellEffIndex /*effIndex*/)
+ {
+ if (GetHitUnit()->GetPositionZ() < GetCaster()->GetPositionZ() - 10.0f)
+ GetHitUnit()->CastSpell(GetHitUnit(), SPELL_GUNSHIP_FALL_TELEPORT, TRIGGERED_FULL_MASK);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_igb_check_for_players_SpellScript::CountTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
+ AfterCast += SpellCastFn(spell_igb_check_for_players_SpellScript::TriggerWipe);
+ OnEffectHitTarget += SpellEffectFn(spell_igb_check_for_players_SpellScript::TeleportPlayer, EFFECT_0, SPELL_EFFECT_DUMMY);
+ }
+
+ uint32 _playerCount;
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_igb_check_for_players_SpellScript();
+ }
+};
+
+class spell_igb_teleport_players_on_victory : public SpellScriptLoader
+{
+ public:
+ spell_igb_teleport_players_on_victory() : SpellScriptLoader("spell_igb_teleport_players_on_victory") { }
+
+ class spell_igb_teleport_players_on_victory_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_igb_teleport_players_on_victory_SpellScript);
+
+ bool Load() OVERRIDE
+ {
+ return GetCaster()->GetInstanceScript();
+ }
+
+ void FilterTargets(std::list<WorldObject*>& targets)
+ {
+ InstanceScript* instance = GetCaster()->GetInstanceScript();
+ targets.remove_if([instance](WorldObject* target) -> bool
+ {
+ return target->GetTransGUID() != instance->GetData64(DATA_ENEMY_GUNSHIP);
+ });
+ }
+
+ void Register() OVERRIDE
+ {
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_igb_teleport_players_on_victory_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_DEST_AREA_ENTRY);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_igb_teleport_players_on_victory_SpellScript();
+ }
+};
+
+class achievement_im_on_a_boat : public AchievementCriteriaScript
+{
+ public:
+ achievement_im_on_a_boat() : AchievementCriteriaScript("achievement_im_on_a_boat") { }
+
+ bool OnCheck(Player* /*source*/, Unit* target) OVERRIDE
+ {
+ return target->GetAI() && target->GetAI()->GetData(ACTION_SHIP_VISITS) <= 2;
+ }
+};
+
+void AddSC_boss_icecrown_gunship_battle()
+{
+ new npc_gunship();
+ new npc_high_overlord_saurfang_igb();
+ new npc_muradin_bronzebeard_igb();
+ new npc_zafod_boombox();
+ new npc_gunship_boarding_leader();
+ new npc_gunship_boarding_add();
+ new npc_gunship_gunner();
+ new npc_gunship_rocketeer();
+ new npc_gunship_mage();
+ new npc_gunship_cannon();
+ new spell_igb_rocket_pack();
+ new spell_igb_rocket_pack_useable();
+ new spell_igb_on_gunship_deck();
+ new spell_igb_periodic_trigger_with_power_cost();
+ new spell_igb_cannon_blast();
+ new spell_igb_incinerating_blast();
+ new spell_igb_overheat();
+ new spell_igb_below_zero();
+ new spell_igb_teleport_to_enemy_ship();
+ new spell_igb_burning_pitch_selector();
+ new spell_igb_burning_pitch();
+ new spell_igb_rocket_artillery();
+ new spell_igb_rocket_artillery_explosion();
+ new spell_igb_gunship_fall_teleport();
+ new spell_igb_check_for_players();
+ new spell_igb_teleport_players_on_victory();
+ new achievement_im_on_a_boat();
+}
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
index 30d520ce7bf..0d262110b5f 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp
@@ -560,7 +560,7 @@ class boss_the_lich_king : public CreatureScript
me->VisitNearbyGridObject(333.0f, worker);
// Reset any light override
- SendLightOverride(0, 5000);
+ me->GetMap()->SetZoneOverrideLight(AREA_THE_FROZEN_THRONE, 0, 5000);
}
bool CanAIAttack(Unit const* target) const OVERRIDE
@@ -593,7 +593,7 @@ class boss_the_lich_king : public CreatureScript
case ACTION_START_ENCOUNTER:
instance->SetBossState(DATA_THE_LICH_KING, IN_PROGRESS);
Talk(SAY_LK_INTRO_1);
- SendMusicToPlayers(MUSIC_FROZEN_THRONE);
+ me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_FROZEN_THRONE);
// schedule talks
me->SetStandState(UNIT_STAND_STATE_STAND);
events.ScheduleEvent(EVENT_INTRO_MOVE_1, 4000);
@@ -602,10 +602,10 @@ class boss_the_lich_king : public CreatureScript
events.ScheduleEvent(EVENT_START_ATTACK, 5000);
break;
case ACTION_PLAY_MUSIC:
- SendMusicToPlayers(MUSIC_FINAL);
+ me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_FINAL);
break;
case ACTION_RESTORE_LIGHT:
- SendLightOverride(0, 5000);
+ me->GetMap()->SetZoneOverrideLight(AREA_THE_FROZEN_THRONE, 0, 5000);
break;
case ACTION_BREAK_FROSTMOURNE:
me->CastSpell((Unit*)NULL, SPELL_SUMMON_BROKEN_FROSTMOURNE, TRIGGERED_IGNORE_CAST_IN_PROGRESS);
@@ -687,7 +687,7 @@ class boss_the_lich_king : public CreatureScript
events.Reset();
events.SetPhase(PHASE_OUTRO);
summons.DespawnAll();
- SendMusicToPlayers(MUSIC_FURY_OF_FROSTMOURNE);
+ me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_FURY_OF_FROSTMOURNE);
me->InterruptNonMeleeSpells(true);
me->CastSpell((Unit*)NULL, SPELL_FURY_OF_FROSTMOURNE, TRIGGERED_NONE);
me->SetWalk(true);
@@ -739,8 +739,8 @@ class boss_the_lich_king : public CreatureScript
{
summon->CastSpell((Unit*)NULL, SPELL_BROKEN_FROSTMOURNE, true);
- SendLightOverride(LIGHT_SOULSTORM, 10000);
- SendWeather(WEATHER_STATE_BLACKSNOW);
+ me->GetMap()->SetZoneOverrideLight(AREA_THE_FROZEN_THRONE, LIGHT_SOULSTORM, 10000);
+ me->GetMap()->SetZoneWeather(AREA_THE_FROZEN_THRONE, WEATHER_STATE_BLACKSNOW, 0.5f);
events.ScheduleEvent(EVENT_OUTRO_SOUL_BARRAGE, 5000, 0, PHASE_OUTRO);
return;
@@ -792,8 +792,8 @@ class boss_the_lich_king : public CreatureScript
{
if (spell->Id == REMORSELESS_WINTER_1 || spell->Id == REMORSELESS_WINTER_2)
{
- SendLightOverride(LIGHT_SNOWSTORM, 5000);
- SendWeather(WEATHER_STATE_LIGHT_SNOW);
+ me->GetMap()->SetZoneOverrideLight(AREA_THE_FROZEN_THRONE, LIGHT_SNOWSTORM, 5000);
+ me->GetMap()->SetZoneWeather(AREA_THE_FROZEN_THRONE, WEATHER_STATE_LIGHT_SNOW, 0.5f);
}
}
@@ -819,7 +819,7 @@ class boss_the_lich_king : public CreatureScript
case POINT_CENTER_1:
me->SetFacingTo(0.0f);
Talk(SAY_LK_REMORSELESS_WINTER);
- SendMusicToPlayers(MUSIC_SPECIAL);
+ me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_SPECIAL);
DoCast(me, SPELL_REMORSELESS_WINTER_1);
events.DelayEvents(62500, EVENT_GROUP_BERSERK); // delay berserk timer, its not ticking during phase transitions
events.ScheduleEvent(EVENT_QUAKE, 62500, 0, PHASE_TRANSITION);
@@ -834,7 +834,7 @@ class boss_the_lich_king : public CreatureScript
case POINT_CENTER_2:
me->SetFacingTo(0.0f);
Talk(SAY_LK_REMORSELESS_WINTER);
- SendMusicToPlayers(MUSIC_SPECIAL);
+ me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_SPECIAL);
DoCast(me, SPELL_REMORSELESS_WINTER_2);
summons.DespawnEntry(NPC_VALKYR_SHADOWGUARD);
events.DelayEvents(62500, EVENT_GROUP_BERSERK); // delay berserk timer, its not ticking during phase transitions
@@ -920,7 +920,7 @@ class boss_the_lich_king : public CreatureScript
break;
case EVENT_SUMMON_SHAMBLING_HORROR:
DoCast(me, SPELL_SUMMON_SHAMBLING_HORROR);
- SendMusicToPlayers(MUSIC_SPECIAL);
+ me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_SPECIAL);
events.ScheduleEvent(EVENT_SUMMON_SHAMBLING_HORROR, 60000, 0, PHASE_ONE);
break;
case EVENT_SUMMON_DRUDGE_GHOUL:
@@ -980,18 +980,18 @@ class boss_the_lich_king : public CreatureScript
events.SetPhase(PHASE_TWO);
me->ClearUnitState(UNIT_STATE_CASTING); // clear state to ensure check in DoCastAOE passes
DoCastAOE(SPELL_QUAKE);
- SendMusicToPlayers(MUSIC_SPECIAL);
+ me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_SPECIAL);
Talk(SAY_LK_QUAKE);
break;
case EVENT_QUAKE_2:
events.SetPhase(PHASE_THREE);
me->ClearUnitState(UNIT_STATE_CASTING); // clear state to ensure check in DoCastAOE passes
DoCastAOE(SPELL_QUAKE);
- SendMusicToPlayers(MUSIC_SPECIAL);
+ me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_SPECIAL);
Talk(SAY_LK_QUAKE);
break;
case EVENT_SUMMON_VALKYR:
- SendMusicToPlayers(MUSIC_SPECIAL);
+ me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_SPECIAL);
Talk(SAY_LK_SUMMON_VALKYR);
DoCastAOE(SUMMON_VALKYR);
events.ScheduleEvent(EVENT_SUMMON_VALKYR, urand(45000, 50000), 0, PHASE_TWO);
@@ -1002,7 +1002,7 @@ class boss_the_lich_king : public CreatureScript
events.SetPhase(PHASE_THREE);
break;
case EVENT_VILE_SPIRITS:
- SendMusicToPlayers(MUSIC_SPECIAL);
+ me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_SPECIAL);
DoCastAOE(SPELL_VILE_SPIRITS);
events.ScheduleEvent(EVENT_VILE_SPIRITS, urand(35000, 40000), EVENT_GROUP_VILE_SPIRITS, PHASE_THREE);
break;
@@ -1073,7 +1073,7 @@ class boss_the_lich_king : public CreatureScript
case EVENT_OUTRO_RAISE_DEAD:
DoCastAOE(SPELL_RAISE_DEAD);
me->ClearUnitState(UNIT_STATE_CASTING);
- SendMusicToPlayers(MUSIC_FINAL);
+ me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_FINAL);
break;
case EVENT_OUTRO_TALK_5:
Talk(SAY_LK_OUTRO_5);
@@ -1114,42 +1114,6 @@ class boss_the_lich_king : public CreatureScript
}
private:
- void SendMusicToPlayers(uint32 musicId) const
- {
- WorldPacket data(SMSG_PLAY_MUSIC, 4);
- data << uint32(musicId);
- SendPacketToPlayers(&data);
- }
-
- void SendLightOverride(uint32 overrideId, uint32 fadeInTime) const
- {
- WorldPacket data(SMSG_OVERRIDE_LIGHT, 12);
- data << uint32(2488); // Light.dbc entry (map default)
- data << uint32(overrideId); // Light.dbc entry (override)
- data << uint32(fadeInTime);
- SendPacketToPlayers(&data);
- }
-
- void SendWeather(WeatherState weather) const
- {
- WorldPacket data(SMSG_WEATHER, 9);
- data << uint32(weather);
- data << float(0.5f);
- data << uint8(0);
- SendPacketToPlayers(&data);
- }
-
- // Send packet to all players in The Frozen Throne
- void SendPacketToPlayers(WorldPacket const* data) const
- {
- Map::PlayerList const& players = me->GetMap()->GetPlayers();
- if (!players.isEmpty())
- for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
- if (Player* player = itr->GetSource())
- if (player->GetAreaId() == AREA_THE_FROZEN_THRONE)
- player->GetSession()->SendPacket(data);
- }
-
uint32 _necroticPlagueStack;
uint32 _vileSpiritExplosions;
};
@@ -2606,38 +2570,6 @@ class spell_the_lich_king_valkyr_target_search : public SpellScriptLoader
}
};
-class spell_the_lich_king_eject_all_passengers : public SpellScriptLoader
-{
- public:
- spell_the_lich_king_eject_all_passengers() : SpellScriptLoader("spell_the_lich_king_eject_all_passengers") { }
-
- class spell_the_lich_king_eject_all_passengers_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_the_lich_king_eject_all_passengers_SpellScript);
-
- bool Load() OVERRIDE
- {
- return GetCaster()->IsVehicle();
- }
-
- void HandleDummy(SpellEffIndex effIndex)
- {
- PreventHitDefaultEffect(effIndex);
- GetCaster()->GetVehicleKit()->RemoveAllPassengers();
- }
-
- void Register() OVERRIDE
- {
- OnEffectHitTarget += SpellEffectFn(spell_the_lich_king_eject_all_passengers_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
- }
- };
-
- SpellScript* GetSpellScript() const OVERRIDE
- {
- return new spell_the_lich_king_eject_all_passengers_SpellScript();
- }
-};
-
class spell_the_lich_king_cast_back_to_caster : public SpellScriptLoader
{
public:
@@ -3270,7 +3202,6 @@ void AddSC_boss_the_lich_king()
new spell_the_lich_king_summon_into_air();
new spell_the_lich_king_soul_reaper();
new spell_the_lich_king_valkyr_target_search();
- new spell_the_lich_king_eject_all_passengers();
new spell_the_lich_king_cast_back_to_caster();
new spell_the_lich_king_life_siphon();
new spell_the_lich_king_vile_spirits();
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
index 8e529ba0ee9..6aeab015b78 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel.h
@@ -68,7 +68,7 @@ enum TeleporterSpells
DEATHBRINGER_S_RISE_TELEPORT = 70858,
UPPER_SPIRE_TELEPORT = 70859,
FROZEN_THRONE_TELEPORT = 70860,
- SINDRAGOSA_S_LAIR_TELEPORT = 70861,
+ SINDRAGOSA_S_LAIR_TELEPORT = 70861
};
enum DataTypes
@@ -76,7 +76,7 @@ enum DataTypes
// Encounter States/Boss GUIDs
DATA_LORD_MARROWGAR = 0,
DATA_LADY_DEATHWHISPER = 1,
- DATA_GUNSHIP_EVENT = 2,
+ DATA_ICECROWN_GUNSHIP_BATTLE = 2,
DATA_DEATHBRINGER_SAURFANG = 3,
DATA_FESTERGUT = 4,
DATA_ROTFACE = 5,
@@ -116,6 +116,7 @@ enum DataTypes
DATA_HIGHLORD_TIRION_FORDRING = 37,
DATA_ARTHAS_PLATFORM = 38,
DATA_TERENAS_MENETHIL = 39,
+ DATA_ENEMY_GUNSHIP = 40
};
enum CreaturesIds
@@ -169,6 +170,33 @@ enum CreaturesIds
NPC_REANIMATED_ADHERENT = 38010,
NPC_VENGEFUL_SHADE = 38222,
+ // Icecrown Gunship Battle
+ NPC_MARTYR_STALKER_IGB_SAURFANG = 38569,
+ NPC_ALLIANCE_GUNSHIP_CANNON = 36838,
+ NPC_HORDE_GUNSHIP_CANNON = 36839,
+ NPC_SKYBREAKER_DECKHAND = 36970,
+ NPC_ORGRIMS_HAMMER_CREW = 36971,
+ NPC_IGB_HIGH_OVERLORD_SAURFANG = 36939,
+ NPC_IGB_MURADIN_BRONZEBEARD = 36948,
+ NPC_THE_SKYBREAKER = 37540,
+ NPC_ORGRIMS_HAMMER = 37215,
+ NPC_GUNSHIP_HULL = 37547,
+ NPC_TELEPORT_PORTAL = 37227,
+ NPC_TELEPORT_EXIT = 37488,
+ NPC_SKYBREAKER_SORCERER = 37116,
+ NPC_SKYBREAKER_RIFLEMAN = 36969,
+ NPC_SKYBREAKER_MORTAR_SOLDIER = 36978,
+ NPC_SKYBREAKER_MARINE = 36950,
+ NPC_SKYBREAKER_SERGEANT = 36961,
+ NPC_KOR_KRON_BATTLE_MAGE = 37117,
+ NPC_KOR_KRON_AXETHROWER = 36968,
+ NPC_KOR_KRON_ROCKETEER = 36982,
+ NPC_KOR_KRON_REAVER = 36957,
+ NPC_KOR_KRON_SERGEANT = 36960,
+ NPC_ZAFOD_BOOMBOX = 37184,
+ NPC_HIGH_CAPTAIN_JUSTIN_BARTLETT = 37182,
+ NPC_SKY_REAVER_KORM_BLACKSCAR = 37833,
+
// Deathbringer Saurfang
NPC_DEATHBRINGER_SAURFANG = 37813,
NPC_BLOOD_BEAST = 38508,
@@ -285,7 +313,7 @@ enum CreaturesIds
NPC_FROSTMOURNE_TRIGGER = 38584,
// Generic
- NPC_INVISIBLE_STALKER = 30298,
+ NPC_INVISIBLE_STALKER = 30298
};
enum GameObjectsIds
@@ -305,6 +333,22 @@ enum GameObjectsIds
GO_ORATORY_OF_THE_DAMNED_ENTRANCE = 201563,
GO_LADY_DEATHWHISPER_ELEVATOR = 202220,
+ // Icecrown Gunship Battle - Horde raid
+ GO_ORGRIMS_HAMMER_H = 201812,
+ GO_THE_SKYBREAKER_H = 201811,
+ GO_GUNSHIP_ARMORY_H_10N = 202178,
+ GO_GUNSHIP_ARMORY_H_25N = 202180,
+ GO_GUNSHIP_ARMORY_H_10H = 202177,
+ GO_GUNSHIP_ARMORY_H_25H = 202179,
+
+ // Icecrown Gunship Battle - Alliance raid
+ GO_ORGRIMS_HAMMER_A = 201581,
+ GO_THE_SKYBREAKER_A = 201580,
+ GO_GUNSHIP_ARMORY_A_10N = 201873,
+ GO_GUNSHIP_ARMORY_A_25N = 201874,
+ GO_GUNSHIP_ARMORY_A_10H = 201872,
+ GO_GUNSHIP_ARMORY_A_25H = 201875,
+
// Deathbringer Saurfang
GO_SAURFANG_S_DOOR = 201825,
GO_DEATHBRINGER_S_CACHE_10N = 202239,
@@ -368,7 +412,7 @@ enum GameObjectsIds
GO_DOODAD_ICECROWN_SNOWEDGEWARNING01 = 202190,
GO_FROZEN_LAVAMAN = 202436,
GO_LAVAMAN_PILLARS_CHAINED = 202437,
- GO_LAVAMAN_PILLARS_UNCHAINED = 202438,
+ GO_LAVAMAN_PILLARS_UNCHAINED = 202438
};
enum AchievementCriteriaIds
@@ -403,11 +447,15 @@ enum AchievementCriteriaIds
CRITERIA_ONCE_BITTEN_TWICE_SHY_10N = 12780,
CRITERIA_ONCE_BITTEN_TWICE_SHY_25N = 13012,
CRITERIA_ONCE_BITTEN_TWICE_SHY_10V = 13011,
- CRITERIA_ONCE_BITTEN_TWICE_SHY_25V = 13013,
+ CRITERIA_ONCE_BITTEN_TWICE_SHY_25V = 13013
};
enum SharedActions
{
+ // Icecrown Gunship Battle
+ ACTION_ENEMY_GUNSHIP_TALK = -369390,
+ ACTION_EXIT_SHIP = -369391,
+
// Festergut
ACTION_FESTERGUT_COMBAT = -366260,
ACTION_FESTERGUT_GAS = -366261,
@@ -431,7 +479,7 @@ enum SharedActions
// The Lich King
ACTION_RESTORE_LIGHT = -72262,
- ACTION_FROSTMOURNE_INTRO = -36823,
+ ACTION_FROSTMOURNE_INTRO = -36823
};
enum WeekliesICC
@@ -445,7 +493,7 @@ enum WeekliesICC
QUEST_BLOOD_QUICKENING_10 = 24874,
QUEST_BLOOD_QUICKENING_25 = 24879,
QUEST_RESPITE_FOR_A_TORNMENTED_SOUL_10 = 24872,
- QUEST_RESPITE_FOR_A_TORNMENTED_SOUL_25 = 24880,
+ QUEST_RESPITE_FOR_A_TORNMENTED_SOUL_25 = 24880
};
enum WorldStatesICC
@@ -454,12 +502,13 @@ enum WorldStatesICC
WORLDSTATE_EXECUTION_TIME = 4904,
WORLDSTATE_SHOW_ATTEMPTS = 4940,
WORLDSTATE_ATTEMPTS_REMAINING = 4941,
- WORLDSTATE_ATTEMPTS_MAX = 4942,
+ WORLDSTATE_ATTEMPTS_MAX = 4942
};
enum AreaIds
{
- AREA_THE_FROZEN_THRONE = 4859,
+ AREA_ICECROWN_CITADEL = 4812,
+ AREA_THE_FROZEN_THRONE = 4859
};
class spell_trigger_spell_from_caster : public SpellScriptLoader
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
index ad06bc1c485..b56e0dd6360 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
@@ -38,7 +38,7 @@ class icecrown_citadel_teleport : public GameObjectScript
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Oratory of the Damned.", GOSSIP_SENDER_ICC_PORT, ORATORY_OF_THE_DAMNED_TELEPORT);
if (instance->GetBossState(DATA_LADY_DEATHWHISPER) == DONE)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Rampart of Skulls.", GOSSIP_SENDER_ICC_PORT, RAMPART_OF_SKULLS_TELEPORT);
- if (instance->GetBossState(DATA_GUNSHIP_EVENT) == DONE)
+ if (instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) == DONE)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Deathbringer's Rise.", GOSSIP_SENDER_ICC_PORT, DEATHBRINGER_S_RISE_TELEPORT);
if (instance->GetData(DATA_COLDFLAME_JETS) == DONE)
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Upper Spire.", GOSSIP_SENDER_ICC_PORT, UPPER_SPIRE_TELEPORT);
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
index edd80377d68..31daa92cbe8 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/instance_icecrown_citadel.cpp
@@ -15,23 +15,30 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "ObjectMgr.h"
-#include "ScriptMgr.h"
+#include "AccountMgr.h"
#include "InstanceScript.h"
-#include "ScriptedCreature.h"
#include "Map.h"
-#include "PoolMgr.h"
-#include "AccountMgr.h"
-#include "icecrown_citadel.h"
+#include "ObjectMgr.h"
#include "Player.h"
+#include "PoolMgr.h"
+#include "ScriptMgr.h"
+#include "ScriptedCreature.h"
+#include "Transport.h"
+#include "TransportMgr.h"
#include "WorldPacket.h"
#include "WorldSession.h"
+#include "icecrown_citadel.h"
enum EventIds
{
+ EVENT_PLAYERS_GUNSHIP_SPAWN = 22663,
+ EVENT_PLAYERS_GUNSHIP_COMBAT = 22664,
+ EVENT_PLAYERS_GUNSHIP_SAURFANG = 22665,
+ EVENT_ENEMY_GUNSHIP_COMBAT = 22860,
+ EVENT_ENEMY_GUNSHIP_DESPAWN = 22861,
EVENT_QUAKE = 23437,
EVENT_SECOND_REMORSELESS_WINTER = 23507,
- EVENT_TELEPORT_TO_FROSMOURNE = 23617,
+ EVENT_TELEPORT_TO_FROSTMOURNE = 23617
};
enum TimedEvents
@@ -39,6 +46,7 @@ enum TimedEvents
EVENT_UPDATE_EXECUTION_TIME = 1,
EVENT_QUAKE_SHATTER = 2,
EVENT_REBUILD_PLATFORM = 3,
+ EVENT_RESPAWN_GUNSHIP = 4
};
DoorData const doorData[] =
@@ -68,7 +76,7 @@ DoorData const doorData[] =
{GO_SINDRAGOSA_SHORTCUT_EXIT_DOOR, DATA_SINDRAGOSA, DOOR_TYPE_PASSAGE, BOUNDARY_NONE},
{GO_ICE_WALL, DATA_SINDRAGOSA, DOOR_TYPE_ROOM, BOUNDARY_SE },
{GO_ICE_WALL, DATA_SINDRAGOSA, DOOR_TYPE_ROOM, BOUNDARY_SW },
- {0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE}, // END
+ {0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE} // END
};
// this doesnt have to only store questgivers, also can be used for related quest spawns
@@ -89,7 +97,7 @@ WeeklyQuest const WeeklyQuestData[WeeklyNPCs] =
{NPC_ALRIN_THE_AGILE, {QUEST_BLOOD_QUICKENING_10, QUEST_BLOOD_QUICKENING_25 }}, // Blood Quickening
{NPC_INFILTRATOR_MINCHAR_BQ, {QUEST_BLOOD_QUICKENING_10, QUEST_BLOOD_QUICKENING_25 }}, // Blood Quickening
{NPC_MINCHAR_BEAM_STALKER, {QUEST_BLOOD_QUICKENING_10, QUEST_BLOOD_QUICKENING_25 }}, // Blood Quickening
- {NPC_VALITHRIA_DREAMWALKER_QUEST, {QUEST_RESPITE_FOR_A_TORNMENTED_SOUL_10, QUEST_RESPITE_FOR_A_TORNMENTED_SOUL_25}}, // Respite for a Tormented Soul
+ {NPC_VALITHRIA_DREAMWALKER_QUEST, {QUEST_RESPITE_FOR_A_TORNMENTED_SOUL_10, QUEST_RESPITE_FOR_A_TORNMENTED_SOUL_25}} // Respite for a Tormented Soul
};
class instance_icecrown_citadel : public InstanceMapScript
@@ -106,6 +114,9 @@ class instance_icecrown_citadel : public InstanceMapScript
TeamInInstance = 0;
HeroicAttempts = MaxHeroicAttempts;
LadyDeathwisperElevatorGUID = 0;
+ GunshipGUID = 0;
+ EnemyGunshipGUID = 0;
+ GunshipArmoryGUID = 0;
DeathbringerSaurfangGUID = 0;
DeathbringerSaurfangDoorGUID = 0;
DeathbringerSaurfangEventGUID = 0;
@@ -164,6 +175,9 @@ class instance_icecrown_citadel : public InstanceMapScript
{
if (!TeamInInstance)
TeamInInstance = player->GetTeam();
+
+ if (GetBossState(DATA_LADY_DEATHWHISPER) == DONE && GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != DONE)
+ SpawnGunship();
}
void OnCreatureCreate(Creature* creature) OVERRIDE
@@ -217,6 +231,10 @@ class instance_icecrown_citadel : public InstanceMapScript
case NPC_DEATHBRINGER_SAURFANG:
DeathbringerSaurfangGUID = creature->GetGUID();
break;
+ case NPC_ALLIANCE_GUNSHIP_CANNON:
+ case NPC_HORDE_GUNSHIP_CANNON:
+ creature->SetControlled(true, UNIT_STATE_ROOT);
+ break;
case NPC_SE_HIGH_OVERLORD_SAURFANG:
if (TeamInInstance == ALLIANCE)
creature->UpdateEntry(NPC_SE_MURADIN_BRONZEBEARD, ALLIANCE, creature->GetCreatureData());
@@ -335,12 +353,60 @@ class instance_icecrown_citadel : public InstanceMapScript
{
uint8 diffIndex = uint8(instance->GetSpawnMode() & 1);
if (!sPoolMgr->IsSpawnedObject<Quest>(WeeklyQuestData[questIndex].questId[diffIndex]))
- entry = 0;
+ return 0;
break;
}
}
break;
}
+ case NPC_HORDE_GUNSHIP_CANNON:
+ case NPC_ORGRIMS_HAMMER_CREW:
+ case NPC_SKY_REAVER_KORM_BLACKSCAR:
+ if (TeamInInstance == ALLIANCE)
+ return 0;
+ break;
+ case NPC_ALLIANCE_GUNSHIP_CANNON:
+ case NPC_SKYBREAKER_DECKHAND:
+ case NPC_HIGH_CAPTAIN_JUSTIN_BARTLETT:
+ if (TeamInInstance == HORDE)
+ return 0;
+ break;
+ case NPC_ZAFOD_BOOMBOX:
+ if (GameObjectTemplate const* go = sObjectMgr->GetGameObjectTemplate(GO_THE_SKYBREAKER_A))
+ if ((TeamInInstance == ALLIANCE && data->mapid == go->moTransport.mapID) ||
+ (TeamInInstance == HORDE && data->mapid != go->moTransport.mapID))
+ return entry;
+ return 0;
+ case NPC_IGB_MURADIN_BRONZEBEARD:
+ if ((TeamInInstance == ALLIANCE && data->posX > 10.0f) ||
+ (TeamInInstance == HORDE && data->posX < 10.0f))
+ return entry;
+ return 0;
+ default:
+ break;
+ }
+
+ return entry;
+ }
+
+ uint32 GetGameObjectEntry(uint32 /*guidLow*/, uint32 entry) OVERRIDE
+ {
+ switch (entry)
+ {
+ case GO_GUNSHIP_ARMORY_H_10N:
+ case GO_GUNSHIP_ARMORY_H_25N:
+ case GO_GUNSHIP_ARMORY_H_10H:
+ case GO_GUNSHIP_ARMORY_H_25H:
+ if (TeamInInstance == ALLIANCE)
+ return 0;
+ break;
+ case GO_GUNSHIP_ARMORY_A_10N:
+ case GO_GUNSHIP_ARMORY_A_25N:
+ case GO_GUNSHIP_ARMORY_A_10H:
+ case GO_GUNSHIP_ARMORY_A_25H:
+ if (TeamInInstance == HORDE)
+ return 0;
+ break;
default:
break;
}
@@ -446,6 +512,20 @@ class instance_icecrown_citadel : public InstanceMapScript
go->SetGoState(GO_STATE_READY);
}
break;
+ case GO_THE_SKYBREAKER_H:
+ case GO_ORGRIMS_HAMMER_A:
+ EnemyGunshipGUID = go->GetGUID();
+ break;
+ case GO_GUNSHIP_ARMORY_H_10N:
+ case GO_GUNSHIP_ARMORY_H_25N:
+ case GO_GUNSHIP_ARMORY_H_10H:
+ case GO_GUNSHIP_ARMORY_H_25H:
+ case GO_GUNSHIP_ARMORY_A_10N:
+ case GO_GUNSHIP_ARMORY_A_25N:
+ case GO_GUNSHIP_ARMORY_A_10H:
+ case GO_GUNSHIP_ARMORY_A_25H:
+ GunshipArmoryGUID = go->GetGUID();
+ break;
case GO_SAURFANG_S_DOOR:
DeathbringerSaurfangDoorGUID = go->GetGUID();
AddDoor(go, true);
@@ -587,6 +667,10 @@ class instance_icecrown_citadel : public InstanceMapScript
case GO_ICE_WALL:
AddDoor(go, false);
break;
+ case GO_THE_SKYBREAKER_A:
+ case GO_ORGRIMS_HAMMER_H:
+ GunshipGUID = 0;
+ break;
default:
break;
}
@@ -621,6 +705,10 @@ class instance_icecrown_citadel : public InstanceMapScript
{
switch (type)
{
+ case DATA_ICECROWN_GUNSHIP_BATTLE:
+ return GunshipGUID;
+ case DATA_ENEMY_GUNSHIP:
+ return EnemyGunshipGUID;
case DATA_DEATHBRINGER_SAURFANG:
return DeathbringerSaurfangGUID;
case DATA_SAURFANG_EVENT_NPC:
@@ -691,7 +779,7 @@ class instance_icecrown_citadel : public InstanceMapScript
switch (type)
{
case DATA_LADY_DEATHWHISPER:
- SetBossState(DATA_GUNSHIP_EVENT, state); // TEMP HACK UNTIL GUNSHIP SCRIPTED
+ {
if (state == DONE)
{
if (GameObject* elevator = instance->GetGameObject(LadyDeathwisperElevatorGUID))
@@ -699,7 +787,19 @@ class instance_icecrown_citadel : public InstanceMapScript
elevator->SetUInt32Value(GAMEOBJECT_LEVEL, 0);
elevator->SetGoState(GO_STATE_READY);
}
+
+ SpawnGunship();
+ }
+ break;
+ }
+ case DATA_ICECROWN_GUNSHIP_BATTLE:
+ if (state == DONE)
+ {
+ if (GameObject* loot = instance->GetGameObject(GunshipArmoryGUID))
+ loot->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN);
}
+ else if (state == FAIL)
+ Events.ScheduleEvent(EVENT_RESPAWN_GUNSHIP, 30000);
break;
case DATA_DEATHBRINGER_SAURFANG:
switch (state)
@@ -846,6 +946,17 @@ class instance_icecrown_citadel : public InstanceMapScript
return true;
}
+ void SpawnGunship()
+ {
+ if (!GunshipGUID)
+ {
+ SetBossState(DATA_ICECROWN_GUNSHIP_BATTLE, NOT_STARTED);
+ uint32 gunshipEntry = TeamInInstance == HORDE ? GO_ORGRIMS_HAMMER_H : GO_THE_SKYBREAKER_A;
+ if (Transport* gunship = sTransportMgr->CreateTransport(gunshipEntry, 0, instance))
+ GunshipGUID = gunship->GetGUID();
+ }
+ }
+
void SetData(uint32 type, uint32 data) OVERRIDE
{
switch (type)
@@ -1066,10 +1177,10 @@ class instance_icecrown_citadel : public InstanceMapScript
return false;
// no break
case DATA_DEATHBRINGER_SAURFANG:
- if (GetBossState(DATA_GUNSHIP_EVENT) != DONE)
+ if (GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != DONE)
return false;
// no break
- case DATA_GUNSHIP_EVENT:
+ case DATA_ICECROWN_GUNSHIP_BATTLE:
if (GetBossState(DATA_LADY_DEATHWHISPER) != DONE)
return false;
// no break
@@ -1163,7 +1274,7 @@ class instance_icecrown_citadel : public InstanceMapScript
void Update(uint32 diff) OVERRIDE
{
- if (BloodQuickeningState != IN_PROGRESS && GetBossState(DATA_THE_LICH_KING) != IN_PROGRESS)
+ if (BloodQuickeningState != IN_PROGRESS && GetBossState(DATA_THE_LICH_KING) != IN_PROGRESS && GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != FAIL)
return;
Events.Update(diff);
@@ -1213,16 +1324,42 @@ class instance_icecrown_citadel : public InstanceMapScript
if (GameObject* wind = instance->GetGameObject(FrozenThroneWindGUID))
wind->SetGoState(GO_STATE_ACTIVE);
break;
+ case EVENT_RESPAWN_GUNSHIP:
+ SpawnGunship();
+ break;
default:
break;
}
}
}
- void ProcessEvent(WorldObject* /*source*/, uint32 eventId) OVERRIDE
+ void ProcessEvent(WorldObject* source, uint32 eventId) OVERRIDE
{
switch (eventId)
{
+ case EVENT_ENEMY_GUNSHIP_DESPAWN:
+ if (GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) == DONE)
+ source->AddObjectToRemoveList();
+ break;
+ case EVENT_ENEMY_GUNSHIP_COMBAT:
+ if (Creature* captain = source->FindNearestCreature(TeamInInstance == HORDE ? NPC_IGB_HIGH_OVERLORD_SAURFANG : NPC_IGB_MURADIN_BRONZEBEARD, 100.0f))
+ captain->AI()->DoAction(ACTION_ENEMY_GUNSHIP_TALK);
+ // no break;
+ case EVENT_PLAYERS_GUNSHIP_SPAWN:
+ case EVENT_PLAYERS_GUNSHIP_COMBAT:
+ if (GameObject* go = source->ToGameObject())
+ if (Transport* transport = go->ToTransport())
+ transport->EnableMovement(false);
+ break;
+ case EVENT_PLAYERS_GUNSHIP_SAURFANG:
+ {
+ if (Creature* captain = source->FindNearestCreature(TeamInInstance == HORDE ? NPC_IGB_HIGH_OVERLORD_SAURFANG : NPC_IGB_MURADIN_BRONZEBEARD, 100.0f))
+ captain->AI()->DoAction(ACTION_EXIT_SHIP);
+ if (GameObject* go = source->ToGameObject())
+ if (Transport* transport = go->ToTransport())
+ transport->EnableMovement(false);
+ break;
+ }
case EVENT_QUAKE:
if (GameObject* warning = instance->GetGameObject(FrozenThroneWarningGUID))
warning->SetGoState(GO_STATE_ACTIVE);
@@ -1235,7 +1372,7 @@ class instance_icecrown_citadel : public InstanceMapScript
Events.ScheduleEvent(EVENT_REBUILD_PLATFORM, 1500);
}
break;
- case EVENT_TELEPORT_TO_FROSMOURNE: // Harvest Soul (normal mode)
+ case EVENT_TELEPORT_TO_FROSTMOURNE: // Harvest Soul (normal mode)
if (Creature* terenas = instance->SummonCreature(NPC_TERENAS_MENETHIL_FROSTMOURNE, TerenasSpawn, NULL, 63000))
{
terenas->AI()->DoAction(ACTION_FROSTMOURNE_INTRO);
@@ -1261,6 +1398,9 @@ class instance_icecrown_citadel : public InstanceMapScript
protected:
EventMap Events;
uint64 LadyDeathwisperElevatorGUID;
+ uint64 GunshipGUID;
+ uint64 EnemyGunshipGUID;
+ uint64 GunshipArmoryGUID;
uint64 DeathbringerSaurfangGUID;
uint64 DeathbringerSaurfangDoorGUID;
uint64 DeathbringerSaurfangEventGUID; // Muradin Bronzebeard or High Overlord Saurfang
diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
index 7ae9ce3faa6..1df92618a3a 100644
--- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
+++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
@@ -584,7 +584,7 @@ public:
{
instance->SetBossState(DATA_MALYGOS_EVENT, FAIL);
- SendLightOverride(LIGHT_GET_DEFAULT_FOR_MAP, 1*IN_MILLISECONDS);
+ me->GetMap()->SetZoneOverrideLight(AREA_EYE_OF_ETERNITY, LIGHT_GET_DEFAULT_FOR_MAP, 1*IN_MILLISECONDS);
if (_phase == PHASE_THREE)
me->SetControlled(false, UNIT_STATE_ROOT);
@@ -725,8 +725,8 @@ public:
me->SetDisableGravity(true);
if (Creature* alexstraszaBunny = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ALEXSTRASZA_BUNNY_GUID)))
me->SetFacingToObject(alexstraszaBunny);
- SendLightOverride(LIGHT_ARCANE_RUNES, 5*IN_MILLISECONDS);
- events.ScheduleEvent(EVENT_FLY_OUT_OF_PLATFORM, 18*IN_MILLISECONDS, 0, PHASE_TWO);
+ me->GetMap()->SetZoneOverrideLight(AREA_EYE_OF_ETERNITY, LIGHT_ARCANE_RUNES, 5 * IN_MILLISECONDS);
+ events.ScheduleEvent(EVENT_FLY_OUT_OF_PLATFORM, 18 * IN_MILLISECONDS, 0, PHASE_TWO);
break;
case POINT_SURGE_OF_POWER_P_TWO:
if (!_performingDestroyPlatform)
@@ -737,7 +737,7 @@ public:
}
break;
case POINT_DESTROY_PLATFORM_P_TWO:
- SendLightOverride(LIGHT_OBSCURE_SPACE, 1*IN_MILLISECONDS);
+ me->GetMap()->SetZoneOverrideLight(AREA_EYE_OF_ETERNITY, LIGHT_OBSCURE_SPACE, 1 * IN_MILLISECONDS);
DoCast(me, SPELL_DESTROY_PLATFORM_CHANNEL);
events.ScheduleEvent(EVENT_MOVE_TO_P_THREE_POINT, 11*IN_MILLISECONDS, 0, PHASE_TWO);
break;
@@ -929,7 +929,7 @@ public:
}
break;
case EVENT_LIGHT_DIMENSION_CHANGE:
- SendLightOverride(LIGHT_CHANGE_DIMENSIONS, 2*IN_MILLISECONDS);
+ me->GetMap()->SetZoneOverrideLight(AREA_EYE_OF_ETERNITY, LIGHT_CHANGE_DIMENSIONS, 2 * IN_MILLISECONDS);
break;
case EVENT_DELAY_MOVE_TO_DESTROY_P:
me->GetMotionMaster()->MovePoint(POINT_DESTROY_PLATFORM_P_TWO, MalygosPositions[0]);
@@ -939,7 +939,7 @@ public:
me->GetMotionMaster()->MovePoint(POINT_IDLE_P_THREE, MalygosPositions[4]);
break;
case EVENT_START_P_THREE:
- SendLightOverride(LIGHT_OBSCURE_ARCANE_RUNES, 1*IN_MILLISECONDS);
+ me->GetMap()->SetZoneOverrideLight(AREA_EYE_OF_ETERNITY, LIGHT_OBSCURE_ARCANE_RUNES, 1 * IN_MILLISECONDS);
DoCast(me, SPELL_CLEAR_ALL_DEBUFFS);
DoCast(me, SPELL_IMMUNE_CURSES);
_canAttack = true;
@@ -1026,27 +1026,6 @@ public:
}
}
- // Function that will change lights of map for all players on map.
- void SendLightOverride(uint32 overrideId, uint32 fadeInTime) const
- {
- WorldPacket data(SMSG_OVERRIDE_LIGHT, 12);
- data << uint32(1773); // Light.dbc entry (map default)
- data << uint32(overrideId); // Light.dbc entry (override)
- data << uint32(fadeInTime);
- SendPacketToPlayers(&data);
- }
-
- // Send packet to all players in Eye of Eternity
- void SendPacketToPlayers(WorldPacket const* data) const
- {
- Map::PlayerList const& players = me->GetMap()->GetPlayers();
- if (!players.isEmpty())
- for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
- if (Player* player = itr->GetSource())
- if (player->GetAreaId() == AREA_EYE_OF_ETERNITY)
- player->GetSession()->SendPacket(data);
- }
-
uint8 _phase; // Counter for phases used with a getter.
uint8 _summonDeaths; // Keeps count of arcane trash.
uint8 _preparingPulsesChecker; // In retail they use 2 preparing pulses with 7 sec CD, after they pass 2 seconds.
diff --git a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp
index 2c809b17367..39dec9999cc 100644
--- a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp
@@ -208,9 +208,11 @@ class instance_oculus : public InstanceMapScript
break;
case DATA_VAROS:
if (state == DONE)
+ {
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 0);
if (Creature* urom = instance->GetCreature(UromGUID))
urom->SetPhaseMask(1, true);
+ }
break;
case DATA_UROM:
if (state == DONE)
diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp
index f840c0562b3..f7f473297ef 100644
--- a/src/server/scripts/Northrend/zone_borean_tundra.cpp
+++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp
@@ -44,6 +44,7 @@ EndContentData */
#include "Player.h"
#include "SpellInfo.h"
#include "WorldSession.h"
+#include "SpellScript.h"
/*######
## npc_sinkhole_kill_credit
@@ -2537,6 +2538,39 @@ public:
};
+enum WindsoulTotemAura
+{
+ SPELL_WINDSOUL_CREDT = 46378
+};
+
+class spell_windsoul_totem_aura : public SpellScriptLoader
+{
+public:
+ spell_windsoul_totem_aura() : SpellScriptLoader("spell_windsoul_totem_aura") { }
+
+ class spell_windsoul_totem_aura_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_windsoul_totem_aura_AuraScript);
+
+ void OnRemove(AuraEffect const*, AuraEffectHandleModes)
+ {
+ if (GetTarget()->isDead())
+ if (Unit* caster = GetCaster())
+ caster->CastSpell(NULL, SPELL_WINDSOUL_CREDT);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectRemove += AuraEffectRemoveFn(spell_windsoul_totem_aura_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const OVERRIDE
+ {
+ return new spell_windsoul_totem_aura_AuraScript();
+ }
+};
+
void AddSC_borean_tundra()
{
new npc_sinkhole_kill_credit();
@@ -2565,4 +2599,5 @@ void AddSC_borean_tundra()
new npc_valiance_keep_cannoneer();
new npc_warmage_coldarra();
new npc_hidden_cultist();
+ new spell_windsoul_totem_aura();
}
diff --git a/src/server/scripts/Northrend/zone_dragonblight.cpp b/src/server/scripts/Northrend/zone_dragonblight.cpp
index 7487c3c8828..a9c46d19138 100644
--- a/src/server/scripts/Northrend/zone_dragonblight.cpp
+++ b/src/server/scripts/Northrend/zone_dragonblight.cpp
@@ -654,6 +654,7 @@ class npc_torturer_lecraft : public CreatureScript
{
npc_torturer_lecraftAI(Creature* creature) : ScriptedAI(creature)
{
+ _textCounter = 1;
_playerGUID = 0;
}
diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp
index 1c6ec703f0c..bd80de627a8 100644
--- a/src/server/scripts/Northrend/zone_storm_peaks.cpp
+++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp
@@ -454,6 +454,9 @@ public:
{
npc_brann_bronzebeard_keystoneAI(Creature* creature) : ScriptedAI(creature)
{
+ memset(&objectGUID, 0, sizeof(objectGUID));
+ playerGUID = 0;
+ voiceGUID = 0;
objectCounter = 0;
}
@@ -640,6 +643,7 @@ public:
{
npc_king_jokkum_vehicleAI(Creature* creature) : VehicleAI(creature)
{
+ playerGUID = 0;
pathEnd = false;
}
@@ -788,37 +792,6 @@ class spell_veranus_summon : public SpellScriptLoader
}
};
-/*#####
-# spell_jokkum_eject_all
-#####*/
-
-class spell_jokkum_eject_all : public SpellScriptLoader
-{
- public: spell_jokkum_eject_all() : SpellScriptLoader("spell_jokkum_eject_all") { }
-
- class spell_jokkum_eject_all_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_jokkum_eject_all_SpellScript);
-
- void HandleScriptEffect(SpellEffIndex /* effIndex */)
- {
- if (Unit* caster = GetCaster())
- if (caster->IsVehicle())
- caster->GetVehicleKit()->RemoveAllPassengers();
- }
-
- void Register() OVERRIDE
- {
- OnEffectHitTarget += SpellEffectFn(spell_jokkum_eject_all_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
- }
- };
-
- SpellScript* GetSpellScript() const OVERRIDE
- {
- return new spell_jokkum_eject_all_SpellScript();
- }
-};
-
enum CloseRift
{
SPELL_DESPAWN_RIFT = 61665
@@ -878,6 +851,5 @@ void AddSC_storm_peaks()
new npc_king_jokkum_vehicle();
new spell_jokkum_scriptcast();
new spell_veranus_summon();
- new spell_jokkum_eject_all();
new spell_close_rift();
}
diff --git a/src/server/scripts/Northrend/zone_zuldrak.cpp b/src/server/scripts/Northrend/zone_zuldrak.cpp
index 8f5ae0f65ff..0f542b3aca7 100644
--- a/src/server/scripts/Northrend/zone_zuldrak.cpp
+++ b/src/server/scripts/Northrend/zone_zuldrak.cpp
@@ -453,7 +453,11 @@ public:
struct npc_alchemist_finklesteinAI : public ScriptedAI
{
- npc_alchemist_finklesteinAI(Creature* creature) : ScriptedAI(creature) { }
+ npc_alchemist_finklesteinAI(Creature* creature) : ScriptedAI(creature)
+ {
+ _playerGUID = 0;
+ _getingredienttry = 0;
+ }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
index 5266a7bd137..c9d452bfada 100644
--- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
+++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
@@ -61,7 +61,11 @@ public:
struct npc_stolen_soulAI : public ScriptedAI
{
- npc_stolen_soulAI(Creature* creature) : ScriptedAI(creature) { }
+ npc_stolen_soulAI(Creature* creature) : ScriptedAI(creature)
+ {
+ myClass = CLASS_NONE;
+ Class_Timer = 1000;
+ }
uint8 myClass;
uint32 Class_Timer;
diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
index ca0ea947295..d92d8aaf5db 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp
@@ -295,13 +295,13 @@ public:
Timer = 1000;
if (Phase == 3)
{
- if (!Essence->IsAlive())
+ if (Essence && !Essence->IsAlive())
DoCast(me, 7, true);
else return;
}
else
{
- if (Essence->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
+ if (Essence && Essence->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
{
MergeThreatList(Essence);
Essence->RemoveAllAuras();
@@ -312,31 +312,37 @@ public:
break;
case 4:
Timer = 1500;
- if (Essence->IsWithinDistInMap(me, 10))
+ if (Essence)
{
- Essence->SetUInt32Value(UNIT_NPC_EMOTESTATE, 374); //rotate and disappear
- Timer = 2000;
- me->RemoveAurasDueToSpell(SPELL_SUBMERGE);
- }
- else
- {
- MergeThreatList(Essence);
- Essence->RemoveAllAuras();
- Essence->DeleteThreatList();
- Essence->GetMotionMaster()->MoveFollow(me, 0, 0);
- return;
+ if (Essence->IsWithinDistInMap(me, 10))
+ {
+ Essence->SetUInt32Value(UNIT_NPC_EMOTESTATE, 374); //rotate and disappear
+ Timer = 2000;
+ me->RemoveAurasDueToSpell(SPELL_SUBMERGE);
+ }
+ else
+ {
+ MergeThreatList(Essence);
+ Essence->RemoveAllAuras();
+ Essence->DeleteThreatList();
+ Essence->GetMotionMaster()->MoveFollow(me, 0, 0);
+ return;
+ }
}
break;
case 5:
- if (Phase == 1)
+ if (Essence)
{
- Essence->AI()->Talk(SUFF_SAY_AFTER);
- }
- else
- {
- Essence->AI()->Talk(DESI_SAY_AFTER);
+ if (Phase == 1)
+ {
+ Essence->AI()->Talk(SUFF_SAY_AFTER);
+ }
+ else
+ {
+ Essence->AI()->Talk(DESI_SAY_AFTER);
+ }
+ Essence->DespawnOrUnsummon();
}
- Essence->DespawnOrUnsummon();
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
EssenceGUID = 0;
SoulCount = 0;
diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
index e34e4ebdb23..09eb261282f 100644
--- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp
@@ -48,9 +48,9 @@ enum Spells
enum Events
{
- EVENT_STREAM_OF_MACHINE_FLUID = 0,
- EVENT_JACKHAMMER = 1,
- EVENT_SHADOW_POWER = 2
+ EVENT_STREAM_OF_MACHINE_FLUID = 1,
+ EVENT_JACKHAMMER = 2,
+ EVENT_SHADOW_POWER = 3
};
class boss_gatewatcher_iron_hand : public CreatureScript
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp
index bfc304e6a99..18388341a36 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp
@@ -59,11 +59,16 @@ class boss_dalliah_the_doomsayer : public CreatureScript
struct boss_dalliah_the_doomsayerAI : public BossAI
{
- boss_dalliah_the_doomsayerAI(Creature* creature) : BossAI(creature, DATA_DALLIAH) { }
+ boss_dalliah_the_doomsayerAI(Creature* creature) : BossAI(creature, DATA_DALLIAH)
+ {
+ soccothratesTaunt = false;
+ soccothratesDeath = false;
+ }
void Reset() OVERRIDE
{
_Reset();
+ soccothratesTaunt = false;
soccothratesDeath = false;
}
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp
index 044be4c1534..6c96708c69d 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp
@@ -82,7 +82,12 @@ class boss_wrath_scryer_soccothrates : public CreatureScript
struct boss_wrath_scryer_soccothratesAI : public BossAI
{
- boss_wrath_scryer_soccothratesAI(Creature* creature) : BossAI(creature, DATA_SOCCOTHRATES) { }
+ boss_wrath_scryer_soccothratesAI(Creature* creature) : BossAI(creature, DATA_SOCCOTHRATES)
+ {
+ preFight = false;
+ dalliahTaunt = false;
+ dalliahDeath = false;
+ }
void Reset() OVERRIDE
{
diff --git a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
index 3f1579c42b1..fdeaa1c2520 100644
--- a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
+++ b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
@@ -115,6 +115,7 @@ public:
{
npc_bloodmaul_bruteAI(Creature* creature) : ScriptedAI(creature)
{
+ PlayerGUID = 0;
hp30 = false;
}
diff --git a/src/server/scripts/Outland/zone_netherstorm.cpp b/src/server/scripts/Outland/zone_netherstorm.cpp
index 72e7332381b..8542b32d631 100644
--- a/src/server/scripts/Outland/zone_netherstorm.cpp
+++ b/src/server/scripts/Outland/zone_netherstorm.cpp
@@ -728,7 +728,15 @@ public:
struct npc_phase_hunterAI : public ScriptedAI
{
- npc_phase_hunterAI(Creature* creature) : ScriptedAI(creature) { }
+ npc_phase_hunterAI(Creature* creature) : ScriptedAI(creature)
+ {
+ Weak = false;
+ Materialize = false;
+ Drained = false;
+ WeakPercent = 25;
+ PlayerGUID = 0;
+ ManaBurnTimer = 5000;
+ }
bool Weak;
bool Materialize;
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp
index e8108f03e7d..c100630a452 100644
--- a/src/server/scripts/Spells/spell_dk.cpp
+++ b/src/server/scripts/Spells/spell_dk.cpp
@@ -197,7 +197,7 @@ class spell_dk_anti_magic_zone : public SpellScriptLoader
void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/)
{
- SpellInfo const* talentSpell = sSpellMgr->GetSpellInfo(SPELL_DK_ANTI_MAGIC_SHELL_TALENT);
+ SpellInfo const* talentSpell = sSpellMgr->EnsureSpellInfo(SPELL_DK_ANTI_MAGIC_SHELL_TALENT);
amount = talentSpell->Effects[EFFECT_0].CalcValue(GetCaster());
if (Player* player = GetCaster()->ToPlayer())
amount += int32(2 * player->GetTotalAttackPowerValue(BASE_ATTACK));
@@ -1424,7 +1424,7 @@ class spell_dk_will_of_the_necropolis : public SpellScriptLoader
{
// min pct of hp is stored in effect 0 of talent spell
uint8 rank = GetSpellInfo()->GetRank();
- SpellInfo const* talentProto = sSpellMgr->GetSpellInfo(sSpellMgr->GetSpellWithRank(SPELL_DK_WILL_OF_THE_NECROPOLIS_TALENT_R1, rank));
+ SpellInfo const* talentProto = sSpellMgr->EnsureSpellInfo(sSpellMgr->GetSpellWithRank(SPELL_DK_WILL_OF_THE_NECROPOLIS_TALENT_R1, rank));
int32 remainingHp = int32(GetTarget()->GetHealth() - dmgInfo.GetDamage());
int32 minHp = int32(GetTarget()->CountPctFromMaxHealth(talentProto->Effects[EFFECT_0].CalcValue(GetCaster())));
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 1e9a8713019..68c16a1b2d6 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -36,6 +36,7 @@
#include "SkillDiscovery.h"
#include "SpellScript.h"
#include "SpellAuraEffects.h"
+#include "Vehicle.h"
class spell_gen_absorb0_hitlimit1 : public SpellScriptLoader
{
@@ -1191,7 +1192,7 @@ class spell_gen_defend : public SpellScriptLoader
void Register() OVERRIDE
{
- SpellInfo const* spell = sSpellMgr->GetSpellInfo(m_scriptSpellId);
+ SpellInfo const* spell = sSpellMgr->EnsureSpellInfo(m_scriptSpellId);
// Defend spells cast by NPCs (add visuals)
if (spell->Effects[EFFECT_0].ApplyAuraName == SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN)
@@ -2177,7 +2178,7 @@ class spell_gen_mounted_charge: public SpellScriptLoader
void Register() OVERRIDE
{
- SpellInfo const* spell = sSpellMgr->GetSpellInfo(m_scriptSpellId);
+ SpellInfo const* spell = sSpellMgr->EnsureSpellInfo(m_scriptSpellId);
if (spell->HasEffect(SPELL_EFFECT_SCRIPT_EFFECT))
OnEffectHitTarget += SpellEffectFn(spell_gen_mounted_charge_SpellScript::HandleScriptEffect, EFFECT_FIRST_FOUND, SPELL_EFFECT_SCRIPT_EFFECT);
@@ -3673,6 +3674,33 @@ class spell_gen_whisper_gulch_yogg_saron_whisper : public SpellScriptLoader
}
};
+class spell_gen_eject_all_passengers : public SpellScriptLoader
+{
+ public:
+ spell_gen_eject_all_passengers() : SpellScriptLoader("spell_gen_eject_all_passengers") { }
+
+ class spell_gen_eject_all_passengers_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_gen_eject_all_passengers_SpellScript);
+
+ void RemoveVehicleAuras()
+ {
+ if (Vehicle* vehicle = GetHitUnit()->GetVehicleKit())
+ vehicle->RemoveAllPassengers();
+ }
+
+ void Register() OVERRIDE
+ {
+ AfterHit += SpellHitFn(spell_gen_eject_all_passengers_SpellScript::RemoveVehicleAuras);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_gen_eject_all_passengers_SpellScript();
+ }
+};
+
void AddSC_generic_spell_scripts()
{
new spell_gen_absorb0_hitlimit1();
@@ -3754,4 +3782,5 @@ void AddSC_generic_spell_scripts()
new spell_gen_vendor_bark_trigger();
new spell_gen_wg_water();
new spell_gen_whisper_gulch_yogg_saron_whisper();
+ new spell_gen_eject_all_passengers();
}
diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp
index ba59f701445..5f03c64eaf1 100644
--- a/src/server/scripts/Spells/spell_mage.cpp
+++ b/src/server/scripts/Spells/spell_mage.cpp
@@ -176,7 +176,7 @@ class spell_mage_cold_snap : public SpellScriptLoader
const SpellCooldowns& cm = caster->GetSpellCooldownMap();
for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();)
{
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
+ SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first);
if (spellInfo->SpellFamilyName == SPELLFAMILY_MAGE &&
(spellInfo->GetSchoolMask() & SPELL_SCHOOL_MASK_FROST) &&
@@ -388,7 +388,7 @@ class spell_mage_ignite : public SpellScriptLoader
{
PreventDefaultAction();
- SpellInfo const* igniteDot = sSpellMgr->GetSpellInfo(SPELL_MAGE_IGNITE);
+ SpellInfo const* igniteDot = sSpellMgr->EnsureSpellInfo(SPELL_MAGE_IGNITE);
int32 pct = 8 * GetSpellInfo()->GetRank();
int32 amount = int32(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), pct) / igniteDot->GetMaxTicks());
diff --git a/src/server/scripts/Spells/spell_pet.cpp b/src/server/scripts/Spells/spell_pet.cpp
index a7742630ccd..491bb7100b2 100644
--- a/src/server/scripts/Spells/spell_pet.cpp
+++ b/src/server/scripts/Spells/spell_pet.cpp
@@ -897,7 +897,7 @@ public:
if (itr != pet->ToPet()->m_spells.end()) // If pet has Wild Hunt
{
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
+ SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
AddPct(mod, spellInfo->Effects[EFFECT_0].CalcValue());
}
@@ -940,7 +940,7 @@ public:
if (itr != pet->ToPet()->m_spells.end()) // If pet has Wild Hunt
{
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
+ SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
mod += CalculatePct(1.0f, spellInfo->Effects[EFFECT_1].CalcValue());
}
@@ -970,7 +970,7 @@ public:
if (itr != pet->ToPet()->m_spells.end()) // If pet has Wild Hunt
{
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
+ SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
mod += CalculatePct(1.0f, spellInfo->Effects[EFFECT_1].CalcValue());
}
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp
index 71e5dac28ec..f12a57aa2ec 100644
--- a/src/server/scripts/Spells/spell_priest.cpp
+++ b/src/server/scripts/Spells/spell_priest.cpp
@@ -236,7 +236,7 @@ class spell_pri_glyph_of_prayer_of_healing : public SpellScriptLoader
{
PreventDefaultAction();
- SpellInfo const* triggeredSpellInfo = sSpellMgr->GetSpellInfo(SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL);
+ SpellInfo const* triggeredSpellInfo = sSpellMgr->EnsureSpellInfo(SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL);
int32 heal = int32(CalculatePct(int32(eventInfo.GetHealInfo()->GetHeal()), aurEff->GetAmount()) / triggeredSpellInfo->GetMaxTicks());
GetTarget()->CastCustomSpell(SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL, SPELLVALUE_BASE_POINT0, heal, eventInfo.GetProcTarget(), true, NULL, aurEff);
}
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index cdf32bd94d5..d1b32570795 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -903,7 +903,7 @@ class spell_q12659_ahunaes_knife : public SpellScriptLoader
enum StoppingTheSpread
{
NPC_VILLAGER_KILL_CREDIT = 18240,
- SPELL_FLAMES = 39199,
+ SPELL_FLAMES = 39199
};
class spell_q9874_liquid_fire : public SpellScriptLoader
@@ -926,7 +926,7 @@ class spell_q9874_liquid_fire : public SpellScriptLoader
{
Player* caster = GetCaster()->ToPlayer();
if (Creature* target = GetHitCreature())
- if (target && target->HasAura(SPELL_FLAMES))
+ if (target && !target->HasAura(SPELL_FLAMES))
{
caster->KilledMonsterCredit(NPC_VILLAGER_KILL_CREDIT, 0);
target->CastSpell(target, SPELL_FLAMES, true);
diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp
index d1d43684f3e..4c1a4d096b9 100644
--- a/src/server/scripts/Spells/spell_rogue.cpp
+++ b/src/server/scripts/Spells/spell_rogue.cpp
@@ -428,7 +428,7 @@ class spell_rog_preparation : public SpellScriptLoader
const SpellCooldowns& cm = caster->GetSpellCooldownMap();
for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();)
{
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
+ SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first);
if (spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE)
{
diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp
index 36e63b5a94e..0e3ada5d119 100644
--- a/src/server/scripts/Spells/spell_warlock.cpp
+++ b/src/server/scripts/Spells/spell_warlock.cpp
@@ -270,7 +270,7 @@ class spell_warl_demonic_circle_summon : public SpellScriptLoader
// WARLOCK_DEMONIC_CIRCLE_ALLOW_CAST; allowing him to cast the WARLOCK_DEMONIC_CIRCLE_TELEPORT.
// If not in range remove the WARLOCK_DEMONIC_CIRCLE_ALLOW_CAST.
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_WARLOCK_DEMONIC_CIRCLE_TELEPORT);
+ SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(SPELL_WARLOCK_DEMONIC_CIRCLE_TELEPORT);
if (GetTarget()->IsWithinDist(circle, spellInfo->GetMaxRange(true)))
{
@@ -353,6 +353,7 @@ class spell_warl_demonic_empowerment : public SpellScriptLoader
if (targetCreature->IsPet())
{
CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate(targetCreature->GetEntry());
+ ASSERT(ci);
switch (ci->family)
{
case CREATURE_FAMILY_SUCCUBUS:
@@ -360,7 +361,7 @@ class spell_warl_demonic_empowerment : public SpellScriptLoader
break;
case CREATURE_FAMILY_VOIDWALKER:
{
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_WARLOCK_DEMONIC_EMPOWERMENT_VOIDWALKER);
+ SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(SPELL_WARLOCK_DEMONIC_EMPOWERMENT_VOIDWALKER);
int32 hp = int32(targetCreature->CountPctFromMaxHealth(GetCaster()->CalculateSpellDamage(targetCreature, spellInfo, 0)));
targetCreature->CastCustomSpell(targetCreature, SPELL_WARLOCK_DEMONIC_EMPOWERMENT_VOIDWALKER, &hp, NULL, NULL, true);
//unitTarget->CastSpell(unitTarget, 54441, true);
diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp
index 5a655a92996..d0ba39e8b09 100644
--- a/src/server/scripts/Spells/spell_warrior.cpp
+++ b/src/server/scripts/Spells/spell_warrior.cpp
@@ -273,7 +273,7 @@ class spell_warr_deep_wounds : public SpellScriptLoader
damage = target->SpellDamageBonusTaken(caster, GetSpellInfo(), damage, SPELL_DIRECT_DAMAGE);
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_WARRIOR_DEEP_WOUNDS_RANK_PERIODIC);
+ SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(SPELL_WARRIOR_DEEP_WOUNDS_RANK_PERIODIC);
uint32 ticks = spellInfo->GetDuration() / spellInfo->Effects[EFFECT_0].Amplitude;
// Add remaining ticks to damage done
diff --git a/src/server/shared/Common.h b/src/server/shared/Common.h
index 5dea589da25..fb153f2ba3e 100644
--- a/src/server/shared/Common.h
+++ b/src/server/shared/Common.h
@@ -71,12 +71,6 @@
#include <signal.h>
#include <assert.h>
-#if PLATFORM == PLATFORM_WINDOWS
-#define STRCASECMP stricmp
-#else
-#define STRCASECMP strcasecmp
-#endif
-
#include <set>
#include <list>
#include <string>
@@ -114,8 +108,6 @@
#include <float.h>
-#define I32FMT "%08I32X"
-#define I64FMT "%016I64X"
#define snprintf _snprintf
#define atoll _atoi64
#define vsnprintf _vsnprintf
@@ -126,8 +118,6 @@
#define stricmp strcasecmp
#define strnicmp strncasecmp
-#define I32FMT "%08X"
-#define I64FMT "%016llX"
#endif
diff --git a/src/server/shared/Database/AdhocStatement.cpp b/src/server/shared/Database/AdhocStatement.cpp
index 15732f20849..896fefde5b7 100644
--- a/src/server/shared/Database/AdhocStatement.cpp
+++ b/src/server/shared/Database/AdhocStatement.cpp
@@ -42,13 +42,13 @@ bool BasicStatementTask::Execute()
if (m_has_result)
{
ResultSet* result = m_conn->Query(m_sql);
- if (!result || !result->GetRowCount())
+ if (!result || !result->GetRowCount() || !result->NextRow())
{
delete result;
m_result.set(QueryResult(NULL));
return false;
}
- result->NextRow();
+
m_result.set(QueryResult(result));
return true;
}
diff --git a/src/server/shared/Database/DatabaseWorkerPool.h b/src/server/shared/Database/DatabaseWorkerPool.h
index 6c2e961d2ad..e2ebda9e8ae 100644
--- a/src/server/shared/Database/DatabaseWorkerPool.h
+++ b/src/server/shared/Database/DatabaseWorkerPool.h
@@ -232,13 +232,12 @@ class DatabaseWorkerPool
ResultSet* result = conn->Query(sql);
conn->Unlock();
- if (!result || !result->GetRowCount())
+ if (!result || !result->GetRowCount() || !result->NextRow())
{
delete result;
return QueryResult(NULL);
}
- result->NextRow();
return QueryResult(result);
}
diff --git a/src/server/shared/Database/QueryHolder.cpp b/src/server/shared/Database/QueryHolder.cpp
index 0c80f70acd2..7b4105ee076 100644
--- a/src/server/shared/Database/QueryHolder.cpp
+++ b/src/server/shared/Database/QueryHolder.cpp
@@ -89,10 +89,9 @@ QueryResult SQLQueryHolder::GetResult(size_t index)
if (index < m_queries.size())
{
ResultSet* result = m_queries[index].second.qresult;
- if (!result || !result->GetRowCount())
+ if (!result || !result->GetRowCount() || !result->NextRow())
return QueryResult(NULL);
- result->NextRow();
return QueryResult(result);
}
else
diff --git a/src/server/shared/Dynamic/LinkedList.h b/src/server/shared/Dynamic/LinkedList.h
index 72d035c2cb6..402aaf3d40c 100644
--- a/src/server/shared/Dynamic/LinkedList.h
+++ b/src/server/shared/Dynamic/LinkedList.h
@@ -33,8 +33,8 @@ class LinkedListElement
LinkedListElement* iNext;
LinkedListElement* iPrev;
public:
- LinkedListElement(): iNext(NULL), iPrev(NULL) { }
- ~LinkedListElement() { delink(); }
+ LinkedListElement() : iNext(NULL), iPrev(NULL) { }
+ virtual ~LinkedListElement() { delink(); }
bool hasNext() const { return(iNext && iNext->iNext != NULL); }
bool hasPrev() const { return(iPrev && iPrev->iPrev != NULL); }
@@ -73,6 +73,10 @@ class LinkedListElement
iNext->iPrev = pElem;
iNext = pElem;
}
+
+ private:
+ LinkedListElement(LinkedListElement const&);
+ LinkedListElement& operator=(LinkedListElement const&);
};
//============================================
@@ -83,6 +87,7 @@ class LinkedListHead
LinkedListElement iFirst;
LinkedListElement iLast;
uint32 iSize;
+
public:
LinkedListHead(): iSize(0)
{
@@ -92,6 +97,8 @@ class LinkedListHead
iLast.iPrev = &iFirst;
}
+ virtual ~LinkedListHead() { }
+
bool isEmpty() const { return(!iFirst.iNext->isInList()); }
LinkedListElement * getFirst() { return(isEmpty() ? NULL : iFirst.iNext); }
@@ -239,6 +246,10 @@ class LinkedListHead
};
typedef Iterator<LinkedListElement> iterator;
+
+ private:
+ LinkedListHead(LinkedListHead const&);
+ LinkedListHead& operator=(LinkedListHead const&);
};
//============================================
diff --git a/src/server/shared/Dynamic/LinkedReference/Reference.h b/src/server/shared/Dynamic/LinkedReference/Reference.h
index 1ba41f1f454..83a1dd155b1 100644
--- a/src/server/shared/Dynamic/LinkedReference/Reference.h
+++ b/src/server/shared/Dynamic/LinkedReference/Reference.h
@@ -94,6 +94,10 @@ template <class TO, class FROM> class Reference : public LinkedListElement
TO* getTarget() const { return iRefTo; }
FROM* GetSource() const { return iRefFrom; }
+
+ private:
+ Reference(Reference const&);
+ Reference& operator=(Reference const&);
};
//=====================================================
diff --git a/src/server/shared/Logging/AppenderFile.cpp b/src/server/shared/Logging/AppenderFile.cpp
index a88188266e2..f2532ad8bb8 100644
--- a/src/server/shared/Logging/AppenderFile.cpp
+++ b/src/server/shared/Logging/AppenderFile.cpp
@@ -16,6 +16,7 @@
*/
#include "AppenderFile.h"
+#include "Common.h"
#if PLATFORM == PLATFORM_WINDOWS
# include <Windows.h>
@@ -80,6 +81,7 @@ FILE* AppenderFile::OpenFile(std::string const &filename, std::string const &mod
std::string newName(fullName);
newName.push_back('.');
newName.append(LogMessage::getTimeStr(time(NULL)));
+ std::replace(newName.begin(), newName.end(), ':', '-');
rename(fullName.c_str(), newName.c_str()); // no error handling... if we couldn't make a backup, just ignore
}
diff --git a/src/tools/vmap4_extractor/mpq_libmpq04.h b/src/tools/vmap4_extractor/mpq_libmpq04.h
index d045abe307a..46cb50fb003 100644
--- a/src/tools/vmap4_extractor/mpq_libmpq04.h
+++ b/src/tools/vmap4_extractor/mpq_libmpq04.h
@@ -36,7 +36,7 @@ public:
mpq_archive_s *mpq_a;
MPQArchive(const char* filename);
- void close();
+ ~MPQArchive() { close(); }
void GetFileListTo(vector<string>& filelist) {
uint32_t filenum;
@@ -65,6 +65,9 @@ public:
delete[] buffer;
}
+
+private:
+ void close();
};
typedef std::deque<MPQArchive*> ArchiveSet;